Version Description
- Fix browser compatibility issues
Download this release
Release Info
Developer | WPsites |
Plugin | WPide |
Version | 2.0.8 |
Comparing to | |
See all releases |
Code changes from version 2.0.7 to 2.0.8
- WPide.php +1 -1
- js/load-editor.js +36 -19
- readme.txt +6 -1
- wpide.css +10 -0
WPide.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WPide
|
4 |
Plugin URI: https://github.com/WPsites/WPide
|
5 |
Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
6 |
-
Version: 2.0.
|
7 |
Author: Simon Dunton
|
8 |
Author URI: http://www.wpsites.co.uk
|
9 |
*/
|
3 |
Plugin Name: WPide
|
4 |
Plugin URI: https://github.com/WPsites/WPide
|
5 |
Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
6 |
+
Version: 2.0.8
|
7 |
Author: Simon Dunton
|
8 |
Author URI: http://www.wpsites.co.uk
|
9 |
*/
|
js/load-editor.js
CHANGED
@@ -116,21 +116,20 @@ function onSessionChange(e) {
|
|
116 |
var lead = sel.getSelectionLead();
|
117 |
|
118 |
var pos = editor.renderer.textToScreenCoordinates(lead.row, lead.column);
|
119 |
-
var ac; // #ac is auto complete html select element
|
120 |
|
|
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
//add editor click listener
|
127 |
//editor clicks should hide the autocomplete dropdown
|
128 |
editor.container.addEventListener('click', function(e){
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
}, false);
|
136 |
|
@@ -241,17 +240,33 @@ function onSessionChange(e) {
|
|
241 |
oHandler = jQuery("#ac").msDropDown({visibleRows:10, rowHeight:20}).data("dd");
|
242 |
|
243 |
jQuery("#ac_child").click(function(item){
|
244 |
-
//
|
245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
});
|
247 |
|
248 |
jQuery("#ac_child a").mouseover(function(item){
|
249 |
//show the code in the info panel
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
//if this command item is enabled
|
252 |
-
if (jQuery("#"+
|
253 |
|
254 |
-
var selected_item_index = jQuery("#"+
|
255 |
|
256 |
if (selected_item_index > -1){ //if select item is valid
|
257 |
|
@@ -288,8 +303,8 @@ function token_test(){
|
|
288 |
}
|
289 |
|
290 |
function wpide_close_autocomplete(){
|
291 |
-
if (ac) ac.style.display='none';
|
292 |
-
if (oHandler) oHandler.close();
|
293 |
|
294 |
autocompleting = false;
|
295 |
|
@@ -518,7 +533,7 @@ function saveDocument() {
|
|
518 |
|
519 |
//enter/return command
|
520 |
function selectACitem (item) {
|
521 |
-
if( document.getElementById('ac').style.display === 'block'
|
522 |
var ac_dropdwn = document.getElementById('ac');
|
523 |
var tag = ac_dropdwn.options[ac_dropdwn.selectedIndex].value;
|
524 |
var sel = editor.selection.getRange();
|
@@ -534,7 +549,7 @@ function selectACitem (item) {
|
|
534 |
//clean up the tag/command
|
535 |
tag = tag.replace(")", ""); //remove end parenthesis
|
536 |
|
537 |
-
|
538 |
editor.selection.setSelectionRange(sel);
|
539 |
editor.insert(tag);
|
540 |
|
@@ -619,6 +634,7 @@ jQuery(document).ready(function($) {
|
|
619 |
|
620 |
//show command help panel for this command
|
621 |
wpide_function_help();
|
|
|
622 |
|
623 |
}else if( document.getElementById('ac').style.display === 'block' ) {
|
624 |
var select=document.getElementById('ac');
|
@@ -627,6 +643,7 @@ jQuery(document).ready(function($) {
|
|
627 |
} else {
|
628 |
select.selectedIndex = select.selectedIndex-1;
|
629 |
}
|
|
|
630 |
} else {
|
631 |
var range = editor.getSelectionRange();
|
632 |
editor.clearSelection();
|
116 |
var lead = sel.getSelectionLead();
|
117 |
|
118 |
var pos = editor.renderer.textToScreenCoordinates(lead.row, lead.column);
|
119 |
+
var ac = document.getElementById('ac'); // #ac is auto complete html select element
|
120 |
|
121 |
+
|
122 |
|
123 |
+
if( typeof ac !== 'undefined' ){
|
124 |
+
|
125 |
+
//add editor click listener
|
|
|
|
|
126 |
//editor clicks should hide the autocomplete dropdown
|
127 |
editor.container.addEventListener('click', function(e){
|
128 |
|
129 |
+
wpide_close_autocomplete();
|
130 |
+
|
131 |
+
autocompleting=false;
|
132 |
+
autocompletelength = 2;
|
133 |
|
134 |
}, false);
|
135 |
|
240 |
oHandler = jQuery("#ac").msDropDown({visibleRows:10, rowHeight:20}).data("dd");
|
241 |
|
242 |
jQuery("#ac_child").click(function(item){
|
243 |
+
//get the link node and pass to select AC item function
|
244 |
+
if (typeof item.srcElement != 'undefined'){
|
245 |
+
var link_node = item.srcElement; //works on chrome
|
246 |
+
}else{
|
247 |
+
var link_node = item.target; //works on Firefox etc
|
248 |
+
}
|
249 |
+
|
250 |
+
selectACitem(link_node);
|
251 |
});
|
252 |
|
253 |
jQuery("#ac_child a").mouseover(function(item){
|
254 |
//show the code in the info panel
|
255 |
+
|
256 |
+
//get the link ID
|
257 |
+
if (typeof item.srcElement != 'undefined'){
|
258 |
+
var link_id = item.srcElement.id; //works on chrome
|
259 |
+
}else{
|
260 |
+
var link_id = item.target.id; //works on Firefox etc
|
261 |
+
}
|
262 |
+
|
263 |
+
if (link_id == '') return; //if the link doesn't have an id it's not valid so just stop
|
264 |
+
|
265 |
+
|
266 |
//if this command item is enabled
|
267 |
+
if (jQuery("#"+link_id).hasClass("enabled")){
|
268 |
|
269 |
+
var selected_item_index = jQuery("#"+link_id).index();
|
270 |
|
271 |
if (selected_item_index > -1){ //if select item is valid
|
272 |
|
303 |
}
|
304 |
|
305 |
function wpide_close_autocomplete(){
|
306 |
+
if (typeof document.getElementById('ac') != 'undefined') document.getElementById('ac').style.display='none';
|
307 |
+
if (typeof oHandler != 'undefined') oHandler.close();
|
308 |
|
309 |
autocompleting = false;
|
310 |
|
533 |
|
534 |
//enter/return command
|
535 |
function selectACitem (item) {
|
536 |
+
if( document.getElementById('ac').style.display === 'block' && oHandler.visible() == 'block' ){
|
537 |
var ac_dropdwn = document.getElementById('ac');
|
538 |
var tag = ac_dropdwn.options[ac_dropdwn.selectedIndex].value;
|
539 |
var sel = editor.selection.getRange();
|
549 |
//clean up the tag/command
|
550 |
tag = tag.replace(")", ""); //remove end parenthesis
|
551 |
|
552 |
+
//console.log(tag);
|
553 |
editor.selection.setSelectionRange(sel);
|
554 |
editor.insert(tag);
|
555 |
|
634 |
|
635 |
//show command help panel for this command
|
636 |
wpide_function_help();
|
637 |
+
console.log("handler is visible");
|
638 |
|
639 |
}else if( document.getElementById('ac').style.display === 'block' ) {
|
640 |
var select=document.getElementById('ac');
|
643 |
} else {
|
644 |
select.selectedIndex = select.selectedIndex-1;
|
645 |
}
|
646 |
+
console.log("ac is visible");
|
647 |
} else {
|
648 |
var range = editor.getSelectionRange();
|
649 |
editor.clearSelection();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: WPsites, Thomas Wieczorek
|
|
3 |
Tags: code, theme editor, plugin editor, code editor
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.3.2
|
6 |
-
Stable tag: 2.0.
|
7 |
|
8 |
WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
9 |
|
@@ -15,6 +15,8 @@ Please come forward (either on github or the WordPress support forum) with any b
|
|
15 |
|
16 |
This plugin would not be possible without the Ajax.org Cloud9 Editor (http://ace.ajax.org/) which is the embedded code editor that powers much of the functionality.
|
17 |
|
|
|
|
|
18 |
= Current Features: =
|
19 |
|
20 |
* Syntax highlighting
|
@@ -74,6 +76,9 @@ Either the image contains no image data (its a new empty file) or the image is n
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 2.0.7 =
|
78 |
* Fixing issue with closing tabs not focusing onto next tab once closed.
|
79 |
* Fixed issue with detecting ajax url correctly which was causing all WPide ajax requests to fail if WordPress was installed in a subdirectory.
|
3 |
Tags: code, theme editor, plugin editor, code editor
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.3.2
|
6 |
+
Stable tag: 2.0.8
|
7 |
|
8 |
WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
9 |
|
15 |
|
16 |
This plugin would not be possible without the Ajax.org Cloud9 Editor (http://ace.ajax.org/) which is the embedded code editor that powers much of the functionality.
|
17 |
|
18 |
+
This plugin performs best in the Chrome web browser.
|
19 |
+
|
20 |
= Current Features: =
|
21 |
|
22 |
* Syntax highlighting
|
76 |
|
77 |
== Changelog ==
|
78 |
|
79 |
+
= 2.0.8 =
|
80 |
+
* Fix browser compatibility issues
|
81 |
+
|
82 |
= 2.0.7 =
|
83 |
* Fixing issue with closing tabs not focusing onto next tab once closed.
|
84 |
* Fixed issue with detecting ajax url correctly which was causing all WPide ajax requests to fail if WordPress was installed in a subdirectory.
|
wpide.css
CHANGED
@@ -217,4 +217,14 @@
|
|
217 |
#publishing-action img{
|
218 |
visibility: hidden;
|
219 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
|
217 |
#publishing-action img{
|
218 |
visibility: hidden;
|
219 |
}
|
220 |
+
|
221 |
+
div#side-info-column{
|
222 |
+
width:23%;
|
223 |
+
}
|
224 |
+
#submitdiv.postbox{
|
225 |
+
min-width:220px;
|
226 |
+
}
|
227 |
+
|
228 |
+
|
229 |
+
|
230 |
|