incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#6614] ticket:429 Add "check all" to export page
Date Thu, 05 Sep 2013 20:40:10 GMT
Updated Branches:
  refs/heads/master b4eddf929 -> f17ad230c


[#6614] ticket:429 Add "check all" to export page


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

Branch: refs/heads/master
Commit: f17ad230ce5f81585491d4dd1a30917f0c60bc7d
Parents: b4eddf9
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Sep 4 12:27:36 2013 +0300
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Sep 5 20:33:09 2013 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/templates/export.html | 15 +++++++++++++++
 Allura/allura/tests/functional/test_admin.py  |  5 +++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f17ad230/Allura/allura/ext/admin/templates/export.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/export.html b/Allura/allura/ext/admin/templates/export.html
index f0429c2..a0620ad 100644
--- a/Allura/allura/ext/admin/templates/export.html
+++ b/Allura/allura/ext/admin/templates/export.html
@@ -22,6 +22,17 @@
 
 {% block header %}Project Export{% endblock %}
 
+{% block extra_js %}
+  {{ super() }}
+  <script type="text/javascript">
+    $(function() {
+      $('#check-all').click(function() {
+        $(':checkbox[name="tools"]').attr('checked', $(this).attr('checked') || null);
+      });
+    });
+  </script>
+{% endblock %}
+
 {% block content %}
 
 {% if status == 'busy' %}
@@ -34,6 +45,10 @@
 <div class="grid-19">
   {% if tools %}
     <form method="POST" action="">
+      <div class="grid-19">
+        <input type="checkbox" id="check-all"><label for="check-all">Check All</label>
+      </div>
+      <p>&nbsp;</p>
       {% for tool in tools %}
       <div class="grid-19">
         <input type="checkbox" name="tools" id="tool-{{ loop.index }}" value="{{ tool.options.mount_point
}}">

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f17ad230/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index 9c5aed6..6045d86 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -867,3 +867,8 @@ class TestExport(TestController):
     def test_bulk_export_path_for_nbhd(self):
         project = M.Project.query.get(name='Home Project for Projects')
         assert_equals(project.bulk_export_path(), '/tmp/bulk_export/p/p')
+
+    def test_export_page_contains_check_all_checkbox(self):
+        r = self.app.get('/admin/export')
+        assert_in('<input type="checkbox" id="check-all">', r)
+        assert_in('Check All</label>', r)


Mime
View raw message