From 1ffc211ddb46bfabe649bbacd1e36bc8e035afa3 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 4 Sep 2011 15:32:41 +0200 Subject: Revert tmp commits This reverts commit ba6c070edd92ca0fc8a6ee85d51769d64a19ee7c. This reverts commit 923510088dda99cb2790b15308593e47369d4f01. --- inc/search.php | 19 ---- lib/exe/js.php | 1 - lib/scripts/compatibility.js | 2 +- lib/scripts/edit.js | 221 +++++++++++++++++++++++-------------------- lib/scripts/index.js | 3 + lib/scripts/linkwiz.js | 4 + lib/scripts/media.js | 3 + lib/scripts/qsearch.js | 3 + lib/scripts/script.js | 5 +- lib/scripts/toolbar.js | 35 ++++--- lib/scripts/tree.js | 3 + lib/styles/screen.css | 5 - 12 files changed, 161 insertions(+), 143 deletions(-) diff --git a/inc/search.php b/inc/search.php index 5ba28a1fc..bc7c35482 100644 --- a/inc/search.php +++ b/inc/search.php @@ -596,25 +596,6 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ if($opts['firsthead']) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER); } - if($type == 'd' && !$opts['skipacl'] && $opts['sneakyacl'] && $item['perm'] < AUTH_READ) { - if ($opts['sneakyacl'] === 2) { - // Perform shy sneaking, i. e. just show the ns if it contains - // something accessible - $old_data_count = count($data); - search($data,$base,'search_universal',$opts,$file,$lvl+1); - if (count($data) > $old_data_count) { - // Contains something visible - array_splice($data, $old_data_count, $return ? 0 : count($data), - array($item)); - } else { - // Contains nothing visible, so hide - $data = array_slice($data, 0, $old_data_count); - } - } - // Stop recursing in any case since we did it ourself - return false; - } - // finally add the item $data[] = $item; return $return; diff --git a/lib/exe/js.php b/lib/exe/js.php index d52fe3607..e96d45ee6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -86,7 +86,6 @@ function js_out(){ // add some global variables print "var DOKU_BASE = '".DOKU_BASE."';"; print "var DOKU_TPL = '".DOKU_TPL."';"; - // FIXME: Move those to JSINFO print "var DOKU_UHN = ".((int) useHeading('navigation')).";"; print "var DOKU_UHC = ".((int) useHeading('content')).";"; diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js index 3b027f016..39f703c71 100644 --- a/lib/scripts/compatibility.js +++ b/lib/scripts/compatibility.js @@ -38,7 +38,7 @@ function DEPRECATED_WRAP(func, context) { return function () { DEPRECATED(); return func.apply(context || this, arguments); - }; + } } /** diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index fe8e4eb78..816568e92 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -14,36 +14,38 @@ * @author Michal Rezler */ function createToolButton(icon,label,key,id,classname){ - var $btn = jQuery(document.createElement('button')), - $ico = jQuery(document.createElement('img')); + var $ = jQuery; + var btn = $('