Visual editor: refactoring
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 19 Apr 2013 13:39:42 +0000 (15:39 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 19 Apr 2013 14:04:08 +0000 (16:04 +0200)
modules/visualEditor.js

index bb4ad31..06a5ab6 100644 (file)
@@ -93,7 +93,7 @@ rng.modules.visualEditor = function(sandbox) {
             this.currentNode = node;\r
             mediator.nodeSelected(node);\r
         },\r
             this.currentNode = node;\r
             mediator.nodeSelected(node);\r
         },\r
-        markFirstSelected: function() {\r
+        selectFirstNode: function() {\r
             var firstNodeWithText = this.node.find('[wlxml-tag]').filter(function() {\r
                 return $(this).clone().children().remove().end().text().trim() !== '';\r
             }).first();\r
             var firstNodeWithText = this.node.find('[wlxml-tag]').filter(function() {\r
                 return $(this).clone().children().remove().end().text().trim() !== '';\r
             }).first();\r
@@ -218,7 +218,7 @@ rng.modules.visualEditor = function(sandbox) {
         onShowed: function() {\r
             if(!wasShownAlready) {\r
                 wasShownAlready = true;\r
         onShowed: function() {\r
             if(!wasShownAlready) {\r
                 wasShownAlready = true;\r
-                view.markFirstSelected();\r
+                view.selectFirstNode();\r
             }\r
         }\r
     \r
             }\r
         }\r
     \r