summaryrefslogtreecommitdiffstats
path: root/client/components/rules/rulesActions.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/rules/rulesActions.js')
-rw-r--r--client/components/rules/rulesActions.js69
1 files changed, 37 insertions, 32 deletions
diff --git a/client/components/rules/rulesActions.js b/client/components/rules/rulesActions.js
index 297fc806..bf8d222d 100644
--- a/client/components/rules/rulesActions.js
+++ b/client/components/rules/rulesActions.js
@@ -1,34 +1,36 @@
BlazeComponent.extendComponent({
onCreated() {
- this.showBoardActions = new ReactiveVar(true);
- this.showCardActions = new ReactiveVar(false);
- this.showChecklistAction = new ReactiveVar(false);
+ this.currentActions = new ReactiveVar("board");
},
- setBoardTriggers(){
- this.showBoardActions.set(true);
- this.showCardActions.set(false);
- this.showChecklistActionsr.set(false);
- $('.js-set-card-triggers').removeClass('active');
- $('.js-set-board-triggers').addClass('active');
- $('.js-set-checklist-triggers').removeClass('active');
- },
- setCardTriggers(){
- this.showBoardActions.set(false);
- this.showCardActions.set(true);
- this.showChecklistActions.set(false);
- $('.js-set-card-triggers').addClass('active');
- $('.js-set-board-triggers').removeClass('active');
- $('.js-set-checklist-triggers').removeClass('active');
- },
- setChecklistTriggers(){
- this.showBoardActions.set(false);
- this.showCardActions.set(false);
- this.showChecklistActions.set(true);
- $('.js-set-card-triggers').removeClass('active');
- $('.js-set-board-triggers').removeClass('active');
- $('.js-set-checklist-triggers').addClass('active');
+ setBoardActions(){
+ this.currentActions.set("board");
+ $('.js-set-card-actions').removeClass('active');
+ $('.js-set-board-actions').addClass('active');
+ $('.js-set-checklist-actions').removeClass('active');
+ $('.js-set-mail-actions').removeClass('active');
+ },
+ setCardActions(){
+ this.currentActions.set("card");
+ $('.js-set-card-actions').addClass('active');
+ $('.js-set-board-actions').removeClass('active');
+ $('.js-set-checklist-actions').removeClass('active');
+ $('.js-set-mail-actions').removeClass('active');
+ },
+ setChecklistActions(){
+ this.currentActions.set("checklist");
+ $('.js-set-card-actions').removeClass('active');
+ $('.js-set-board-actions').removeClass('active');
+ $('.js-set-checklist-actions').addClass('active');
+ $('.js-set-mail-actions').removeClass('active');
+ },
+ setMailActions(){
+ this.currentActions.set("mail");
+ $('.js-set-card-actions').removeClass('active');
+ $('.js-set-board-actions').removeClass('active');
+ $('.js-set-checklist-actions').removeClass('active');
+ $('.js-set-mail-actions').addClass('active');
},
rules() {
@@ -39,14 +41,17 @@ BlazeComponent.extendComponent({
console.log(this.data());
},
events() {
- return [{'click .js-set-board-triggers'(event) {
- this.setBoardTriggers();
+ return [{'click .js-set-board-actions'(event) {
+ this.setBoardActions();
+ },
+ 'click .js-set-card-actions'(event) {
+ this.setCardActions();
},
- 'click .js-set-card-triggers'(event) {
- this.setCardTriggers();
+ 'click .js-set-mail-actions'(event) {
+ this.setMailActions();
},
- 'click .js-set-checklist-triggers'(event) {
- this.setChecklistTriggers();
+ 'click .js-set-checklist-actions'(event) {
+ this.setChecklistActions();
},}];
},
}).register('rulesActions'); \ No newline at end of file