Changeset 26645
- Timestamp:
- 2013-01-10T14:08:17+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/debug_scripts.js
r26640 r26645 33 33 _mainDiv.css( 34 34 { 35 "position":"fixed", 36 "font-size":"0.7em", 37 "bottom":"0px", 38 "height":"40px", 35 "position":"fixed", 36 "font-size":"0.7em", 37 "bottom":"0px", 39 38 "width":"100%", 40 "background":"white", 41 "border":"1px black solid", 39 "background":"white", 40 "border":"1px black solid", 42 41 "padding":"5px", 43 42 "z-index":100 … … 51 50 toolBarDiv.append(buttonDiv); 52 51 _textDiv = $("<div>"); 53 _textDiv.css({"overflow":"auto", "width":"100%" , "height":"260px"});52 _textDiv.css({"overflow":"auto", "width":"100%"}); 54 53 55 54 var pickElementButton = $("<input type=\"button\" value=\"Enable debugging\">"); … … 93 92 $(this).val("Open editor"); 94 93 _editingDiv.hide(); 95 _mainDiv.css("height", (_mainDiv.height() - 200) + "px");96 94 } 97 95 else … … 99 97 $(this).val("Close editor"); 100 98 _editingDiv.show(); 101 _mainDiv.css("height", (_mainDiv.height() + 200) + "px");102 99 } 103 100 }); … … 187 184 }); 188 185 189 var minimiseButton = $("<img>", {"src":gs.imageURLs. expand});186 var minimiseButton = $("<img>", {"src":gs.imageURLs.collapse}); 190 187 minimiseButton.css({"cursor":"pointer", "float":"right", "margin-right":"20px"}); 191 188 minimiseButton.click(function() … … 195 192 _textDiv.hide(); 196 193 $(this).attr("src", gs.imageURLs.expand); 197 _mainDiv.css("height", (_mainDiv.height() - 260) + "px");198 194 } 199 195 else … … 201 197 _textDiv.show(); 202 198 $(this).attr("src", gs.imageURLs.collapse); 203 _mainDiv.css("height", (_mainDiv.height() + 260) + "px");204 199 } 205 200 }); … … 280 275 } 281 276 282 var editArea= $("<div>", {"id":"textEditor"});283 editArea.css({"width":"100%", "height":"180px"});284 editArea.val(template);277 var textEditor = $("<div>", {"id":"textEditor"}); 278 textEditor.css({"width":"100%"}); 279 textEditor.val(template); 285 280 286 281 _editingDiv.empty(); 287 _editingDiv.append( editArea);288 _editingDiv. css({"height":"190px"});282 _editingDiv.append($("<p>" + filepath + "</p>")); 283 _editingDiv.append(textEditor); 289 284 290 285 _editor = ace.edit("textEditor"); … … 293 288 _editor.setValue(template); 294 289 _editor.clearSelection(); 295 console.log(_editor); 296 297 _mainDiv.css({"height":"500px"}); 290 291 textEditor.css({"min-height":"200px", "border-top":"5px solid #444"}); 292 textEditor.resizable({handles: 'n', resize:function() 293 { 294 textEditor.css({top:"0px"}); 295 }}); 298 296 299 297 _closeEditorButton.removeAttr("disabled"); … … 371 369 var infoContainer = $("<div>"); 372 370 infoContainer.css({"cursor":"pointer", "border":"1px dashed #AAAAAA", "margin":"5px"}); 373 var fromDIV = $("<div>");374 371 var elementDIV = $("<div>"); 375 372 376 373 elementDIV.css("font-size", "1.1em"); 377 fromDIV.css("font-size", "0.9em"); 378 379 infoContainer.append(fromDIV); 374 380 375 infoContainer.append(elementDIV); 381 376 … … 397 392 attrstr += this.name + "=\"" + this.value + "\" "; 398 393 }); 399 400 fromDIV.text("From " + filepath + ":"); 394 401 395 elementDIV.text("<" + fullNodename + " " + attrstr + ">"); 402 396
Note:
See TracChangeset
for help on using the changeset viewer.