- Timestamp:
- 2013-03-12T13:24:34+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js
r27024 r27055 225 225 _styleFunctions.push(function(){_saveButton.button({icons:{primary:"ui-icon-disk"}, disabled:true})}); 226 226 227 _swapEditorButton = $("<button>Switch to XML Editor</button>");227 _swapEditorButton = $("<button>Switch to XML editor</button>"); 228 228 _swapEditorButton.button().click(function() 229 229 { … … 247 247 _editor.setValue(xmlText); 248 248 _editor.clearSelection(); 249 var UndoManager = require("ace/undomanager").UndoManager; 250 _editor.getSession().setUndoManager(new UndoManager()); 249 251 _textEditor.show(); 250 _swapEditorButton.button("option", "label", "Switch to Visual Editor");252 _swapEditorButton.button("option", "label", "Switch to visual editor"); 251 253 _isVisualEditor = false; 254 _xmlStatusBar.show(); 252 255 } 253 256 else … … 260 263 _vEditor.selectRootElement(); 261 264 _vEditor.getMainDiv().show(); 262 _swapEditorButton.button("option", "label", "Switch to XML Editor");265 _swapEditorButton.button("option", "label", "Switch to XML editor"); 263 266 _isVisualEditor = true; 267 _xmlStatusBar.hide(); 264 268 } 265 269 } … … 284 288 _xmlStatusBar.css("padding", "5px"); 285 289 _xmlStatusBar.addClass("ui-corner-all"); 290 _styleFunctions.push(function(){_xmlStatusBar.hide();}); 286 291 287 292 //Check the XML for errors every 2 seconds … … 315 320 _saveButton.button("option", "disabled", false); 316 321 } 317 if(_swapEditorButton.button("option", "label") == "Switch to Visual Editor")322 if(_swapEditorButton.button("option", "label") == "Switch to visual editor") 318 323 { 319 324 _swapEditorButton.button("option", "disabled", false); … … 446 451 447 452 _closeEditorButton.button("option", "disabled", false); 453 if(_closeEditorButton.button("option", "label") == "Open editor") 454 { 455 _closeEditorButton.button("option", "label", "Close editor"); 456 _editingDiv.show(); 457 } 448 458 }) 449 459 .error(function() … … 582 592 } 583 593 594 var fixTitle = function() 595 { 596 $("title").text($("title").text().replace(/<[^>]*>/g, "")); 597 } 598 584 599 var resizeContainers = function() 585 600 { … … 613 628 614 629 addMouseEventsToDebugElements(debugElems); 630 fixTitle(); 615 631 } 616 632
Note:
See TracChangeset
for help on using the changeset viewer.