From e2e7d29b66055356fc039e3e3c393d5ad873121b Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 8 May 2007 21:18:31 +0000 Subject: [PATCH] scripts moved to an extension git-svn-id: file:///home/shish/svn/shimmie2/trunk@81 7f39781d-f577-437e-ae19-be835c7a54ca --- core/ext/load_ext_data.ext.php | 20 ++++++ .../libshish.js => ext/core_scripts/script.js | 66 +++++++++++++++++++ scripts/shimmie.js | 61 ----------------- 3 files changed, 86 insertions(+), 61 deletions(-) create mode 100644 core/ext/load_ext_data.ext.php rename scripts/libshish.js => ext/core_scripts/script.js (54%) delete mode 100644 scripts/shimmie.js diff --git a/core/ext/load_ext_data.ext.php b/core/ext/load_ext_data.ext.php new file mode 100644 index 00000000..3d3184d9 --- /dev/null +++ b/core/ext/load_ext_data.ext.php @@ -0,0 +1,20 @@ +get_string("data_href"); + + foreach(glob("ext/*/style.css") as $css_file) { + $page->add_header(""); + } + + foreach(glob("ext/*/script.js") as $js_file) { + $page->add_header(""); + } + } + } +} +add_event_listener(new LoadExtData()); +?> diff --git a/scripts/libshish.js b/ext/core_scripts/script.js similarity index 54% rename from scripts/libshish.js rename to ext/core_scripts/script.js index 80cdcc58..e74bfb02 100644 --- a/scripts/libshish.js +++ b/ext/core_scripts/script.js @@ -1,3 +1,69 @@ +var defaultTexts = new Array(); + +window.onload = function(e) { + var sections=get_sections(); + for(var i=0;i