From a0bcc6a8a09d40384167e010ab319bde99a7d0dc Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 2 Aug 2013 14:29:12 +0400 Subject: [PATCH] #251: fixed refresh of table --- .../controllers/build_lists_controller.js | 56 +++++++++---------- .../projects/build_lists/_filter.html.haml | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/assets/javascripts/angularjs/controllers/build_lists_controller.js b/app/assets/javascripts/angularjs/controllers/build_lists_controller.js index 0c3f8f4de..d411910d5 100644 --- a/app/assets/javascripts/angularjs/controllers/build_lists_controller.js +++ b/app/assets/javascripts/angularjs/controllers/build_lists_controller.js @@ -4,7 +4,10 @@ RosaABF.controller('BuildListsController', ['$scope', '$http', '$location', '$ti $scope.first_run = true; $scope.server_status = null; $scope.build_lists = []; - $scope.isRequest = false; + $scope.isRequest = false; // Disable 'Search' button + + // Fixes: redirect to page after form submit + $("#monitoring_filter").on('submit', function(){ return false; }); @@ -23,34 +26,32 @@ RosaABF.controller('BuildListsController', ['$scope', '$http', '$location', '$ti });; } - $scope.search = function() { - if ($.isEmptyObject($location.search()) || !$scope.first_run) { - var array = $("#monitoring_filter").serializeArray(); - var params = {}; - for(i=0; i 'sel80 medium input_cleanse', :tabindex => 2} .top.box .filter - = form_for :filter, :html => {:class => :form, :id => 'monitoring_filter', 'ng-submit' => 'search()'}, :authenticity_token => false do |f| + = form_for :filter, :html => {:class => :form, :id => 'monitoring_filter', 'ng-submit' => 'refresh(true)'}, :authenticity_token => false do |f| .column = render 'server_status' = hidden_field_tag :owner_name, @project.try(:owner).try(:uname)