mirror of
https://github.com/documize/community.git
synced 2025-08-02 12:05:23 +02:00
[WIP] Upgrade EmberJS -- lint pass!
This commit is contained in:
parent
c7808d0b5a
commit
adbd00bdd7
95 changed files with 645 additions and 645 deletions
|
@ -3,7 +3,7 @@
|
|||
{{#each documents key="id" as |document|}}
|
||||
<li class="document {{if document.selected "selected"}}" id="document-{{document.id}}">
|
||||
|
||||
{{#link-to 'document.index' space.id space.slug document.id document.slug}}
|
||||
{{#link-to "document.index" space.id space.slug document.id document.slug}}
|
||||
<div class="title">{{ document.name }}</div>
|
||||
<div class="snippet">{{ document.excerpt }}</div>
|
||||
{{folder/document-tags documentTags=document.tags}}
|
||||
|
@ -13,7 +13,7 @@
|
|||
{{/link-to}}
|
||||
|
||||
{{#if hasDocumentActions}}
|
||||
<div class="checkbox" {{action 'selectDocument' document.id}}>
|
||||
<div class="checkbox" {{action "selectDocument" document.id}}>
|
||||
{{#if document.selected}}
|
||||
<i class="material-icons">check_box</i>
|
||||
{{else}}
|
||||
|
@ -22,20 +22,20 @@
|
|||
</div>
|
||||
{{#if document.selected}}
|
||||
<div class="actions">
|
||||
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action 'onExport'}}>
|
||||
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action "onExport"}}>
|
||||
<i class="material-icons">import_export</i>
|
||||
{{#attach-tooltip showDelay=1000}}Export as HTML{{/attach-tooltip}}
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{#if permissions.documentMove}}
|
||||
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action 'onShowMoveDocuments'}}>
|
||||
<div class="move-documents-button button-icon-green button-icon-small align-middle" {{action "onShowMoveDocuments"}}>
|
||||
<i class="material-icons">compare_arrows</i>
|
||||
{{#attach-tooltip showDelay=1000}}Move{{/attach-tooltip}}
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
{{/if}}
|
||||
{{#if permissions.documentDelete}}
|
||||
<div class="delete-documents-button button-icon-red button-icon-small align-middle" {{action 'onShowDeleteDocuments'}}>
|
||||
<div class="delete-documents-button button-icon-red button-icon-small align-middle" {{action "onShowDeleteDocuments"}}>
|
||||
{{#attach-tooltip showDelay=1000}}Delete{{/attach-tooltip}}
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
|
@ -49,15 +49,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{{#ui/ui-dialog title="Delete Documents" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteDialog onAction=(action
|
||||
'onDeleteDocuments')}}
|
||||
{{#ui/ui-dialog title="Delete Documents" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteDialog onAction=(action "onDeleteDocuments")}}
|
||||
<p>Are you sure you want to delete {{selectedDocuments.length}} {{selectedCaption}}?</p>
|
||||
{{/ui/ui-dialog}}
|
||||
|
||||
{{#ui/ui-dialog title="Move Documents" confirmCaption="Move" buttonType="btn-success" show=showMoveDialog onAction=(action
|
||||
'onMoveDocuments')}}
|
||||
{{#ui/ui-dialog title="Move Documents" confirmCaption="Move" buttonType="btn-success" show=showMoveDialog onAction=(action "onMoveDocuments")}}
|
||||
<p>Select space for {{selectedDocuments.length}} {{selectedCaption}}</p>
|
||||
{{ui/ui-list-picker items=moveOptions nameField='name' singleSelect=true}}
|
||||
{{ui/ui-list-picker items=moveOptions nameField="name" singleSelect=true}}
|
||||
{{/ui/ui-dialog}}
|
||||
|
||||
{{#if showAdd}}
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
<div class="mb-5">
|
||||
<h1>{{block.title}}</h1>
|
||||
<p>{{block.excerpt}}</p>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action 'onEdit' block.id}}>Edit</button>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action "onEdit" block.id}}>Edit</button>
|
||||
<div class="button-gap" />
|
||||
<button type="button" class="btn btn-outline-danger" onclick={{action 'onShowDeleteDialog' block.id}}>Delete</button>
|
||||
<button type="button" class="btn btn-outline-danger" onclick={{action "onShowDeleteDialog" block.id}}>Delete</button>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{#if isSpaceAdmin}}
|
||||
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteDialog onAction=(action 'onDeleteBlock')}}
|
||||
{{#ui/ui-dialog title="Delete Content Block" confirmCaption="Delete" buttonType="btn-danger" show=showDeleteDialog onAction=(action "onDeleteBlock")}}
|
||||
<p>Are you sure you want to delete this re-usable content block?</p>
|
||||
{{/ui/ui-dialog}}
|
||||
{{/if}}
|
|
@ -1,11 +1,11 @@
|
|||
<div class="content-zone">
|
||||
|
||||
<div class="explainer-header explainer-gap">Categories</div>
|
||||
<form class="form-inline" onsubmit={{action 'onAdd'}}>
|
||||
<form class="form-inline" onsubmit={{action "onAdd"}}>
|
||||
<div class="form-group mr-3">
|
||||
{{focus-input id="new-category-name" type='text' class="form-control mousetrap" placeholder="Category name" value=newCategory}}
|
||||
{{focus-input id="new-category-name" type="text" class="form-control mousetrap" placeholder="Category name" value=newCategory}}
|
||||
</div>
|
||||
<button type="button" class="btn btn-success font-weight-bold" onclick={{action 'onAdd'}}>Add</button>
|
||||
<button type="button" class="btn btn-success font-weight-bold" onclick={{action "onAdd"}}>Add</button>
|
||||
</form>
|
||||
|
||||
<div class="space-admin">
|
||||
|
@ -13,34 +13,34 @@
|
|||
{{#each category as |cat|}}
|
||||
<div class="item row">
|
||||
{{#if cat.editMode}}
|
||||
<form onsubmit={{action 'onSave' cat.id bubbles=false}} class="col-8">
|
||||
{{focus-input id=(concat 'edit-category-' cat.id) type="text" value=cat.category class="form-control"}}
|
||||
<form onsubmit={{action "onSave" cat.id bubbles=false}} class="col-8">
|
||||
{{focus-input id=(concat "edit-category-" cat.id) type="text" value=cat.category class="form-control"}}
|
||||
</form>
|
||||
{{else}}
|
||||
<div class="category col-8">
|
||||
<div class="name">{{cat.category}}</div>
|
||||
<div class="info">
|
||||
{{cat.documents}} {{if (eq cat.documents 1) 'document' 'documents' }} · {{cat.users}} users/groups
|
||||
{{cat.documents}} {{if (eq cat.documents 1) "document" "documents" }} · {{cat.users}} users/groups
|
||||
{{#unless cat.access}}<span class="text-danger">(you have no view permission)</span>{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="col-4 buttons text-right">
|
||||
{{#if cat.editMode}}
|
||||
<button type="button" class="btn btn-outline-secondary" {{action 'onEditCancel' cat.id}}>Cancel</button>
|
||||
<button type="button" class="btn btn-success" {{action 'onSave' cat.id}}>Save</button>
|
||||
<button type="button" class="btn btn-outline-secondary" {{action "onEditCancel" cat.id}}>Cancel</button>
|
||||
<button type="button" class="btn btn-success" {{action "onSave" cat.id}}>Save</button>
|
||||
{{else}}
|
||||
<div id="category-access-button-{{cat.id}}" class="button-icon-gray align-middle" {{action 'onShowAccessPicker' cat.id}}>
|
||||
<div id="category-access-button-{{cat.id}}" class="button-icon-gray align-middle" {{action "onShowAccessPicker" cat.id}}>
|
||||
{{#attach-tooltip showDelay=1000}}Category view permission{{/attach-tooltip}}
|
||||
<i class="material-icons">security</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div class="button-icon-gray align-middle" {{action 'onEdit' cat.id}} >
|
||||
<div class="button-icon-gray align-middle" {{action "onEdit" cat.id}} >
|
||||
{{#attach-tooltip showDelay=1000}}Rename{{/attach-tooltip}}
|
||||
<i class="material-icons">edit</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="{{concat 'delete-category-' cat.id}}" class="button-icon-danger align-middle" {{action 'onShowDelete' cat.id}}>
|
||||
<div id={{concat "delete-category-" cat.id}} class="button-icon-danger align-middle" {{action "onShowDelete" cat.id}}>
|
||||
{{#attach-tooltip showDelay=1000}}Delete{{/attach-tooltip}}
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
|
@ -62,19 +62,19 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action 'onDelete'}}>Delete</button>
|
||||
<button type="button" class="btn btn-danger" onclick={{action "onDelete"}}>Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#ui/ui-dialog title="Set Category Access" confirmCaption="Save" buttonType="btn-success" show=showCategoryAccess onAction=(action 'onGrantAccess')}}
|
||||
{{#ui/ui-dialog title="Set Category Access" confirmCaption="Save" buttonType="btn-success" show=showCategoryAccess onAction=(action "onGrantAccess")}}
|
||||
<p>Select who can view documents within category</p>
|
||||
|
||||
<div class="widget-list-picker">
|
||||
<ul class="options">
|
||||
{{#each categoryPermissions as |permission|}}
|
||||
<li class="option {{if permission.selected 'selected'}}" {{action 'onToggle' permission}}>
|
||||
<li class="option {{if permission.selected "selected"}}" {{action "onToggle" permission}}>
|
||||
<div class="text text-truncate">
|
||||
{{#if (eq permission.who "role")}}
|
||||
<span class="button-icon-gray button-icon-small align-middle">
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
<small class="form-text text-muted">This will delete all documents and templates within this space!</small>
|
||||
</div>
|
||||
</form>
|
||||
<button type="button" class="btn btn-danger mt-3" onclick={{action 'onDelete'}}>Delete Space</button>
|
||||
<button type="button" class="btn btn-danger mt-3" onclick={{action "onDelete"}}>Delete Space</button>
|
||||
</div>
|
||||
|
|
|
@ -3,29 +3,29 @@
|
|||
<form>
|
||||
<div class="form-group">
|
||||
<label>Space Name</label>
|
||||
{{focus-input id="space-name" type="text" value=spaceName class=(if hasNameError 'form-control is-invalid' 'form-control') placeholder="Space name" autocomplete="off"}}
|
||||
{{focus-input id="space-name" type="text" value=spaceName class=(if hasNameError "form-control is-invalid" "form-control") placeholder="Space name" autocomplete="off"}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Space Type</label>
|
||||
{{ui-select id="spacetypes-dropdown" content=spaceTypeOptions optionValuePath="id" optionLabelPath="label" selection=spaceType action=(action 'onSetSpaceType')}}
|
||||
{{ui-select id="spacetypes-dropdown" content=spaceTypeOptions optionValuePath="id" optionLabelPath="label" selection=spaceType action=(action "onSetSpaceType")}}
|
||||
<small class="form-text text-muted">Who can see this space?</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Content Liking</label>
|
||||
{{#if allowLikes}}
|
||||
{{input type='text' id="space-likes-prompt" class="form-control" placeholder="Enter prompt asking for user feedback" value=likes}}
|
||||
{{input type="text" id="space-likes-prompt" class="form-control" placeholder="Enter prompt asking for user feedback" value=likes}}
|
||||
<small class="form-text text-muted">Specify the prompt, e.g. Did this help you? Was this helpful? Did you find what you needed?</small>
|
||||
<div class="mt-4">
|
||||
<button type="button" class="btn btn-outline-danger" onclick={{action 'onSetLikes' false}}>Do not allow users to like content</button>
|
||||
<button type="button" class="btn btn-outline-danger" onclick={{action "onSetLikes" false}}>Do not allow users to like content</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action 'onSetLikes' true}}>Allow users to like content</button>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action "onSetLikes" true}}>Allow users to like content</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</form>
|
||||
<button type="button" class="btn btn-success mt-3" onclick={{action 'onSave'}}>Save</button>
|
||||
<button type="button" class="btn btn-success mt-3" onclick={{action "onSave"}}>Save</button>
|
||||
</div>
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
<div class="container-fluid my-3">
|
||||
<div class="row justify-content-center">
|
||||
<button type="button" class="btn btn-info font-weight-bold text-uppercase my-3" onclick={{action 'onShowAddModal'}}>Add existing users</button>
|
||||
<button type="button" class="btn btn-info font-weight-bold text-uppercase my-3" onclick={{action "onShowAddModal"}}>Add existing users</button>
|
||||
|
||||
<button type="button" class="btn btn-info font-weight-bold text-uppercase my-3" onclick={{action 'onShowInviteModal'}}>Invite new users</button>
|
||||
<button type="button" class="btn btn-info font-weight-bold text-uppercase my-3" onclick={{action "onShowInviteModal"}}>Invite new users</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -39,10 +39,10 @@
|
|||
<tr>
|
||||
<td class="no-wrap no-width">
|
||||
<i class="material-icons align-top text-secondary cursor-pointer">more_vert</i>
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn='clickout' showOn='click' isShown=false}}
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn="clickout" showOn="click" isShown=false}}
|
||||
<div class="menu">
|
||||
<a class="item" href="#" {{action 'onBulkPermission' permission true}}>Grant all</a>
|
||||
<a class="item" href="#" {{action 'onBulkPermission' permission false}}>Revoke all</a>
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission true}}>Grant all</a>
|
||||
<a class="item" href="#" {{action "onBulkPermission" permission false}}>Revoke all</a>
|
||||
</div>
|
||||
{{/attach-popover}}
|
||||
{{#if (eq permission.who "role")}}
|
||||
|
@ -88,7 +88,7 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-success font-weight-bold text-uppercase my-3" onclick={{action 'onSave'}}>SAVE</button>
|
||||
<button type="button" class="btn btn-success font-weight-bold text-uppercase my-3" onclick={{action "onSave"}}>SAVE</button>
|
||||
|
||||
<div class="row my-3">
|
||||
<div class="col-12 col-md-6">
|
||||
|
@ -124,12 +124,12 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">Add User To Space</div>
|
||||
<div class="modal-body">
|
||||
{{input id="user-search" type="text" class="form-control mousetrap" placeholder="Search for users by firstname, lastname, email" value=searchText key-up=(action 'onSearch')}}
|
||||
{{input id="user-search" type="text" class="form-control mousetrap" placeholder="Search for users by firstname, lastname, email" value=searchText key-up=(action "onSearch")}}
|
||||
{{#each filteredUsers as |user|}}
|
||||
<div class="row my-3">
|
||||
<div class="col-10">{{user.fullname}}</div>
|
||||
<div class="col-2 text-right">
|
||||
<button class="btn btn-success" {{action 'onAdd' user}}>Add</button>
|
||||
<button class="btn btn-success" {{action "onAdd" user}}>Add</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
@ -147,10 +147,10 @@
|
|||
<div class="modal-header">Invite Users to Space</div>
|
||||
<div class="modal-body">
|
||||
<p>Email invite leads to a smooth onboarding process</p>
|
||||
<form onsubmit={{action 'onSpaceInvite'}}>
|
||||
<form onsubmit={{action "onSpaceInvite"}}>
|
||||
<div class="form-group">
|
||||
<label for="space-invite-email">Email</label>
|
||||
{{input id="space-invite-email" type='email' class="form-control mousetrap" placeholder="Enter email" value=inviteEmail}}
|
||||
{{input id="space-invite-email" type="email" class="form-control mousetrap" placeholder="Enter email" value=inviteEmail}}
|
||||
<small class="form-text text-muted">Comma separate multiple email addresses</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -161,7 +161,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-success" onclick={{action 'onSpaceInvite'}}>Invite</button>
|
||||
<button type="button" class="btn btn-success" onclick={{action "onSpaceInvite"}}>Invite</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="mb-5">
|
||||
<h1>{{item.title}}</h1>
|
||||
<p>{{item.description}}</p>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action 'onOpenTemplate' item.id}}>Open</button>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action "onOpenTemplate" item.id}}>Open</button>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
|
@ -1,10 +1,10 @@
|
|||
<div class="view-space">
|
||||
<div class="filter-caption mt-4">{{documents.length}} documents</div>
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
<li class="tab tab-vertical {{if spaceSelected 'selected'}}" {{action 'onDocumentFilter' 'space' space.id}}>All ({{documents.length}})</li>
|
||||
<li class="tab tab-vertical {{if spaceSelected "selected"}}" {{action "onDocumentFilter" "space" space.id}}>All ({{documents.length}})</li>
|
||||
{{#if hasCategories}}
|
||||
{{#if (gt rootDocCount 0)}}
|
||||
<li class="tab tab-vertical text-truncate {{if uncategorizedSelected 'selected'}}" {{action 'onDocumentFilter' 'uncategorized' space.id}}>Uncategorized ({{rootDocCount}})</li>
|
||||
<li class="tab tab-vertical text-truncate {{if uncategorizedSelected "selected"}}" {{action "onDocumentFilter" "uncategorized" space.id}}>Uncategorized ({{rootDocCount}})</li>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
@ -22,14 +22,14 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
{{#each categories as |cat index|}}
|
||||
<li class="tab tab-vertical text-truncate {{if cat.selected 'selected'}}" {{action 'onDocumentFilter' 'category' cat.id}}>{{cat.category}} ({{cat.docCount}})</li>
|
||||
{{#each categories as |cat|}}
|
||||
<li class="tab tab-vertical text-truncate {{if cat.selected "selected"}}" {{action "onDocumentFilter" "category" cat.id}}>{{cat.category}} ({{cat.docCount}})</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
{{#if spaceSettings}}
|
||||
<div class="text-center {{if (gt categories.length 0) 'mt-4'}}">
|
||||
{{#link-to 'folder.settings' space.id space.slug (query-params tab="categories") class="btn btn-secondary font-weight-bold"}}{{categoryLinkName}}{{/link-to}}
|
||||
<div class="text-center {{if (gt categories.length 0) "mt-4"}}">
|
||||
{{#link-to "folder.settings" space.id space.slug (query-params tab="categories") class="btn btn-secondary font-weight-bold"}}{{categoryLinkName}}{{/link-to}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue