incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [08/15] git commit: [#5656] ticket:301 Change mass-edit.js to process move form also
Date Fri, 24 May 2013 18:48:52 GMT
[#5656] ticket:301 Change mass-edit.js to process move form also


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

Branch: refs/heads/master
Commit: 75adfcc0785a592ce4ced6dba8c66c4421283e87
Parents: ffb9e7f
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed May 1 09:16:50 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri May 24 18:35:51 2013 +0000

----------------------------------------------------------------------
 .../forgetracker/templates/tracker/mass_move.html  |    1 +
 .../forgetracker/widgets/resources/js/mass-edit.js |   13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/75adfcc0/ForgeTracker/forgetracker/templates/tracker/mass_move.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/mass_move.html b/ForgeTracker/forgetracker/templates/tracker/mass_move.html
index 1953801..ac5c515 100644
--- a/ForgeTracker/forgetracker/templates/tracker/mass_move.html
+++ b/ForgeTracker/forgetracker/templates/tracker/mass_move.html
@@ -25,6 +25,7 @@
 {% block edit_box %}
 <div class="editbox">
   {{c.mass_move_form.display()}}
+  <div id="result" style="clear:both;"></div>
 </div>
 {% endblock %}
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/75adfcc0/ForgeTracker/forgetracker/widgets/resources/js/mass-edit.js
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/resources/js/mass-edit.js b/ForgeTracker/forgetracker/widgets/resources/js/mass-edit.js
index 90a037e..83736c9 100644
--- a/ForgeTracker/forgetracker/widgets/resources/js/mass-edit.js
+++ b/ForgeTracker/forgetracker/widgets/resources/js/mass-edit.js
@@ -18,6 +18,13 @@
 */
 
 $(function(){
+    $form = $('#update-values')
+    if ($form.length == 0) {
+        $form = $('.editbox > form');
+    }
+    if ($('#id_search').length == 0) {
+        $form.append('<input type="hidden" name="__search" id="id_search">');
+    }
     $('#id_search').val(window.location.search);
     $('#assigned_to').val('');
     $('#select_all').click(function(){
@@ -28,16 +35,16 @@ $(function(){
             $('tbody.ticket-list input[type=checkbox]').removeAttr('checked');
         }
     });
-    $('#update-values').submit(function(){
+    $form.submit(function(){
         var $checked=$('tbody.ticket-list input:checked'), count=$checked.length;
 
         if ( !count ) {
-            $('#result').text('No tickets selected for update.');
+            $('#result').text('No tickets selected.');
             return false;
         }
 
         $checked.each(function() {
-            $('#update-values').append('<input type="hidden" name="__ticket_ids" value="'+$(this).val()+'"/>');
+            $form.append('<input type="hidden" name="__ticket_ids" value="'+$(this).val()+'"/>');
         });
     });
 });


Mime
View raw message