From c4e54fd7eb55d56f821a77b832e7f44087260810 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 20 Aug 2013 15:37:17 +0200 Subject: [PATCH] Fixed fromDocument usage in .cms-tree See https://github.com/silverstripe/silverstripe-cms/pull/823 --- javascript/CMSMain.Tree.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/javascript/CMSMain.Tree.js b/javascript/CMSMain.Tree.js index f5713c1d..0d6460eb 100644 --- a/javascript/CMSMain.Tree.js +++ b/javascript/CMSMain.Tree.js @@ -2,13 +2,10 @@ $.entwine('ss.tree', function($){ $('.cms-tree').entwine({ - onadd: function(){ - var self = this; - $(document).on('context_show.vakata', function(){ - self.adjustContextClass(this); - }); - - this._super(); + fromDocument: { + 'oncontext_show.vakata': function(e){ + this.adjustContextClass(); + } }, /* * Add and remove classes from context menus to allow for