1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00

Show content like box if not draft document

This commit is contained in:
McMatts 2018-04-17 16:09:28 +01:00
parent 22b6674edb
commit 94ca80f052
3 changed files with 27 additions and 32 deletions

View file

@ -32,8 +32,6 @@ export default Component.extend(TooltipMixin, {
deleteBlockId: '',
canEdit: computed('permissions', 'document.protection', function() {
let canEdit = this.get('document.protection') !== this.get('constants').ProtectionType.Lock && this.get('permissions.documentEdit');
// if (canEdit) this.setupAddWizard();
return canEdit;
}),
hasBlocks: computed('blocks', function() {
@ -41,6 +39,12 @@ export default Component.extend(TooltipMixin, {
}),
mousetrap: null,
voteThanks: false,
showLikes: false,
didReceiveAttrs() {
this._super(...arguments);
this.set('showLikes', this.get('folder.allowLikes') && this.get('document.isLive'));
},
didRender() {
this._super(...arguments);
@ -116,20 +120,6 @@ export default Component.extend(TooltipMixin, {
});
},
// setupAddWizard() {
// schedule('afterRender', () => {
// $('.start-section:not(.start-section-empty-state)').off('.hoverIntent');
// $('.start-section:not(.start-section-empty-state)').hoverIntent({interval: 100, over: function() {
// // in
// $(this).find('.start-button').velocity("transition.slideDownIn", {duration: 300});
// }, out: function() {
// // out
// $(this).find('.start-button').velocity("transition.slideUpOut", {duration: 300});
// } });
// });
// },
addSection(model) {
let sequence = 0;
let level = 1;