Merge branch 'Tibing-dev-tree-view' into develop/tree

Conflicts:
	config/webpack.common.js
	package.json
	src/app/app.menu.ts
	src/app/pages/pages.component.ts
This commit is contained in:
nixa 2016-07-12 12:09:19 +03:00
commit 85a9f86186
10 changed files with 100 additions and 0 deletions

View file

@ -89,6 +89,7 @@ module.exports = {
// these packages have problems with their sourcemaps // these packages have problems with their sourcemaps
helpers.root('node_modules/rxjs'), helpers.root('node_modules/rxjs'),
helpers.root('node_modules/ng2-bootstrap'), helpers.root('node_modules/ng2-bootstrap'),
helpers.root('node_modules/ng2-branchy')
] ]
} }

View file

@ -37,6 +37,7 @@
"lodash": "^4.12.0", "lodash": "^4.12.0",
"ng2-bootstrap": "^1.0.20", "ng2-bootstrap": "^1.0.20",
"ng2-ckeditor": "^1.0.4", "ng2-ckeditor": "^1.0.4",
"ng2-branchy": "0.0.2-2",
"ng2-uploader": "^0.5.2", "ng2-uploader": "^0.5.2",
"normalize.css": "^4.1.1", "normalize.css": "^4.1.1",
"rxjs": "5.0.0-beta.6", "rxjs": "5.0.0-beta.6",

View file

@ -0,0 +1,25 @@
import {Component} from '@angular/core';
import {RouteConfig} from '@angular/router-deprecated';
import {TreeView} from "./components/treeView";
@Component({
selector: 'components',
pipes: [],
providers: [],
styles: [],
template: `<router-outlet></router-outlet>`
})
@RouteConfig([
{
name: 'TreeView',
component: TreeView,
path: '/tree-view',
useAsDefault: true
}
])
export class Components {
constructor() {
}
}

View file

@ -0,0 +1 @@
@import '../../theme/sass/treeView';

View file

@ -0,0 +1 @@
export * from './treeView.component';

View file

@ -0,0 +1,37 @@
import {Component} from '@angular/core';
import {BranchyComponent, TreeModel} from 'ng2-branchy';
import {BaCard} from '../../../../theme/components/baCard';
@Component({
selector: 'tree-view',
directives: [BranchyComponent, BaCard],
template: require('./treeView.html'),
})
export class TreeView {
constructor() {
}
private tree: TreeModel = {
value: 'Programming languages by programming paradigm',
children: [
{
value: 'Object-oriented programming',
children: [
{value: 'Java'},
{value: 'C++'},
{value: 'C#'},
]
},
{
value: 'Prototype-based programming',
children: [
{value: 'JavaScript'},
{value: 'CoffeeScript'},
{value: 'Lua'},
]
}
]
};
}

View file

@ -0,0 +1,5 @@
<div class="col-md-6">
<ba-card title="basic">
<branchy id="tree-view" [tree]="tree"></branchy>
</ba-card>
</div>

View file

@ -0,0 +1 @@
export * from './components.component';

View file

@ -0,0 +1,27 @@
#tree-view .tree {
& .node-value {
color: white;
}
& .folding {
&.node-expanded::before {
color: white;
}
&.node-collapsed::before {
color: white;
}
&.node-leaf::before {
color: white;
}
}
& .over-drop-target {
border: 4px solid ghostwhite;
}
& .node-value{
& .node-selected::after {
background-color: white;
}
&:after {
background-color: white;
}
}
}

View file

@ -8,3 +8,4 @@
@import "sass/socicon"; @import "sass/socicon";
@import "sass/table"; @import "sass/table";
@import "sass/form"; @import "sass/form";
@import "sass/treeView";