Commits

Olemis Lang committed 52a124c

BH Dashboard #146 : Revert to plain old checkboxes (i.e. no more iPhone style)

Comments (0)

Files changed (2)

 hgsvn/rm_files.diff
 t146/t146_r1386655_jeditable.diff
-t146/t146_r1386655_jeditable_custom.diff
-t146/t146_r1386655_jquery_iphone_checkbox.diff
 t146/t146_r1386655_bheditable.diff

t146/t146_r1386655_bheditable.diff

 # HG changeset patch
-# Parent fe1dd1d24bcea6ddeeabf64934d79330d4caf23f
+# Parent 90cba6d9886048ab97bf79814e1d3db483e43df5
 BH Dashboard #146 : Bloodhound in-place edit arquitecture
 
-diff -r fe1dd1d24bce bhdashboard/htdocs/js/bheditable.js
+diff -r 90cba6d98860 bhdashboard/htdocs/js/bheditable.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/bheditable.js	Wed Sep 26 22:23:35 2012 -0500
-@@ -0,0 +1,203 @@
++++ b/bhdashboard/htdocs/js/bheditable.js	Sat Sep 29 23:26:49 2012 -0500
+@@ -0,0 +1,204 @@
 +/*
 +  Licensed to the Apache Software Foundation (ASF) under one
 +  or more contributor license agreements.  See the NOTICE file
 +        }
 +    });
 +
-+    // Basic wiki editor requires Trac's wikitoolbar.js
++  // Basic wiki editor requires Trac's wikitoolbar.js
 +
 +  $.editable.addInputType('bhwiki', 
 +    {
 +        }
 +    });
 +
-+  $.editable.addInputType('iphone-checkbox', 
++  $.editable.addInputType('checkbox', 
 +    {
 +      element : function(settings, original) {
 +          var checkbox = $('<input />').attr('type', 'checkbox');
-+          var container = $('<div />');
-+          if (settings.width != 'none')
-+            container.css({ width : settings.width });
-+          if (settings.height != 'none')
-+            container.css({ height : settings.height });
-+          container.append(checkbox);
-+          $(this).append(container);
++          $(this).append(checkbox);
 +          return checkbox;
 +        },
 +      content : function(data, settings, original) {
 +          var checkbox = $('input[type="checkbox"]', this);
 +          if (value)
 +              checkbox.attr('checked', 'checked');
-+          checkbox.iphoneStyle(json);
-+        },
++
++          /* Submit on change if no submit button defined. */
++          if (!settings.submit) {
++            var form = this;
++            checkbox.change(function() {
++                form.submit();
++            });
++          }
++        }
 +    });
 +
 + /* BLODDHOUND EDITABLE DATA-API
 +
 +}(window.jQuery); 
 +
-diff -r fe1dd1d24bce bhdashboard/htdocs/js/jquery.json.js
+diff -r 90cba6d98860 bhdashboard/htdocs/js/jquery.json.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/jquery.json.js	Wed Sep 26 22:23:35 2012 -0500
++++ b/bhdashboard/htdocs/js/jquery.json.js	Sat Sep 29 23:26:49 2012 -0500
 @@ -0,0 +1,23 @@
 +
 +(function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
 +c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
 +return'"'+string+'"';};})(jQuery);
 \ No newline at end of file
-diff -r fe1dd1d24bce bhdashboard/util.py
---- a/bhdashboard/util.py	Wed Sep 26 22:14:08 2012 -0500
-+++ b/bhdashboard/util.py	Wed Sep 26 22:23:35 2012 -0500
+diff -r 90cba6d98860 bhdashboard/util.py
+--- a/bhdashboard/util.py	Sat Sep 29 22:55:19 2012 -0500
++++ b/bhdashboard/util.py	Sat Sep 29 23:26:49 2012 -0500
 @@ -176,6 +176,17 @@
      )