\r
views.visualEditing.setView('rightColumn', views.visualEditingSidebar.getAsView());\r
addMainTab('Edytor', 'editor', views.visualEditing.getAsView());\r
\r
views.visualEditing.setView('rightColumn', views.visualEditingSidebar.getAsView());\r
addMainTab('Edytor', 'editor', views.visualEditing.getAsView());\r
addMainTab('Historia', 'history', views.diffLayout.getAsView());\r
\r
sandbox.getDOM().append(views.mainLayout.getAsView());\r
addMainTab('Historia', 'history', views.diffLayout.getAsView());\r
\r
sandbox.getDOM().append(views.mainLayout.getAsView());\r
},\r
restoringStarted: function(event) {\r
sandbox.getModule('mainBar').setCommandEnabled('save', false);\r
},\r
restoringStarted: function(event) {\r
sandbox.getModule('mainBar').setCommandEnabled('save', false);\r
},\r
historyItemAdded: function(item) {\r
sandbox.getModule('documentHistory').addHistory([item], {animate: true});\r
},\r
historyItemAdded: function(item) {\r
sandbox.getModule('documentHistory').addHistory([item], {animate: true});\r
documentReverted: function(event) {\r
commands.resetDocument(event.document, 'revert');\r
sandbox.getModule('mainBar').setCommandEnabled('save', true);\r
documentReverted: function(event) {\r
commands.resetDocument(event.document, 'revert');\r
sandbox.getModule('mainBar').setCommandEnabled('save', true);\r
views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView());\r
},\r
'cmd.save': function() {\r
views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView());\r
},\r
'cmd.save': function() {\r
sandbox.getModule('documentCanvas').toggleGrid(toggle);\r
},\r
newNodeRequested: function(wlxmlTag, wlxmlClass) {\r
sandbox.getModule('documentCanvas').toggleGrid(toggle);\r
},\r
newNodeRequested: function(wlxmlTag, wlxmlClass) {\r
- } else {\r
- sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
- }\r
+ },\r
+ command: function(cmd, meta) {\r
+ sandbox.getModule('documentCanvas').command(cmd, meta);\r