mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +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,
|
copyDocument: false,
|
||||||
clonedSpace: { id: "" },
|
clonedSpace: { id: "" },
|
||||||
showSpace: false,
|
showSpace: false,
|
||||||
|
showClone: false,
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
let folders = this.get('folders');
|
let folders = this.get('folders');
|
||||||
|
@ -61,6 +62,10 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
onToggleCloneOptions() {
|
||||||
|
this.set('showClone', !this.get('showClone'));
|
||||||
|
},
|
||||||
|
|
||||||
onToggleNewSpace() {
|
onToggleNewSpace() {
|
||||||
let val = !this.get('showSpace');
|
let val = !this.get('showSpace');
|
||||||
this.set('showSpace', val);
|
this.set('showSpace', val);
|
||||||
|
|
|
@ -13,12 +13,20 @@
|
||||||
<label>New Space</label>
|
<label>New Space</label>
|
||||||
<div class="tip">Every space contains related documents</div>
|
<div class="tip">Every space contains related documents</div>
|
||||||
{{input type='text' id="new-folder-name" class="mousetrap" value=newFolder}}
|
{{input type='text' id="new-folder-name" class="mousetrap" value=newFolder}}
|
||||||
<p class="margin-top-30">Optionally, clone existing space</p>
|
{{#unless showClone}}
|
||||||
{{ui-select id="owners-dropdown" content=folders prompt="select space" action=(action 'onCloneSpaceSelect') optionValuePath="id" optionLabelPath="name" selection=cloneSpace}}
|
<div class="margin-top-30">
|
||||||
<div class="margin-top-20" />
|
<a {{action "onToggleCloneOptions"}} >Clone existing space →</a>
|
||||||
{{#ui/ui-checkbox selected=copyTemplate}}Templates{{/ui/ui-checkbox}}
|
</div>
|
||||||
{{#ui/ui-checkbox selected=copyPermission}}Permissions{{/ui/ui-checkbox}}
|
{{else}}
|
||||||
{{#ui/ui-checkbox selected=copyDocument}}Documents{{/ui/ui-checkbox}}
|
<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>
|
||||||
<div class="regular-button button-blue" {{action "onAdd"}}>Add</div>
|
<div class="regular-button button-blue" {{action "onAdd"}}>Add</div>
|
||||||
<div class="flat-button flat-gray" {{action "onToggleNewSpace"}}>Cancel</div>
|
<div class="flat-button flat-gray" {{action "onToggleNewSpace"}}>Cancel</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue