From b908e2f95b9a63bdc16b734b35f05600db7f6514 Mon Sep 17 00:00:00 2001 From: jepso Date: Thu, 27 Sep 2007 22:48:49 +0000 Subject: [PATCH] Include mootools and IE css fixes properly, --- .../frontend/modules/manual/config/view.yml | 6 +- .../apps/frontend/templates/manual_layout.php | 10 ++- website/web/js/manual_toc.js | 76 ------------------- 3 files changed, 12 insertions(+), 80 deletions(-) delete mode 100644 website/web/js/manual_toc.js diff --git a/website/apps/frontend/modules/manual/config/view.yml b/website/apps/frontend/modules/manual/config/view.yml index 76b5ac1d0..bbb15fb3c 100644 --- a/website/apps/frontend/modules/manual/config/view.yml +++ b/website/apps/frontend/modules/manual/config/view.yml @@ -1,4 +1,4 @@ default: - stylesheets: [main, layout, manual, manual_iefix: { media: print }] - javascripts: [mootools.v1.11, manual_tree, manual_toc] - layout: manual_layout \ No newline at end of file + stylesheets: [main, layout, manual] + javascripts: [mootools.v1.11.js, manual_tree] + layout: manual_layout diff --git a/website/apps/frontend/templates/manual_layout.php b/website/apps/frontend/templates/manual_layout.php index 7745ea948..1bbd3d0c0 100644 --- a/website/apps/frontend/templates/manual_layout.php +++ b/website/apps/frontend/templates/manual_layout.php @@ -9,6 +9,14 @@ + + + + @@ -41,4 +49,4 @@ - \ No newline at end of file + diff --git a/website/web/js/manual_toc.js b/website/web/js/manual_toc.js deleted file mode 100644 index 98fef94a7..000000000 --- a/website/web/js/manual_toc.js +++ /dev/null @@ -1,76 +0,0 @@ -function initializeTocToggles() -{ - var container = new Element('div', { - 'id': 'toc-toggles' - }); - - container.injectTop($('table-of-contents')); - $('table-of-contents').setStyle('padding-top', '0'); - - var hideToggle = new Element('a', { - 'href': 'javascript:void(0);', - 'events': { - 'click': function() { - var toc = $E('ul', 'table-of-contents'); - - if (toc.getStyle('display') == 'none') { - this.setHTML(tocHideText); - toc.setStyle('display', 'block'); - stickyToggle.setStyle('display', 'inline'); - Cookie.set('hidetoc', 0, {duration: 1000}); - } else { - this.setHTML(tocShowText); - toc.setStyle('display', 'none'); - stickyToggle.setStyle('display', 'none'); - Cookie.set('hidetoc', 1, {duration: 1000}); - } - } - } - }); - - var stickyToggle = new Element('a', { - 'href': 'javascript:void(0);', - 'events': { - 'click': function() { - var wrap = $('wrap'); - - if ( ! wrap.hasClass('sticky-toc')) { - this.setHTML(tocUnstickyText); - wrap.addClass('sticky-toc'); - hideToggle.setStyle('display', 'none'); - Cookie.set('stickytoc', 1, {duration: 1000}); - } else { - this.setHTML(tocStickyText); - wrap.removeClass('sticky-toc'); - hideToggle.setStyle('display', 'inline'); - Cookie.set('stickytoc', 0, {duration: 1000}); - } - } - } - }); - - hideToggle.setHTML(tocHideText); - hideToggle.injectInside(container); - - stickyToggle.setHTML(tocStickyText); - stickyToggle.injectInside(container); - - if (Cookie.get('hidetoc') == 1) { - hideToggle.fireEvent('click'); - stickyToggle.setStyle('display', 'none'); - } - - if (Cookie.get('stickytoc') == 1) { - stickyToggle.fireEvent('click'); - hideToggle.setStyle('display', 'none'); - } -} - -window.addEvent('domready', function() { - initializeTocToggles(); -}); - -window.addEvent('domready', function() { - new SmoothScroll(); -}); -