zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felixche...@apache.org
Subject incubator-zeppelin git commit: moved delete button to help protect against accidental clicks
Date Sat, 30 Jan 2016 23:50:15 GMT
Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 90cc2b3d1 -> e8444cb69


moved delete button to help protect against accidental clicks

### What is this PR for?
The delete notebook action is embedded in the button bar with several other buttons, increasing
the potential for an accidental click. This PR moves the delete button out of the "normal"
button bar.

### What type of PR is it?
Improvement

### Todos
(none)

### Is there a relevant Jira issue?
No

### How should this be tested?
Create new notebook
populate notebook
delete notebook

### Screenshots (if appropriate)

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

Author: Brent Schneeman <schneeman@gmail.com>

Closes #662 from schnee/master and squashes the following commits:

d744732 [Brent Schneeman] updated xpath
cda2dbf [Brent Schneeman] Merge remote-tracking branch 'upstream/master'
d57eb97 [Brent Schneeman] fixed test of notebook-actionBar.html
9b75fdf [Brent Schneeman] more accurate styling
3d45544 [Brent Schneeman] span styling applied
d3deac0 [Brent Schneeman] moved delete button to help protect against accidental clicks


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

Branch: refs/heads/master
Commit: e8444cb69b754bef1ccc578b96f48a59b5970c7a
Parents: 90cc2b3
Author: Brent Schneeman <schneeman@gmail.com>
Authored: Fri Jan 29 08:35:09 2016 -0600
Committer: Felix Cheung <felixcheung@apache.org>
Committed: Sat Jan 30 15:50:07 2016 -0800

----------------------------------------------------------------------
 .../org/apache/zeppelin/AbstractZeppelinIT.java  |  2 +-
 .../java/org/apache/zeppelin/ZeppelinIT.java     |  2 +-
 .../src/app/notebook/notebook-actionBar.html     | 19 ++++++++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e8444cb6/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
index 899b802..1e442e4 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
@@ -123,7 +123,7 @@ abstract public class AbstractZeppelinIT {
   }
 
   protected void deleteTestNotebook(final WebDriver driver) {
-    driver.findElement(By.xpath("//*[@id='main']/div//h3/span[1]/button[@tooltip='Remove
the notebook']"))
+    driver.findElement(By.xpath("//*[@id='main']/div//h3/span/button[@tooltip='Remove the
notebook']"))
         .sendKeys(Keys.ENTER);
     sleep(1000, true);
     driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this notebook')]"
+

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e8444cb6/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
index 4476940..e6591f2 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinIT.java
@@ -188,7 +188,7 @@ public class ZeppelinIT extends AbstractZeppelinIT {
       waitForText("BindingTest_1_",
           By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
 
-      driver.findElement(By.xpath("//*[@id='main']/div//h3/span[1]/button[@tooltip='Remove
the notebook']"))
+      driver.findElement(By.xpath("//*[@id='main']/div//h3/span/button[@tooltip='Remove the
notebook']"))
           .sendKeys(Keys.ENTER);
       sleep(1000, true);
       driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this notebook')]"
+

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e8444cb6/zeppelin-web/src/app/notebook/notebook-actionBar.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook-actionBar.html b/zeppelin-web/src/app/notebook/notebook-actionBar.html
index 360b8f7..0340e28 100644
--- a/zeppelin-web/src/app/notebook/notebook-actionBar.html
+++ b/zeppelin-web/src/app/notebook/notebook-actionBar.html
@@ -45,13 +45,7 @@ limitations under the License.
               tooltip-placement="bottom" tooltip="Clear output">
         <i class="fa fa-eraser"></i>
       </button>
-      <button type="button"
-              class="btn btn-default btn-xs"
-              ng-click="removeNote(note.id)"
-              ng-hide="viewOnly"
-              tooltip-placement="bottom" tooltip="Remove the notebook">
-        <i class="icon-trash"></i>
-      </button>
+
       <button type="button"
               class="btn btn-default btn-xs"
               ng-hide="viewOnly"
@@ -69,6 +63,17 @@ limitations under the License.
       </button>
     </span>
 
+<!-- put the delete action by itself for your protection -->
+    <span class="labelBtn" style="vertical-align:middle; display:inline-block;">
+      <button type="button"
+              class="btn btn-default btn-xs"
+              ng-click="removeNote(note.id)"
+              ng-hide="viewOnly"
+              tooltip-placement="bottom" tooltip="Remove the notebook">
+        <i class="icon-trash"></i>
+      </button>
+    </span>
+
     <span ng-hide="viewOnly">
       <div class="labelBtn btn-group">
         <div class="btn btn-default btn-xs dropdown-toggle"


Mime
View raw message