Skip to content

Commit

Permalink
Refactor OpenTraitManager
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Mar 8, 2018
1 parent e6395e2 commit 87bff5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dist/css/grapes.min.css

Large diffs are not rendered by default.

15 changes: 2 additions & 13 deletions src/commands/view/OpenTraitManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const $ = Backbone.$;
const $ = require('backbone').$;

module.exports = {
run(editor, sender) {
Expand All @@ -12,28 +12,17 @@ module.exports = {
if (!this.$cn) {
var tmView = tm.getTraitsViewer();
var confTm = tm.getConfig();

// Main container
this.$cn = $('<div></div>');
// Secondary container
this.$cn2 = $('<div></div>');
this.$cn.append(this.$cn2);

this.$header = $('<div>').append(
`<div class="${confTm.stylePrefix}header">${confTm.textNoElement}</div>`
);

this.$cn.append(this.$header);

this.$cn2.append(
'<div class="' +
pfx +
'traits-label">' +
confTm.labelContainer +
'</div>'
`<div class="${pfx}traits-label">${confTm.labelContainer}</div>`
);
this.$cn2.append(tmView.render().el);

var panels = editor.Panels;

if (!panels.getPanel('views-container'))
Expand Down

0 comments on commit 87bff5d

Please sign in to comment.