allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [2/3] git commit: [#5088] ticket:309 Confirm delete dialog contains information about the deleted tool
Date Wed, 03 Apr 2013 22:15:51 GMT
[#5088] ticket:309  Confirm delete dialog contains information about the deleted tool


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

Branch: refs/heads/master
Commit: 5ca4eaf1ca6554a3c846557a59f190e04882f7dd
Parents: 5eb6d36
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Tue Apr 2 12:20:27 2013 +0400
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Apr 3 22:00:45 2013 +0000

----------------------------------------------------------------------
 .../allura/ext/admin/templates/project_tools.html  |    6 +++---
 Allura/allura/public/nf/js/project_tools.js        |    8 ++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5ca4eaf1/Allura/allura/ext/admin/templates/project_tools.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_tools.html b/Allura/allura/ext/admin/templates/project_tools.html
index 30005e3..51f1521 100644
--- a/Allura/allura/ext/admin/templates/project_tools.html
+++ b/Allura/allura/ext/admin/templates/project_tools.html
@@ -71,7 +71,7 @@
                                value="{{mount['ac'].options.mount_point}}"/>
                         <input name="tool-{{loop.index0}}.delete" type="hidden" value="Delete"/>
                         {% if mount['ac'].load().uninstallable %}
-                          <a href="#" class="mount_delete">Delete</a>
+                          <a href="#" class="mount_delete" mount_point="{{ mount['ac'].options.mount_point
}}">Delete</a>
                         {% endif %}
                       </form>
                     </li>
@@ -95,7 +95,7 @@
                                  name="subproject-{{loop.index0}}.shortname"
                                  value="{{mount['sub'].shortname}}"/>
                           <input name="subproject-{{loop.index0}}.delete" type="hidden"
value="Delete"/>
-                          <a href="#" class="mount_delete">Delete</a>
+                          <a href="#" class="mount_delete" mount_point="{{ mount['sub'].shortname
}}">Delete</a>
                       </form>
                     </li>
                 </ul>
@@ -105,7 +105,7 @@
     </div>
 </div>
 <form id="mount_delete_form" style="display:none">
-  <div class="grid-13">Warning: This will destroy all data in this tool and is non
reversable!</div>
+  <div class="grid-13 wraning_msg">Warning: This will destroy all data in this tool
and is non reversable!</div>
   <div class="grid-13">&nbsp;</div>
   <hr>
   <div class="grid-13">&nbsp;</div>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5ca4eaf1/Allura/allura/public/nf/js/project_tools.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/project_tools.js b/Allura/allura/public/nf/js/project_tools.js
index 89fed8e..fca4919 100644
--- a/Allura/allura/public/nf/js/project_tools.js
+++ b/Allura/allura/public/nf/js/project_tools.js
@@ -51,6 +51,14 @@
         form_to_delete = null;
     });
     $('a.mount_delete').click(function () {
+        if (this.getAttribute('mount_point')){
+            $('div.wraning_msg').text('Warning: This will destroy all data in the "' +
+                this.getAttribute('mount_point') +
+                '" tool and is non reversable!');}
+        else {
+            $('div.wraning_msg').text('Warning: This will destroy all data in this tool and
is non reversable!');
+        }
+
         form_to_delete = this.parentNode;
         return false;
     });


Mime
View raw message