PluginProbe
Debug Log Manager – Conveniently Monitor and Inspect Errors / 2.3.1
Debug Log Manager – Conveniently Monitor and Inspect Errors v2.3.1
2.5.2 2.5.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.3.0 1.3.1 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.8.0 1.8.2 1.8.3 1.8.4 All 49 releases
debug-log-manager / assets / js / plugin-editor.js

plugin-editor.js in Debug Log Manager – Conveniently Monitor and Inspect Errors 2.3.1, at assets/js/plugin-editor.js

42 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function( $ ) {
2 'use strict';
3
4 $(document).ready( function() {
5
6 enableViewMode();
7
8 $('#toggle-editing').click(function() {
9 enableEditMode();
10 });
11
12 }); // end of (document).ready();
13
14 function enableViewMode() {
15
16 $('.wrap h1').remove();
17 $('.fileedit-title').remove();
18
19 $('.wrap').prepend('<div class="fileedit-title"><h1>View Plugins</h1><button id="toggle-editing" class="button button-small button-secondary">Enable Editing</button></div>');
20
21 $('.fileedit-sub h2').text($(".fileedit-sub h2").text().replace("Editing", "Viewing"));
22
23 // Plugin selector label
24 $(".fileedit-sub label#theme-plugin-editor-selector").text($(".fileedit-sub label#theme-plugin-editor-selector").text().replace("edit", "view"));
25
26 $('.editor-notices').hide();
27 $('.submit').hide();
28
29 }
30
31 function enableEditMode() {
32
33 $('.fileedit-title').remove();
34 $('.wrap').prepend('<div class="fileedit-title"><h1>Edit Plugins</h1></div>');
35
36 $('.fileedit-sub h2').text($(".fileedit-sub h2").text().replace("Viewing", "Editing"));
37
38 $('.editor-notices').show();
39 $('.submit').show();
40 }
41
42 })( jQuery );