Commit ca30b367 authored by Sang D NGO's avatar Sang D NGO
Browse files

Merge branch 'bootstrap' into 'master'

Bootstrap sidebar

See merge request !4
parents 7898becc 1e4156aa
@import './home/most-home';
@import './sidebar/most-sidebar';
@import './proposal/most-proposal';
.most-root.full-width.row.no-padding-xs(sub-header-aware)
most-mode-indicator
.col-md-3.hidden-xs
most-sidebar
.col-xs-12.col-md-8.no-padding-xs
.ui-view(name="root", noanimation)
......@@ -8,30 +8,21 @@
.config(function($stateProvider) {
$stateProvider
.state('example', {
url: '/example',
views: {
'': {
templateUrl: MODULE_DIR_NAME + '/app/home/most-home.html'
},
'sidebar@example': {
templateUrl: MODULE_DIR_NAME + '/app/home/most-sidebar.html'
}
},
.state('most', {
url: '/most',
templateUrl: MODULE_DIR_NAME + '/app/app.html',
deepStateRedirect: {
default: 'example.home',
default: 'most.proposal',
fn: function() {
return { state: 'example.home' };
return true;
}
}
})
.state('example.home', {
url: '/home',
controller: 'mostHomeController',
controllerAs: 'ctrl',
.state('most.proposal', {
url: '/proposal',
views: {
'main@example': {
templateUrl: MODULE_DIR_NAME + '/app/home/most-main.html'
'root@most': {
template: '<most-proposal />'
}
}
});
......
......@@ -9,7 +9,7 @@
function mostApplicationMenu(applicationMenuTemplateBuilder) {
var directive = {
restrict: 'E',
template: applicationMenuTemplateBuilder('/#/example', 'mdi-emoticon-happy', 'Most'),
template: applicationMenuTemplateBuilder('/#/most', 'mdi-emoticon-happy', 'Most'),
replace: true
};
......
(function() {
'use strict';
var MODULE_NAME = 'linagora.esn.most';
angular.module(MODULE_NAME)
.controller('mostHomeController', mostHomeController);
function mostHomeController() {
this.message = 'Most home!';
}
})();
'use strict';
/* global chai: false */
var expect = chai.expect;
describe('the mostHomeController', function() {
var $rootScope, $scope, $controller;
beforeEach(function() {
angular.mock.module('linagora.esn.most');
angular.mock.inject(function(_$rootScope_, _$controller_) {
$rootScope = _$rootScope_;
$scope = $rootScope.$new();
$controller = _$controller_;
});
});
function initController() {
var bindings = {},
controller = $controller('mostHomeController',
{
$scope: $scope
},
bindings);
$scope.$digest();
return controller;
}
describe('the initialization', function() {
it('should set $scope.message on init', function() {
var ctrl = initController();
expect(ctrl.message).to.equal('Most home!');
});
});
});
@most-sidebar-width: 25%;
.most-home {
.flex-shorthand(1);
position: relative;
top: 47px;
height: 70vh;
.most-main {
.most-main-content {
.flex-shorthand(1);
margin-left: 7px;
margin-right: 7px;
.most-module-card {
.flex-horizontal-centered;
padding: 5px 10px;
background: @m-white;
}
}
}
.most-sidebar {
height: 100%;
border-right: 1px solid lighten(@m-gray, 0%);
width: @most-sidebar-width;
margin-top: 15px;
.most-sidebar-content {
.flex-horizontal-centered;
}
}
}
.most-subheader-content {
.flex-horizontal-centered;
font-size: 1.2em;
color: @m-white;
}
@media(min-width: @screen-md-min) {
.most-home > .most-main {
margin-top: 15px;
}
}
.most-home
.col-md-3.most-sidebar.hidden-xs.ui-view(name='sidebar')
.col-xs-12.col-md-8.most-main.no-padding-xs.ui-view(name='main')
sub-header
most-subheader
.most-main-content
.most-module-card
h1 #{__('Most module')}
.most-sidebar-content
.card-header
h1 #{__('My sidebar')}
(function() {
'use strict';
var MODULE_NAME = 'linagora.esn.most';
var MODULE_DIR_NAME = '/linagora.esn.most';
angular.module(MODULE_NAME)
.component('mostSubheader', mostSubheader());
function mostSubheader() {
var component = {
templateUrl: MODULE_DIR_NAME + '/app/home/most-subheader.html'
};
return component;
}
})();
extends /modules/subheader/responsive-subheader.pug
block left
most-burger-button.hidden-md
span.most-subheader-content
| #{__('Most module')}
block right
(function(angular) {
'use strict';
angular.module('linagora.esn.most')
.component('mostProposalList', {
templateUrl: '/linagora.esn.most/app/proposal/list/most-proposal-list.html',
controller: 'MostProposalListController'
});
})(angular);
(function(angular) {
'use strict';
angular.module('linagora.esn.most')
.controller('MostProposalListController', MostProposalListController);
function MostProposalListController() {
}
})(angular);
(function(angular) {
'use strict';
angular.module('linagora.esn.most')
.component('mostProposal', {
templateUrl: '/linagora.esn.most/app/proposal/most-proposal.html',
controller: 'MostProposalController'
});
})(angular);
(function(angular) {
'use strict';
angular.module('linagora.esn.most')
.controller('MostProposalController', MostProposalController);
function MostProposalController() {
}
})(angular);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment