mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +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
|
@ -12,11 +12,10 @@
|
|||
import $ from 'jquery';
|
||||
import { empty } from '@ember/object/computed';
|
||||
import { computed } from '@ember/object';
|
||||
import TooltipMixin from '../../mixins/tooltip';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(TooltipMixin, ModalMixin, {
|
||||
export default Component.extend(ModalMixin, {
|
||||
busy: false,
|
||||
mousetrap: null,
|
||||
showLinkModal: false,
|
||||
|
@ -57,15 +56,11 @@ export default Component.extend(TooltipMixin, ModalMixin, {
|
|||
$('#' + this.get('pageId')).focus(function() {
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
this.renderTooltips();
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.removeTooltips();
|
||||
|
||||
let mousetrap = this.get('mousetrap');
|
||||
if (is.not.null(mousetrap)) {
|
||||
mousetrap.unbind('esc');
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
// https://documize.com
|
||||
|
||||
import { computed } from '@ember/object';
|
||||
import TooltipMixin from '../../../mixins/tooltip';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(TooltipMixin, {
|
||||
export default Component.extend({
|
||||
isDirty: false,
|
||||
pageBody: "",
|
||||
codeSyntax: null,
|
||||
|
@ -100,9 +99,6 @@ export default Component.extend(TooltipMixin, {
|
|||
editor = null;
|
||||
this.set('codeEditor', null);
|
||||
}
|
||||
|
||||
this.removeTooltips();
|
||||
|
||||
},
|
||||
|
||||
// Wrap code in PRE tag with language identifier for subsequent rendering.
|
||||
|
|
|
@ -13,11 +13,10 @@ import $ from 'jquery';
|
|||
import { set } from '@ember/object';
|
||||
import { schedule } from '@ember/runloop';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import SectionMixin from '../../../mixins/section';
|
||||
import TooltipMixin from '../../../mixins/tooltip';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(SectionMixin, TooltipMixin, {
|
||||
export default Component.extend(SectionMixin, {
|
||||
sectionService: service('section'),
|
||||
isDirty: false,
|
||||
waiting: false,
|
||||
|
@ -27,7 +26,7 @@ export default Component.extend(SectionMixin, TooltipMixin, {
|
|||
this._super(...arguments);
|
||||
this.user = {};
|
||||
this.workspaces = [];
|
||||
this.config = {};
|
||||
this.config = {};
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
|
@ -92,7 +91,6 @@ export default Component.extend(SectionMixin, TooltipMixin, {
|
|||
|
||||
schedule('afterRender', () => {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
self.renderTooltips();
|
||||
});
|
||||
self.set('waiting', false);
|
||||
}, function (reason) { // eslint-disable-line no-unused-vars
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
// https://documize.com
|
||||
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import SectionMixin from '../../../mixins/section';
|
||||
import TooltipMixin from '../../../mixins/tooltip';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(SectionMixin, TooltipMixin, {
|
||||
export default Component.extend(SectionMixin, {
|
||||
sectionService: service('section'),
|
||||
isDirty: false,
|
||||
waiting: false,
|
||||
|
|
|
@ -14,12 +14,11 @@ import $ from 'jquery';
|
|||
import { htmlSafe } from '@ember/string';
|
||||
import { computed, set } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import NotifierMixin from '../../../mixins/notifier';
|
||||
import TooltipMixin from '../../../mixins/tooltip';
|
||||
import SectionMixin from '../../../mixins/section';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
||||
export default Component.extend(SectionMixin, NotifierMixin, {
|
||||
sectionService: service('section'),
|
||||
isDirty: false,
|
||||
busy: false,
|
||||
|
@ -93,10 +92,6 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
|||
});
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this.removeTooltips();
|
||||
},
|
||||
|
||||
getBoardLists() {
|
||||
this.set('busy', true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue