summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-14 17:39:37 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-14 17:39:37 +0200
commit25da8376ca2ee3b7bedadf924557d4d7bb6c6771 (patch)
treea96f00a3a050ea90385e6cd56cf15516cf4e437e /client/lib
parent30a3daa6af179009ac17b40a71bf3f9e9b1d698a (diff)
downloadwekan-25da8376ca2ee3b7bedadf924557d4d7bb6c6771.tar.gz
wekan-25da8376ca2ee3b7bedadf924557d4d7bb6c6771.tar.bz2
wekan-25da8376ca2ee3b7bedadf924557d4d7bb6c6771.zip
Beautyfied
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/utils.js52
1 files changed, 26 insertions, 26 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js
index e6dc7d85..44ca3a4a 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -39,15 +39,15 @@ Utils = {
if (!prevData && !nextData) {
base = 0;
increment = 1;
- // 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
- } else if (!nextData) {
- base = prevData.sort + 1;
- increment = 1;
- }
+ // 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
+ } else if (!nextData) {
+ base = prevData.sort + 1;
+ increment = 1;
+ }
// In the general case take the average of the previous and next element
// sort indexes.
else {
@@ -71,15 +71,15 @@ Utils = {
if (!prevCardDomElement && !nextCardDomElement) {
base = 0;
increment = 1;
- // 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
- } else if (!nextCardDomElement) {
- base = Blaze.getData(prevCardDomElement).sort + 1;
- increment = 1;
- }
+ // 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
+ } else if (!nextCardDomElement) {
+ base = Blaze.getData(prevCardDomElement).sort + 1;
+ increment = 1;
+ }
// In the general case take the average of the previous and next element
// sort indexes.
else {
@@ -121,7 +121,7 @@ Utils = {
return Math.sqrt(
Math.pow(touchA.screenX - touchB.screenX, 2) +
Math.pow(touchA.screenY - touchB.screenY, 2)
- );
+ );
},
enableClickOnTouch(selector) {
@@ -145,21 +145,21 @@ Utils = {
});
},
- getTriggerActionDesc(event,tempInstance){
+ 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++){
+ for (let i = 0; i < triggerEls.length; i++) {
const element = tempInstance.$(triggerEls[i]);
- if(element.hasClass("trigger-text")){
+ if (element.hasClass("trigger-text")) {
finalString += element.text().toLowerCase();
- }else if(element.find("select").length > 0){
+ } else if (element.find("select").length > 0) {
finalString += element.find("select option:selected").text().toLowerCase();
- }else if(element.find("input").length > 0){
+ } else if (element.find("input").length > 0) {
finalString += element.find("input").val();
}
// Add space
- if(i != length - 1){
+ if (i != length - 1) {
finalString += " ";
}
}
@@ -171,4 +171,4 @@ Utils = {
// resized. This is used to reactively re-calculate the popup position in case
// of a window resize. This is the equivalent of a "Signal" in some other
// programming environments (eg, elm).
-$(window).on('resize', () => Utils.windowResizeDep.changed());
+$(window).on('resize', () => Utils.windowResizeDep.changed()); \ No newline at end of file