mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
select which boards and date since, individual board not working yet
This commit is contained in:
parent
16bf5237b9
commit
1e37c68d99
7 changed files with 166 additions and 87 deletions
|
@ -50,7 +50,8 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
|||
token: "",
|
||||
user: null,
|
||||
board: null,
|
||||
lists: []
|
||||
lists: [],
|
||||
boards: []
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -101,6 +102,12 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
|||
|
||||
this.set('noBoards', false);
|
||||
|
||||
if (is.undefined(self.get('initDateTimePicker'))) {
|
||||
$.datetimepicker.setLocale('en');
|
||||
$('#trello-since').datetimepicker();
|
||||
self.set('initDateTimePicker', "Done");
|
||||
}
|
||||
|
||||
if (is.null(board) || is.undefined(board)) {
|
||||
if (boards.length) {
|
||||
board = boards[0];
|
||||
|
@ -150,6 +157,15 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
|||
}
|
||||
},
|
||||
|
||||
onBoardCheckbox(id) {
|
||||
let boards = this.get('config.boards');
|
||||
let board = boards.findBy('id', id);
|
||||
|
||||
if (board !== null) {
|
||||
Ember.set(board, 'included', !board.included);
|
||||
}
|
||||
},
|
||||
|
||||
auth() {
|
||||
if (this.get('appKey') === "") {
|
||||
$("#trello-appkey").addClass('error').focus();
|
||||
|
|
|
@ -3,45 +3,71 @@
|
|||
isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
|
||||
{{#if authenticated}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
<div class="input-form">
|
||||
<div class="heading">
|
||||
<div class="title">Select Board & Lists</div>
|
||||
<div class="tip">Choose lists to include from board</div>
|
||||
{{#if noBoards}}
|
||||
<div class="input-control">
|
||||
<div class="color-error">You have no team boards to share - personal boards are never shown.</div>
|
||||
</div>
|
||||
{{#if noBoards}}
|
||||
<div class="input-control">
|
||||
<div class="color-error">You have no team boards to share - personal boards are never shown.</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="input-control">
|
||||
<label>Board</label>
|
||||
<div class="tip">Select board</div>
|
||||
{{ui-select id="boards-dropdown" content=boards action=(action 'onBoardChange') optionValuePath="id" optionLabelPath="name" selection=config.board}}
|
||||
{{else}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
<div class="input-form">
|
||||
<div class="heading">
|
||||
<div class="title">Select Board & Lists</div>
|
||||
<div class="tip">Choose lists to include from board</div>
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Lists</label>
|
||||
<div class="tip">Select lists to include</div>
|
||||
<div class="section-trello-board" style= {{boardStyle}}>
|
||||
<div class="section-trello-board-title">{{config.board.name}}</div>
|
||||
{{#each config.lists as |list|}}
|
||||
<div class="section-trello-list" {{action 'onListCheckbox' list.id}}>
|
||||
{{#if list.included}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box</i>
|
||||
{{else}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box_outline_blank</i>
|
||||
{{/if}}
|
||||
<span class="trello-list-title">{{list.name}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="clearfix" />
|
||||
<label>Show summary from (default 7 days ago)</label>
|
||||
{{input id="trello-since" value=config.since type="text" }}<br>
|
||||
</div>
|
||||
|
||||
<div class="input-control">
|
||||
<label>Select which boards you want to see</label>
|
||||
<div class="tip">All boards are selectd by default</div>
|
||||
<div class="github-board">
|
||||
{{#each config.boards as |board|}}
|
||||
<div class="github-list" {{action 'onBoardCheckbox' board.id}}>
|
||||
{{#if board.included}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box</i>
|
||||
{{else}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
||||
{{/if}}
|
||||
<span style="background-color: {{board.prefs.backgroundColor}}">{{board.name}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right width-50">
|
||||
<div class="input-form">
|
||||
<div class="input-control">
|
||||
<label>Individual Board</label>
|
||||
<div class="tip">Select board</div>
|
||||
{{ui-select id="boards-dropdown" content=boards action=(action 'onBoardChange') optionValuePath="id" optionLabelPath="name" selection=config.board}}
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Lists</label>
|
||||
<div class="tip">Select lists to include</div>
|
||||
<div class="section-trello-board" style= {{boardStyle}}>
|
||||
<div class="section-trello-board-title">{{config.board.name}}</div>
|
||||
{{#each config.lists as |list|}}
|
||||
<div class="section-trello-list" {{action 'onListCheckbox' list.id}}>
|
||||
{{#if list.included}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box</i>
|
||||
{{else}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray section-trello-list-checkbox">check_box_outline_blank</i>
|
||||
{{/if}}
|
||||
<span class="trello-list-title">{{list.name}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue