diff --git a/ext/index/theme.php b/ext/index/theme.php
index 5408bf85..4b73dfc5 100644
--- a/ext/index/theme.php
+++ b/ext/index/theme.php
@@ -76,9 +76,14 @@ EOD;
$h_index = "Index";
$h_next = ($page_number >= $total_pages) ? "Next" : "Next";
- $h_search_string = count($search_terms) == 0 ? "Search" : html_escape(implode(" ", $search_terms));
+ $h_search_string = html_escape(implode(" ", $search_terms));
$h_search_link = make_link();
$h_search = "
+
(Max file size is $max_kb)
diff --git a/lib/jquery.form-defaults.js b/lib/jquery.form-defaults.js
new file mode 100644
index 00000000..7ef5a9fe
--- /dev/null
+++ b/lib/jquery.form-defaults.js
@@ -0,0 +1,41 @@
+jQuery.fn.DefaultValue = function(text){
+ return this.each(function(){
+ //Make sure we're dealing with text-based form fields
+ if(this.type != 'text' && this.type != 'password' && this.type != 'textarea')
+ return;
+
+ //Store field reference
+ var fld_current=this;
+
+ //Set value initially if none are specified
+ if(this.value=='') {
+ this.value=text;
+ } else {
+ //Other value exists - ignore
+ return;
+ }
+
+ //Remove values on focus
+ $(this).focus(function() {
+ if(this.value==text || this.value=='')
+ this.value='';
+ });
+
+ //Place values back on blur
+ $(this).blur(function() {
+ if(this.value==text || this.value=='')
+ this.value=text;
+ });
+
+ //Capture parent form submission
+ //Remove field values that are still default
+ $(this).parents("form").each(function() {
+ //Bind parent form submit
+ $(this).submit(function() {
+ if(fld_current.value==text) {
+ fld_current.value='';
+ }
+ });
+ });
+ });
+};
\ No newline at end of file
diff --git a/lib/shimmie.js b/lib/shimmie.js
deleted file mode 100644
index 3b26466e..00000000
--- a/lib/shimmie.js
+++ /dev/null
@@ -1,136 +0,0 @@
-var defaultTexts = new Array();
-
-window.onload = function(e) {
- var sections=get_sections();
- for(var i=0;i
$(document).ready(function() {
$(\"#$i-toggle\").click(function() {
- $(\"#$i\").slideToggle(\"slow\");
- if($(\"#$i\").is(\":hidden\")) {
- $.cookie(\"$i-hidden\", true);
- }
- else {
- $.cookie(\"$i-hidden\", false);
- }
+ $(\"#$i\").slideToggle(\"slow\", function() {
+ if($(\"#$i\").is(\":hidden\")) {
+ $.cookie(\"$i-hidden\", 'true', {path: '/'});
+ }
+ else {
+ $.cookie(\"$i-hidden\", 'false', {path: '/'});
+ }
+ });
});
- if($.cookie(\"$i-hidden\")) {
+ if($.cookie(\"$i-hidden\") == 'true') {
$(\"#$i\").hide();
}
});