Commits

Olemis Lang committed 8fe08e2

BH Dashboard #146 : Usable wiki toolbar (bhwiki) and jEditable loading/saving indicator

  • Participants
  • Parent commits b055784
  • Branches t146_inline_edit

Comments (0)

Files changed (1)

File t146/t146_r1386655_bheditable.diff

 
 diff -r 90cba6d98860 bhdashboard/htdocs/js/bheditable.js
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bhdashboard/htdocs/js/bheditable.js	Sun Sep 30 02:12:55 2012 -0500
-@@ -0,0 +1,259 @@
++++ b/bhdashboard/htdocs/js/bheditable.js	Sun Sep 30 20:40:22 2012 -0500
+@@ -0,0 +1,263 @@
 +/*
 +  Licensed to the Apache Software Foundation (ASF) under one
 +  or more contributor license agreements.  See the NOTICE file
 +  * ============================ */
 +  $.extend($.fn.editable.defaults, {
 +      'cssclass' : 'inplace',
++      'indicator' : '<small><em><i class="icon-loading"></i> Saving ...</em></small>',
 +      'placeholder' : '<small class="btn-link">Click to edit</small>'
 +    });
 +
 +  $.editable.addInputType('bhwiki', 
 +    {
 +      element : function(settings, original) {
++          /* Do not cancel edits on wiki toolbar click */ 
++          settings.onblur = 'ignore';
++
 +          var textarea = $('<textarea />').addClass('wikitext trac-resizable');
 +          var iefix = $('<fieldset />').addClass('iefix');
 +          if (settings.rows) {
 +
 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	Sun Sep 30 02:12:55 2012 -0500
++++ b/bhdashboard/htdocs/js/jquery.json.js	Sun Sep 30 20:40:22 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';}
 \ No newline at end of file
 diff -r 90cba6d98860 bhdashboard/util.py
 --- a/bhdashboard/util.py	Sat Sep 29 22:55:19 2012 -0500
-+++ b/bhdashboard/util.py	Sun Sep 30 02:12:55 2012 -0500
++++ b/bhdashboard/util.py	Sun Sep 30 20:40:22 2012 -0500
 @@ -176,6 +176,17 @@
      )