Repository: zeppelin
Updated Branches:
  refs/heads/master 14427442e -> 4dc6bf570


[ZEPPELIN-3076]Chart field is also draggable and sortable in the 'keys', 
'groups' and 'values'

### What is this PR for?
Current the `keys`, `groups` and `values` is only droppable. It is a little 
inconvenient if I want to drag it to other place or sort it.
This feature let `keys`, `groups` and `values` not only `droppable`, but also 
`draggable` and `sorttable`.

### What type of PR is it?
[Feature]

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-3076 [ZEPPELIN-3076]

### How should this be tested?
I have Add the Screenshots for the test. Just as the Screenshots showing, all 
the element in `keys`, `groups` and `values` is draggable and sorttable.

![untitled 
project4](https://user-images.githubusercontent.com/5969176/33252922-ed1ab0b4-d37b-11e7-8a5c-b3dbb6765d18.gif)

### Questions:
* Does the licenses files need update? NO
* Is there breaking changes for older versions? NO
* Does this needs documentation? NO

Author: liguohui <[email protected]>

Closes #2686 from liguohuicmss/draggable-field-keys-groups-values2 and squashes 
the following commits:

08b86b8 [liguohui] add a new line
ebb8436 [liguohui] Chart field is also draggable and sortable in the 'keys', 
'groups' and 'values'


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

Branch: refs/heads/master
Commit: 4dc6bf57080e11ebf0533bbedcdba780c5e71398
Parents: 1442744
Author: liguohui <[email protected]>
Authored: Tue Nov 28 22:53:48 2017 +0800
Committer: Lee moon soo <[email protected]>
Committed: Thu Nov 30 09:11:15 2017 -0800

----------------------------------------------------------------------
 .../src/app/tabledata/pivot_settings.html        | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4dc6bf57/zeppelin-web/src/app/tabledata/pivot_settings.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/tabledata/pivot_settings.html 
b/zeppelin-web/src/app/tabledata/pivot_settings.html
index abfe730..68de019 100644
--- a/zeppelin-web/src/app/tabledata/pivot_settings.html
+++ b/zeppelin-web/src/app/tabledata/pivot_settings.html
@@ -49,7 +49,11 @@ limitations under the License.
             data-drop="true" jqyoui-droppable="{multiple:true, 
onDrop:'save()'}"
             class="list-unstyled"
             style="border-radius: 6px; margin-top: 7px;">
-          <li ng-repeat="item in config.keys">
+          <li ng-repeat="item in config.keys track by $index"
+              ng-model="config.keys"
+              data-drag="true"
+              jqyoui-draggable="{index: {{$index}}, animate: false}"
+              data-jqyoui-options="{revert: 'invalid', placeholder: 'keep', 
helper: 'clone'}">
             <div class="btn btn-default btn-xs"
                  style="background-color: #EFEFEF; margin: 2px 0px 0px 2px;">
               {{item.name}}
@@ -69,7 +73,11 @@ limitations under the License.
             jqyoui-droppable="{multiple:true, onDrop:'save()'}"
             class="list-unstyled"
             style="border-radius: 6px; margin-top: 7px;">
-          <li ng-repeat="item in config.groups">
+          <li ng-repeat="item in config.groups track by $index"
+              ng-model="config.groups"
+              data-drag="true"
+              jqyoui-draggable="{index: {{$index}}, animate: false}"
+              data-jqyoui-options="{revert: 'invalid', placeholder: 'keep', 
helper: 'clone'}">
             <div class="btn btn-default btn-xs"
                  style="background-color: #EFEFEF; margin: 2px 0px 0px 2px;">
               {{item.name}}
@@ -89,7 +97,11 @@ limitations under the License.
             jqyoui-droppable="{multiple:true, onDrop:'save()'}"
             class="list-unstyled"
             style="border-radius: 6px; margin-top: 7px;">
-          <li ng-repeat="item in config.values">
+          <li ng-repeat="item in config.values track by $index"
+              ng-model="config.values"
+              data-drag="true"
+              jqyoui-draggable="{index: {{$index}}, animate: false}"
+              data-jqyoui-options="{revert: 'invalid', placeholder: 'keep', 
helper: 'clone'}">
             <div class="btn-group">
               <div class="btn btn-default btn-xs dropdown-toggle"
                    style="background-color: #EFEFEF;"
@@ -112,3 +124,4 @@ limitations under the License.
     </div>
   </div> <!-- panel-body -->
 </div> <!-- panel -->
+

Reply via email to