Repository: nifi
Updated Branches:
  refs/heads/master a76641b25 -> d98426cc3


[NIFI-2941] allow users to click checkbox labels to toggle the checkbox. This 
closes #1538


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/d98426cc
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/d98426cc
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/d98426cc

Branch: refs/heads/master
Commit: d98426cc3d15ea6b506c2d3173e0ce5d8a4b5565
Parents: a76641b
Author: Scott Aslan <[email protected]>
Authored: Mon Feb 27 09:44:30 2017 -0500
Committer: Matt Gilman <[email protected]>
Committed: Mon Feb 27 09:57:43 2017 -0500

----------------------------------------------------------------------
 .../main/webapp/WEB-INF/partials/canvas/port-configuration.jsp | 2 +-
 .../webapp/WEB-INF/partials/canvas/processor-configuration.jsp | 2 +-
 .../WEB-INF/partials/canvas/remote-port-configuration.jsp      | 2 +-
 .../WEB-INF/partials/canvas/reporting-task-configuration.jsp   | 2 +-
 .../partials/provenance/provenance-event-details-dialog.jsp    | 2 +-
 .../nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css     | 6 +++++-
 .../webapp/js/jquery/propertytable/jquery.propertytable.js     | 4 ++--
 .../main/webapp/js/nf/canvas/nf-connection-configuration.js    | 2 +-
 .../src/main/webapp/js/nf/canvas/nf-processor-configuration.js | 2 +-
 .../nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js    | 5 +++++
 .../nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js     | 2 +-
 .../nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js  | 6 +++---
 12 files changed, 23 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/port-configuration.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/port-configuration.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/port-configuration.jsp
index f805792..4a52ba8 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/port-configuration.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/port-configuration.jsp
@@ -24,7 +24,7 @@
                     <input type="text" id="port-name"/>
                     <div class="port-enabled-container">
                         <div id="port-enabled" class="port-enabled nf-checkbox 
checkbox-unchecked"></div>
-                        <span> Enabled</span>
+                        <span class="nf-checkbox-label"> Enabled</span>
                     </div>
                 </div>
             </div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
index 829be1e..185166e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
@@ -27,7 +27,7 @@
                             <input type="text" id="processor-name" 
name="processor-name"/>
                             <div class="processor-enabled-container">
                                 <div id="processor-enabled" class="nf-checkbox 
checkbox-unchecked"></div>
-                                <span> Enabled</span>
+                                <span class="nf-checkbox-label"> Enabled</span>
                             </div>
                         </div>
                     </div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/remote-port-configuration.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/remote-port-configuration.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/remote-port-configuration.jsp
index 46701b4..8f38369 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/remote-port-configuration.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/remote-port-configuration.jsp
@@ -34,7 +34,7 @@
                 <input id="remote-port-concurrent-tasks" type="text"/>
                 <div id="remote-port-use-compression-container">
                     <div id="remote-port-use-compression" 
class="nf-checkbox"></div>
-                    <span>Compressed</span>
+                    <span class="nf-checkbox-label">Compressed</span>
                 </div>
             </div>
         </div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
index 8e780c0..2788c0f 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/reporting-task-configuration.jsp
@@ -27,7 +27,7 @@
                             <input type="text" id="reporting-task-name" 
name="reporting-task-name"/>
                             <div class="reporting-task-enabled-container">
                                 <div id="reporting-task-enabled" 
class="nf-checkbox checkbox-unchecked"></div>
-                                <span> Enabled</span>
+                                <span class="nf-checkbox-label"> Enabled</span>
                             </div>
                         </div>
                         <div class="reporting-task-read-only setting-field 
hidden">

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/provenance/provenance-event-details-dialog.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/provenance/provenance-event-details-dialog.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/provenance/provenance-event-details-dialog.jsp
index 743c503..73898fe 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/provenance/provenance-event-details-dialog.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/provenance/provenance-event-details-dialog.jsp
@@ -95,7 +95,7 @@
                     <div id="attributes-header" class="event-header">Attribute 
Values</div>
                     <div id="modified-attribute-toggle-container">
                         <div id="modified-attribute-toggle" class="nf-checkbox 
checkbox-unchecked"></div>
-                        <div id="modified-attribute-toggle-label">Show 
modified attributes only</div>
+                        <div id="modified-attribute-toggle-label" 
class="nf-checkbox-label">Show modified attributes only</div>
                         <div class="clear"></div>
                     </div>
                     <div class="clear"></div>

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css
index 453be80..6810e52 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/common-ui.css
@@ -253,13 +253,17 @@ ul.property-info li {
 }
 
 div.nf-checkbox {
-    cursor: default;
+    cursor: pointer;
     width: 12px;
     height: 12px;
     float: left;
     margin-right: 4px;
 }
 
