summaryrefslogtreecommitdiffstats
path: root/client/lib/utils.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-09-16 00:10:40 +0300
committerLauri Ojansivu <x@xet7.org>2018-09-16 00:10:40 +0300
commit6673b79738720651f186039808d4e22ef14e4c3c (patch)
tree464eb186f382f14b93c9c9ca7b21a14851746770 /client/lib/utils.js
parent053757f135b54241b4899a83cd3bb749b1e81bc9 (diff)
parent36c04edb9f7cf16fb450b76598c4957968d4674b (diff)
downloadwekan-6673b79738720651f186039808d4e22ef14e4c3c.tar.gz
wekan-6673b79738720651f186039808d4e22ef14e4c3c.tar.bz2
wekan-6673b79738720651f186039808d4e22ef14e4c3c.zip
Merge branch 'feature-rules' of https://github.com/Angtrim/wekan into Angtrim-feature-rules
Diffstat (limited to 'client/lib/utils.js')
-rw-r--r--client/lib/utils.js29
1 files changed, 25 insertions, 4 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js
index 5349e500..a15dac39 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -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;
},
};