mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
clone space options expandable
This commit is contained in:
parent
c235fb569e
commit
63b24aed3f
3 changed files with 638 additions and 625 deletions
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
|
|||
copyDocument: false,
|
||||
clonedSpace: { id: "" },
|
||||
showSpace: false,
|
||||
showClone: false,
|
||||
|
||||
didReceiveAttrs() {
|
||||
let folders = this.get('folders');
|
||||
|
@ -61,6 +62,10 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
|
|||
},
|
||||
|
||||
actions: {
|
||||
onToggleCloneOptions() {
|
||||
this.set('showClone', !this.get('showClone'));
|
||||
},
|
||||
|
||||
onToggleNewSpace() {
|
||||
let val = !this.get('showSpace');
|
||||
this.set('showSpace', val);
|
||||
|
|
|
@ -13,12 +13,20 @@
|
|||
<label>New Space</label>
|
||||
<div class="tip">Every space contains related documents</div>
|
||||
{{input type='text' id="new-folder-name" class="mousetrap" value=newFolder}}
|
||||
<p class="margin-top-30">Optionally, clone existing space</p>
|
||||
{{ui-select id="owners-dropdown" content=folders prompt="select space" action=(action 'onCloneSpaceSelect') optionValuePath="id" optionLabelPath="name" selection=cloneSpace}}
|
||||
<div class="margin-top-20" />
|
||||
{{#ui/ui-checkbox selected=copyTemplate}}Templates{{/ui/ui-checkbox}}
|
||||
{{#ui/ui-checkbox selected=copyPermission}}Permissions{{/ui/ui-checkbox}}
|
||||
{{#ui/ui-checkbox selected=copyDocument}}Documents{{/ui/ui-checkbox}}
|
||||
{{#unless showClone}}
|
||||
<div class="margin-top-30">
|
||||
<a {{action "onToggleCloneOptions"}} >Clone existing space →</a>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="margin-top-30">
|
||||
<p>Clone existing space</p>
|
||||
{{ui-select id="owners-dropdown" content=folders prompt="select space" action=(action 'onCloneSpaceSelect') optionValuePath="id" optionLabelPath="name" selection=cloneSpace}}
|
||||
<div class="margin-top-20" />
|
||||
{{#ui/ui-checkbox selected=copyTemplate}}Templates{{/ui/ui-checkbox}}
|
||||
{{#ui/ui-checkbox selected=copyPermission}}Permissions{{/ui/ui-checkbox}}
|
||||
{{#ui/ui-checkbox selected=copyDocument}}Documents{{/ui/ui-checkbox}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
<div class="regular-button button-blue" {{action "onAdd"}}>Add</div>
|
||||
<div class="flat-button flat-gray" {{action "onToggleNewSpace"}}>Cancel</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue