-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom filters, Electron update to ver 1.2.0
- Loading branch information
1 parent
b2c536f
commit c25998e
Showing
23 changed files
with
683 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
/** | ||
* @ngdoc function | ||
* @name electroCrudApp.controller:MainHeaderCtrl | ||
* @description | ||
* # MainHeaderCtrl | ||
* Controller of the electroCrudApp | ||
*/ | ||
angular.module('electroCrudApp') | ||
.controller('MainHeaderCtrl', ['$rootScope', '$scope', function ($rootScope, $scope) { | ||
|
||
var isControlSidebarOpened = false; | ||
|
||
$rootScope.$on('toggleControlSidebar', function(){ | ||
$scope.toggleControlSidebar(); | ||
}); | ||
|
||
$scope.toggleControlSidebar = function(){ | ||
if (isControlSidebarOpened) { | ||
$.AdminLTE.controlSidebar.close(); | ||
} else { | ||
$.AdminLTE.controlSidebar.open(); | ||
} | ||
isControlSidebarOpened = !isControlSidebarOpened; | ||
}; | ||
|
||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use strict'; | ||
|
||
/** | ||
* @ngdoc function | ||
* @name electroCrudApp.controller:RightSideBarCtrl | ||
* @description | ||
* # RightSideBarCtrl | ||
* Controller of the electroCrudApp | ||
*/ | ||
angular.module('electroCrudApp') | ||
.controller('RightSideBarCtrl', ['$scope', '$rootScope', 'viewsModel', 'SweetAlert', 'session', | ||
function($scope, $rootScope, viewsModel, SweetAlert, session) { | ||
|
||
$scope.viewFilters = session.activeViewFilters; | ||
|
||
$scope.editFilter = function(filter) { | ||
$rootScope.$emit('editFilter', filter.name); | ||
}; | ||
|
||
$scope.addFilter = function(){ | ||
$rootScope.$emit('addFilter'); | ||
}; | ||
|
||
$scope.resetFilter = function(){ | ||
for (var filter of $scope.viewFilters) { | ||
filter.selected = false; | ||
} | ||
$rootScope.$emit('selectFilter'); | ||
$rootScope.$emit('toggleControlSidebar'); | ||
}; | ||
|
||
$scope.selectFilter = function(name) { | ||
for (var filter of $scope.viewFilters) { | ||
filter.selected = filter.name == name; | ||
} | ||
$rootScope.$emit('selectFilter', name); | ||
$rootScope.$emit('toggleControlSidebar'); | ||
}; | ||
|
||
}]); |
Oops, something went wrong.