1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-05 05:25:27 +02:00

Introduce modular UI framework

1. Modals wrapped
2. Toolbar icon actions: click and link-to navigation
3. Moved components into sub-folders
4. Replaced Bootstrap Tooltip and Dropdown libs with Ember specific add-ons

And more.

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
Co-Authored-By: McMatts <matt@documize.com>
This commit is contained in:
Harvey Kandola 2018-12-11 18:00:08 +00:00
parent f140e7ef77
commit 6eb68f84e0
48 changed files with 330 additions and 240 deletions

View file

@ -2,12 +2,26 @@
{{/layout/master-sidebar}}
{{#layout/master-content}}
<div class="grid-container-8-2">
<div class="grid-cell-1">
{{layout/page-heading title=appMeta.title}}
{{layout/page-desc desc=appMeta.message}}
</div>
<div class="grid-cell-2">
{{#if (or session.isEditor session.isAdmin)}}
{{#ui/ui-toolbar dark=false light=true raised=true large=true bordered=true}}
{{#if session.isEditor}}
{{ui/ui-toolbar-icon icon=constants.Icon.Plus color=constants.Color.Green tooltip="New space" onClick=(action "onShowModal")}}
{{/if}}
{{#if session.isAdmin}}
{{ui/ui-toolbar-icon icon=constants.Icon.Settings tooltip="Settings" linkTo="customize.general"}}
{{/if}}
{{/ui/ui-toolbar}}
{{/if}}
</div>
</div>
<h1>{{appMeta.title}}</h1>
<p>{{appMeta.message}}</p>
{{#if session.isEditor}}
<button type="button" class="btn btn-success font-weight-bold my-3" {{action "onShowModal"}}>+ SPACE</button>
{{/if}}
{{spaces/space-list spaces=model}}
<div class="modal" tabindex="-1" role="dialog" id="add-space-modal">
@ -19,11 +33,11 @@
<div class="form-group">
<label for="new-space-name">Space Name</label>
{{input type="text" id="new-space-name" class="form-control mousetrap" placeholder="Space name" value=spaceName}}
<small id="emailHelp" class="form-text text-muted">Characters and numbers only</small>
<small class="form-text text-muted">Characters and numbers only</small>
</div>
<div class="form-group">
<label for="clone-space-dropdown">Clone Space</label>
{{ui-select id="clone-space-dropdown" content=model prompt="select space" action=(action "onCloneSpaceSelect") optionValuePath="id" optionLabelPath="name" selection=clonedSpace}}
{{ui/ui-select id="clone-space-dropdown" content=model prompt="select space" action=(action "onCloneSpaceSelect") optionValuePath="id" optionLabelPath="name" selection=clonedSpace}}
<small id="emailHelp" class="form-text text-muted">Copy templates, permissions, documents from existing space</small>
<div class="margin-top-10" />
{{#if hasClone}}
@ -35,11 +49,11 @@
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" onclick={{action "onAddSpace"}}>Add</button>
{{ui/ui-button color=constants.Color.Gray light=true label=constants.Label.Cancel dismiss=true}}
{{ui/ui-button-gap}}
{{ui/ui-button color=constants.Color.Green light=true label=constants.Label.Add onClick=(action "onAddSpace")}}
</div>
</div>
</div>
</div>
{{/layout/master-content}}