From 2d6262c1145c5937afa14d66b5203c84393df679 Mon Sep 17 00:00:00 2001 From: Pierre Spring Date: Fri, 17 Sep 2010 15:13:37 +0200 Subject: loading jQuery and putting it into noConflict mode --- lib/exe/js.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 3756c43b9..c916bf85d 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -34,8 +34,16 @@ function js_out(){ // The generated script depends on some dynamic options $cache = getCacheName('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); + // load jQuery, minified if compression is eanbled. + $jquery_file_path = DOKU_INC.'lib/scripts/jquery/jquery'; + if($conf['compress']) { + $jquery_file_path .= '.min'; + } + $jquery_file_path .= '.js'; + // array of core files $files = array( + $jquery_file_path, DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', -- cgit v1.2.3 From c4bb7947fcb2d4a5e5f8a15d9e3bbec333e44e13 Mon Sep 17 00:00:00 2001 From: Pierre Spring Date: Sun, 10 Oct 2010 23:42:56 +0200 Subject: Got rid of drag.js and added jQuery UI instead. --- lib/exe/js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index c916bf85d..59d1ded2c 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,6 +44,8 @@ function js_out(){ // array of core files $files = array( $jquery_file_path, + DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.core.min.js', + DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.interactions.min.js', DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', @@ -52,7 +54,6 @@ function js_out(){ DOKU_INC.'lib/scripts/tw-sack.js', DOKU_INC.'lib/scripts/ajax.js', DOKU_INC.'lib/scripts/index.js', - DOKU_INC.'lib/scripts/drag.js', DOKU_INC.'lib/scripts/textselection.js', DOKU_INC.'lib/scripts/toolbar.js', DOKU_INC.'lib/scripts/edit.js', -- cgit v1.2.3 From 80997d21e0aee9b8f27153000742ecd781f429f8 Mon Sep 17 00:00:00 2001 From: Michal Rezler Date: Sat, 26 Mar 2011 12:46:37 +0100 Subject: locktimer.js is jQueryfied --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index f953aae9e..b0b722a2e 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -122,7 +122,7 @@ function js_out(){ js_runonstart("initSizeCtl('size__ctl','wiki__text')"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ - js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")"); + js_runonstart("initLocktimer(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")"); } js_runonstart('scrollToMarker()'); js_runonstart('focusMarker()'); -- cgit v1.2.3 From fdfb9c6a2877dcbadeab697aad779bea76780965 Mon Sep 17 00:00:00 2001 From: Michal Rezler Date: Sat, 26 Mar 2011 15:42:22 +0100 Subject: cookie.js is jQueryfied, added jQuery-cookie-plugin --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index b0b722a2e..d3377fb0b 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,6 +44,7 @@ function js_out(){ // array of core files $files = array( $jquery_file_path, + DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.core.min.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.interactions.min.js', DOKU_INC.'lib/scripts/helpers.js', -- cgit v1.2.3 From 11bf24d856a6a4cb606bc6fe10ebcbd844f4127f Mon Sep 17 00:00:00 2001 From: Michal Rezler Date: Sun, 27 Mar 2011 13:57:35 +0200 Subject: helpers.js was removed - it basically contained functions they are implemented in jQuery library --- lib/exe/js.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index d3377fb0b..4aa2851c8 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -47,7 +47,6 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.core.min.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.interactions.min.js', - DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', DOKU_INC.'lib/scripts/cookie.js', -- cgit v1.2.3 From 2ed49e2ac1bc9ed8a9d514d3ea9515e455768152 Mon Sep 17 00:00:00 2001 From: Michal Rezler Date: Mon, 28 Mar 2011 23:09:13 +0200 Subject: JS API is corrected to the original state --- lib/exe/js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 4aa2851c8..169803658 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -47,6 +47,7 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.core.min.js', DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.interactions.min.js', + DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', DOKU_INC.'lib/scripts/cookie.js', @@ -122,7 +123,7 @@ function js_out(){ js_runonstart("initSizeCtl('size__ctl','wiki__text')"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ - js_runonstart("initLocktimer(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")"); + js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")"); } js_runonstart('scrollToMarker()'); js_runonstart('focusMarker()'); -- cgit v1.2.3 From ff482cae0f5a620704d845037d60ae13ab851410 Mon Sep 17 00:00:00 2001 From: Michal Rezler Date: Wed, 30 Mar 2011 23:08:13 +0200 Subject: fixed import for drag.js and started a rewrite of edit.js --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 169803658..183ae6d4c 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -55,6 +55,7 @@ function js_out(){ DOKU_INC.'lib/scripts/tw-sack.js', DOKU_INC.'lib/scripts/ajax.js', DOKU_INC.'lib/scripts/index.js', + DOKU_INC.'lib/scripts/drag.js', DOKU_INC.'lib/scripts/textselection.js', DOKU_INC.'lib/scripts/toolbar.js', DOKU_INC.'lib/scripts/edit.js', -- cgit v1.2.3 From 17582ec6bab09e9d9faf53a93d22ecb4fbf2bb47 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 10:21:08 +0200 Subject: Add a newline when loading JavaScript files This avoids problems when the files are concatenated later. --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index a3efff700..5ef3b5801 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -185,7 +185,7 @@ function js_load($file){ } $data = str_replace($match[0],$idata,$data); } - echo $data; + echo "$data\n"; } /** -- cgit v1.2.3 From 43576758311bd64506284b15a3a12f153a1c1bc2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 11:28:43 +0200 Subject: Updated jQuery-UI, added jQuery updater, load theme in CSS dispatcher This patch adds a simple shell script to easily update the jQuery/jQuery-UI+theme bundle to the latest available version. The jQuery-UI CSS theme is now loaded in lib/exe/css.php (before plugin and template styles - 3rd party authors can override the styles). --- lib/exe/js.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 5ef3b5801..69bc730ac 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -34,19 +34,14 @@ function js_out(){ // The generated script depends on some dynamic options $cache = getCacheName('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); - // load jQuery, minified if compression is eanbled. - $jquery_file_path = DOKU_INC.'lib/scripts/jquery/jquery'; - if($conf['compress']) { - $jquery_file_path .= '.min'; - } - $jquery_file_path .= '.js'; + // load minified version for some files + $min = $conf['compress'] ? '.min' : ''; // array of core files $files = array( - $jquery_file_path, + DOKU_INC."lib/scripts/jquery/jquery$min.js"; DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', - DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.core.min.js', - DOKU_INC.'lib/scripts/jquery-ui/jquery-ui.interactions.min.js', + DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', -- cgit v1.2.3 From 303d4f1470333e1ba613083310ab52b886f3d68c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 12:15:18 +0200 Subject: fixed typo --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 69bc730ac..b0618dc4c 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -39,7 +39,7 @@ function js_out(){ // array of core files $files = array( - DOKU_INC."lib/scripts/jquery/jquery$min.js"; + DOKU_INC."lib/scripts/jquery/jquery$min.js", DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC.'lib/scripts/helpers.js', -- cgit v1.2.3 From 6992ea08420671362032b795cd2972cfc0ef5f01 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 13:15:56 +0200 Subject: fixed JavaScript compressor for certain regexes This fixes a problem with running the minified jQuery through the compressor. --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index b0618dc4c..e4c5c2ab8 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -294,7 +294,7 @@ function js_compress($s){ // items that don't need spaces next to them $chars = "^&|!+\-*\/%=\?:;,{}()<>% \t\n\r'\"[]"; - $regex_starters = array("(", "=", "[", "," , ":"); + $regex_starters = array("(", "=", "[", "," , ":", "!"); $whitespaces_chars = array(" ", "\t", "\n", "\r", "\0", "\x0B"); -- cgit v1.2.3 From 17e2e2545f2fd3607a14238ecee25eb7a605ce84 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 10 Jun 2011 20:26:04 +0200 Subject: Moved behavioural functions into it's own object and file JavaScript functions adding behaviours based on IDs or class names where moved to their own object into behaviour.js and where jQueryized. --- lib/exe/js.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index e4c5c2ab8..0d4a08ebd 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -60,6 +60,7 @@ function js_out(){ DOKU_INC.'lib/scripts/subscriptions.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_TPLINC.'script.js', + DOKU_INC.'lib/scripts/behaviour.js', ); // add possible plugin scripts and userscript @@ -121,8 +122,6 @@ function js_out(){ if($conf['locktime'] != 0){ js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); } - js_runonstart('scrollToMarker()'); - js_runonstart('focusMarker()'); // init hotkeys - must have been done after init of toolbar # disabled for FS#1958 js_runonstart('initializeHotkeys()'); -- cgit v1.2.3 From cd06d16faa924afeb14f864b058e01ce8867057c Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Tue, 21 Jun 2011 13:30:18 +0200 Subject: Fix index Javascript, introduce compatibility.js * Removed "use strict" statement, since it does not work with our script file joining (the statement has to be the first in a file or function) * Make index a global object again to allow overriding and enhancing * Use prefix dw_ for index object * Reintroduce index.treeattach * Support deprecated index.toggle calling convention * Add $ prefix for jQuery variables * Use slide animation for freshly loaded sublists as well * Fix various errors --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 0d4a08ebd..25dc8496a 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -58,6 +58,7 @@ function js_out(){ DOKU_INC.'lib/scripts/linkwiz.js', DOKU_INC.'lib/scripts/media.js', DOKU_INC.'lib/scripts/subscriptions.js', + DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_TPLINC.'script.js', DOKU_INC.'lib/scripts/behaviour.js', -- cgit v1.2.3 From c949174a2e8c324e3e463a9d10e9e6dc07b0ba9e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 22 Jun 2011 21:05:17 +0200 Subject: Fix and refactor ajax.js * Move file to qsearch.js * Rename object to dw_qsearch * Remove unnecessary usage of Delay * Use $ prefix for jQuery objects * Fix result list hiding on click * Fix namespace shorting --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 25dc8496a..28894ffc6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -48,7 +48,7 @@ function js_out(){ DOKU_INC.'lib/scripts/cookie.js', DOKU_INC.'lib/scripts/script.js', DOKU_INC.'lib/scripts/tw-sack.js', - DOKU_INC.'lib/scripts/ajax.js', + DOKU_INC.'lib/scripts/qsearch.js', DOKU_INC.'lib/scripts/index.js', DOKU_INC.'lib/scripts/drag.js', DOKU_INC.'lib/scripts/textselection.js', -- cgit v1.2.3 From 6619f42eb475ad91a0b73d1aa6268ff41c6129a2 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 1 Jul 2011 16:49:28 +0200 Subject: Refactor CSS and JS caching * Increase HTTP cache time since the resources are timestamped on request anyway * Check userscript.js only once for JS cache validation * Use cache class --- lib/exe/js.php | 67 ++++++++-------------------------------------------------- 1 file changed, 9 insertions(+), 58 deletions(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 28894ffc6..0688825c6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -32,7 +32,8 @@ function js_out(){ global $config_cascade; // The generated script depends on some dynamic options - $cache = getCacheName('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); + $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'], + '.js'); // load minified version for some files $min = $conf['compress'] ? '.min' : ''; @@ -70,25 +71,13 @@ function js_out(){ $files[] = $config_cascade['userscript']['default']; } + $cache_files = array_merge($files, getConfigFiles('main')); + $cache_files[] = __FILE__; + // check cache age & handle conditional request - header('Cache-Control: public, max-age=3600'); - header('Pragma: public'); - if(js_cacheok($cache,$files)){ - http_conditionalRequest(filemtime($cache)); - if($conf['allowdebug']) header("X-CacheUsed: $cache"); - - // finally send output - if ($conf['gzip_output'] && http_gzip_valid($cache)) { - header('Vary: Accept-Encoding'); - header('Content-Encoding: gzip'); - readfile($cache.".gz"); - } else { - if (!http_sendfile($cache)) readfile($cache); - } - return; - } else { - http_conditionalRequest(time()); - } + // This may exit if a cache can be used + http_cached($cache->cache, + $cache->useCache(array('files' => $cache_files))); // start output buffering and build the script ob_start(); @@ -137,18 +126,7 @@ function js_out(){ $js .= "\n"; // https://bugzilla.mozilla.org/show_bug.cgi?id=316033 - // save cache file - io_saveFile($cache,$js); - if(function_exists('gzopen')) io_saveFile("$cache.gz",$js); - - // finally send output - if ($conf['gzip_output']) { - header('Vary: Accept-Encoding'); - header('Content-Encoding: gzip'); - print gzencode($js,9,FORCE_GZIP); - } else { - print $js; - } + http_cached_finish($cache->cache, $js); } /** @@ -183,33 +161,6 @@ function js_load($file){ echo "$data\n"; } -/** - * Checks if a JavaScript Cache file still is valid - * - * @author Andreas Gohr - */ -function js_cacheok($cache,$files){ - if(isset($_REQUEST['purge'])) return false; //support purge request - - $ctime = @filemtime($cache); - if(!$ctime) return false; //There is no cache - - global $config_cascade; - - // some additional files to check - $files = array_merge($files, getConfigFiles('main')); - $files[] = $config_cascade['userscript']['default']; - $files[] = __FILE__; - - // now walk the files - foreach($files as $file){ - if(@filemtime($file) > $ctime){ - return false; - } - } - return true; -} - /** * Returns a list of possible Plugin Scripts (no existance check here) * -- cgit v1.2.3 From ddf8a04fe3281e871c5311235b08185a5ceab797 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 8 Jul 2011 12:20:02 +0200 Subject: moved some editor functions to a new dw_editor object There are probably more functions that should go in here --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 0688825c6..720e34577 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -55,6 +55,7 @@ function js_out(){ DOKU_INC.'lib/scripts/textselection.js', DOKU_INC.'lib/scripts/toolbar.js', DOKU_INC.'lib/scripts/edit.js', + DOKU_INC.'lib/scripts/editor.js', DOKU_INC.'lib/scripts/locktimer.js', DOKU_INC.'lib/scripts/linkwiz.js', DOKU_INC.'lib/scripts/media.js', @@ -107,7 +108,6 @@ function js_out(){ // init stuff js_runonstart("addEvent(document,'click',closePopups)"); js_runonstart('addTocToggle()'); - js_runonstart("initSizeCtl('size__ctl','wiki__text')"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); -- cgit v1.2.3 From 32cb905a0339607a7acfef6488bec0015bae6b8b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 8 Jul 2011 13:04:59 +0200 Subject: moved the TOC toggling to dw_behaviour --- lib/exe/js.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 720e34577..308c1b534 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -107,7 +107,6 @@ function js_out(){ // init stuff js_runonstart("addEvent(document,'click',closePopups)"); - js_runonstart('addTocToggle()'); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); -- cgit v1.2.3 From d10c9a7424d1ef0aace2fd34e1008196d111a88c Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 7 Jul 2011 16:08:05 +0200 Subject: Rewrite mediamanager JavaScript Make it faster, prettier, less wrong, add UI effects, use jQuery UI Dialog, Abstract tree view stuff away into jQuery.dw_tree --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 308c1b534..44ab2d5ca 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -50,6 +50,7 @@ function js_out(){ DOKU_INC.'lib/scripts/script.js', DOKU_INC.'lib/scripts/tw-sack.js', DOKU_INC.'lib/scripts/qsearch.js', + DOKU_INC.'lib/scripts/tree.js', DOKU_INC.'lib/scripts/index.js', DOKU_INC.'lib/scripts/drag.js', DOKU_INC.'lib/scripts/textselection.js', -- cgit v1.2.3 From 09063cc66339d6e5daa12af4896a2457c03cfaf3 Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Thu, 4 Aug 2011 20:32:16 +0300 Subject: issue #44 multi file uploader --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 44ab2d5ca..fd8b74947 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -43,6 +43,7 @@ function js_out(){ DOKU_INC."lib/scripts/jquery/jquery$min.js", DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", + DOKU_INC."lib/scripts/fileuploader.js", DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', -- cgit v1.2.3 From 8d7448594cb00e995bed9b6e6db6e7f9280da24d Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Sun, 7 Aug 2011 13:54:36 +0300 Subject: issue #44 fileuploader specific changes made in inheriting class --- lib/exe/js.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index fd8b74947..1ca4fef98 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,6 +44,7 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC."lib/scripts/fileuploader.js", + DOKU_INC."lib/scripts/fileuploaderextended.js", DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', -- cgit v1.2.3 From b2a330ca75f1ceec063a08029abb0204110e3601 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 6 Aug 2011 13:56:57 +0200 Subject: removed events.js --- lib/exe/js.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 44ab2d5ca..4355cbfd7 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -44,7 +44,6 @@ function js_out(){ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js', DOKU_INC."lib/scripts/jquery/jquery-ui$min.js", DOKU_INC.'lib/scripts/helpers.js', - DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/delay.js', DOKU_INC.'lib/scripts/cookie.js', DOKU_INC.'lib/scripts/script.js', -- cgit v1.2.3 From 02782d1287173f3981a008755958543c178de296 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 12:24:43 +0200 Subject: moved subscription javascript into behaviour --- lib/exe/js.php | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 4355cbfd7..93d5439e0 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -59,7 +59,6 @@ function js_out(){ DOKU_INC.'lib/scripts/locktimer.js', DOKU_INC.'lib/scripts/linkwiz.js', DOKU_INC.'lib/scripts/media.js', - DOKU_INC.'lib/scripts/subscriptions.js', DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_TPLINC.'script.js', -- cgit v1.2.3 From fbedf1265a6551391cbb7442ec5f9360328ff508 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 15:17:54 +0200 Subject: moved footnotes and section highlighting to ne file jquerized --- lib/exe/js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 93d5439e0..0e0a22d42 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -61,8 +61,9 @@ function js_out(){ DOKU_INC.'lib/scripts/media.js', DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', - DOKU_TPLINC.'script.js', DOKU_INC.'lib/scripts/behaviour.js', + DOKU_INC.'lib/scripts/page.js', + DOKU_TPLINC.'script.js', ); // add possible plugin scripts and userscript -- cgit v1.2.3 From 99e7bfd4c733d81cd01dd2d97e10bb4dda62df66 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Aug 2011 11:35:58 +0200 Subject: jqueryized locktimer --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 0e0a22d42..e96d45ee6 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -109,7 +109,7 @@ function js_out(){ js_runonstart("addEvent(document,'click',closePopups)"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ - js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); + js_runonstart("dw_locktimer.init(".($conf['locktime'] - 60).",".$conf['usedraft'].")"); } // init hotkeys - must have been done after init of toolbar # disabled for FS#1958 js_runonstart('initializeHotkeys()'); -- cgit v1.2.3 From 5e7a292691951a0fa0a18f06c8b9bcfb509a032d Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 9 Sep 2011 22:26:16 +0200 Subject: Various JavaScript improvements, JSLint, jQuery --- lib/exe/js.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index 33f8c695d..b7f2fd222 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -88,6 +88,7 @@ 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')).";"; @@ -106,10 +107,7 @@ function js_out(){ echo "\n\n/* XXXXXXXXXX end of " . str_replace(DOKU_INC, '', $file) . " XXXXXXXXXX */\n\n"; } - // init stuff - js_runonstart("addEvent(document,'click',closePopups)"); - js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ js_runonstart("dw_locktimer.init(".($conf['locktime'] - 60).",".$conf['usedraft'].")"); } @@ -220,7 +218,7 @@ function js_escape($string){ * @author Andreas Gohr */ function js_runonstart($func){ - echo "addInitEvent(function(){ $func; });".NL; + echo "jQuery(function(){ $func; });".NL; } /** -- cgit v1.2.3