[Rt-commit] rt branch, 4.6/inline-edit, updated. rt-4.4.1-176-g8d75051

Shawn Moore shawn at bestpractical.com
Tue Sep 20 15:01:48 EDT 2016


The branch, 4.6/inline-edit has been updated
       via  8d7505111638510a1b687e5018be6e0a334779c6 (commit)
       via  05912601d14521eb7862455f1a789cedc71335a5 (commit)
       via  40207ba03cf3ceb5be528d002dd0c1d9a5eb0eca (commit)
       via  9735e492c6e62f45516c6ea36ee47cf7e16e850e (commit)
      from  6bda46a6276275cdf36efe3090b57a2b45c6f29f (commit)

Summary of changes:
 share/static/css/base/inline-edit.css |  3 ++-
 share/static/js/util.js               | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

- Log -----------------------------------------------------------------
commit 9735e492c6e62f45516c6ea36ee47cf7e16e850e
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 20 18:11:18 2016 +0000

    Avoid rendering inline edit indicators on error

diff --git a/share/static/css/base/inline-edit.css b/share/static/css/base/inline-edit.css
index 2a8857d..6ee1e9b 100644
--- a/share/static/css/base/inline-edit.css
+++ b/share/static/css/base/inline-edit.css
@@ -8,7 +8,7 @@ table.inline-edit td .value {
     padding: 0.25em 0.25em 0.125em 0.125em;
 }
 
-body:not(.inline-editing) td.editable .value:hover {
+body:not(.inline-editing) table.inline-edit td.editable .value:hover {
     background: #ffd url(../../../static/images/pencil.png) no-repeat top right;
     background-size: auto 1.5em;
     border-color: black;
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 335ca03..ba008c2 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -582,6 +582,7 @@ jQuery(function () {
     var disableInlineEdit = function () {
         inlineEditEnabled = false;
         jQuery('.editable').removeClass('editing').removeClass('loading');
+        jQuery('table.inline-edit').removeClass('inline-edit');
     };
 
     var inlineEditingDate = false;

commit 40207ba03cf3ceb5be528d002dd0c1d9a5eb0eca
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 20 18:12:55 2016 +0000

    Factor out a renderError function

diff --git a/share/static/js/util.js b/share/static/js/util.js
index ba008c2..b97a35c 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -688,6 +688,14 @@ jQuery(function () {
         tbody.addClass('refreshing');
         inlineEditPristineForm = null;
 
+        var renderError = function (error) {
+            jQuery.jGrowl(error, { sticky: true, themeState: 'none' });
+            cell.addClass('error').html(loc_key('error'));
+            jQuery(window).off('scroll', scrollHandler);
+            jQuery(document).off('keyup', escapeKeyHandler);
+            disableInlineEdit();
+        };
+
         jQuery.ajax({
             url     : editor.attr('action'),
             method  : 'POST',
@@ -705,20 +713,12 @@ jQuery(function () {
                         jQuery(document).off('keyup', escapeKeyHandler);
                     },
                     function (xhr, error) {
-                        jQuery.jGrowl(error, { sticky: true, themeState: 'none' });
-                        cell.addClass('error').html(loc_key('error'));
-                        jQuery(window).off('scroll', scrollHandler);
-                        jQuery(document).off('keyup', escapeKeyHandler);
-                        disableInlineEdit();
+                        renderError(error);
                     }
                 );
             },
             error   : function (xhr, error) {
-                jQuery.jGrowl(error, { sticky: true, themeState: 'none' });
-                cell.addClass('error').html(loc_key('error'));
-                jQuery(window).off('scroll', scrollHandler);
-                jQuery(document).off('keyup', escapeKeyHandler);
-                disableInlineEdit();
+                renderError(error);
             }
         });
     };

commit 05912601d14521eb7862455f1a789cedc71335a5
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 20 18:44:22 2016 +0000

    Minimum height for value
    
    That way there isn't a very narrow strip of yellow background on hover

diff --git a/share/static/css/base/inline-edit.css b/share/static/css/base/inline-edit.css
index 6ee1e9b..88a8661 100644
--- a/share/static/css/base/inline-edit.css
+++ b/share/static/css/base/inline-edit.css
@@ -5,6 +5,7 @@ table.inline-edit tr.evenline td {
 
 table.inline-edit td .value {
     border: 1px dashed transparent;
+    min-height: 1em;
     padding: 0.25em 0.25em 0.125em 0.125em;
 }
 

commit 8d7505111638510a1b687e5018be6e0a334779c6
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 20 18:44:43 2016 +0000

    Hovering anywhere in the cell should indicate inline edit

diff --git a/share/static/css/base/inline-edit.css b/share/static/css/base/inline-edit.css
index 88a8661..35fcb6e 100644
--- a/share/static/css/base/inline-edit.css
+++ b/share/static/css/base/inline-edit.css
@@ -9,7 +9,7 @@ table.inline-edit td .value {
     padding: 0.25em 0.25em 0.125em 0.125em;
 }
 
-body:not(.inline-editing) table.inline-edit td.editable .value:hover {
+body:not(.inline-editing) table.inline-edit td.editable:hover .value {
     background: #ffd url(../../../static/images/pencil.png) no-repeat top right;
     background-size: auto 1.5em;
     border-color: black;

-----------------------------------------------------------------------


More information about the rt-commit mailing list