summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardBody.js7
-rw-r--r--client/components/cards/cardDetails.js20
-rwxr-xr-xclient/components/main/editor.js5
-rw-r--r--client/components/rules/ruleDetails.jade4
-rw-r--r--client/components/rules/ruleDetails.js8
-rw-r--r--client/components/rules/rules.styl11
-rw-r--r--client/components/rules/rulesActions.jade6
-rw-r--r--client/components/rules/rulesActions.js8
-rw-r--r--client/components/rules/rulesMain.js19
-rw-r--r--client/components/rules/rulesTriggers.jade6
-rw-r--r--client/components/rules/rulesTriggers.js6
11 files changed, 83 insertions, 17 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index b68c9b12..ccbd0f23 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -147,6 +147,13 @@ BlazeComponent.extendComponent({
});
},
+ scrollTop(position = 0) {
+ const swimlanes = this.$('.js-swimlanes');
+ swimlanes && swimlanes.animate({
+ scrollTop: position,
+ });
+ },
+
}).register('boardBody');
BlazeComponent.extendComponent({
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 2cd399c1..da0f126a 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -69,6 +69,20 @@ BlazeComponent.extendComponent({
if (offset) {
bodyBoardComponent.scrollLeft(cardContainerScroll + offset);
}
+
+ //Scroll top
+ const cardViewStartTop = $cardView.offset().top;
+ const cardContainerScrollTop = $cardContainer.scrollTop();
+ let topOffset = false;
+ if(cardViewStartTop < 0){
+ topOffset = 0;
+ } else if(cardViewStartTop - cardContainerScrollTop > 100) {
+ topOffset = cardViewStartTop - cardContainerScrollTop - 100;
+ }
+ if(topOffset !== false) {
+ bodyBoardComponent.scrollTop(topOffset);
+ }
+
},
presentParentTask() {
@@ -96,7 +110,11 @@ BlazeComponent.extendComponent({
},
onRendered() {
- if (!Utils.isMiniScreen()) this.scrollParentContainer();
+ if (!Utils.isMiniScreen()) {
+ Meteor.setTimeout(() => {
+ this.scrollParentContainer();
+ }, 500);
+ }
const $checklistsDom = this.$('.card-checklist-items');
$checklistsDom.sortable({
diff --git a/client/components/main/editor.js b/client/components/main/editor.js
index 888fbe00..20ece562 100755
--- a/client/components/main/editor.js
+++ b/client/components/main/editor.js
@@ -38,7 +38,10 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
const view = this;
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const knowedUsers = currentBoard.members.map((member) => {
- member.username = Users.findOne(member.userId).username;
+ const u = Users.findOne(member.userId);
+ if(u){
+ member.username = u.username;
+ }
return member;
});
const mentionRegex = /\B@([\w.]*)/gi;
diff --git a/client/components/rules/ruleDetails.jade b/client/components/rules/ruleDetails.jade
index b9a1351c..1f351357 100644
--- a/client/components/rules/ruleDetails.jade
+++ b/client/components/rules/ruleDetails.jade
@@ -14,5 +14,9 @@ template(name="ruleDetails")
div.trigger-content
div.trigger-text
= action
+ div.rules-back
+ button.js-goback
+ i.fa.fa-chevron-left
+ | {{{_ 'r-back'}}}
\ No newline at end of file
diff --git a/client/components/rules/ruleDetails.js b/client/components/rules/ruleDetails.js
index 386b2b48..17c86dc3 100644
--- a/client/components/rules/ruleDetails.js
+++ b/client/components/rules/ruleDetails.js
@@ -14,7 +14,9 @@ BlazeComponent.extendComponent({
const trigger = Triggers.findOne({
_id: rule.triggerId,
});
- return trigger.description();
+ const desc = trigger.description();
+ const upperdesc = desc.charAt(0).toUpperCase() + desc.substr(1);
+ return upperdesc;
},
action() {
const ruleId = this.data().ruleId;
@@ -24,7 +26,9 @@ BlazeComponent.extendComponent({
const action = Actions.findOne({
_id: rule.actionId,
});
- return action.description();
+ const desc = action.description();
+ const upperdesc = desc.charAt(0).toUpperCase() + desc.substr(1);
+ return upperdesc;
},
events() {
diff --git a/client/components/rules/rules.styl b/client/components/rules/rules.styl
index 45ce4003..b52f84a7 100644
--- a/client/components/rules/rules.styl
+++ b/client/components/rules/rules.styl
@@ -32,6 +32,17 @@
display: inline-block
float: right
margin: auto
+.rules-back
+ display: block
+ overflow: auto
+ margin-top: 15px
+ margin-bottom: 5px
+ button
+ display: inline-block
+ float: right
+ margin: auto
+ margin-right:14px
+
.flex
display: -webkit-box
display: -moz-box
diff --git a/client/components/rules/rulesActions.jade b/client/components/rules/rulesActions.jade
index 8dfceeeb..4bcff769 100644
--- a/client/components/rules/rulesActions.jade
+++ b/client/components/rules/rulesActions.jade
@@ -22,4 +22,8 @@ template(name="rulesActions")
else if ($eq currentActions.get 'checklist')
+checklistActions(ruleName=data.ruleName triggerVar=data.triggerVar)
else if ($eq currentActions.get 'mail')
- +mailActions(ruleName=data.ruleName triggerVar=data.triggerVar) \ No newline at end of file
+ +mailActions(ruleName=data.ruleName triggerVar=data.triggerVar)
+ div.rules-back
+ button.js-goback
+ i.fa.fa-chevron-left
+ | {{{_ 'r-back'}}} \ No newline at end of file
diff --git a/client/components/rules/rulesActions.js b/client/components/rules/rulesActions.js
index ecba857b..64a5c70e 100644
--- a/client/components/rules/rulesActions.js
+++ b/client/components/rules/rulesActions.js
@@ -41,16 +41,16 @@ BlazeComponent.extendComponent({
},
events() {
return [{
- 'click .js-set-board-actions' (event) {
+ 'click .js-set-board-actions'(){
this.setBoardActions();
},
- 'click .js-set-card-actions' (event) {
+ 'click .js-set-card-actions'() {
this.setCardActions();
},
- 'click .js-set-mail-actions' (event) {
+ 'click .js-set-mail-actions'() {
this.setMailActions();
},
- 'click .js-set-checklist-actions' (event) {
+ 'click .js-set-checklist-actions'() {
this.setChecklistActions();
},
}];
diff --git a/client/components/rules/rulesMain.js b/client/components/rules/rulesMain.js
index 65cc3d98..0752a541 100644
--- a/client/components/rules/rulesMain.js
+++ b/client/components/rules/rulesMain.js
@@ -24,7 +24,7 @@ BlazeComponent.extendComponent({
events() {
return [{
- 'click .js-delete-rule' (event) {
+ 'click .js-delete-rule' () {
const rule = this.currentData();
Rules.remove(rule._id);
Actions.remove(rule.actionId);
@@ -34,9 +34,11 @@ BlazeComponent.extendComponent({
'click .js-goto-trigger' (event) {
event.preventDefault();
const ruleTitle = this.find('#ruleTitle').value;
- this.find('#ruleTitle').value = '';
- this.ruleName.set(ruleTitle);
- this.setTrigger();
+ if(ruleTitle !== undefined && ruleTitle !== ''){
+ this.find('#ruleTitle').value = '';
+ this.ruleName.set(ruleTitle);
+ this.setTrigger();
+ }
},
'click .js-goto-action' (event) {
event.preventDefault();
@@ -46,6 +48,15 @@ BlazeComponent.extendComponent({
event.preventDefault();
this.setRulesList();
},
+ 'click .js-goback' (event) {
+ event.preventDefault();
+ if(this.rulesCurrentTab.get() === 'trigger' || this.rulesCurrentTab.get() === 'ruleDetails' ){
+ this.setRulesList();
+ }
+ if(this.rulesCurrentTab.get() === 'action'){
+ this.setTrigger();
+ }
+ },
'click .js-goto-details' (event) {
event.preventDefault();
const rule = this.currentData();
diff --git a/client/components/rules/rulesTriggers.jade b/client/components/rules/rulesTriggers.jade
index 0ef5edfa..01c0cad5 100644
--- a/client/components/rules/rulesTriggers.jade
+++ b/client/components/rules/rulesTriggers.jade
@@ -18,4 +18,8 @@ template(name="rulesTriggers")
else if showCardTrigger.get
+cardTriggers
else if showChecklistTrigger.get
- +checklistTriggers \ No newline at end of file
+ +checklistTriggers
+ div.rules-back
+ button.js-goback
+ i.fa.fa-chevron-left
+ | {{{_ 'r-back'}}} \ No newline at end of file
diff --git a/client/components/rules/rulesTriggers.js b/client/components/rules/rulesTriggers.js
index 506e63b2..e3c16221 100644
--- a/client/components/rules/rulesTriggers.js
+++ b/client/components/rules/rulesTriggers.js
@@ -39,13 +39,13 @@ BlazeComponent.extendComponent({
},
events() {
return [{
- 'click .js-set-board-triggers' (event) {
+ 'click .js-set-board-triggers' () {
this.setBoardTriggers();
},
- 'click .js-set-card-triggers' (event) {
+ 'click .js-set-card-triggers' () {
this.setCardTriggers();
},
- 'click .js-set-checklist-triggers' (event) {
+ 'click .js-set-checklist-triggers' () {
this.setChecklistTriggers();
},
}];