This commit is contained in:
Wedge 2016-06-23 04:49:36 +03:00
parent 2961b9e2f2
commit 660a509b33
2 changed files with 12 additions and 5 deletions

View File

@ -18,16 +18,23 @@ RosaABF.controller('RosaABFController', ['$scope', 'LocalesHelper', 'SoundNotifi
toggle = false; toggle = false;
} }
if(toggle) {
if(typeof $cookies.get('toggle') == 'undefined') { if(typeof $cookies.get('toggle') == 'undefined') {
$scope.toggle = toggle; $scope.toggle = toggle;
} }
else { else {
$scope.toggle = $cookies.get('toggle') == 'true' ? true : false; $scope.toggle = $cookies.get('toggle') == 'true' ? true : false;
} }
}
else {
$scope.toggle = false;
}
$scope.toggleSidebar = function() { $scope.toggleSidebar = function() {
$scope.toggle = !$scope.toggle; $scope.toggle = !$scope.toggle;
if(toggle) {
$cookies.put("toggle", $scope.toggle); $cookies.put("toggle", $scope.toggle);
}
}; };
}]); }]);

View File

@ -1,7 +1,7 @@
= f.input :name = f.input :name
= f.input :description, as: :text = f.input :description, as: :text
div ng-controller="ProjectsVersionsTypeaheadController" ng-init=('init("'+@platform.name+'","'+@product.project.try(:name_with_owner).to_s+'","'+@product.project_id.to_s+'","'+@product.project_version+'")') div ng-controller="ProjectsVersionsTypeaheadController" ng-init=('init("'+@platform.name+'","'+@product.project.try(:name_with_owner).to_s+'","'+@product.project_id.to_s+'","'+@product.project_version.to_s+'")')
= f.input :project_id, as: :string, = f.input :project_id, as: :string,
input_html: { uib_typeahead: 'project.name for project in getProjects($viewValue)', input_html: { uib_typeahead: 'project.name for project in getProjects($viewValue)',
typeahead_wait_ms: 200, typeahead_wait_ms: 200,