diff --git a/README.txt b/README.txt
index 88bcd3d..1794594 100644
--- a/README.txt
+++ b/README.txt
@@ -3,7 +3,7 @@ Contributors: JoelStarnes
Tags: order pages, ajax, re-order, drag-and-drop, admin, manage, page, pages, sidebar, header, hide,
Requires at least: 2.1
Tested up to: 2.5
-Stable tag: 1.1.0
+Stable tag: 1.1.1
Organise page order and manage page structure with this simple drag-and-drop Ajax interface.
@@ -51,6 +51,9 @@ Any good up-to-date browser should work fine. I test in Firefox, IE7, Safari and
==Change Log==
+* 1.1.1
+ * Fix a bug with console.log for safari, removed php code from js&css scripts to fix error
+
* 1.1.0
* Added quick rename
* Externalised scripts
diff --git a/pagemash-css.php b/pagemash.css
similarity index 83%
rename from pagemash-css.php
rename to pagemash.css
index e056de6..16f4a50 100644
--- a/pagemash-css.php
+++ b/pagemash.css
@@ -1,8 +1,3 @@
-
/* __ __ _
WordPress Plugin | \/ | | |
_ __ __ _ __ _ ___| \ / | __ _ ___| |__
@@ -23,17 +18,17 @@ body.wp-admin div#wpwrap div#wpcontent ul#pageMash_pages {
}
ul#pageMash_pages li.collapsed ul { display:none; }
ul#pageMash_pages li.children {
- background-image: url('collapse.png');
+ background-image: url('collapse.png');
}
ul#pageMash_pages li.collapsed.children {
- background-image: url('expand.png');
+ background-image: url('expand.png');
}
ul#pageMash_pages li {
display:block;
margin:2px 0 0 0;
border-bottom:1px solid #aaa; border-right:1px solid #aaa; border-top:1px solid #ccc; border-left:1px solid #ccc;
padding:4px 6px 4px 24px;
- background:#F1F1F1 url('page.png') no-repeat 4px 4px;
+ background:#F1F1F1 url('page.png') no-repeat 4px 4px;
list-style-type:none;
}
ul#pageMash_pages li span.title { font-weight: bold; }
diff --git a/pagemash-js.php b/pagemash.js
similarity index 77%
rename from pagemash-js.php
rename to pagemash.js
index c6c2de4..af10658 100644
--- a/pagemash-js.php
+++ b/pagemash.js
@@ -1,8 +1,3 @@
-
/* __ __ _
WordPress Plugin | \/ | | |
_ __ __ _ __ _ ___| \ / | __ _ ___| |__
@@ -16,24 +11,15 @@
*/
window.addEvent('domready', function(){
- // When logging debug messages with console.warn
- // if user doesn't have Firebug, write them to the DOM instead
- if (typeof console == "undefined") {
- // Create an unordered list to display warning messages
- var logsOutput = document.createElement('ul');
- $("debug_list").appendChild(logsOutput);
+ // If user doesn't have Firebug, create empty functions for the console.
+ if (!window.console || !console.firebug)
+ {
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
- // Define console.warn() function
- console = {
- warn: function(msg) {
- logsOutput.innerHTML += '
' + msg + '';
- }
- };
- // Create an empty function for all other console methods
- var consoleMethods = ["log", "debug", "info", "error", "assert", "dir", "dirxml", "group",
- "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
- for (var i = 0; i < consoleMethods.length; ++i)
- console[consoleMethods[i]] = function() {}
+ window.console = {};
+ for (var i = 0; i < names.length; ++i)
+ window.console[names[i]] = function() {}
}
});
@@ -63,7 +49,7 @@ var SaveList = function() {
var theDump = sortIt.serialize();
console.group('Database Update');
console.time('Update Chronometer');
- new Ajax('saveList.php', {
+ new Ajax('../wp-content/plugins/pagemash/saveList.php', {
method: 'post',
postBody: 'm='+Json.toString(theDump),
// update: "debug_list",
@@ -87,12 +73,10 @@ var SaveList = function() {
}).request();
};
/* toggle the remove class of grandparent */
-
var toggleRemove = function(el) {
el.parentNode.parentNode.parentNode.toggleClass('remove');
console.log("Page: '%s' has been %s", $E('span.title', el.parentNode.parentNode.parentNode).innerHTML, (el.parentNode.parentNode.hasClass('remove') ? 'HIDDEN': 'MADE VISIBLE' ));
}
-
/* ******** dom ready ******** */
@@ -102,7 +86,6 @@ window.addEvent('domready', function(){
onComplete: function(el) {
el.setStyle('background-color', '#F1F1F1');
sortIt.altColor();
- SaveList();
$ES('li','pageMash_pages').each(function(el) {
if( el.getElement('ul') ){
@@ -131,13 +114,11 @@ window.addEvent('domready', function(){
sortIt.altColor();
$('update_status').setStyle('opacity', 0);
-
$('pageMash_submit').addEvent('click', function(e){
e = new Event(e);
SaveList();
e.stop();
});
-
var pageMashInfo = new Fx.Slide('pageMashInfo');
$('pageMashInfo_toggle').addEvent('click', function(e){
diff --git a/pagemash.php b/pagemash.php
index 8c6c3e1..7118f2c 100644
--- a/pagemash.php
+++ b/pagemash.php
@@ -4,7 +4,7 @@ Plugin Name: pageMash
Plugin URI: http://joelstarnes.co.uk/pagemash/
Description: pageMash > pageManagement [WP_Admin > Manage > pageMash]
Author: Joel Starnes
-Version: 1.1.0
+Version: 1.1.1
Author URI: http://joelstarnes.co.uk/
CHANGELOG:
@@ -18,10 +18,7 @@ Release: Date: Description:
1.0.3 18 Mar 2008 Fixed datatype bug causing array problems
1.0.4 11 Apr 2008 removed shorthand PHP and updated CSS and JS headers to admin_print_scripts hook.
1.1.0 24 Apr 2008 Added quick rename, externalised scripts, changed display of edit|hide|rename links, deregisters prototype
-
-FIXME:
- @fixme with instantUpdateFeature hide will not send the update
- @todo readme txt CMS, mass edit pages, exclude pages, manage, organise,
+1.11 29 Apr 2008 Fix a bug with console.log for safari, removed php code from js&css scripts to fix error
*/
#########CONFIG OPTIONS############################################
@@ -31,12 +28,6 @@ $minlevel = 7; /*[deafult=7]*/
$excludePagesFeature = true; /*[deafult=true]*/
/* Allows you to set pages not to be listed */
-$instantUpdateFeature = false; /*[deafult=false]*/
-/* Updates the database instantly after a move using ajax
- otherwise it will wait for update button press.
- nb. this feature has not been optimised and enabling will cause
- much increased server load */
-
###################################################################
/*
INSPIRATIONS/CREDITS:
@@ -105,13 +96,13 @@ function pageMash_getPages($post_parent){
}
function pageMash_main(){
- global $instantUpdateFeature, $excludePagesFeature, $excludePagesList;
+ global $excludePagesFeature, $excludePagesList;
if(!is_array(get_option('exclude_pages'))) $excludePagesList=array(); else $excludePagesList = get_option('exclude_pages'); //if it's empty set as an empty array
?>
- version [1.1.0]
+ version [1.1.1]
pageMash - pageManagement
@@ -123,9 +114,7 @@ function pageMash_main(){
-
-
@@ -154,7 +143,7 @@ function pageMash_head(){
wp_enqueue_script('pagemash_mootools', '/'.$pageMash_rel_dir.'nest-mootools.v1.11.js', false, false); //code is not compatible with other releases of moo
wp_enqueue_script('pagemash_nested', '/'.$pageMash_rel_dir.'nested.js', array('pagemash_mootools'), false);
wp_enqueue_script('pagemash_inlineEdit', '/'.$pageMash_rel_dir.'inlineEdit.v1.2.js', array('pagemash_mootools'), false);
- wp_enqueue_script('pagemash', '/'.$pageMash_rel_dir.'pagemash-js.php', array('pagemash_mootools'), false);
+ wp_enqueue_script('pagemash', '/'.$pageMash_rel_dir.'pagemash.js', array('pagemash_mootools'), false);
add_action('admin_head', 'pageMash_add_css', 1);
}
@@ -162,7 +151,7 @@ function pageMash_head(){
function pageMash_add_css(){
global $pageMash_abs_dir;
?>
-
+