mirror of
https://github.com/wekan/wekan.git
synced 2026-03-11 08:02:33 +01:00
Merge branch 'feature-rules' of https://github.com/Angtrim/wekan into Angtrim-feature-rules
This commit is contained in:
commit
6673b79738
60 changed files with 3074 additions and 259 deletions
|
|
@ -4,6 +4,7 @@ window.Modal = new class {
|
|||
constructor() {
|
||||
this._currentModal = new ReactiveVar(closedValue);
|
||||
this._onCloseGoTo = '';
|
||||
this._isWideModal = false;
|
||||
}
|
||||
|
||||
getHeaderName() {
|
||||
|
|
@ -20,6 +21,10 @@ window.Modal = new class {
|
|||
return this.getTemplateName() !== closedValue;
|
||||
}
|
||||
|
||||
isWide(){
|
||||
return this._isWideModal;
|
||||
}
|
||||
|
||||
close() {
|
||||
this._currentModal.set(closedValue);
|
||||
if (this._onCloseGoTo) {
|
||||
|
|
@ -27,9 +32,16 @@ window.Modal = new class {
|
|||
}
|
||||
}
|
||||
|
||||
openWide(modalName, { header = '', onCloseGoTo = ''} = {}) {
|
||||
this._currentModal.set({ header, modalName });
|
||||
this._onCloseGoTo = onCloseGoTo;
|
||||
this._isWideModal = true;
|
||||
}
|
||||
|
||||
open(modalName, { header = '', onCloseGoTo = ''} = {}) {
|
||||
this._currentModal.set({ header, modalName });
|
||||
this._onCloseGoTo = onCloseGoTo;
|
||||
|
||||
}
|
||||
}();
|
||||
|
||||
|
|
@ -38,5 +50,5 @@ Blaze.registerHelper('Modal', Modal);
|
|||
EscapeActions.register('modalWindow',
|
||||
() => Modal.close(),
|
||||
() => Modal.isOpen(),
|
||||
{ noClickEscapeOn: '.modal-content' }
|
||||
{ noClickEscapeOn: '.modal-container' }
|
||||
);
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ window.Popup = new class {
|
|||
// our internal dependency, and since we just changed the top element of
|
||||
// our internal stack, the popup will be updated with the new data.
|
||||
if (!self.isOpen()) {
|
||||
console.log(self.template)
|
||||
self.current = Blaze.renderWithData(self.template, () => {
|
||||
self._dep.depend();
|
||||
return { ...self._getTopStack(), stack: self._stack };
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ Utils = {
|
|||
if (!prevData && !nextData) {
|
||||
base = 0;
|
||||
increment = 1;
|
||||
// If we drop the card in the first position
|
||||
// If we drop the card in the first position
|
||||
} else if (!prevData) {
|
||||
base = nextData.sort - 1;
|
||||
increment = -1;
|
||||
// If we drop the card in the last position
|
||||
// If we drop the card in the last position
|
||||
} else if (!nextData) {
|
||||
base = prevData.sort + 1;
|
||||
increment = 1;
|
||||
|
|
@ -71,11 +71,11 @@ Utils = {
|
|||
if (!prevCardDomElement && !nextCardDomElement) {
|
||||
base = 0;
|
||||
increment = 1;
|
||||
// If we drop the card in the first position
|
||||
// If we drop the card in the first position
|
||||
} else if (!prevCardDomElement) {
|
||||
base = Blaze.getData(nextCardDomElement).sort - 1;
|
||||
increment = -1;
|
||||
// If we drop the card in the last position
|
||||
// If we drop the card in the last position
|
||||
} else if (!nextCardDomElement) {
|
||||
base = Blaze.getData(prevCardDomElement).sort + 1;
|
||||
increment = 1;
|
||||
|
|
@ -145,6 +145,7 @@ Utils = {
|
|||
});
|
||||
},
|
||||
|
||||
<<<<<<< HEAD
|
||||
setMatomo(data){
|
||||
window._paq = window._paq || [];
|
||||
window._paq.push(['setDoNotTrack', data.doNotTrack]);
|
||||
|
|
@ -188,6 +189,26 @@ Utils = {
|
|||
} else if (matomo) {
|
||||
window._paq.push(['trackPageView']);
|
||||
}
|
||||
|
||||
getTriggerActionDesc(event, tempInstance) {
|
||||
const jqueryEl = tempInstance.$(event.currentTarget.parentNode);
|
||||
const triggerEls = jqueryEl.find(".trigger-content").children();
|
||||
let finalString = "";
|
||||
for (let i = 0; i < triggerEls.length; i++) {
|
||||
const element = tempInstance.$(triggerEls[i]);
|
||||
if (element.hasClass("trigger-text")) {
|
||||
finalString += element.text().toLowerCase();
|
||||
} else if (element.find("select").length > 0) {
|
||||
finalString += element.find("select option:selected").text().toLowerCase();
|
||||
} else if (element.find("input").length > 0) {
|
||||
finalString += element.find("input").val();
|
||||
}
|
||||
// Add space
|
||||
if (i != length - 1) {
|
||||
finalString += " ";
|
||||
}
|
||||
}
|
||||
return finalString;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue