mirror of https://github.com/akveo/blur-admin
parent
2631c853e9
commit
1c2ba8fc06
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 23.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.panels', [])
|
||||
.config(routeConfig);
|
||||
|
||||
/** @ngInject */
|
||||
function routeConfig($stateProvider) {
|
||||
$stateProvider
|
||||
.state('panels', {
|
||||
url: '/panels',
|
||||
templateUrl: 'app/pages/panels/panels.html',
|
||||
controller: 'NotificationsPageCtrl'
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 23.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Includes basic panel layout inside of current element.
|
||||
*/
|
||||
angular.module('BlurAdmin.theme')
|
||||
.directive('baPanel', baPanel);
|
||||
|
||||
/** @ngInject */
|
||||
function baPanel(baPanel) {
|
||||
return angular.extend({}, baPanel, {
|
||||
template: function(el, attrs) {
|
||||
var res = '<div class="panel panel-default invisible ' + (attrs.baPanelClass || '') + '" zoom-in>';
|
||||
res += baPanel.template(el, attrs);
|
||||
res += '</div>';
|
||||
return res;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 23.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.theme')
|
||||
.factory('baPanel', baPanel);
|
||||
|
||||
/** @ngInject */
|
||||
function baPanel() {
|
||||
|
||||
/** Base baPanel directive */
|
||||
return {
|
||||
restrict: 'A',
|
||||
transclude: true,
|
||||
template: function(elem, attrs) {
|
||||
var res = '<div class="panel-body"><div class="panel-content" ng-transclude></div></div>';
|
||||
if (attrs.baPanelTitle) {
|
||||
var titleTpl = '<div class="panel-heading clearfix"><h3 class="panel-title">' + attrs.baPanelTitle + '</h3></div>';
|
||||
res = titleTpl + res; // title should be before
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 23.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Represents current element as panel, adding all necessary classes.
|
||||
*/
|
||||
angular.module('BlurAdmin.theme')
|
||||
.directive('baPanelSelf', baPanelSelf);
|
||||
|
||||
/** @ngInject */
|
||||
function baPanelSelf(baPanel) {
|
||||
return angular.extend({}, baPanel, {
|
||||
link: function(scope, el, attrs) {
|
||||
el.addClass('panel panel-default');
|
||||
if (attrs.baPanelClass) {
|
||||
el.addClass(attrs.baPanelClass);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
Loading…
Reference in new issue