summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardHeader.jade9
-rw-r--r--client/components/boards/boardHeader.js3
-rw-r--r--client/components/lists/listBody.js2
-rw-r--r--client/components/rules/rules.jade27
-rw-r--r--client/components/rules/rules.js25
-rw-r--r--client/components/rules/rules.styl34
6 files changed, 100 insertions, 0 deletions
diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade
index 1c6c8f8c..5116de28 100644
--- a/client/components/boards/boardHeader.jade
+++ b/client/components/boards/boardHeader.jade
@@ -88,6 +88,10 @@ template(name="boardHeaderBar")
a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
i.fa.fa-times-thin
+ a.board-header-btn.js-open-rules-view(title="{{_ 'rules'}}")
+ i.fa.fa-cutlery
+ span {{_ 'rules'}}
+
a.board-header-btn.js-open-search-view(title="{{_ 'search'}}")
i.fa.fa-search
span {{_ 'search'}}
@@ -290,6 +294,11 @@ template(name="boardChangeTitlePopup")
textarea.js-board-desc= description
input.primary.wide(type="submit" value="{{_ 'rename'}}")
+template(name="boardCreateRulePopup")
+ p {{_ 'close-board-pop'}}
+ button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
+
+
template(name="archiveBoardPopup")
p {{_ 'close-board-pop'}}
button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js
index 2dfd58c1..bf36da7d 100644
--- a/client/components/boards/boardHeader.js
+++ b/client/components/boards/boardHeader.js
@@ -108,6 +108,9 @@ BlazeComponent.extendComponent({
'click .js-open-search-view'() {
Sidebar.setView('search');
},
+ 'click .js-open-rules-view'() {
+ Modal.open('rules');
+ },
'click .js-multiselection-activate'() {
const currentCard = Session.get('currentCard');
MultiSelection.activate();
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 0a10f7d5..b93b7e67 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -95,6 +95,8 @@ BlazeComponent.extendComponent({
evt.preventDefault();
Utils.goBoardId(Session.get('currentBoard'));
}
+ console.log(evt)
+
},
cardIsSelected() {
diff --git a/client/components/rules/rules.jade b/client/components/rules/rules.jade
new file mode 100644
index 00000000..8f482b06
--- /dev/null
+++ b/client/components/rules/rules.jade
@@ -0,0 +1,27 @@
+template(name="rules")
+ .rules
+ h2
+ i.fa.fa-cutlery
+ | Project rules
+
+ ul.rules-lists
+ each triggers
+ li.rules-lists-item
+ p
+ = toId
+ div.rules-btns-group
+ button
+ i.fa.fa-eye
+ | View rule
+ button
+ i.fa.fa-trash-o
+ | Delete rule
+ else
+ li.no-items-message No rules
+ div.rules-add
+ button
+ i.fa.fa-plus
+ | Add rule
+ input(type=text)
+
+
diff --git a/client/components/rules/rules.js b/client/components/rules/rules.js
new file mode 100644
index 00000000..e679431a
--- /dev/null
+++ b/client/components/rules/rules.js
@@ -0,0 +1,25 @@
+
+BlazeComponent.extendComponent({
+ onCreated() {
+ this.subscribe('allTriggers');
+ },
+
+ triggers() {
+ return Triggers.find({});
+ },
+ events() {
+ return [{'click .js-add-trigger'(event) {
+
+ event.preventDefault();
+ const toName = this.find('#toName').value;
+ const fromName = this.find('#fromName').value;
+ const toId = Triggers.findOne().findList(toName)._id;
+ const fromId = Triggers.findOne().findList(fromName)._id;
+ console.log(toId);
+ console.log(fromId);
+ Triggers.insert({group: "cards", activityType: "moveCard","fromId":fromId,"toId":toId });
+
+
+ },}];
+ },
+}).register('rules');
diff --git a/client/components/rules/rules.styl b/client/components/rules/rules.styl
new file mode 100644
index 00000000..2aab1b40
--- /dev/null
+++ b/client/components/rules/rules.styl
@@ -0,0 +1,34 @@
+.rules-list
+ overflow-y: scroll
+.rules-lists-item
+ display: block
+ position: relative
+ overflow: auto
+ p
+ display: inline-block
+ float: left
+ margin: revert
+
+.rules-btns-group
+ position: absolute
+ right: 0
+ top: 50%
+ transform: translateY(-50%)
+ button
+ margin: auto
+.rules-add
+ display: block
+ overflow: auto
+ margin-top: 25px
+ margin-bottom: 5px
+ input
+ display: inline-block
+ float: right
+ margin: auto
+ margin-right: 10px
+ button
+ display: inline-block
+ float: right
+ margin: auto
+
+ \ No newline at end of file