mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Removed obsolete doc general settings code
This commit is contained in:
parent
785e4c245d
commit
6ff74cf45e
3 changed files with 660 additions and 686 deletions
1316
embed/bindata.go
1316
embed/bindata.go
File diff suppressed because one or more lines are too long
|
@ -10,7 +10,6 @@
|
|||
// https://documize.com
|
||||
|
||||
import { empty } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Notifier from '../../mixins/notifier';
|
||||
import Component from '@ember/component';
|
||||
|
@ -21,31 +20,6 @@ export default Component.extend(Notifier, {
|
|||
docExcerpt: '',
|
||||
hasNameError: empty('docName'),
|
||||
|
||||
noEdits: computed('permssions', 'document', function() {
|
||||
let constants = this.get('constants');
|
||||
let permissions = this.get('permissions');
|
||||
|
||||
if (!permissions.get('documentEdit')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!permissions.get('documentApprove') && this.get('document.protection') === constants.ProtectionType.Review) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.get('document.protection') === constants.ProtectionType.Lock) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}),
|
||||
|
||||
keyUp(e) {
|
||||
if (e.keyCode === 27) { // escape key
|
||||
this.send('onCancel');
|
||||
}
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<div class="form-group">
|
||||
<label for="document-name">Name</label>
|
||||
{{focus-input id="document-name" type="text" value=docName
|
||||
class=(if hasNameError 'form-control mousetrap is-invalid' 'form-control mousetrap') placeholder="Title" autocomplete="off" disabled=noEdits}}
|
||||
class=(if hasNameError 'form-control mousetrap is-invalid' 'form-control mousetrap') placeholder="Title" autocomplete="off"}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="document-excerpt">Excerpt</label>
|
||||
{{textarea id="document-excerpt" rows="4" value=docExcerpt class='form-control mousetrap' placeholder="Excerpt" autocomplete="off" disabled=noEdits}}
|
||||
{{textarea id="document-excerpt" rows="4" value=docExcerpt class='form-control mousetrap' placeholder="Excerpt" autocomplete="off"}}
|
||||
<small class="form-text text-muted">Optional description explaining content</small>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue