diff --git a/app/app/components/document/document-sidebar-toc.js b/app/app/components/document/document-sidebar-toc.js index bd199a0d..e5dc1e87 100644 --- a/app/app/components/document/document-sidebar-toc.js +++ b/app/app/components/document/document-sidebar-toc.js @@ -67,6 +67,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { willDestroyElement() { this.eventBus.unsubscribe('documentPageAdded'); + this.destroyTooltips(); }, onDocumentPageAdded(pageId) { @@ -409,4 +410,4 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { this.attrs.gotoPage(id); }, }, -}); \ No newline at end of file +}); diff --git a/app/app/components/document/page-heading.js b/app/app/components/document/page-heading.js index 64b060b2..17194ad0 100644 --- a/app/app/components/document/page-heading.js +++ b/app/app/components/document/page-heading.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . All rights reserved. // -// This software (Documize Community Edition) is licensed under +// This software (Documize Community Edition) is licensed under // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html // // You can operate outside the AGPL restrictions by purchasing // Documize Enterprise Edition and obtaining a commercial license -// by contacting . +// by contacting . // // https://documize.com @@ -22,6 +22,10 @@ export default Ember.Component.extend(TooltipMixin, { } }, + willDestroyElement() { + this.destroyTooltips(); + }, + actions: { editPage(id) { this.attrs.onEditPage(id); @@ -31,4 +35,4 @@ export default Ember.Component.extend(TooltipMixin, { this.attrs.onDeletePage(id); }, } -}); \ No newline at end of file +}); diff --git a/app/app/pods/document/index/controller.js b/app/app/pods/document/index/controller.js index de491176..86663907 100644 --- a/app/app/pods/document/index/controller.js +++ b/app/app/pods/document/index/controller.js @@ -197,7 +197,6 @@ export default Ember.Controller.extend(NotifierMixin, { }, onDocumentDelete() { - console.log("deleting " + this.get('model.id')); let self = this; this.get('documentService').deleteDocument(this.get('model.id')).then(function() { diff --git a/app/app/templates/components/document/page-heading.hbs b/app/app/templates/components/document/page-heading.hbs index 016d16c0..e7aab772 100644 --- a/app/app/templates/components/document/page-heading.hbs +++ b/app/app/templates/components/document/page-heading.hbs @@ -7,11 +7,9 @@ mode_edit {{/link-to}} - {{#unless page.firstPage}} -
- delete -
- {{/unless}} +
+ delete +
{{/if}}