This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit 202056ffa1f814e98caca4d65b9b355d24a0eef8 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Dec 21 15:19:10 2015 +0100 fixes #7847 ajout d'un flag dans l'url pour les recherches avancées, permettant un refresh de la page quand on clique dans le menu --- .../src/main/webapp/js/coselmar-controllers.js | 23 ++++++++++++++++++++++ .../src/main/webapp/views/documents/toolsPart.html | 4 ++-- .../src/main/webapp/views/users/searchPart.html | 4 ++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index 29bdb3c..3b2d5b2 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -215,6 +215,17 @@ coselmarControllers.controller("DocumentsCtrl", ['$scope', '$route', '$routePara $scope.documents = documents; }); }; + + $scope.searchMode = function(type) { + if (type == 'advanced') { + $location.search('advancedSearch'); + $scope.advanced = true; + } else { + $location.search(""); + $scope.advanced = false; + } + }; + }]); // Controller for new document View @@ -620,6 +631,18 @@ coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', }; }); }; + + $scope.searchMode = function(type) { + console.log("pouet"); + console.log(type); + if (type == 'advanced') { + $location.search('advancedSearch'); + $scope.advanced = true; + } else { + $location.search(""); + $scope.advanced = false; + } + }; }]); // Controller for new user View diff --git a/coselmar-ui/src/main/webapp/views/documents/toolsPart.html b/coselmar-ui/src/main/webapp/views/documents/toolsPart.html index b65ef3e..68b3922 100644 --- a/coselmar-ui/src/main/webapp/views/documents/toolsPart.html +++ b/coselmar-ui/src/main/webapp/views/documents/toolsPart.html @@ -41,7 +41,7 @@ <button type="submit" class="btn btn-primary fa fa-search"></button> </div> <div class="form-group" ng-show="!advanced"> - <a ng-click="advanced=true" class="btn btn-action"> + <a ng-click="searchMode('advanced')" class="btn btn-action"> <span class="fa fa-expand" aria-hidden="true"></span> {{'common.button.advanceSearch' | translate }} </a> @@ -57,7 +57,7 @@ <!-- Advanced Search part --> <div ng-show="advanced" class="search-zone marginVertical20"> <div class="form-group text-right"> - <a ng-click="advanced=false" class="btn btn-action"><span class="fa fa-compress" aria-hidden="true"></span> {{ 'common.button.simpleSearch' | translate }}</a> + <a ng-click="searchMode('simple')" class="btn btn-action"><span class="fa fa-compress" aria-hidden="true"></span> {{ 'common.button.simpleSearch' | translate }}</a> </div> <form class="form-horizontal" name="userFullOption" role="userFullOptions" ng-submit="advancedSearchDocuments()"> diff --git a/coselmar-ui/src/main/webapp/views/users/searchPart.html b/coselmar-ui/src/main/webapp/views/users/searchPart.html index f972776..7ab1c84 100644 --- a/coselmar-ui/src/main/webapp/views/users/searchPart.html +++ b/coselmar-ui/src/main/webapp/views/users/searchPart.html @@ -46,7 +46,7 @@ <button type="submit" class="btn btn-primary glyphicon glyphicon-search"></button> </div> <div class="form-group" ng-show="!advanced"> - <a ng-click="advanced=true" class="btn btn-action"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> {{ 'common.button.advanceSearch' | translate }}</a> + <a ng-click="searchMode('advanced')" class="btn btn-action"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> {{ 'common.button.advanceSearch' | translate }}</a> </div> </form> @@ -58,7 +58,7 @@ <!-- Advanced Search part --> <div ng-show="advanced" class="search-zone marginVertical20"> <div class="form-group text-right"> - <a ng-click="advanced=false" class="btn btn-action"><span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span> {{ 'common.button.simpleSearch' | translate }}</a> + <a ng-click="searchMode('simple')" class="btn btn-action"><span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span> {{ 'common.button.simpleSearch' | translate }}</a> </div> <form class="form-horizontal" name="userFullOption" role="userFullOptions" ng-submit="advancedSearchUsers()"> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.