Skip to content

Commit

Permalink
Custom filters
Browse files Browse the repository at this point in the history
Custom filters, Electron update to ver 1.2.0
  • Loading branch information
garrylachman committed May 27, 2016
1 parent b2c536f commit c25998e
Show file tree
Hide file tree
Showing 23 changed files with 683 additions and 37 deletions.
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ module.exports = function (grunt) {
}, {
expand: true,
cwd: '.',
src: 'node_modules/{strip-json-comments,deep-extend,debug,ms,rc,ini,tunnel-ssh,ssh2,ssh2-streams,streamsearch,mysql,promise,asap,bignumber.js,readable-stream,isarray,core-util-is,inherits,string_decoder}/**',
src: 'node_modules/{setter-method,strip-json-comments,deep-extend,debug,ms,rc,ini,tunnel-ssh,ssh2,ssh2-streams,streamsearch,mysql,promise,asap,bignumber.js,readable-stream,isarray,core-util-is,inherits,string_decoder}/**',
dest: '<%= yeoman.dist %>'
}, {
expand: true,
Expand Down Expand Up @@ -487,7 +487,7 @@ module.exports = function (grunt) {
name: 'ElectoCRUD',
dir: 'dist',
out: 'appDist',
version: '1.1.1',
version: '1.2.0',
platform: 'win32',
arch: 'all',
overwrite: true,
Expand All @@ -502,7 +502,7 @@ module.exports = function (grunt) {
name: 'ElectoCRUD',
dir: 'dist',
out: 'appDist',
version: '1.1.1',
version: '1.2.0',
platform: 'darwin',
arch: 'all',
overwrite: true,
Expand All @@ -517,7 +517,7 @@ module.exports = function (grunt) {
name: 'ElectoCRUD',
dir: 'dist',
out: 'appDist',
version: '1.1.1',
version: '1.2.0',
platform: 'linux',
arch: 'all',
overwrite: true,
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ No Coding, just select database and create views.

## Download Binaries [![GitHub tag](https://img.shields.io/github/tag/garrylachman/ElectroCRUD.svg?maxAge=180&style=flat-square)]()

[Mac OSX (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.4.0/ElectoCRUD-darwin-x64.zip)
[Mac OSX (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.5.0/ElectoCRUD-darwin-x64.zip)

[Linux 32Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.4.0/ElectoCRUD-linux-ia32.zip)
[Linux 32Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.5.0/ElectoCRUD-linux-ia32.zip)

[Linux 64Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.4.0/ElectoCRUD-linux-x64.zip)
[Linux 64Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.5.0/ElectoCRUD-linux-x64.zip)

[Windows 32Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.4.0/ElectoCRUD-win32-ia32.zip)
[Windows 32Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.5.0/ElectoCRUD-win32-ia32.zip)

[Windows 64Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.4.0/ElectoCRUD-win32-x64.zip)
[Windows 64Bit (Pre-release)](https://github.com/garrylachman/ElectroCRUD/releases/download/0.5.0/ElectoCRUD-win32-x64.zip)

## Screenshots
| | |
| ------------- | ------------- |
| <img src="http://i.imgur.com/TetjYVu.png" style="float: left;" /> <img src="http://i.imgur.com/yc2L992.png" style="float: left;" /> <img src="http://i.imgur.com/A51zLRv.png" style="float: left;" /> | <img src="http://i.imgur.com/E1BS1tL.png" style="float: left;" /> <img src="http://i.imgur.com/twgRdOr.png" style="float: left;" /> <img src="http://i.imgur.com/DjznKTD.png" style="float: left;" /> |
| <img src="http://i.imgur.com/fLb3CdC.png" style="float: left;" /> <img src="http://i.imgur.com/TetjYVu.png" style="float: left;" /> <img src="http://i.imgur.com/yc2L992.png" style="float: left;" /> <img src="http://i.imgur.com/A51zLRv.png" style="float: left;" /> | <img src="http://i.imgur.com/UEjZSa5.png" style="float: left;" /> <img src="http://i.imgur.com/E1BS1tL.png" style="float: left;" /> <img src="http://i.imgur.com/twgRdOr.png" style="float: left;" /> <img src="http://i.imgur.com/DjznKTD.png" style="float: left;" /> |


## Install dependencies
Expand Down
55 changes: 50 additions & 5 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
<link rel="stylesheet" href="bower_components/sweetalert/dist/sweetalert.css" />
<link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.css" />
<link rel="stylesheet" href="bower_components/ngprogress/ngProgress.css" />
<link rel="stylesheet" href="bower_components/animate.css/animate.css" />
<!-- endbower -->
<!-- endbuild -->

</head>
<body ng-app="electroCrudApp" class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

<header class="main-header">
<header class="main-header" ng-controller="MainHeaderCtrl">
<!-- Logo -->
<a href="index2.html" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
Expand All @@ -55,7 +56,10 @@

<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
</ul>
<li>
<a ng-click="toggleControlSidebar()" title="Custom Filters"><i class="fa fa-filter"></i></a>
</li>
</ul>
</div>
</nav>
</header>
Expand Down Expand Up @@ -118,9 +122,47 @@ <h1>
</footer>


<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>



<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark" ng-controller="RightSideBarCtrl">

<!-- Tab panes -->
<div class="tab-content">
<!-- Home tab content -->
<div class="tab-pane active" id="control-sidebar-home-tab">
<h3 class="control-sidebar-heading">Custom Filters <small ng-click="addFilter()" class="fa fa-plus margin-left-10"></small></h3>
<ul class="control-sidebar-menu">
<li ng-repeat="filter in viewFilters" ng-class="{'active': filter.selected}" class="pointer">
<a ng-click="selectFilter(filter.name)" ng-mouseover="showEdit=true" ng-mouseleave="showEdit=false" ng-init="showEdit=false">
<i class="menu-icon fa {{filter.icon}} {{filter.bgColor}}"></i>
<button ng-click="editFilter(filter); $event.stopPropagation();" ng-show="showEdit" class="btn btn-flat pull-right bg-olive side-menubar-filter-edit animated rubberBand margin-left-10">Edit</button>
<button ng-click="resetFilter(); $event.stopPropagation();" ng-show="filter.selected" class="btn btn-flat pull-right bg-light-blue side-menubar-filter-edit animated rubberBand">Unselect</button>
<div class="menu-info">
<h4 class="control-sidebar-subheading">{{filter.title}}</h4>
<p>{{filter.subTitle}}</p>
</div>
</a>
</li>
</ul>
<!-- /.control-sidebar-menu -->

<!-- /.control-sidebar-menu -->

</div>
<!-- /.tab-pane -->
</div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>





</div>
<!-- ./wrapper -->

Expand Down Expand Up @@ -198,6 +240,9 @@ <h1>
<script src="scripts/services/widget-helper.js"></script>
<script src="scripts/directives/ng-enter.js"></script>
<script src="scripts/controllers/process-list.js"></script>
<script src="scripts/controllers/right-side-bar.js"></script>
<script src="scripts/controllers/main-header.js"></script>
<script src="scripts/services/view-filter-helper.js"></script>
<!-- endbuild -->
</body>
</html>
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "index.js",
"name": "electrocrud",
"version": "0.4.0",
"version": "0.5.0",
"private": false,
"engines": {
"node": ">=0.10.0"
Expand Down
28 changes: 28 additions & 0 deletions app/scripts/controllers/main-header.js
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;
};

}]);
40 changes: 40 additions & 0 deletions app/scripts/controllers/right-side-bar.js
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');
};

}]);
Loading

0 comments on commit c25998e

Please sign in to comment.