+.nf-checkbox-label {
+    cursor: pointer;
+}
+
 div.checkbox-unchecked {
     background: transparent url(../images/inputCheckbox.png) no-repeat scroll 
top left;
 }

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
index 5e298ae..b606359 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -139,7 +139,7 @@
 
             // build the custom checkbox
             isEmpty = $('<div class="nf-checkbox 
string-check"/>').appendTo(stringCheckPanel);
-            $('<span class="string-check-label">&nbsp;Set empty 
string</span>').appendTo(stringCheckPanel);
+            $('<span class="string-check-label nf-checkbox-label">&nbsp;Set 
empty string</span>').appendTo(stringCheckPanel);
 
             var ok = $('<div class="button">Ok</div>').css({
                 'color': '#fff',
@@ -369,7 +369,7 @@
 
             // build the custom checkbox
             isEmpty = $('<div class="nf-checkbox 
string-check"/>').appendTo(stringCheckPanel);
-            $('<span class="string-check-label">&nbsp;Set empty 
string</span>').appendTo(stringCheckPanel);
+            $('<span class="string-check-label nf-checkbox-label">&nbsp;Set 
empty string</span>').appendTo(stringCheckPanel);
 
             var ok = $('<div class="button">Ok</div>').css({
                 'color': '#fff',

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index 47a6367..3642536 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -753,7 +753,7 @@
      * @argument {string} name      The relationship name
      */
     var createRelationshipOption = function (name) {
-        var relationshipLabel = $('<div class="relationship-name 
ellipsis"></div>').text(name);
+        var relationshipLabel = $('<div class="relationship-name 
nf-checkbox-label ellipsis"></div>').text(name);
         var relationshipValue = $('<span class="relationship-name-value 
hidden"></span>').text(name);
         return $('<div class="available-relationship-container"><div 
class="available-relationship nf-checkbox checkbox-unchecked"></div>' +
             
'</div>').append(relationshipLabel).append(relationshipValue).appendTo('#relationship-names');

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index 7236da3..d532eac 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -170,7 +170,7 @@
      * @argument {object} relationship      The relationship
      */
     var createRelationshipOption = function (relationship) {
-        var relationshipLabel = $('<div class="relationship-name 
ellipsis"></div>').text(relationship.name);
+        var relationshipLabel = $('<div class="relationship-name 
nf-checkbox-label ellipsis"></div>').text(relationship.name);
         var relationshipValue = $('<span class="relationship-name-value 
hidden"></span>').text(relationship.name);
 
         // build the relationship checkbox element

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index 2b2677a..682ad4c 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -63,6 +63,11 @@
             }
         });
 
+        // setup click areas for custom checkboxes
+        $(document).on('click', '.nf-checkbox-label', function (e) {
+            $(e.target).parent().find('.nf-checkbox').click();
+        });
+
         // show the loading icon when appropriate
         $(document).ajaxStart(function () {
             // show the loading indicator

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
index ab3cb85..1901600 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
@@ -836,7 +836,7 @@
             // adds a legend entry for the specified instance
             var addLegendEntry = function (legend, instance) {
                 // create the label and the checkbox
-                var instanceLabelElement = 
$('<div></div>').addClass('legend-label').css('color', 
color(instance.label)).text(instance.label).ellipsis();
+                var instanceLabelElement = 
$('<div></div>').addClass('legend-label nf-checkbox-label').css('color', 
color(instance.label)).text(instance.label).ellipsis();
                 var instanceCheckboxElement = $('<div 
class="nf-checkbox"></div>').on('click', function () {
                     // get the line and the control points for this instance 
(select all for the line to update control and main charts)
                     var chartLine = d3.selectAll('path.chart-line-' + 
instance.id);

http://git-wip-us.apache.org/repos/asf/nifi/blob/d98426cc/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
index 975dd1a..73a8125 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
@@ -1075,7 +1075,7 @@
                 var userId = $('<span class="user-id 
hidden"></span>').text(user.id);
 
                 // identity
-                var identity = $('<div 
class="available-identities"></div>').text(user.component.identity);
+                var identity = $('<div class="available-identities 
nf-checkbox-label"></div>').text(user.component.identity);
 
                 // clear
                 var clear = $('<div class="clear"></div>');
@@ -1108,10 +1108,10 @@
                 var groupId = $('<span class="group-id 
hidden"></span>').text(group.id);
 
                 // icon
-                var groupIcon = $('<div class="fa fa-users" style="margin-top: 
6px;"></div>');
+                var groupIcon = $('<div class="fa fa-users nf-checkbox-label" 
style="margin-top: 6px;"></div>');
 
                 // identity
-                var identity = $('<div 
class="available-identities"></div>').text(group.component.identity);
+                var identity = $('<div class="available-identities 
nf-checkbox-label"></div>').text(group.component.identity);
 
                 // clear
                 var clear = $('<div class="clear"></div>');

Reply via email to