}\r
}\r
\r
+ var statusBarView = {\r
+ node: view.node.find('#rng-visualEditor-statusbar'),\r
+ setup: function() {\r
+ var view = this;\r
+ view.node.on('mouseenter', 'a', function(e) {\r
+ var target = $(e.target);\r
+ mediator.nodeHighlightedById(target.attr('data-id')); \r
+ });\r
+ view.node.on('mouseleave', 'a', function(e) {\r
+ var target = $(e.target);\r
+ mediator.nodeDimmedById(target.attr('data-id')); \r
+ });\r
+ view.node.on('click', 'a', function(e) {\r
+ e.preventDefault();\r
+ mediator.nodeSelectedById($(e.target).attr('data-id'));\r
+ });\r
+ },\r
+ \r
+ showNode: function(node) {\r
+ this.node.empty();\r
+ this.node.html(sandbox.getTemplate('statusBarNodeDisplay')({node: node, parents: node.parents('[wlxml-tag]')}));\r
+ //node.parents('[wlxml-tag]')\r
+ },\r
+ \r
+ highlightNode: function(id) {\r
+ this.node.find('a[data-id="'+id+'"]').addClass('rng-hover');\r
+ },\r
+ dimNode: function(id) {\r
+ this.node.find('a[data-id="' +id+'"]').removeClass('rng-hover');\r
+ }\r
+ }\r
+ \r
view.setup();\r
sideBarView.setup();\r
toolbarView.setup();\r
+ statusBarView.setup();\r
\r
var mediator = {\r
getCurrentNode: function() {\r
},\r
nodeSelected: function(node) {\r
sideBarView.updateEditPane(node);\r
+ statusBarView.showNode(node);\r
},\r
nodeSelectedById: function(id) {\r
view.selectNodeById(id);\r
nodeHovered: function(node) {\r
view.highlightNode(node);\r
sideBarView.highlightNode(node.attr('id'));\r
+ statusBarView.highlightNode(node.attr('id'));\r
},\r
nodeBlured: function(node) {\r
view.dimNode(node);\r
sideBarView.dimNode(node.attr('id'));\r
+ statusBarView.dimNode(node.attr('id'));\r
},\r
wrapWithNodeRequest: function(wlxmlTag, wlxmlClass) {\r
view.wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r