mirror of
https://github.com/documize/community.git
synced 2025-08-02 03:55:24 +02:00
Replace Bootstrap tooltips/popovers/dropdowns
With Ember Attacher component. This commit removes redundant BS code. Co-Authored-By: McMatts <matt@documize.com>
This commit is contained in:
parent
f05a6fc999
commit
75a19a80f9
44 changed files with 160 additions and 353 deletions
|
@ -38,7 +38,8 @@
|
|||
{{#if hasBlocks}}
|
||||
<ul class="block-list">
|
||||
{{#each blocks as |block|}}
|
||||
<li class="item" title="{{block.firstname}} {{block.lastname}}, {{time-ago block.created}}, used: {{ block.used }}" data-toggle="tooltip" data-placement="top">
|
||||
<li class="item">
|
||||
{{#attach-tooltip showDelay=1000}}Published by {{block.firstname}} {{block.lastname}}, {{time-ago block.created}} — used {{ block.used }} times{{/attach-tooltip}}
|
||||
<div class="details" {{action 'onInsertBlock' block}}>
|
||||
<div class="title text-truncate">{{block.title}}</div>
|
||||
<div class="desc text-truncate">{{block.excerpt}}</div>
|
||||
|
|
|
@ -22,15 +22,17 @@
|
|||
<div class="d-sm-inline-block margin-left-20" />
|
||||
|
||||
{{#each selectedCategories as |cat|}}
|
||||
<div class="document-category {{if isSpaceAdmin 'cursor-pointer'}}" data-toggle="tooltip" data-placement="top" title="Category" {{action 'onEditCategory'}}>
|
||||
<div class="document-category {{if isSpaceAdmin 'cursor-pointer'}}" {{action 'onEditCategory'}}>
|
||||
{{cat.category}}
|
||||
{{#attach-tooltip showDelay=1000}}Category{{/attach-tooltip}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<div class="d-block d-sm-none margin-top-20" />
|
||||
|
||||
{{#each tagz as |t index|}}
|
||||
<div class="document-tag {{if isSpaceAdmin 'cursor-pointer'}}" data-toggle="tooltip" data-placement="top" title="Tag" {{action 'onEditCategory'}}>
|
||||
<div class="document-tag {{if isSpaceAdmin 'cursor-pointer'}}" {{action 'onEditCategory'}}>
|
||||
{{#attach-tooltip showDelay=1000}}Tag{{/attach-tooltip}}
|
||||
{{concat '#' t}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div id="sidebar" class="sidebar-white document-sidebar">
|
||||
|
||||
<div class="sidebar-view-switcher d-flex align-items-center justify-content-center">
|
||||
<i class="material-icons" title="Table of contents" data-toggle="tooltip" data-placement="top">reorder</i>
|
||||
<i class="material-icons">reorder</i>
|
||||
</div>
|
||||
|
||||
<div id="doc-toc" class="document-toc">
|
||||
|
@ -34,11 +34,13 @@
|
|||
title={{item.page.title}}>
|
||||
<span class="numbering">{{item.page.numbering}}</span>
|
||||
{{#if (or item.userHasChangePending userHasNewPagePending)}}
|
||||
<span class="color-red-600" title="Pending approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
<span class="color-red-600" >[*] </span>
|
||||
{{#attach-tooltip showDelay=1000}}Pending changes{{/attach-tooltip}}
|
||||
{{/if}}
|
||||
{{#if (or permissions.documentApprove roles.documentApprove)}}
|
||||
{{#if item.changeAwaitingReview}}
|
||||
<span class="color-green-700" title="Awaiting approval" data-toggle="tooltip" data-placement="top">[*] </span>
|
||||
<span class="color-green-700">[*] </span>
|
||||
{{#attach-tooltip showDelay=1000}}Awaiting approval{{/attach-tooltip}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{item.page.title}}
|
||||
|
|
|
@ -19,40 +19,42 @@
|
|||
{{/if}}
|
||||
{{#if hasMenuPermissions}}
|
||||
<div class="button-icon-gap" />
|
||||
<div id="page-menu-button-{{page.id}}" class="button-icon-gray align-middle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<div id="page-menu-button-{{page.id}}" class="button-icon-gray align-middle">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</div>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="page-menu-button-{{page.id}}">
|
||||
{{#if canEdit}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'edit-page-button-' page.id}} {{action 'onEdit'}}>Edit</a>
|
||||
{{/if}}
|
||||
{{#if permissions.documentCopy}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'copy-page-button-' page.id}} data-toggle="modal" data-target={{concat '#copy-page-modal-' page.id}} data-backdrop="static">Copy</a>
|
||||
{{/if}}
|
||||
{{#if canMove}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'move-page-button-' page.id}} data-toggle="modal" data-target={{concat '#move-page-modal-' page.id}} data-backdrop="static">Move</a>
|
||||
{{/if}}
|
||||
{{#if permissions.documentTemplate}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'publish-page-button-' page.id}} data-toggle="modal" data-target={{concat '#publish-page-modal-' page.id}} data-backdrop="static">Publish</a>
|
||||
{{/if}}
|
||||
{{#if canDelete}}
|
||||
<a class="dropdown-item text-danger" href="#" id={{concat 'delete-page-button-' page.id}} data-toggle="modal" data-target={{concat '#delete-page-modal-' page.id}} data-backdrop="static">Delete</a>
|
||||
{{/if}}
|
||||
{{#if (and canEdit state.actionablePage)}}
|
||||
<div class="dropdown-divider"></div>
|
||||
{{#unless state.indentDisabled}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'toc-indent-button-' page.id}} {{action 'pageIndent'}}>Indent</a>
|
||||
{{/unless}}
|
||||
{{#unless state.outdentDisabled}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'toc-outdent-button-' page.id}} {{action 'pageOutdent'}}>Outdent</a>
|
||||
{{/unless}}
|
||||
{{#unless state.upDisabled}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'toc-up-button-' page.id}} {{action 'pageUp'}}>Move up</a>
|
||||
{{/unless}}
|
||||
{{#unless state.downDisabled}}
|
||||
<a class="dropdown-item" href="#" id={{concat 'toc-down-button-' page.id}} {{action 'pageDown'}}>Move down</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#attach-popover class="ember-attacher-popper" hideOn='clickout' showOn='click' isShown=false}}
|
||||
<div class="menu">
|
||||
{{#if canEdit}}
|
||||
<a class="item" href="#" id={{concat 'edit-page-button-' page.id}} {{action 'onEdit'}}>Edit</a>
|
||||
{{/if}}
|
||||
{{#if permissions.documentCopy}}
|
||||
<a class="item" href="#" id={{concat 'copy-page-button-' page.id}} data-toggle="modal" data-target={{concat '#copy-page-modal-' page.id}} data-backdrop="static">Copy</a>
|
||||
{{/if}}
|
||||
{{#if canMove}}
|
||||
<a class="item" href="#" id={{concat 'move-page-button-' page.id}} data-toggle="modal" data-target={{concat '#move-page-modal-' page.id}} data-backdrop="static">Move</a>
|
||||
{{/if}}
|
||||
{{#if permissions.documentTemplate}}
|
||||
<a class="item" href="#" id={{concat 'publish-page-button-' page.id}} data-toggle="modal" data-target={{concat '#publish-page-modal-' page.id}} data-backdrop="static">Publish</a>
|
||||
{{/if}}
|
||||
{{#if canDelete}}
|
||||
<a class="item red" href="#" id={{concat 'delete-page-button-' page.id}} data-toggle="modal" data-target={{concat '#delete-page-modal-' page.id}} data-backdrop="static">Delete</a>
|
||||
{{/if}}
|
||||
{{#if (and canEdit state.actionablePage)}}
|
||||
<div class="divider"></div>
|
||||
{{#unless state.indentDisabled}}
|
||||
<a class="item" href="#" id={{concat 'toc-indent-button-' page.id}} {{action 'pageIndent'}}>Indent</a>
|
||||
{{/unless}}
|
||||
{{#unless state.outdentDisabled}}
|
||||
<a class="item" href="#" id={{concat 'toc-outdent-button-' page.id}} {{action 'pageOutdent'}}>Outdent</a>
|
||||
{{/unless}}
|
||||
{{#unless state.upDisabled}}
|
||||
<a class="item" href="#" id={{concat 'toc-up-button-' page.id}} {{action 'pageUp'}}>Move up</a>
|
||||
{{/unless}}
|
||||
{{#unless state.downDisabled}}
|
||||
<a class="item" href="#" id={{concat 'toc-down-button-' page.id}} {{action 'pageDown'}}>Move down</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/attach-popover}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue