Commits

Olemis Lang committed 01b2eee

BH Dashboard #146 : Text area (except wiki) and text fields

Comments (0)

Files changed (1)

t146/t146_r1386655_bheditable.diff

 # HG changeset patch
-# Parent 8fff6768aa62239c5639a62147ada783f9137295
+# Parent c25cea793d1a8641cf1a7a1697e83b0470e588ba
 BH Dashboard #146 : Bloodhound in-place edit arquitecture
 
-diff -r 8fff6768aa62 bhdashboard/htdocs/js/bheditable.js
+diff -r c25cea793d1a bhdashboard/htdocs/js/bheditable.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/bheditable.js	Sat Sep 22 14:14:27 2012 -0500
-@@ -0,0 +1,115 @@
++++ b/bhdashboard/htdocs/js/bheditable.js	Mon Sep 24 00:28:36 2012 -0500
+@@ -0,0 +1,133 @@
 +/*
 +  Licensed to the Apache Software Foundation (ASF) under one
 +  or more contributor license agreements.  See the NOTICE file
 +
 + /* BLODDHOUND EDITABLE DEFAULTS
 +  * ============================ */
++  $.extend($.fn.editable.defaults, {
++      'cssclass' : 'inplace',
++      'placeholder' : '<small class="btn-link">Click to edit</small>'
++    });
 +
 + /* BLODDHOUND EDITABLE TYPES
 +  * ========================= */
 +            });
 +          }
 +        }
-+    })
++    });
 +
++  $.editable.addInputType('bhtext', 
++    {
++      element : function(settings, original) {
++          var input = $('<input />');
++          if (settings.width  != 'none') { input.attr('width', settings.width);  }
++          if (settings.height != 'none') { input.attr('height', settings.height); }
++          /* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
++          //input[0].setAttribute('autocomplete','off');
++          input.attr('autocomplete','off');
++          input.attr('type','text');
++          $(this).append(input);
++          return(input);
++        }
++    });
 +
 + /* BLODDHOUND EDITABLE DATA-API
 +  * ============================ */
 +
 +}(window.jQuery); 
 +
-diff -r 8fff6768aa62 bhdashboard/htdocs/js/jquery.json.js
+diff -r c25cea793d1a bhdashboard/htdocs/js/jquery.json.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/jquery.json.js	Sat Sep 22 14:14:27 2012 -0500
++++ b/bhdashboard/htdocs/js/jquery.json.js	Mon Sep 24 00:28:36 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 8fff6768aa62 bhdashboard/util.py
---- a/bhdashboard/util.py	Wed Sep 19 18:56:14 2012 -0500
-+++ b/bhdashboard/util.py	Sat Sep 22 14:14:27 2012 -0500
+diff -r c25cea793d1a bhdashboard/util.py
+--- a/bhdashboard/util.py	Sun Sep 23 13:33:21 2012 -0500
++++ b/bhdashboard/util.py	Mon Sep 24 00:28:36 2012 -0500
 @@ -176,6 +176,17 @@
      )