allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [3/3] git commit: [#5088] Changed custom attribute to HTML5 data-* attr
Date Wed, 03 Apr 2013 22:15:52 GMT
[#5088] Changed custom attribute to HTML5 data-* attr

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/master
Commit: f81ebb34c22b6fce51990310ebea7768086d1814
Parents: 80b4708
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Apr 3 22:15:20 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Apr 3 22:15:20 2013 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f81ebb34/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 68e83ce..0d572af 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" mount_point="{{ mount['ac'].options.mount_point
}}">Delete</a>
+                          <a href="#" class="mount_delete" data-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" mount_point="{{ mount['sub'].shortname
}}">Delete</a>
+                          <a href="#" class="mount_delete" data-mount-point="{{ mount['sub'].shortname
}}">Delete</a>
                       </form>
                     </li>
                 </ul>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f81ebb34/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 1b07067..c477e7a 100644
--- a/Allura/allura/public/nf/js/project_tools.js
+++ b/Allura/allura/public/nf/js/project_tools.js
@@ -51,13 +51,12 @@
         form_to_delete = null;
     });
     $('a.mount_delete').click(function () {
-        if (this.getAttribute('mount_point')){
-            $('div.warning_msg').text('Warning: This will destroy all data in the "' +
-                this.getAttribute('mount_point') +
-                '" tool and is non reversable!');}
-        else {
-            $('div.warning_msg').text('Warning: This will destroy all data in this tool and
is non reversable!');
+        var tool_label = 'this';
+        var mount_point = $(this).data('mount-point');
+        if (mount_point) {
+            tool_label = 'the "' + mount_point + '"';
         }
+        $('div.warning_msg').text('Warning: This will destroy all data in ' + tool_label
+ ' tool and is non-reversable!');
 
         form_to_delete = this.parentNode;
         return false;


Mime
View raw message