mirror of https://github.com/akveo/blur-admin
lists ui first commit
parent
dc12ae0b31
commit
05700eb510
Binary file not shown.
|
@ -0,0 +1,63 @@
|
|||
/**
|
||||
* @author a.demeshko
|
||||
* created on 28.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.teams.lists')
|
||||
.controller('ListsTabCtrl', ListsTabCtrl);
|
||||
|
||||
/** @ngInject */
|
||||
function ListsTabCtrl($scope, baConfig) {
|
||||
|
||||
$scope.transparent = baConfig.theme.blur;
|
||||
var dashboardColors = baConfig.colors.dashboard;
|
||||
var colors = [];
|
||||
for (var key in dashboardColors) {
|
||||
colors.push(dashboardColors[key]);
|
||||
}
|
||||
|
||||
function getRandomColor() {
|
||||
var i = Math.floor(Math.random() * (colors.length - 1));
|
||||
return colors[i];
|
||||
}
|
||||
|
||||
$scope.Lists = [
|
||||
{ text: 'Check me out yeah' },
|
||||
{ text: 'Lorem ipsum dolor sit amet, possit denique oportere at his, etiam corpora deseruisse te pro' },
|
||||
{ text: 'Ex has semper alterum, expetenda dignissim' },
|
||||
{ text: 'Vim an eius ocurreret abhorreant, id nam aeque persius ornatus.' },
|
||||
{ text: 'Simul erroribus ad usu' },
|
||||
{ text: 'Ei cum solet appareat, ex est graeci mediocritatem' },
|
||||
{ text: 'Get in touch with akveo team' },
|
||||
{ text: 'Write email to business cat' },
|
||||
{ text: 'Have fun with blur admin' },
|
||||
{ text: 'What do you think?' },
|
||||
];
|
||||
|
||||
$scope.Lists.forEach(function(item) {
|
||||
item.color = getRandomColor();
|
||||
});
|
||||
|
||||
$scope.newTodoText = '';
|
||||
|
||||
$scope.addNewList = function (event, clickPlus) {
|
||||
if (clickPlus || event.which === 13) {
|
||||
$scope.Lists.unshift({
|
||||
text: $scope.newTodoText,
|
||||
color: getRandomColor(),
|
||||
});
|
||||
$scope.newTodoText = '';
|
||||
}
|
||||
};
|
||||
|
||||
$scope.removeList = function (index) {
|
||||
if (confirm("Are you sure?"))
|
||||
{
|
||||
$scope.Lists[index].deleted = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @author v.lugovksy
|
||||
* created on 16.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.teams.lists')
|
||||
.directive('listsDirective', listsDirective);
|
||||
|
||||
/** @ngInject */
|
||||
function listsDirective() {
|
||||
return {
|
||||
restrict: 'EA',
|
||||
controller: 'ListsTabCtrl',
|
||||
templateUrl: 'app/pages/teams/lists/listsDirective.html'
|
||||
};
|
||||
}
|
||||
})();
|
|
@ -0,0 +1,9 @@
|
|||
<div class="row">
|
||||
<div class="col-xlg-3 col-lg-6 col-md-6 col-xs-12"
|
||||
ba-panel
|
||||
ba-panel-title="Mailing LISTS"
|
||||
ba-panel-class="xmedium-panel feed-comply-panel with-scroll todo-panel">
|
||||
<lists-directive></lists-directive>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 16.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.teams.lists', [])
|
||||
.config(routeConfig);
|
||||
|
||||
/** @ngInject */
|
||||
function routeConfig($stateProvider,$urlRouterProvider) {
|
||||
$stateProvider
|
||||
.state('teams.lists', {
|
||||
url: '/lists',
|
||||
//abstract: true,
|
||||
templateUrl: 'app/pages/teams/lists/lists.html',
|
||||
controller: "ListsTabCtrl",
|
||||
controllerAs: "listsTabCtrl",
|
||||
title: 'Lists',
|
||||
sidebarMeta: {
|
||||
order: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
|
@ -0,0 +1,18 @@
|
|||
<div class="task-todo-container" ng-class="{'transparent': transparent}">
|
||||
<input type="text" value="" class="form-control task-todo" placeholder="Add a new list.." ng-keyup="addNewList($event)" ng-model="newTodoText"/>
|
||||
<i ng-click="addNewList('',true)" class="add-item-icon ion-plus-round"></i>
|
||||
<div class="box-shadow-border"></div>
|
||||
<ul class="todo-list" ui-sortable ng-model="Lists">
|
||||
<li ng-repeat="item in Lists" ng-if="!item.deleted" ng-init="activeItem=false"
|
||||
ng-class="{checked: isChecked, active: activeItem}"
|
||||
ng-mouseenter="activeItem=true" ng-mouseleave="activeItem=false">
|
||||
<div class="blur-container"><div class="blur-box"></div></div>
|
||||
<i class="mark" style="background-color: {{::item.color}}"></i>
|
||||
<label class="todo-checkbox custom-checkbox custom-input-success">
|
||||
<input type="checkbox" ng-model="isChecked">
|
||||
<span class="cut-with-dots">{{ item.text }}</span>
|
||||
</label>
|
||||
<i class="remove-todo ion-ios-close-empty" ng-click="removeList($index)"></i>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
Binary file not shown.
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
}).state('teams.members.label', {
|
||||
url: '/:label',
|
||||
templateUrl: 'app/pages/teams/members/list/membersList.html',
|
||||
templateUrl: 'app/pages/teams/members/membersListing/membersList.html',
|
||||
title: 'Members',
|
||||
controller: "MembersListCtrl",
|
||||
controllerAs: "listCtrl"
|
||||
|
@ -34,7 +34,7 @@
|
|||
controller: "MemberDetailCtrl",
|
||||
controllerAs: "detailCtrl"
|
||||
});
|
||||
$urlRouterProvider.when('/teams/members','/teams/members/list');
|
||||
$urlRouterProvider.when('/teams/members','/teams/members/listing');
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/** @ngInject */
|
||||
function MembersListCtrl($scope, $stateParams, membersList) {
|
||||
var vm = this;
|
||||
vm.members = ($stateParams.label == "list") ? membersList.getAllMessages() : membersList.getMembersByLabel($stateParams.label);
|
||||
vm.members = ($stateParams.label == "listing") ? membersList.getAllMessages() : membersList.getMembersByLabel($stateParams.label);
|
||||
vm.label = $stateParams.label;
|
||||
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
angular.module('BlurAdmin.pages.teams', [
|
||||
'BlurAdmin.pages.teams.members',
|
||||
'BlurAdmin.pages.teams.lists',
|
||||
])
|
||||
.config(routeConfig);
|
||||
|
||||
|
|
Loading…
Reference in New Issue