problem with persistent modals persists

parent e900c5f4
...@@ -29,8 +29,6 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -29,8 +29,6 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope.loadingCatPictos = false; $scope.loadingCatPictos = false;
$scope.radioModel = 'Middle'; $scope.radioModel = 'Middle';
$scope.onlyOwn = onlyOwn; $scope.onlyOwn = onlyOwn;
if (onlyOwn)
$scope.source = 'ownpictos';
/* /*
* Get data about SymbolStix * Get data about SymbolStix
...@@ -101,8 +99,6 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -101,8 +99,6 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope.load_own_pictos = function () { $scope.load_own_pictos = function () {
$scope.source = 'ownpictos'; $scope.source = 'ownpictos';
$('#own_group').fadeIn();
$http.get(config.backend + '/sup/' + supervisor.id + '/pictos') $http.get(config.backend + '/sup/' + supervisor.id + '/pictos')
.success(function (data) { .success(function (data) {
if (data) { if (data) {
...@@ -298,12 +294,16 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -298,12 +294,16 @@ dashboardControllers.controller('AddPictoCtrl', function (
//Triggered when scrolling to bottom //Triggered when scrolling to bottom
$scope.scroll = function(){ $scope.scroll = function(){
if ($scope.onlyOwn)
return;
$scope.loadingCatPictos = true; $scope.loadingCatPictos = true;
$scope.page += 1; $scope.page += 1;
var request = ""; var request = "";
if($scope.breadcrumbs.length == 1){ if($scope.breadcrumbs.length == 1) {
//Request page X from all pictos (symbolstx) //Request page X from all pictos (symbolstx)
request = config.backend + '/sup/' + supervisor.id + request = config.backend + '/sup/' + supervisor.id +
'/pic_fromSymbolStx/page/'+$scope.page+'/limit/'+$scope.limit; '/pic_fromSymbolStx/page/'+$scope.page+'/limit/'+$scope.limit;
...@@ -373,6 +373,9 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -373,6 +373,9 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope.loadingCatPictos = false; $scope.loadingCatPictos = false;
}); });
} }
}; };
if (onlyOwn)
$scope.load_own_pictos();
}); });
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div id="collections" class="col-md-12 category-collection" <div id="collections" class="col-md-12 category-collection"
ng-class="{ 'category-collection-loading': loadingCatPictos }" ng-class="{ 'category-collection-loading': loadingCatPictos }"
data-loading="{{ 'loading_pictos' | translate }}"> data-loading="{{ 'loading_pictos' | translate }}">
<form ng-submit="search()"> <form ng-submit="search()" ng-show="!onlyOwn">
<div class="input-group" id="search_pictos_box"> <div class="input-group" id="search_pictos_box">
<input type="text" class="form-control" placeholder="{{ 'filter' | translate }}" <input type="text" class="form-control" placeholder="{{ 'filter' | translate }}"
id="srch_term_picto" name="srch_term_picto" ng-model="srch_term_picto"> id="srch_term_picto" name="srch_term_picto" ng-model="srch_term_picto">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment