[Rt-commit] rt branch, 4.6/inline-edit, updated. rt-4.4.1-136-gd6dce03

Shawn Moore shawn at bestpractical.com
Mon Sep 12 16:56:05 EDT 2016


The branch, 4.6/inline-edit has been updated
       via  d6dce030c8bcc08a0bd4ce1e2197e75f6bc3db11 (commit)
       via  93dd4a8fe310e596bb889caedb231ee75ebbae24 (commit)
      from  657018150a9b97f8acb8c93ca057f8c329f73cc8 (commit)

Summary of changes:
 share/html/Elements/CollectionAsTable/Row | 3 +++
 share/static/js/util.js                   | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 93dd4a8fe310e596bb889caedb231ee75ebbae24
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Sep 12 20:52:55 2016 +0000

    Capture table sooner
    
        WIP: Merge with "Capture tbody sooner" commit

diff --git a/share/static/js/util.js b/share/static/js/util.js
index cb201d9..9eba73b 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -520,9 +520,7 @@ function escapeCssSelector(str) {
     return str.replace(/([^A-Za-z0-9_-])/g,'\\$1');
 }
 
-function refreshCollectionListRow(tbody, success, error) {
-    var table = tbody.closest('table');
-
+function refreshCollectionListRow(tbody, table, success, error) {
     var params = {
         DisplayFormat : table.data('display-format'),
         ObjectClass   : table.data('class'),
@@ -610,6 +608,7 @@ jQuery(function () {
         var editor = jQuery(this);
         var cell = editor.closest('td');
         var tbody = cell.closest('tbody');
+        var table = tbody.closest('table');
         var value = cell.find('.value');
 
         var params = editor.serialize();
@@ -629,6 +628,7 @@ jQuery(function () {
 
                 refreshCollectionListRow(
                     tbody,
+                    table,
                     function () { },
                     function (xhr, error) {
                         jQuery.jGrowl(error, { sticky: true, themeState: 'none' });

commit d6dce030c8bcc08a0bd4ce1e2197e75f6bc3db11
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Sep 12 20:54:53 2016 +0000

    Don't enable edit UI if no ModifyTicket

diff --git a/share/html/Elements/CollectionAsTable/Row b/share/html/Elements/CollectionAsTable/Row
index 688d77f..ffd4f59 100644
--- a/share/html/Elements/CollectionAsTable/Row
+++ b/share/html/Elements/CollectionAsTable/Row
@@ -109,6 +109,9 @@ foreach my $column (@Format) {
 
     delete $attrs{edit} if !$InlineEdit;
 
+    delete $attrs{edit} if $record->isa('RT::Ticket')
+                        && !$record->CurrentUserHasRight('ModifyTicket');
+
     $attrs{colspan} = $column->{span};
     $item += ($attrs{'colspan'} || 1);
 

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


More information about the rt-commit mailing list