Skip to content

Commit

Permalink
Whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Mar 23, 2016
1 parent 006dd82 commit d29c7a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions design/standard/javascript/jquery.eztags.tree.js
Expand Up @@ -10,13 +10,15 @@
this.rootNode = {};
this.getSetupData();
};

TreeView.prototype.getSetupData = function(){
$.getJSON(this.$el.data('config-url') + '?ContentType=json', function(data) {
this.rootNode = data.content.config.rootTag;
this.hideRoot = data.content.config.hideRootTag;
this.initialiseTree();
}.bind(this));
};

TreeView.prototype.getTreeData = function(node, cb){
if(this.rootNodeAdded || this.hideRoot){
var tagId = node.id == '#' ? this.rootNode.id : node.id;
Expand All @@ -38,6 +40,7 @@
this.rootNodeAdded = true;
}
};

TreeView.prototype.initialiseTree = function(){
this.$el.jstree({
'core': {
Expand Down Expand Up @@ -70,6 +73,7 @@
remove_data_selected: function(e, data){
this.$el.parent().find('a.jstree-anchor[data-id=' + data.tag.id + ']').removeAttr('data-selected');
},

add_data_selected: function(id){
this.$el.parent().find('a.jstree-anchor[data-id=' + id + ']').attr('data-selected', true);
}
Expand Down

0 comments on commit d29c7a4

Please sign in to comment.