Changeset 1327921
- Timestamp:
- 01/13/2016 11:45:30 PM (10 years ago)
- Location:
- gmace
- Files:
-
- 2 deleted
- 13 edited
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (deleted)
-
assets/screenshot-4.png (deleted)
-
trunk/assets/css/style.css (modified) (3 diffs)
-
trunk/assets/js/scripts.js (modified) (31 diffs)
-
trunk/assets/languages/gmace-en_UK.mo (modified) (previous)
-
trunk/assets/languages/gmace-en_UK.po (modified) (1 diff)
-
trunk/assets/languages/gmace-en_US.mo (modified) (previous)
-
trunk/assets/languages/gmace-en_US.po (modified) (1 diff)
-
trunk/assets/languages/gmace-ru_RU.mo (modified) (previous)
-
trunk/assets/languages/gmace-ru_RU.po (modified) (1 diff)
-
trunk/gmace.php (modified) (34 diffs)
-
trunk/inc/editor.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gmace/trunk/assets/css/style.css
r1221233 r1327921 134 134 border-bottom: 1px solid; 135 135 } 136 #filedit #text_file #gm_slider > div { 136 #filedit #text_file #gm_slider .hide-files { 137 position: absolute; 138 top: 0; 139 left: 0; 140 right: 140px; 141 bottom: 0; 142 overflow: hidden; 143 } 144 #filedit #text_file #gm_slider .hide-files > div { 137 145 position: absolute; 146 top: 0; bottom: 0; 138 147 min-width: 100%; 139 bottom: 0;140 148 overflow: hidden; 141 149 } … … 168 176 } 169 177 #filedit #text_file #gm_slider a.close_editor { 170 position: absolute; 171 width: 15px;height: 15px; 172 top: 0;bottom: 0;right: 5px; 173 margin: auto; 174 transition: .1s; 175 font-weight: bold; 176 font-family: arial; 177 font-size: 10px; 178 } 179 #filedit #text_file #gm_slider a.close_editor:hover { 180 border-radius: 5px; 178 position: absolute; 179 top: -1px; bottom: 0; right: 10px; 180 width: 15px; 181 height: 15px; 182 line-height: 15px; 183 margin: auto; 184 opacity: 0; 185 z-index: 2; 186 187 font-family: FontAwesome; 188 text-align: center; 189 font-size: 15px; 190 color: white; 191 text-rendering: auto; 192 -webkit-font-smoothing: antialiased; 193 -moz-osx-font-smoothing: grayscale; 194 195 transition: 200ms; 196 -webkit-transition: 200ms; 197 -moz-transition: 200ms; 198 -o-transition: 200ms; 199 } 200 #filedit #text_file #gm_slider p.tab_editor:hover a.close_editor { 201 opacity: 1; 202 } 203 #filedit #text_file #gm_slider a.close_editor:before { 204 content: "\f00d"; 181 205 } 182 206 #filedit #text_file #gm_hotbar { … … 305 329 margin: 0; 306 330 } 307 [name="linePos"] { 308 width: 80px; 331 #linePos { 332 position: absolute; 333 top: 0; 334 bottom: 0; 335 right: 0; 336 width: 139px; 337 padding: 0; 338 padding-left: 15px; 339 margin: 0; 340 box-shadow: none; 341 border: none; 342 font-family: monospace; 309 343 } 310 344 -
gmace/trunk/assets/js/scripts.js
r1221244 r1327921 1 (function($){ 2 3 $(document).on("ready", function(){ 4 5 if(getCookie("gmace_pars")){ 1 (function($) 2 { 3 $(document).on("ready", function() 4 { 5 if(getCookie("gmace_pars")) 6 { 6 7 var THEME_EDITOR = JSON.parse(getCookie("gmace_pars")).theme || "dreamweaver"; 7 8 $("#filedit").addClass(JSON.parse(getCookie("gmace_pars")).side || "left"); … … 9 10 $("#gm_actions [name='theme_editor']").val(THEME_EDITOR); 10 11 $("#gm_actions [name='sidebarside']").val(JSON.parse(getCookie("gmace_pars")).side || "left"); 11 }else{ 12 } 13 else 14 { 12 15 var THEME_EDITOR = "dreamweaver"; 13 16 } … … 27 30 $("#filedit #file ul.folder-objects[data-dir-folder='/www']").parent().addClass("open"); 28 31 29 30 setTrigger();31 32 32 var openTabs = getCookie("opentabs"); 33 if(openTabs){ 33 if(openTabs) 34 { 34 35 openTabs = JSON.parse(openTabs); 35 if(openTabs.files.length){ 36 if(openTabs.files.length) 37 { 36 38 for(var jcount = 0; jcount < openTabs.files.length; jcount++) 37 if(openTabs.files[jcount]){ 39 { 40 if(openTabs.files[jcount]) 41 { 38 42 addNewWindowEditor(openTabs.files[jcount]); 39 43 } 40 }else{ 44 } 45 } 46 else 47 { 41 48 addNewWindowEditor(); 42 49 } 43 }else{ 50 } 51 else 52 { 44 53 addNewWindowEditor(); 45 54 } … … 47 56 48 57 /* ------------------------ EVENT HOTBAR'S BUTTON ------------------------- */ 49 $("#gm_hotbar div[data-action='full-mode']").on("click", function(){ 50 if($("#filedit").hasClass("full-mode")){ 58 $("#gm_hotbar div[data-action='full-mode']").on("click", function() 59 { 60 if($("#filedit").hasClass("full-mode")) 61 { 51 62 $("#filedit").removeClass("full-mode"); 52 63 $("#filedit #text_file").after($("#filedit #file")); 53 }else{ 64 } 65 else 66 { 54 67 $("#filedit").addClass("full-mode"); 55 68 $("#filedit #file").appendTo($("#filedit #text_file")); … … 57 70 changePar("resize"); 58 71 }); 59 $("#gm_hotbar div[data-action='new-window-editor']").on("click", function(){ 72 $("#gm_hotbar div[data-action='new-window-editor']").on("click", function() 73 { 60 74 addNewWindowEditor(); 61 75 }); 62 $("#gm_hotbar div[data-action='open-actions-menu']").on("click", function(){ 63 76 $("#gm_hotbar div[data-action='action-save-file']").on('click',function() 77 { 78 writeToFile($("#gm_editors div.shown").data("editor")); 79 } 80 ); 81 $("#gm_hotbar div[data-action='open-actions-menu']").on("click", function() 82 { 64 83 $("#file").removeClass("expand"); 65 $("#gm_actions").toggleClass("expand") 66 84 $("#gm_actions").toggleClass("expand"); 67 85 }); 68 $("#gm_hotbar div[data-action='open-file-menu']").on("click", function() {69 86 $("#gm_hotbar div[data-action='open-file-menu']").on("click", function() 87 { 70 88 $("#gm_actions").removeClass("expand"); 71 $("#file").toggleClass("expand") 72 89 $("#file").toggleClass("expand"); 73 90 }); 74 91 75 76 77 $("#savefile").on('click',function(){ 78 writeToFile($("#gm_editors div.shown").data("editor")); 79 }); 80 setInterval(function(){ 81 $(".gm_success:not(.checked), .gm_error:not(.checked)").each(function(){ 92 $("#gm_slider .hide-files").on("wheel", function(e) 93 { 94 var currentPosLeft = $("#gm_slider .hide-files > div").position().left; 95 var scrollSize = 40; 96 97 if(e.originalEvent.deltaY > 0 && $("#gm_slider .hide-files > div").width() + currentPosLeft > $("#gm_slider .hide-files").width()) 98 { 99 $("#gm_slider .hide-files > div").css("left", currentPosLeft - scrollSize); 100 } 101 else if(e.originalEvent.deltaY < 0 && currentPosLeft + scrollSize <= 0) 102 { 103 $("#gm_slider .hide-files > div").css("left", currentPosLeft + scrollSize); 104 } 105 } 106 ); 107 108 $("#gm_actions [name='theme_editor']").on('change', function() 109 { 110 changeGMAceParametrs(); 111 changePar("theme", $(this).val()); 112 THEME_EDITOR = $(this).val(); 113 } 114 ); 115 $("#gm_actions [name='sidebarside']").on('change', function() 116 { 117 changeGMAceParametrs(); 118 $("#filedit").removeClass("left right").addClass($(this).val()); 119 } 120 ); 121 $("#gm_actions input[name='wrapping']").on('change', function() 122 { 123 changePar("wrapping", $(this).prop("checked")); 124 } 125 ); 126 $("#gm_actions input[name='printMargin']").on('change', function() 127 { 128 changePar("printMargin", $(this).prop("checked")); 129 } 130 ); 131 $("#linePos").on('change', function() 132 { 133 var sessLen = $("#gm_editors div.shown").data("editor").session.getLength(); 134 if($(this).val() > sessLen) 135 { 136 $(this).data("val", sessLen); 137 } 138 $("#gm_editors div.shown").data("editor").gotoLine($(this).val()); 139 } 140 ); 141 setInterval(function() 142 { 143 if($("#linePos").data("val") != $("#linePos").val()) 144 { 145 $("#linePos").data("val", $("#linePos").val()).trigger("change"); 146 } 147 148 $(".gm_success:not(.checked), .gm_error:not(.checked)").each(function(){ 82 149 var e = $(this); 83 150 … … 88 155 setTimeout(function(){ e.trigger("click"); }, 5000); 89 156 }); 90 }, 100); 91 92 $("#gm_actions [name='theme_editor']").on('change', function(){ 93 changeGMAceParametrs(); 94 changePar("theme", $(this).val()); 95 THEME_EDITOR = $(this).val(); 96 }); 97 $("#gm_actions [name='sidebarside']").on('change', function(){ 98 changeGMAceParametrs(); 99 $("#filedit").removeClass("left right").addClass($(this).val()); 100 }); 101 $("#gm_actions input[name='wrapping']").on('change', function(){ 102 changePar("wrapping", $(this).prop("checked")); 103 }); 104 $("#gm_actions input[name='printMargin']").on('change', function(){ 105 changePar("printMargin", $(this).prop("checked")); 106 }); 107 $("#gm_actions input[name='linePos']").on('change', function(){ 108 if($(this).val() > $("#gm_editors div.shown").data("editor").session.getLength()) 109 $(this).val($("#gm_editors div.shown").data("editor").session.getLength()); 110 $("#gm_editors div.shown").data("editor").gotoLine($(this).val()); 111 }); 157 }, 100); 112 158 113 159 114 160 115 161 116 function changeGMAceParametrs(){ 162 function changeGMAceParametrs() 163 { 117 164 var parsArray = JSON.stringify({ 118 165 "theme": $("#gm_actions [name='theme_editor']").val(), … … 120 167 }); 121 168 122 var date = new Date(new Date().getTime() + 604800);169 var date = new Date(new Date().getTime() + 31536000000); 123 170 document.cookie = "gmace_pars="+parsArray+"; path=/; expires=" + date.toUTCString(); 124 171 } 125 172 126 173 127 function changePar(par, val){ 128 $("#gm_editors > div").each(function(){ 129 switch(par){ 174 function changePar(par, val) 175 { 176 $("#gm_editors > div").each(function() 177 { 178 switch(par) 179 { 130 180 case "theme": 131 181 $(this).data("editor").setTheme("ace/theme/"+val); 132 182 break; 183 133 184 case "wrapping": 134 185 $(this).data("editor").getSession().setUseWrapMode(val); 135 186 $(this).data("editor").resize(); 136 187 break; 188 137 189 case "resize": 138 190 $(this).data("editor").resize(); 139 191 break; 192 140 193 case "printMargin": 141 194 $(this).data("editor").setShowPrintMargin(val); … … 147 200 148 201 149 function setTrigger(){ 150 151 $("ul.folder-objects li").off().on('click', function(e){ 152 e.preventDefault(); 153 154 if($(this).hasClass("obj-folder") && e.which == 1){ 155 156 if($(this).children("ul.folder-objects").hasClass("expand")){ 157 $(this).removeClass("open").children("ul.folder-objects").slideUp().removeClass("expand"); 158 }else{ 159 $(this).addClass("open").children("ul.folder-objects").slideDown().addClass("expand"); 160 } 161 162 }else if($(this).hasClass("obj-file")){ 163 if($("#gm_editors div").length) 164 readFromFile($("#gm_editors div.shown").data("editor"), $(this).closest("ul.folder-objects").data("dir-folder") + "/" + $(this).text()); 165 else 166 addNewWindowEditor($(this).closest("ul.folder-objects").data("dir-folder") + "/" + $(this).text()); 167 } 168 169 return false; 170 }).on("mousedown", function(e){ 171 e.preventDefault(); 172 173 if($(this).hasClass("obj-file") && e.which == 2){ 174 175 $(this).off("mouseup"); 176 $(this).on("mouseup", function(e){ 177 if(e.which == 2){ 178 addNewWindowEditor($(this).closest("ul.folder-objects").data("dir-folder") + "/" + $(this).text()); 179 } 180 }); 181 182 } 183 184 return false; 185 }).on("contextmenu", function(e){ 186 if(!e.shiftKey){ 187 openPropertyFile(e.pageY + 5, e.pageX + 5, $(this)); 202 $("#file").on("mousedown", function(e) 203 { 204 var $this = $(e.target); 205 206 if($this.closest("ul.folder-objects li").length) 207 { 208 $this = $this.closest("ul.folder-objects li"); 209 210 if($this.hasClass("obj-file") && e.which == 2) 211 { 212 e.preventDefault(); 213 214 $this.off("mouseup"); 215 $this.on("mouseup", function(e) 216 { 217 if(e.which == 2) 218 { 219 addNewWindowEditor($this.closest("ul.folder-objects").data("dir-folder") + "/" + $this.text()); 220 } 221 } 222 ); 223 224 return false; 225 } 226 } 227 } 228 ).on("click", function(e) 229 { 230 var $this = $(e.target); 231 232 if($this.closest("ul.folder-objects li").length) 233 { 234 $this = $this.closest("ul.folder-objects li"); 235 236 if($this.hasClass("obj-folder") && e.which == 1) 237 { 238 if($this.children("ul.folder-objects").hasClass("expand")) 239 { 240 $this.removeClass("open").children("ul.folder-objects").slideUp().removeClass("expand"); 241 } 242 else 243 { 244 $this.addClass("open").children("ul.folder-objects").slideDown().addClass("expand"); 245 } 246 247 } 248 else if($this.hasClass("obj-file")) 249 { 250 if($("#gm_editors div").length) 251 readFromFile($("#gm_editors div.shown").data("editor"), $this.closest("ul.folder-objects").data("dir-folder") + "/" + $this.text()); 252 else 253 addNewWindowEditor($this.closest("ul.folder-objects").data("dir-folder") + "/" + $this.text()); 254 } 255 } 256 257 } 258 ).on("contextmenu", function(e) 259 { 260 if(!e.shiftKey && $(e.target).closest("ul.folder-objects li").length){ 261 openPropertyFile(e.pageY + 5, e.pageX + 5, $(e.target).closest("ul.folder-objects li")); 188 262 return false; 189 263 } 190 } );191 }192 193 194 function addNewWindowEditor(directory) {195 264 } 265 ); 266 267 268 function addNewWindowEditor(directory) 269 { 196 270 $("#gm_editors div.shown").removeClass("shown"); 197 271 $("p.tab_editor.select").removeClass("select"); … … 204 278 205 279 $("#gm_editors").append( $("<div>").data("index", ++icount).data("directory", directory).addClass("shown").attr("id", "gmace-editor-"+icount) ); 206 $("#gm_slider > div").append( $("<p>", { 207 class: "tab_editor select", 208 html: "<a class='close_editor'></a><span>"+nameFile+"</span>", 209 click: function(){ 210 if(!$(this).hasClass("select")){ 211 $("p.tab_editor.select").removeClass("select"); 212 $("#gm_editors div.shown").removeClass("shown"); 213 $("#gm_editors div#gmace-editor-"+$(this).addClass("select").data("index")).addClass("shown").data("editor").focus(); 214 $("#gm_editors div.shown").data("editor").resize(); 215 } 216 } 217 }).data("index", icount).attr("id", "gmace-tab-"+icount).on("mousedown", function(e){ 218 e.preventDefault(); 219 220 if(e.which == 2){ 221 222 $(this).off("mouseup"); 223 $(this).on("mouseup", function(e){ 224 if(e.which == 2){ 225 226 if($(this).hasClass("select")){ 227 $("#gm_editors div#gmace-editor-"+$(this).data("index")).remove(); 228 $(this).remove(); 229 230 $("#gmace-editor-"+$("#gm_slider p.tab_editor:first-child").addClass("select").data("index")).addClass("shown"); 231 $("#gm_editors div.shown").data("editor").resize(); 232 }else{ 233 $("#gm_editors div#gmace-editor-"+$(this).data("index")).remove(); 234 $(this).remove(); 235 } 236 237 saveOpenedTab(); 238 } 239 }); 240 241 } 242 243 return false; 244 })); 280 $("#gm_slider .hide-files > div").append( 281 $("<p>", { 282 class: "tab_editor select", 283 html: "<a class='close_editor'></a><span>"+nameFile+"</span>", 284 click: function(e) 285 { 286 var $this = $(e.target); 287 288 if($this.is("#gm_slider a.close_editor")) 289 { 290 $this.parent().trigger("removeTab"); 291 } 292 else if(!$(this).hasClass("select")) 293 { 294 var currentEditorScreen = $("#gm_editors div#gmace-editor-" + $(this).data("index")); 295 var currentLine = currentEditorScreen.data("editor").getCursorPosition().row + 1; 296 297 $("p.tab_editor.select").removeClass("select"); 298 $("#gm_editors div.shown").removeClass("shown"); 299 $("#linePos").data("val", currentLine).val(currentLine); 300 currentEditorScreen.addClass("shown").data("editor").focus(); 301 currentEditorScreen.data("editor").resize(); 302 $(this).addClass("select"); 303 } 304 } 305 }).data("index", icount).attr("id", "gmace-tab-"+icount).on("mousedown", function(e) 306 { 307 if(e.which == 2) 308 { 309 $(this).one("mouseup", function(e) 310 { 311 if(e.which == 2) 312 { 313 $(this).trigger("removeTab"); 314 } 315 } 316 ); 317 } 318 } 319 ).on("removeTab", function() 320 { 321 if($(this).hasClass("select")) 322 { 323 $("#gm_editors div#gmace-editor-"+$(this).data("index")).remove(); 324 $(this).remove(); 325 326 $("#gmace-editor-"+$("#gm_slider p.tab_editor:first-child").addClass("select").data("index")).addClass("shown"); 327 $("#gm_editors div.shown").data("editor").resize(); 328 } 329 else 330 { 331 $("#gm_editors div#gmace-editor-"+$(this).data("index")).remove(); 332 $(this).remove(); 333 } 334 335 saveOpenedTab(); 336 } 337 ) 338 ); 245 339 246 340 var editor_n = ace.edit("gmace-editor-"+icount); … … 282 376 }); 283 377 284 editor_n.on("focus", function(){ 285 $("#gm_actions, #file").removeClass("expand"); 286 $("#gm_editors div.focus").removeClass("focus"); 287 }); 288 editor_n.getSession().selection.on('changeCursor', function(e){ 289 $("#gm_actions input[name='linePos']").val($("#gm_editors div.shown").data("editor").getCursorPosition().row + 1); 290 saveOpenedTab(); 291 }); 378 editor_n.on("focus", function() 379 { 380 $("#gm_actions, #file").removeClass("expand"); 381 $("#gm_editors div.focus").removeClass("focus"); 382 } 383 ); 384 editor_n.getSession().selection.on('changeCursor', function(e) 385 { 386 var yPos = $("#gm_editors div.shown").data("editor").getCursorPosition().row + 1; 387 $("#linePos").data("val", yPos).val(yPos); 388 saveOpenedTab(); 389 } 390 ); 292 391 293 392 $("#gm_editors div#gmace-editor-"+icount).data("editor", editor_n); 393 $("#filedit #text_file #gm_slider .hide-files > div").width($("p.tab_editor").width() * $("p.tab_editor").length); 294 394 readFromFile(editor_n); 295 395 } 296 396 297 397 298 function readFromFile(editor, directory){ 398 function readFromFile(editor, directory) 399 { 299 400 300 401 directory = directory || $("#gm_editors div.shown").data("directory"); … … 324 425 325 426 326 function writeToFile(editor){ 427 function writeToFile(editor) 428 { 429 var directory = $("#gm_editors div.shown").data("directory"); 327 430 $.post(ajaxurl, { 328 431 action: 'gmace_rewrite_file', 329 432 directory: $("#gm_editors div.shown").data("directory"), 330 433 content: editor.getValue() 331 }, function(response) { 332 $("#messages").append("<div class='gm_success'>"+translated_name.strfile+" <i>"+$("#gm_editors div.shown").data("directory")+"</i> "+translated_name.strrewrited+".</div>"); 434 }, function(response) 435 { 436 $("#messages").append("<div class='gm_success'>"+translated_name.strfile+" <i>"+directory+"</i> "+translated_name.strrewrited+".</div>"); 333 437 }); 334 438 } 335 439 336 440 337 function setModeEditor(editor, filedir){ 441 function setModeEditor(editor, filedir) 442 { 338 443 339 444 filedir = filedir.split("/"); … … 342 447 filedir = filedir[filedir.length - 1]; 343 448 344 switch(filedir){ 345 case "css": case "sass": case "less": { 449 switch(filedir) 450 { 451 case "css": case "sass": case "less": 346 452 editor.getSession().setMode("ace/mode/css"); 347 }break; 348 case "js": { 453 break; 454 455 case "js": 349 456 editor.getSession().setMode("ace/mode/javascript"); 350 }break; 351 case "html": case "htm": case "xhtml": { 457 break; 458 459 case "html": case "htm": case "xhtml": 352 460 editor.getSession().setMode("ace/mode/html"); 353 }break; 354 case "htaccess": case "htpasswd": { 461 break; 462 463 case "htaccess": case "htpasswd": 355 464 editor.getSession().setMode("ace/mode/apache_conf"); 356 }break; 357 case "java": { 465 break; 466 467 case "java": 358 468 editor.getSession().setMode("ace/mode/java"); 359 }break; 360 case "py": { 469 break; 470 471 case "py": 361 472 editor.getSession().setMode("ace/mode/python"); 362 }break; 363 default: { 473 break; 474 475 default: 364 476 editor.getSession().setMode("ace/mode/php"); 365 }break; 366 } 367 } 368 369 370 function saveOpenedTab(){ 477 break; 478 } 479 } 480 481 482 function saveOpenedTab() 483 { 371 484 var openedtab = { files: [] }; 372 485 373 $("#gm_editors > div").each(function(){ 374 openedtab.files[openedtab.files.length] = encodeURIComponent($(this).data("directory")); 375 }); 486 $("#gm_editors > div").each(function() 487 { 488 openedtab.files[openedtab.files.length] = encodeURIComponent( $(this).data("directory") ); 489 } 490 ); 376 491 377 492 openedtab = JSON.stringify(openedtab); 378 493 379 var date = new Date(new Date().getTime() + 604800);494 var date = new Date(new Date().getTime() + 31536000000); 380 495 document.cookie = "opentabs="+openedtab+"; path=/; expires=" + date.toUTCString(); 381 496 … … 383 498 384 499 385 function getCookie(name){ 500 function getCookie(name) 501 { 386 502 var matches = document.cookie.match(new RegExp( 387 503 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" … … 391 507 392 508 393 function openPropertyFile(y, x, elementFile){ 509 function openPropertyFile(y, x, elementFile) 510 { 394 511 395 512 var directory = (elementFile.closest("ul.folder-objects").data("dir-folder") + "/" + elementFile.children("span").text()); … … 422 539 "class" : "cut", 423 540 text : translated_name.cut 424 }).on("click", function(){ 541 }).on("click", function() 542 { 425 543 $("li.obj-folder.transparent").removeClass("transparent"); 426 544 elementFile.addClass("transparent"); … … 435 553 text : translated_name.paste, 436 554 "buffered" : dirNameAction == null || dirAction == null?"false":"true" 437 }).on("click", function(){ 555 }).on("click", function() 556 { 438 557 if(dirNameAction != null && dirAction != null) 439 558 $.post(ajaxurl, { … … 446 565 elementFile.children("ul").remove(); 447 566 elementFile.append(response).trigger("click"); 448 setTrigger();449 567 elementFile.addClass("open").children("ul").addClass("expand"); 450 568 … … 453 571 "height":"65px" 454 572 }); 455 if(dirAction == "copy"){ 573 if(dirAction == "copy") 574 { 456 575 $("#property_menu").html("<bold><p>"+translated_name.success_copied+"</p></bold>"); 457 }else if(dirAction == "cut"){ 576 } 577 else if(dirAction == "cut") 578 { 458 579 $("#property_menu").html("<bold><p>"+translated_name.success_moved+"</p></bold>"); 459 580 } 460 581 461 if(unlinkUl != null){ 582 if(unlinkUl != null) 583 { 462 584 unlinkUl.remove(); 463 585 } … … 470 592 "class" : "rename newhead", 471 593 text : translated_name.rename 472 }).on("click", function(){ 594 }).on("click", function() 595 { 473 596 $("#property_menu").addClass("info_run").css({ 474 597 "width":"280px", 475 598 "height":"65px" 476 599 }).html("<input type='text' value='"+fileName+"'><input type='button' class='button button-primary' value='"+translated_name.apply+"'>"); 477 $("#property_menu input.button-primary").on("click", function(){ 478 $.post(ajaxurl, { 479 action: 'gmace_rename_and_delete_file', 480 type: "rename", 481 newname: $("#property_menu input[type='text']").val(), 482 directory: fileDir, 483 file: fileName 484 }, function(response) 485 { 486 var parent = elementFile.parent("ul").parent(); 487 488 parent.children("ul").remove(); 489 parent.append(response); 490 setTrigger(); 491 parent.addClass("open").children("ul").addClass("expand"); 492 493 $("#property_menu").html("<bold><p>"+translated_name.success_renamed+"</p></bold>"); 494 }); 495 }); 600 601 $("#property_menu input.button-primary").on("click", function() 602 { 603 $.post(ajaxurl, { 604 action: 'gmace_rename_and_delete_file', 605 type: "rename", 606 newname: $("#property_menu input[type='text']").val(), 607 directory: fileDir, 608 file: fileName 609 }, function(response) 610 { 611 var parent = elementFile.parent("ul").parent(); 612 613 parent.children("ul").remove(); 614 parent.append(response); 615 parent.addClass("open").children("ul").addClass("expand"); 616 617 $("#property_menu").html("<bold><p>"+translated_name.success_renamed+"</p></bold>"); 618 }); 619 } 620 ); 496 621 }) 497 622 ).append( … … 499 624 "class" : "delete", 500 625 text : translated_name.delete 501 }).on("click", function() {502 626 }).on("click", function() 627 { 503 628 elementFile.addClass("red"); 504 629 505 630 if(confirm(translated_name.reallydelete+" "+fileName+"?")) 631 { 506 632 $.post(ajaxurl, { 507 633 action: 'gmace_rename_and_delete_file', … … 509 635 directory: fileDir, 510 636 file: fileName 511 }, function(response){ 637 }, function(response) 638 { 512 639 var parent = elementFile.parent("ul").parent(); 513 640 514 641 parent.children("ul").remove(); 515 642 parent.append(response).trigger("click"); 516 setTrigger();517 643 parent.addClass("open").children("ul").addClass("expand"); 518 644 … … 522 648 }).html("<bold><p>"+translated_name.success_deleted+"</p></bold>"); 523 649 }); 650 } 524 651 else 652 { 525 653 elementFile.removeClass("red"); 654 } 526 655 }) 527 656 ).append( … … 529 658 "class" : "new_file newhead", 530 659 text : translated_name.new_file 531 }).on("click", function(){ 660 }).on("click", function() 661 { 532 662 $("#property_menu").addClass("info_run").css({ 533 663 "width":"280px", … … 547 677 elementFile.children("ul").remove(); 548 678 elementFile.append(response).trigger("click"); 549 setTrigger();550 679 elementFile.addClass("open").children("ul").addClass("expand"); 551 680 … … 558 687 "class" : "new_folder", 559 688 text : translated_name.new_folder 560 }).on("click", function(){ 689 }).on("click", function() 690 { 561 691 $("#property_menu").addClass("info_run").css({ 562 692 "width":"280px", … … 564 694 }).html("<input type='text'><input type='button' class='button button-primary' value='"+translated_name.create+"'>"); 565 695 566 $("#property_menu input.button-primary").on("click", function(){ 567 $.post(ajaxurl, { 568 action: 'gmace_create_file', 569 type: "folder", 570 directory: fileDir+"/"+fileName, 571 name: $("#property_menu input[type='text']").val() 572 }, function(response) 573 { 574 var parent = elementFile.parent("ul").parent(); 575 576 elementFile.children("ul").remove(); 577 elementFile.append(response).trigger("click"); 578 setTrigger(); 579 elementFile.addClass("open").children("ul").addClass("expand"); 580 581 $("#property_menu").html("<bold><p>"+translated_name.success_created+"</p></bold>"); 582 }); 583 }); 696 $("#property_menu input.button-primary").on("click", function() 697 { 698 $.post(ajaxurl, { 699 action: 'gmace_create_file', 700 type: "folder", 701 directory: fileDir+"/"+fileName, 702 name: $("#property_menu input[type='text']").val() 703 }, function(response) 704 { 705 var parent = elementFile.parent("ul").parent(); 706 707 elementFile.children("ul").remove(); 708 elementFile.append(response).trigger("click"); 709 elementFile.addClass("open").children("ul").addClass("expand"); 710 711 $("#property_menu").html("<bold><p>"+translated_name.success_created+"</p></bold>"); 712 }); 713 } 714 ); 584 715 }) 585 716 ).append( … … 587 718 "class" : "download newhead", 588 719 text : translated_name.download 589 }).on("click", function(){ 590 window.open("http://www.developer-wp.com/wp-admin/admin.php?page=gmace-editor&file="+fileDir.replace("/www", "")+"/"+fileName, "_blank"); 720 }).on("click", function() 721 { 722 window.open("/wp-admin/admin.php?page=gmace-editor&file="+fileDir.replace("/www", "")+"/"+fileName, "_blank"); 591 723 }) 592 724 ).append( … … 594 726 "class" : "unzip", 595 727 text : translated_name.unzip 596 }).on("click", function(){ 728 }).on("click", function() 729 { 597 730 598 731 }) … … 601 734 "class" : "openinnewtab", 602 735 text : translated_name.openinnewtab 603 }).on("click", function(){ 736 }).on("click", function() 737 { 604 738 window.open(fileDir.replace("/www", "")+"/"+fileName, "_blank"); 605 739 }) … … 608 742 "class" : "property newhead", 609 743 text : translated_name.properties 610 }).on("click", function(){ 744 }).on("click", function() 745 { 611 746 $.post(ajaxurl, { 612 747 action: 'gmace_get_property_file', 613 748 directory: fileDir, 614 749 file: fileName 615 }, function(response){ 750 }, function(response) 751 { 616 752 $("#property_menu").addClass("info_run").html(response); 617 753 }); … … 624 760 $("#property_menu").css({"top": "auto", "bottom": 0}); 625 761 626 if(fileDir + fileName == "/www" && type_obj == "folder"){ 762 if(fileDir + fileName == "/www" && type_obj == "folder") 763 { 627 764 $("#property_menu .copy, #property_menu .cut, #property_menu .rename, #property_menu .delete").remove(); 628 765 } 629 if(type_obj == "file"){ 766 if(type_obj == "file") 767 { 630 768 $("#property_menu .paste, #property_menu .new_folder, #property_menu .new_file").remove(); 631 769 if($.inArray(elementFile.attr("type"), archiveFormats) < 0) 770 { 632 771 $("#property_menu .unzip").remove(); 772 } 633 773 if($.inArray(elementFile.attr("type"), openingFormats) < 0) 774 { 634 775 $("#property_menu .openinnewtab").remove(); 635 }else{ 776 } 777 } 778 else 779 { 636 780 $("#property_menu .download, #property_menu .unzip, #property_menu .openinnewtab").remove(); 637 781 } 638 782 639 783 // Deleting property menu 640 $(document).off("mousedown").on("mousedown", function(e){ 641 if(!$(e.target).closest("#property_menu").length){ 642 $("#property_menu").remove(); 643 } 644 }); 784 $(document).off("mousedown").on("mousedown", function(e) 785 { 786 if(!$(e.target).closest("#property_menu").length) 787 { 788 $("#property_menu").remove(); 789 } 790 } 791 ); 645 792 } 646 793 -
gmace/trunk/assets/languages/gmace-en_UK.po
r1221233 r1327921 18 18 msgid "description" 19 19 msgstr "Free PHP-code editor Wordpress" 20 21 #. Author of the plugin/theme 22 msgid "action-save-file" 23 msgstr "Зберегти файл" 20 24 21 25 #. Author of the plugin/theme -
gmace/trunk/assets/languages/gmace-en_US.po
r1221233 r1327921 18 18 msgid "description" 19 19 msgstr "Free PHP-code editor Wordpress" 20 21 #. Author of the plugin/theme 22 msgid "action-save-file" 23 msgstr "Save file" 20 24 21 25 #. Author of the plugin/theme -
gmace/trunk/assets/languages/gmace-ru_RU.po
r1221233 r1327921 18 18 msgid "description" 19 19 msgstr "Свободный PHP-редактор кода Wordpress" 20 21 #. Author of the plugin/theme 22 msgid "action-save-file" 23 msgstr "Сохранить файл" 20 24 21 25 #. Author of the plugin/theme -
gmace/trunk/gmace.php
r1221233 r1327921 4 4 Plugin URI: http://wordpress.org/plugins/gmace/ 5 5 Description: Free PHP-editor code Wordpress. A variety of themes, syntax highlighting and a built file manager 6 Version: 1.4 6 Version: 1.4.1 7 7 Author: German Mesky 8 8 Author URI: http://vk.com/false_coder … … 10 10 define('GMACE_DIR', plugin_dir_path(__FILE__)); 11 11 define('GMACE_URL', plugin_dir_url(__FILE__)); 12 define('GMACEPATH', str_replace("\www/", "", ABSPATH));12 define('GMACEPATH', ABSPATH); 13 13 if(defined("WPLANG")) 14 14 define('GMACELANG', WPLANG); … … 17 17 18 18 19 if($_GET['file']){ 19 if($_GET['file']) 20 { 20 21 include(ABSPATH."/wp-includes/pluggable.php"); 21 22 include(GMACE_DIR."inc/download-manager.php"); … … 23 24 24 25 25 26 function gmace_init(){26 function gmace_init() 27 { 27 28 load_plugin_textdomain('gmace', false, dirname(plugin_basename(__FILE__)).'/assets/languages/'); 28 }add_action('plugins_loaded', 'gmace_init'); 29 } 30 add_action('plugins_loaded', 'gmace_init'); 29 31 30 32 … … 32 34 function gmace_add_to_menu() 33 35 { 34 if(!is_user_logged_in() || !current_user_can('administrator')){ 36 if(!is_user_logged_in() || !current_user_can('administrator')) 37 { 35 38 return; 36 39 } … … 39 42 add_action('admin_print_scripts-'.$page, 'gmace_enqueue_script'); 40 43 41 }add_action('admin_menu', 'gmace_add_to_menu'); 44 } 45 add_action('admin_menu', 'gmace_add_to_menu'); 42 46 43 47 … … 45 49 function gmace_enqueue_script() 46 50 { 47 if(!is_user_logged_in() || !current_user_can('administrator')){ 51 if(!is_user_logged_in() || !current_user_can('administrator')) 52 { 48 53 return; 49 54 } … … 82 87 83 88 84 function gmace_spread_page(){ include(GMACE_DIR."inc/editor.php"); } 89 function gmace_spread_page() 90 { 91 include(GMACE_DIR."inc/editor.php"); 92 } 85 93 86 94 … … 90 98 function gmace_read_file() 91 99 { 92 if(!is_user_logged_in() || !current_user_can('administrator')){ 100 if(!is_user_logged_in() || !current_user_can('administrator')) 101 { 93 102 wp_die(); 94 103 return; … … 98 107 99 108 wp_die(); 100 }add_action('wp_ajax_gmace_action_read', 'gmace_read_file'); 109 } 110 add_action('wp_ajax_gmace_action_read', 'gmace_read_file'); 101 111 102 112 … … 104 114 function gmace_rewrite_file() 105 115 { 106 if(!is_user_logged_in() || !current_user_can('administrator')){ 116 if(!is_user_logged_in() || !current_user_can('administrator')) 117 { 107 118 wp_die(); 108 119 return; … … 113 124 114 125 wp_die(); 115 }add_action('wp_ajax_gmace_rewrite_file', 'gmace_rewrite_file'); 126 } 127 add_action('wp_ajax_gmace_rewrite_file', 'gmace_rewrite_file'); 116 128 117 129 … … 119 131 function gmace_get_property_file() 120 132 { 121 if(!is_user_logged_in() || !current_user_can('administrator')){ 133 if(!is_user_logged_in() || !current_user_can('administrator')) 134 { 122 135 wp_die(); 123 136 return; … … 133 146 $size = round($size, 1).$sizeNames[$icount]; 134 147 135 if(filetype($directory) == "dir"){ 148 if(filetype($directory) == "dir") 149 { 136 150 print("<p><b>".__('name-directory', 'gmace').": </b>$directory</p>"); 137 151 print("<p><b>".__('name-size-of-object', 'gmace').": </b>".$size."</p>"); 138 152 print("<p><b>".__('name-type-of-object', 'gmace').": </b><span>".__('name-folder', 'gmace')."</span></p>"); 139 }else{ 153 } 154 else 155 { 140 156 print(" 141 157 <p> … … 150 166 151 167 wp_die(); 152 }add_action('wp_ajax_gmace_get_property_file', 'gmace_get_property_file'); 168 } 169 add_action('wp_ajax_gmace_get_property_file', 'gmace_get_property_file'); 153 170 154 171 … … 156 173 function gmace_renamedelete_obj() 157 174 { 158 if(!is_user_logged_in() || !current_user_can('administrator')){ 175 if(!is_user_logged_in() || !current_user_can('administrator')) 176 { 159 177 wp_die(); 160 178 return; … … 167 185 elseif($_POST['type']=="delete") 168 186 { 169 if(filetype(GMACEPATH.$_POST['directory']."/".$_POST['file']) == "dir"){ 187 if(filetype(GMACEPATH.$_POST['directory']."/".$_POST['file']) == "dir") 188 { 170 189 dir_unlink(GMACEPATH.$_POST['directory']."/".$_POST['file']); 171 190 print(gmace_scan_to($_POST['directory'])); 172 }else{ 191 } 192 else 193 { 173 194 unlink(GMACEPATH.$_POST['directory']."/".$_POST['file']); 174 195 print(gmace_scan_to($_POST['directory'])); 175 196 } 176 }else print("error"); 177 178 wp_die(); 179 }add_action('wp_ajax_gmace_rename_and_delete_file', 'gmace_renamedelete_obj'); 197 } 198 else print("error"); 199 200 wp_die(); 201 } 202 add_action('wp_ajax_gmace_rename_and_delete_file', 'gmace_renamedelete_obj'); 180 203 181 204 … … 183 206 function gmace_create_obj() 184 207 { 185 if(!is_user_logged_in() || !current_user_can('administrator')){ 208 if(!is_user_logged_in() || !current_user_can('administrator')) 209 { 186 210 wp_die(); 187 211 return; … … 190 214 $directory = GMACEPATH.$_POST['directory']."/".$_POST['name']; 191 215 192 if(($_POST['type'] =="folder" && mkdir($directory)) || ($_POST['type']=="file" && fopen($directory, "w")));216 if(($_POST['type'] == "folder" && mkdir($directory)) || ($_POST['type']=="file" && fopen($directory, "w"))); 193 217 print(gmace_scan_to($_POST['directory'])); 194 218 195 219 wp_die(); 196 }add_action('wp_ajax_gmace_create_file', 'gmace_create_obj'); 220 } 221 add_action('wp_ajax_gmace_create_file', 'gmace_create_obj'); 197 222 198 223 … … 200 225 function gmace_paste_obj() 201 226 { 202 if(!is_user_logged_in() || !current_user_can('administrator')){ 203 wp_die(); 204 return; 205 } 206 207 if(filetype(GMACEPATH.$_POST['from-directory']) == "dir"){ 227 if(!is_user_logged_in() || !current_user_can('administrator')) 228 { 229 wp_die(); 230 return; 231 } 232 233 if(filetype(GMACEPATH.$_POST['from-directory']) == "dir") 234 { 208 235 dir_move(GMACEPATH.$_POST['from-directory'], GMACEPATH.$_POST['to-directory'], $_POST['type'] == "cut"); 209 236 print(gmace_scan_to($_POST['to-directory'])); 210 }else{ 211 if(file_exists(GMACEPATH.$_POST['to-directory']."/".end(explode("/", $_POST['from-directory'])))){ 237 } 238 else 239 { 240 if(file_exists(GMACEPATH.$_POST['to-directory']."/".end(explode("/", $_POST['from-directory'])))) 241 { 212 242 $from_file = fopen(GMACEPATH.$_POST['from-directory'], "r"); 213 243 $to_file = fopen(get_new_name(GMACEPATH.$_POST['from-directory'], GMACEPATH.$_POST['to-directory']), "w+"); 214 244 215 245 $text = ""; 216 while(!feof($from_file)){ 246 while(!feof($from_file)) 247 { 217 248 $text .= fgets($from_file, 999); 218 249 } … … 223 254 224 255 if($_POST['type'] == "cut") 256 { 225 257 unlink(GMACEPATH.$_POST['from-directory']); 258 } 226 259 227 260 print(gmace_scan_to($_POST['to-directory'])); 228 }else{ 229 if(copy(GMACEPATH.$_POST['from-directory'], GMACEPATH.$_POST['to-directory']."/".basename($_POST['from-directory']))){ 261 } 262 else 263 { 264 if(copy(GMACEPATH.$_POST['from-directory'], GMACEPATH.$_POST['to-directory']."/".basename($_POST['from-directory']))) 265 { 230 266 if($_POST['type'] == "cut") 231 267 unlink(GMACEPATH.$_POST['from-directory']); … … 236 272 237 273 wp_die(); 238 }add_action('wp_ajax_gmace_paste_file', 'gmace_paste_obj'); 274 } 275 add_action('wp_ajax_gmace_paste_file', 'gmace_paste_obj'); 239 276 240 277 … … 242 279 function gmace_scan_to($directory) 243 280 { 244 if(!is_user_logged_in() || !current_user_can('administrator')){ 281 if(!is_user_logged_in() || !current_user_can('administrator')) 282 { 245 283 wp_die(); 246 284 return; … … 256 294 $obj = scandir(GMACEPATH.$directory); 257 295 if($obj) 258 foreach($obj as $index => $val){ 259 if(filetype(GMACEPATH.$directory."/".$val) == "dir"){ 260 if($val != "." && $val != ".."){ 296 { 297 foreach($obj as $index => $val) 298 { 299 if(filetype(GMACEPATH.$directory."/".$val) == "dir") 300 { 301 if($val != "." && $val != "..") 302 { 261 303 $folders[$folder_id]=$val; 262 304 $folder_id++; 263 305 } 264 }else{ 306 } 307 else 308 { 265 309 $files[$file_id]=$val; 266 310 $file_id++; 267 311 } 268 312 } 313 } 269 314 270 315 //------ SORT -------// 271 for($i = 0; $i < $folder_id; $i++){ 316 for($i = 0; $i < $folder_id; $i++) 317 { 272 318 $fd.="<li class='obj-folder'><span>".$folders[$i]."</span>".(gmace_scan_to($directory."/".$folders[$i]))."</li>"; 273 319 } 274 for($i = 0; $i < $file_id; $i++){ 320 for($i = 0; $i < $file_id; $i++) 321 { 275 322 $fd.="<li class='obj-file' type='".end(explode('.', $files[$i]))."'><span><a>".$files[$i]."</a></span></li>"; 276 323 } … … 283 330 function dir_move($dirFrom, $dirTo, $flag) 284 331 { 285 if(!is_user_logged_in() || !current_user_can('administrator')){ 332 if(!is_user_logged_in() || !current_user_can('administrator')) 333 { 286 334 wp_die(); 287 335 return; … … 290 338 $errors = 0; 291 339 292 if(file_exists($dirTo."/".basename($dirFrom)."/")){ 340 if(file_exists($dirTo."/".basename($dirFrom)."/")) 341 { 293 342 $dirTo = get_new_name($dirFrom, $dirTo); 294 }else{ 343 } 344 else 345 { 295 346 $dirTo .= "/".basename($dirFrom)."/"; 296 347 } 297 348 298 349 if(!file_exists($dirTo)) 350 { 299 351 mkdir($dirTo); 352 } 300 353 301 foreach(scandir($dirFrom) as $index => $val){ 302 if(filetype($dirFrom."/".$val) == "dir"){ 303 if($val != "." && $val != ".."){ 354 foreach(scandir($dirFrom) as $index => $val) 355 { 356 if(filetype($dirFrom."/".$val) == "dir") 357 { 358 if($val != "." && $val != "..") 359 { 304 360 $errors += dir_move($dirFrom."/".$val, $dirTo, $flag); 305 361 } 306 }else{ 362 } 363 else 364 { 307 365 if(!copy($dirFrom."/".$val, $dirTo."/".$val)) 366 { 308 367 $errors++; 368 } 309 369 } 310 370 } 311 371 312 372 if($flag) 373 { 313 374 dir_unlink($dirFrom); 375 } 314 376 315 377 return $errors == 0; … … 320 382 function get_new_name($dirFrom, $dirTo) 321 383 { 322 if(!is_user_logged_in() || !current_user_can('administrator')){ 384 if(!is_user_logged_in() || !current_user_can('administrator')) 385 { 323 386 wp_die(); 324 387 return; … … 329 392 $newname = explode(".", end($newname_r)); 330 393 331 if(filetype($dirFrom) == "dir"){ 332 while(file_exists($dirTo."/".$newname[count($newname)-1]."-".$icount)){ 394 if(filetype($dirFrom) == "dir") 395 { 396 while(file_exists($dirTo."/".$newname[count($newname)-1]."-".$icount)) 397 { 333 398 $icount++; 334 399 } … … 337 402 $newname_r[count($newname_r) - 1] = implode(".", $newname); 338 403 $newname_r = implode("/", $newname_r); 339 }else{ 340 while(file_exists($dirTo."/".$newname[count($newname)-2]."-".$icount.".".$newname[count($newname)-1])){ 404 } 405 else 406 { 407 while(file_exists($dirTo."/".$newname[count($newname)-2]."-".$icount.".".$newname[count($newname)-1])) 408 { 341 409 $icount++; 342 410 } … … 354 422 function dir_unlink($directory) 355 423 { 356 if(!is_user_logged_in() || !current_user_can('administrator')){ 424 if(!is_user_logged_in() || !current_user_can('administrator')) 425 { 357 426 wp_die(); 358 427 return; … … 361 430 $errors = 0; 362 431 363 foreach(scandir($directory) as $index=>$val){ 364 if(filetype($directory."/".$val) == "dir"){ 365 if($val!="." && $val!=".."){ 432 foreach(scandir($directory) as $index=>$val) 433 { 434 if(filetype($directory."/".$val) == "dir") 435 { 436 if($val!="." && $val!="..") 437 { 366 438 $errors += dir_unlink($directory."/".$val); 367 439 } 368 }else{ 440 } 441 else 442 { 369 443 if(!unlink($directory."/".$val)) 370 444 $errors++; … … 373 447 374 448 if(!rmdir($directory)) 449 { 375 450 $errors++; 451 } 376 452 377 453 return $errors == 0; … … 382 458 function dirsize($directory) 383 459 { 384 if(!is_user_logged_in() || !current_user_can('administrator')){ 460 if(!is_user_logged_in() || !current_user_can('administrator')) 461 { 385 462 wp_die(); 386 463 return; … … 389 466 $total_size; 390 467 391 foreach(scandir($directory) as $index=>$val){ 392 if(filetype($directory."/".$val)=="dir"){ 393 if($val != "." && $val != ".."){ 468 foreach(scandir($directory) as $index=>$val) 469 { 470 if(filetype($directory."/".$val)=="dir") 471 { 472 if($val != "." && $val != "..") 473 { 394 474 $total_size += dirsize($directory."/".$val); 395 475 } 396 }else{ 476 } 477 else 478 { 397 479 $total_size += filesize($directory."/".$val); 398 480 } -
gmace/trunk/inc/editor.php
r1221233 r1327921 3 3 <div id="text_file"> 4 4 <div id="gm_slider"> 5 <div></div> 5 <div class="hide-files"><div></div></div> 6 <input type="number" value="1" id="linePos" min="1"> 6 7 </div> 7 8 <div id="gm_hotbar"> 8 <div title="<?php _e('add-editor', 'gmace'); ?>" data-action="new-window-editor"> 9 <span class="fa fa-plus"></span> 10 </div> 11 <div title="<?php _e('list-files', 'gmace'); ?>" data-action="open-file-menu"> 12 <span class="fa fa-files-o"></span> 9 <div title="<?php _e('plugin-settings', 'gmace'); ?>" data-action="open-actions-menu"> 10 <span class="fa fa-cog"></span> 13 11 </div> 14 12 <div title="<?php _e('full-mode', 'gmace'); ?>" data-action="full-mode"> 15 13 <span class="fa fa-arrows-alt"></span> 16 14 </div> 17 <div title="<?php _e('plugin-settings', 'gmace'); ?>" data-action="open-actions-menu"> 18 <span class="fa fa-cog"></span> 15 <div title="<?php _e('add-editor', 'gmace'); ?>" data-action="new-window-editor"> 16 <span class="fa fa-plus"></span> 17 </div> 18 <div title="<?php _e('action-save-file', 'gmace'); ?>" data-action="action-save-file"> 19 <span class="fa fa-floppy-o"></span> 20 </div> 21 <div title="<?php _e('list-files', 'gmace'); ?>" data-action="open-file-menu"> 22 <span class="fa fa-files-o"></span> 19 23 </div> 20 24 </div> … … 22 26 <div id="gm_actions"> 23 27 <div> 24 <div>25 <p class='gm_p'><?php _e('current-row', 'gmace'); ?>:</p>26 <input type="number" value="1" name="linePos" min="1">27 </div>28 28 <div> 29 29 <div> … … 64 64 <div><?php print(gmace_scan_to("/"));?></div> 65 65 </div> 66 <input id="savefile" type="button" value="<?php _e('action-save', 'gmace'); ?>" class="button button-primary" title="<?php _e('title-how-to-save', 'gmace'); ?>">67 66 </div> -
gmace/trunk/readme.txt
r1221249 r1327921 1 === Plugin Name ===1 === Plugin Name === 2 2 Contributors: GMDragonX 3 3 Tags: gmace, code editor, code, syntax light 4 4 Requires at least: 4.0 5 Tested up to: 4. 2.46 Stable tag: 1.4 5 Tested up to: 4.4.1 6 Stable tag: 1.4.1 7 7 License: GNU 8 8 … … 11 11 == Description == 12 12 13 Quick code editor of any file on your Wordpress site with syntax highlighting, supports editing multiple files at once and stylish look in any design of your console. To access the editor, you need to scroll the mouse to the "Settings" button and in the dropdown menu, select "Edit GMAce".13 Quick code editor of any file on your Wordpress site with syntax highlighting, supports editing multiple files at once and stylish look in any design of your console. To access the editor, you need select "Edit GMAce" at admin-panel. 14 14 15 15 This plugin has the following advantages over other editors: 16 - Allows you to edit multiple files simultaneously. 17 - Allows you to perform operations on files and folders (delete, move, rename, create) directly in the editor. 18 - Instant change settings after their changes directly in the editor. 19 - Support some hot keys. 20 - Syntax highlighting. 16 - Allows you to edit multiple files simultaneously 17 - Allows you to perform operations on files and folders (delete, move, rename, create) directly in the editor 18 - Instant change settings after their changes directly in the editor 19 - Support some hot keys 20 - Syntax highlighting 21 - Save last opened tabs 21 22 22 23 == Installation == … … 27 28 == Screenshots == 28 29 29 1. Style editor 30 2. Full screen mode and a list of files 31 3. Selection of themes 32 4. Sidebar on the other hand 30 1. Style SolarizedLight. Left-Menu. 31 2. Style Monokai. Right-Menu. Highlighting the path to the selected file 33 32 34 33 == Changelog == 34 35 = 1.4.1 = 36 * Fixed bugs 37 * Line-field moved to main panel (on top) 38 * Save-button moved to sidebar 39 * Rewritten code and fixed problem with the path from the site root 40 + The tab bar can scroll 35 41 36 42 = 1.4 = … … 85 91 86 92 = Описание = 87 Быстрый редактор кода любого файла на вашем Wordpress-сайте с подсветкой синтаксиса. Для доступа к редактору, вам нужно навести на кнопку "Настройки" и в выпадающем меню выбрать "Редактор GMAce".93 Быстрый редактор кода любого файла на вашем Wordpress-сайте с подсветкой синтаксиса. Для доступа к редактору, вам нужно выбрать "Редактор GMAce" в админ-панели. 88 94 89 95 Этот плагин имеет такие преимущества перед другими плагинами: … … 94 100 - Поддержка некоторых гарячих клавиш. 95 101 - Подсветка синтаксиса 102 - Сохранение последник открытых вкладок 96 103 97 104 Это основные преимущества.
Note: See TracChangeset
for help on using the changeset viewer.