mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
upgraded gorilla mux dependency, improved anon viewing
This commit is contained in:
parent
7ce3adb65e
commit
1d2109aa44
18 changed files with 2411 additions and 402 deletions
|
@ -45,8 +45,10 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
|||
selected.forEach((s) => {
|
||||
let cats = this.set('categories', categories);
|
||||
let cat = categories.findBy('id', s.id);
|
||||
cat.set('selected', true);
|
||||
this.set('categories', cats);
|
||||
if (is.not.undefined(cat)) {
|
||||
cat.set('selected', true);
|
||||
this.set('categories', cats);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,6 +37,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, {
|
|||
didUpdateAttrs() {
|
||||
this._super(...arguments);
|
||||
this.set('selectedDocuments', []);
|
||||
this.set('filteredDocs', []);
|
||||
},
|
||||
|
||||
didRender() {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const {
|
||||
RSVP,
|
||||
inject: { service }
|
||||
} = Ember;
|
||||
|
||||
|
@ -26,6 +27,10 @@ export default Ember.Service.extend({
|
|||
getUserPins() {
|
||||
let userId = this.get('session.user.id');
|
||||
|
||||
if (!this.get('session.authenticated')) {
|
||||
return new RSVP.resolve([]);
|
||||
}
|
||||
|
||||
return this.get('ajax').request(`pin/${userId}`, {
|
||||
method: 'GET'
|
||||
}).then((response) => {
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
{{#if permissions.documentEdit}}
|
||||
<li class="item">{{#link-to 'document.history'}}History{{/link-to}}</li>
|
||||
{{/if}}
|
||||
<li class="divider"/>
|
||||
{{/if}}
|
||||
{{#if permissions.documentTemplate}}
|
||||
<li class="item" id="save-template-button">Template</li>
|
||||
<li class="divider"/>
|
||||
{{/if}}
|
||||
<li class="divider"/>
|
||||
<li class="item" id="print-document-button" {{action 'onPrintDocument'}}>Print</li>
|
||||
{{#if permissions.documentDelete}}
|
||||
<li class="item danger" id="delete-document-button">Delete</li>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<div class="round-button button-gray" id="space-unpin-button" data-tooltip="Remove favorite" data-tooltip-position="top center" {{action 'onUnpin'}}>
|
||||
<i class="material-icons">favorite</i>
|
||||
</div>
|
||||
{{else}}
|
||||
{{else if session.authenticated}}
|
||||
<div class="round-button button-gray" id="space-pin-button" data-tooltip="Mark favorite" data-tooltip-position="top center">
|
||||
<i class="material-icons">favorite_border</i>
|
||||
</div>
|
||||
|
@ -74,15 +74,17 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#unless pinState.isPinned}}
|
||||
{{#dropdown-dialog target="space-pin-button" position="bottom right" button="Pin" color="flat-green" onAction=(action 'onPin') focusOn="pin-space-name"}}
|
||||
<div class="input-control">
|
||||
<label>Favorite Space</label>
|
||||
<div class="tip">Provide short name</div>
|
||||
{{input type='text' id="pin-space-name" value=pinState.newName}}
|
||||
</div>
|
||||
{{/dropdown-dialog}}
|
||||
{{/unless}}
|
||||
{{#if session.authenticated}}
|
||||
{{#unless pinState.isPinned}}
|
||||
{{#dropdown-dialog target="space-pin-button" position="bottom right" button="Pin" color="flat-green" onAction=(action 'onPin') focusOn="pin-space-name"}}
|
||||
<div class="input-control">
|
||||
<label>Favorite Space</label>
|
||||
<div class="tip">Provide short name</div>
|
||||
{{input type='text' id="pin-space-name" value=pinState.newName}}
|
||||
</div>
|
||||
{{/dropdown-dialog}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#if permissions.spaceOwner}}
|
||||
{{#dropdown-dialog target="space-delete-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'deleteSpace')}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue