mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Beautyfied
This commit is contained in:
parent
30a3daa6af
commit
25da8376ca
15 changed files with 715 additions and 461 deletions
|
|
@ -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());
|
||||
Loading…
Add table
Add a link
Reference in a new issue