Skip to content

Commit 4001111

Browse files
committed
Added general ui component (silverbux#37)
1 parent 4a124ae commit 4001111

File tree

10 files changed

+752
-30
lines changed

10 files changed

+752
-30
lines changed
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
class FormsGeneralController{
2-
constructor(){
3-
'ngInject';
1+
class FormsGeneralController {
2+
constructor () {
3+
'ngInject'
44

5-
//
6-
}
5+
//
6+
}
77

8-
$onInit(){
9-
}
8+
$onInit () {}
109
}
1110

1211
export const FormsGeneralComponent = {
13-
templateUrl: './views/app/components/forms-general/forms-general.component.html',
14-
controller: FormsGeneralController,
15-
controllerAs: 'vm',
16-
bindings: {}
12+
templateUrl: './views/app/components/forms-general/forms-general.component.html',
13+
controller: FormsGeneralController,
14+
controllerAs: 'vm',
15+
bindings: {}
1716
}
18-
19-

angular/app/components/nav-sidebar/nav-sidebar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
<i class="fa fa-angle-left pull-right"></i>
8282
</a>
8383
<ul class="treeview-menu">
84-
<li><a ui-sref="app.comingsoon"><i class="fa fa-circle-o"></i> General</a></li>
84+
<li><a ui-sref="app.uigeneral"><i class="fa fa-circle-o"></i> General</a></li>
8585
<li><a ui-sref="app.comingsoon"><i class="fa fa-circle-o"></i> Icons</a></li>
8686
<li><a ui-sref="app.comingsoon"><i class="fa fa-circle-o"></i> Buttons</a></li>
8787
<li><a ui-sref="app.comingsoon"><i class="fa fa-circle-o"></i> Sliders</a></li>

angular/app/components/reset-password/reset-password.component.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ResetPasswordController {
2929
}
3030

3131
submit (isValid) {
32-
if(isValid) {
32+
if (isValid) {
3333
this.alerts = []
3434
let data = {
3535
email: this.$state.params.email,
@@ -44,13 +44,13 @@ class ResetPasswordController {
4444
let alrtArr = []
4545

4646
angular.forEach(res.data.errors, function (value) {
47-
alrtArr = {type: 'error', 'title': 'Error!', msg: value[0]}
47+
alrtArr = {type: 'error', 'title': 'Error!', msg: value[0]}
4848
})
4949

5050
this.alerts.push(alrtArr)
51-
})
51+
})
5252
} else {
53-
this.formSubmitted = true
53+
this.formSubmitted = true
5454
}
5555
}
5656
}

angular/app/components/ui-general/ui-general.component.html

Lines changed: 657 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class UiGeneralController {
2+
constructor () {
3+
'ngInject'
4+
5+
//
6+
}
7+
8+
$onInit () {}
9+
}
10+
11+
export const UiGeneralComponent = {
12+
templateUrl: './views/app/components/ui-general/ui-general.component.html',
13+
controller: UiGeneralController,
14+
controllerAs: 'vm',
15+
bindings: {}
16+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.color-palette {
2+
height: 35px;
3+
line-height: 35px;
4+
text-align: center;
5+
}
6+
7+
.color-palette-set {
8+
margin-bottom: 15px;
9+
}
10+
11+
.color-palette {
12+
span {
13+
display: none;
14+
font-size: 12px;
15+
}
16+
&:hover span {
17+
display: block;
18+
}
19+
}
20+
21+
.color-palette-box h4 {
22+
position: absolute;
23+
top: 100%;
24+
left: 25px;
25+
margin-top: -40px;
26+
color: rgba(255, 255, 255, 0.8);
27+
font-size: 12px;
28+
display: block;
29+
z-index: 7;
30+
}

angular/config/routes.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ export function RoutesConfig ($stateProvider, $urlRouterProvider) {
4141
}
4242
}
4343
})
44+
.state('app.uigeneral', {
45+
url: '/ui-general',
46+
data: {
47+
auth: true
48+
},
49+
views: {
50+
'main@app': {
51+
template: '<ui-general></ui-general>'
52+
}
53+
}
54+
})
4455
.state('app.formsgeneral', {
4556
url: '/forms-general',
4657
data: {

angular/index.components.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import {FormsGeneralComponent} from './app/components/forms-general/forms-general.component';
1+
import { UiGeneralComponent } from './app/components/ui-general/ui-general.component'
2+
import { FormsGeneralComponent } from './app/components/forms-general/forms-general.component'
23
import { ChartsChartjsComponent } from './app/components/charts-chartjs/charts-chartjs.component'
34
import { WidgetsComponent } from './app/components/widgets/widgets.component'
45
import { UserProfileComponent } from './app/components/user-profile/user-profile.component'
@@ -22,7 +23,8 @@ import { LoginFormComponent } from './app/components/login-form/login-form.compo
2223
import { RegisterFormComponent } from './app/components/register-form/register-form.component'
2324

2425
angular.module('app.components')
25-
.component('formsGeneral', FormsGeneralComponent)
26+
.component('uiGeneral', UiGeneralComponent)
27+
.component('formsGeneral', FormsGeneralComponent)
2628
.component('chartsChartjs', ChartsChartjsComponent)
2729
.component('widgets', WidgetsComponent)
2830
.component('userProfile', UserProfileComponent)
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
ngDescribe({
2-
name: 'Test forms-general component',
3-
modules: 'app',
4-
element: '<forms-general></forms-general>',
5-
tests: function (deps) {
6-
7-
it('basic test', () => {
8-
//
9-
});
10-
}
11-
});
2+
name: 'Test forms-general component',
3+
modules: 'app',
4+
element: '<forms-general></forms-general>',
5+
tests: function (deps) {
6+
it('basic test', () => {
7+
//
8+
})
9+
}
10+
})
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ngDescribe({
2+
name: 'Test ui-general component',
3+
modules: 'app',
4+
element: '<ui-general></ui-general>',
5+
tests: function (deps) {
6+
it('basic test', () => {
7+
//
8+
})
9+
}
10+
})

0 commit comments

Comments
 (0)