From 5231e8667c43c8de15daee7107cf03524455d384 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Mon, 15 Mar 2010 00:52:45 +1300 Subject: [PATCH] javascript and css fixes for html templating engine. --- htdocs/static/templating_template_flossmanuals.css | 1 - htdocs/static/templating_template_flossmanuals.js | 153 +++++++-------------- htdocs/static/typography.css | 2 +- templates/templating_template_flossmanuals.html | 2 + 4 files changed, 50 insertions(+), 108 deletions(-) rewrite htdocs/static/templating_template_flossmanuals.js (98%) diff --git a/htdocs/static/templating_template_flossmanuals.css b/htdocs/static/templating_template_flossmanuals.css index 4e5e996..58334aa 100644 --- a/htdocs/static/templating_template_flossmanuals.css +++ b/htdocs/static/templating_template_flossmanuals.css @@ -86,7 +86,6 @@ background: #ffe7cb; width: 100%; opacity: .75; - filter: alpha(opacity=85); color: #000; font-style: italic; font-size: 9px; diff --git a/htdocs/static/templating_template_flossmanuals.js b/htdocs/static/templating_template_flossmanuals.js dissimilarity index 98% index 5740f10..971794d 100644 --- a/htdocs/static/templating_template_flossmanuals.js +++ b/htdocs/static/templating_template_flossmanuals.js @@ -1,106 +1,47 @@ -function addLoadEvent(func) { - var oldonload = window.onload; - if (typeof window.onload != 'function') { - window.onload = func; - } else { - window.onload = function() { - oldonload(); - func(); - }; - } -} - -function insertAfter(newElement, targetElement) { - var parent = targetElement.parentNode; - if (parent.lastChild == targetElement) { - parent.appendChild(newElement); - } else { - parent.insertBefore(newElement, targetElement.nextSibling); - } -} - -function captionizeImages() { - if (!document.getElementsByTagName || - !document.createElement) { - return false; - } - var images = document.getElementsByTagName("img"); - for (var i=0; i 0){ + $('.left.arrow a').each(function() { + this.href = chapters[i-1]; + }); + } + else{ + $('.left.arrow a').each(function() { + this.style.visibility = 'hidden'; + }); + } + if (i + 1 < chapters.length){ + $('.right.arrow a').each(function() { + this.href = chapters[i+1]; + }); + } + else{ + $('.right.arrow a').each(function() { + this.style.visibility = 'hidden'; + }); + } + } + } + return chapters; +} + +var all_book_chapters = $(get_chapter_list); + +function previous(){ + return true; +} + +function next(){ + return true; +} diff --git a/htdocs/static/typography.css b/htdocs/static/typography.css index 7e30c3c..8e484de 100755 --- a/htdocs/static/typography.css +++ b/htdocs/static/typography.css @@ -44,7 +44,7 @@ line-height:17px; height:90px; width:120px; background-image: url('/floss/pub/TWiki/FlossSkin2/image.png'); - background-repeat : no; + background-repeat : none; } p.writers_comment diff --git a/templates/templating_template_flossmanuals.html b/templates/templating_template_flossmanuals.html index ffdf8d6..f2f885e 100644 --- a/templates/templating_template_flossmanuals.html +++ b/templates/templating_template_flossmanuals.html @@ -8,6 +8,8 @@ + + -- 2.11.4.GIT