mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 15:04:07 +01:00
UI for rules list
This commit is contained in:
parent
d5870472fb
commit
f63482b587
19 changed files with 256 additions and 2 deletions
|
|
@ -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'}}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ BlazeComponent.extendComponent({
|
|||
evt.preventDefault();
|
||||
Utils.goBoardId(Session.get('currentBoard'));
|
||||
}
|
||||
console.log(evt)
|
||||
|
||||
},
|
||||
|
||||
cardIsSelected() {
|
||||
|
|
|
|||
27
client/components/rules/rules.jade
Normal file
27
client/components/rules/rules.jade
Normal file
|
|
@ -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)
|
||||
|
||||
|
||||
25
client/components/rules/rules.js
Normal file
25
client/components/rules/rules.js
Normal file
|
|
@ -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');
|
||||
34
client/components/rules/rules.styl
Normal file
34
client/components/rules/rules.styl
Normal file
|
|
@ -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
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue