├── src ├── assets │ └── .gitkeep ├── app │ ├── app.component.css │ ├── app.component.html │ ├── charts │ │ ├── pieCharts │ │ │ ├── pieCharts.component.html │ │ │ └── pieCharts.component.ts │ │ └── lineCharts │ │ │ ├── lineCharts.component.html │ │ │ └── lineCharts.component.ts │ ├── tables │ │ └── datatable │ │ │ ├── datatable.component.html │ │ │ └── datatable.component.ts │ ├── login │ │ ├── login.component.ts │ │ └── login.component.html │ ├── app.routing.ts │ ├── app.component.ts │ ├── module │ │ ├── view.analysis.js.map │ │ ├── view.analysis.ts │ │ ├── view.analysis.js │ │ └── analytics.html │ ├── dashboard │ │ ├── dashboard.component.ts │ │ ├── dashboard.module.ts │ │ ├── nav.component.html │ │ ├── nav.component.ts │ │ └── dashboard.component.html │ ├── bootstraps │ │ ├── static │ │ │ ├── bootstrap.component.ts │ │ │ └── bootstrap.component.html │ │ └── plugin │ │ │ ├── plugin.component.ts │ │ │ └── plugin.component.html │ ├── app.module.ts │ └── app.component.spec.ts ├── favicon.ico ├── img │ ├── green.png │ ├── green@2x.png │ └── loading-sm.gif ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── fonts │ ├── FontAwesome.otf │ ├── Pe-icon-7-stroke.eot │ ├── Pe-icon-7-stroke.ttf │ ├── Pe-icon-7-stroke.woff │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── index.html ├── main.ts ├── tsconfig.json ├── test.ts ├── polyfills.ts ├── main.html └── fileupload │ └── fileinput.min.js ├── .gitignore ├── images ├── a1.jpg ├── a2.jpg ├── a3.jpg ├── a4.jpg ├── a5.jpg ├── a6.jpg ├── a7.jpg ├── a8.jpg ├── a9.jpg ├── loading.gif ├── profile.jpg └── loading-bars.svg ├── e2e ├── app.po.ts ├── app.e2e-spec.ts └── tsconfig.json ├── dist.js ├── protractor.conf.js ├── karma.conf.js ├── README.md ├── package.json ├── angular-cli.json └── tslint.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/a1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a1.jpg -------------------------------------------------------------------------------- /images/a2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a2.jpg -------------------------------------------------------------------------------- /images/a3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a3.jpg -------------------------------------------------------------------------------- /images/a4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a4.jpg -------------------------------------------------------------------------------- /images/a5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a5.jpg -------------------------------------------------------------------------------- /images/a6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a6.jpg -------------------------------------------------------------------------------- /images/a7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a7.jpg -------------------------------------------------------------------------------- /images/a8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a8.jpg -------------------------------------------------------------------------------- /images/a9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/a9.jpg -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/img/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/img/green.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/loading.gif -------------------------------------------------------------------------------- /images/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/images/profile.jpg -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/img/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/img/green@2x.png -------------------------------------------------------------------------------- /src/img/loading-sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/img/loading-sm.gif -------------------------------------------------------------------------------- /src/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/fonts/Pe-icon-7-stroke.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/Pe-icon-7-stroke.eot -------------------------------------------------------------------------------- /src/fonts/Pe-icon-7-stroke.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/Pe-icon-7-stroke.ttf -------------------------------------------------------------------------------- /src/fonts/Pe-icon-7-stroke.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/Pe-icon-7-stroke.woff -------------------------------------------------------------------------------- /src/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoziUncle/ng2-admin-master/HEAD/src/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/app/charts/pieCharts/pieCharts.component.html: -------------------------------------------------------------------------------- 1 |

2 | pie charts works! 3 | 4 |

5 | -------------------------------------------------------------------------------- /src/app/tables/datatable/datatable.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, element, by } from 'protractor'; 2 | 3 | export class MyNg2CliPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/app/login/login.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-login', 5 | templateUrl: './login.component.html', 6 | }) 7 | export class LoginComponent implements OnInit { 8 | 9 | 10 | ngOnInit(){ 11 | 12 | }; 13 | 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Cli2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | loading... 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | import { enableProdMode } from '@angular/core'; 3 | import { environment } from './environments/environment'; 4 | import { AppModule } from './app/app.module'; 5 | 6 | if (environment.production) { 7 | enableProdMode(); 8 | } 9 | 10 | platformBrowserDynamic().bootstrapModule(AppModule); 11 | -------------------------------------------------------------------------------- /e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { MyNg2CliPage } from './app.po'; 2 | 3 | describe('my-ng2-cli App', function() { 4 | let page: MyNg2CliPage; 5 | 6 | beforeEach(() => { 7 | page = new MyNg2CliPage(); 8 | }); 9 | 10 | it('should display message saying app works', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('app works!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /dist.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.use(express.static('dist')); 5 | 6 | app.get('/', function (req, res) { 7 | res.send('Hello World'); 8 | }) 9 | 10 | var server = app.listen(9999, function () { 11 | 12 | var host = server.address().address 13 | var port = server.address().port 14 | 15 | console.log("应用实例,访问地址为 http://%s:%s", host, port) 16 | 17 | }) 18 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "module": "commonjs", 8 | "moduleResolution": "node", 9 | "outDir": "../dist/out-tsc-e2e", 10 | "sourceMap": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "../node_modules/@types" 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "", 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": ["es6", "dom"], 8 | "mapRoot": "./", 9 | "module": "es6", 10 | "moduleResolution": "node", 11 | "outDir": "../dist/out-tsc", 12 | "sourceMap": true, 13 | "target": "es5", 14 | "typeRoots": [ 15 | "../node_modules/@types" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import {Routes, RouterModule} from '@angular/router'; 2 | import {AnalysisComponent} from './module/view.analysis'; 3 | import {LoginComponent} from './login/login.component'; 4 | 5 | const appRoutes:Routes = [ 6 | { 7 | path: '', 8 | component: LoginComponent 9 | }, 10 | { 11 | path: 'content', 12 | component: AnalysisComponent 13 | }, 14 | { 15 | path: '**', 16 | component: LoginComponent 17 | } 18 | ]; 19 | 20 | export const routing = RouterModule.forRoot(appRoutes); 21 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component,OnInit} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent implements OnInit{ 8 | ngOnInit(){ 9 | var name = this.getQueryString("account"); 10 | var password = this.getQueryString("pwd"); 11 | }; 12 | 13 | getQueryString = function(name){ 14 | var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 15 | var r = window.location.search.substr(1).match(reg); 16 | if(r!=null)return r[2]; return null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/module/view.analysis.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"view.analysis.js","sourceRoot":"","sources":["view.analysis.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAClD,gCAA+B,4BAA4B,CAAC,CAAA;AAE5D,uBAA+C,iBAAiB,CAAC,CAAA;AACjE,8BAA2B,kBAAkB,CAAC,CAAA;AAM9C;IAEI,2BAAqB,cAA8B,EAC9B,MAAoB,EACpB,KAAqB,EACrB,MAAc;QAHd,mBAAc,GAAd,cAAc,CAAgB;QAC9B,WAAM,GAAN,MAAM,CAAc;QACpB,UAAK,GAAL,KAAK,CAAgB;QACrB,WAAM,GAAN,MAAM,CAAQ;IAChC,CAAC;IAEJ,oCAAQ,GAAR;QACI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;;IAfL;QAAC,gBAAS,CAAC;YACP,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAC,sBAAsB;SACrC,CAAC;;yBAAA;IAgBF,wBAAC;AAAD,CAAC,AAdD,IAcC;AAdY,yBAAiB,oBAc7B,CAAA"} -------------------------------------------------------------------------------- /src/app/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { NavComponent } from './nav.component'; 3 | import { Router, ActivatedRoute, Params } from '@angular/router'; 4 | 5 | @Component({ 6 | selector: 'app-charts', 7 | templateUrl: './dashboard.component.html', 8 | }) 9 | export class DashboardComponent implements OnInit { 10 | 11 | para = ""; 12 | 13 | constructor ( 14 | private parent: NavComponent, 15 | private route: ActivatedRoute, 16 | private router: Router 17 | ) {} 18 | 19 | ngOnInit(){ 20 | this.parent.setActiveByPath(this.parent.dashboard,""); 21 | this.para = this.parent.para; 22 | }; 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/app/bootstraps/static/bootstrap.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import {NavComponent} from '../../dashboard/nav.component'; 3 | import {Router, ActivatedRoute, Params} from '@angular/router'; 4 | import {NgClass} from '@angular/common'; 5 | 6 | 7 | @Component({ 8 | selector: 'ng2-bootstrap', 9 | templateUrl: './bootstrap.component.html' 10 | }) 11 | export class BootstrapComponent implements OnInit { 12 | 13 | constructor( 14 | private parent:NavComponent, 15 | private route:ActivatedRoute, 16 | private router:Router) { 17 | } 18 | 19 | ngOnInit() { 20 | this.parent.setActiveByPath("bootstrap", this.parent.bootstrap); 21 | 22 | }; 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/app/module/view.analysis.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Response } from '@angular/http'; 3 | import { Router, ActivatedRoute, Params } from '@angular/router'; 4 | import {AppComponent} from '../app.component'; 5 | import { NgClass} from '@angular/common'; 6 | import {ChartsModule} from 'ng2-charts/ng2-charts'; 7 | 8 | @Component({ 9 | selector: 'app-analysis', 10 | templateUrl:"./analytics.html", 11 | 12 | }) 13 | 14 | export class AnalysisComponent implements OnInit{ 15 | constructor ( 16 | private parent: AppComponent, 17 | private route: ActivatedRoute, 18 | private router: Router 19 | ) {} 20 | 21 | ngOnInit(){ 22 | 23 | 24 | }; 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/app/charts/pieCharts/pieCharts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { NavComponent } from '../../dashboard/nav.component'; 3 | import { Router, ActivatedRoute, Params } from '@angular/router'; 4 | import { NgClass} from '@angular/common'; 5 | declare var $: any; 6 | 7 | @Component({ 8 | selector: 'app-charts', 9 | templateUrl: './pieCharts.component.html', 10 | }) 11 | export class pieChartsComponent implements OnInit { 12 | 13 | 14 | 15 | constructor ( 16 | private parent: NavComponent, 17 | private route: ActivatedRoute, 18 | private router: Router 19 | ) {} 20 | 21 | ngOnInit(){ 22 | this.parent.setActiveByPath("charts",this.parent.pieCharts); 23 | 24 | $("#btn").click(function () { 25 | alert("123"); 26 | }); 27 | 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | /*global jasmine */ 5 | var SpecReporter = require('jasmine-spec-reporter'); 6 | 7 | exports.config = { 8 | allScriptsTimeout: 11000, 9 | specs: [ 10 | './e2e/**/*.e2e-spec.ts' 11 | ], 12 | capabilities: { 13 | 'browserName': 'chrome' 14 | }, 15 | directConnect: true, 16 | baseUrl: 'http://localhost:4200/', 17 | framework: ['jasmine','requirejs'], 18 | jasmineNodeOpts: { 19 | showColors: true, 20 | defaultTimeoutInterval: 30000, 21 | print: function() {} 22 | }, 23 | useAllAngular2AppRoots: true, 24 | beforeLaunch: function() { 25 | require('ts-node').register({ 26 | project: 'e2e' 27 | }); 28 | }, 29 | onPrepare: function() { 30 | jasmine.getEnv().addReporter(new SpecReporter()); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /src/app/charts/lineCharts/lineCharts.component.html: -------------------------------------------------------------------------------- 1 |

2 | line charts works! 3 |

4 |
5 |
6 | 15 | 16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
{{label}}
{{d && d.data[j]}}
26 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {LocationStrategy, HashLocationStrategy} from '@angular/common'; 3 | import {NgModule} from '@angular/core'; 4 | import {FormsModule} from '@angular/forms'; 5 | import {HttpModule} from '@angular/http'; 6 | import {routing} from './app.routing'; 7 | 8 | 9 | import {ChartsModule} from 'ng2-charts/ng2-charts'; 10 | 11 | import {AppComponent} from './app.component'; 12 | import {AnalysisComponent} from './module/view.analysis'; 13 | import {LoginComponent} from './login/login.component'; 14 | import {DashboardModule} from './dashboard/dashboard.module'; 15 | 16 | 17 | @NgModule({ 18 | declarations: [ 19 | AppComponent, 20 | AnalysisComponent, 21 | LoginComponent, 22 | 23 | ], 24 | imports: [ 25 | BrowserModule, 26 | FormsModule, 27 | HttpModule, 28 | routing, 29 | ChartsModule, 30 | DashboardModule 31 | ], 32 | providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}], 33 | bootstrap: [AppComponent] 34 | }) 35 | export class AppModule { 36 | } 37 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable:no-unused-variable */ 2 | 3 | import { TestBed, async } from '@angular/core/testing'; 4 | import { AppComponent } from './app.component'; 5 | 6 | describe('AppComponent', () => { 7 | beforeEach(() => { 8 | TestBed.configureTestingModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | }); 13 | TestBed.compileComponents(); 14 | }); 15 | 16 | it('should create the app', async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app).toBeTruthy(); 20 | })); 21 | 22 | it(`should have as title 'app works!'`, async(() => { 23 | const fixture = TestBed.createComponent(AppComponent); 24 | const app = fixture.debugElement.componentInstance; 25 | expect(app.title).toEqual('app works!'); 26 | })); 27 | 28 | it('should render title in a h1 tag', async(() => { 29 | const fixture = TestBed.createComponent(AppComponent); 30 | fixture.detectChanges(); 31 | const compiled = fixture.debugElement.nativeElement; 32 | expect(compiled.querySelector('h1').textContent).toContain('app works!'); 33 | })); 34 | }); 35 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/long-stack-trace-zone'; 4 | import 'zone.js/dist/proxy.js'; 5 | import 'zone.js/dist/sync-test'; 6 | import 'zone.js/dist/jasmine-patch'; 7 | import 'zone.js/dist/async-test'; 8 | import 'zone.js/dist/fake-async-test'; 9 | import { getTestBed } from '@angular/core/testing'; 10 | import { 11 | BrowserDynamicTestingModule, 12 | platformBrowserDynamicTesting 13 | } from '@angular/platform-browser-dynamic/testing'; 14 | 15 | 16 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. 17 | declare var __karma__: any; 18 | declare var require: any; 19 | declare var $:any; 20 | 21 | // Prevent Karma from running prematurely. 22 | __karma__.loaded = function () {}; 23 | 24 | // First, initialize the Angular testing environment. 25 | getTestBed().initTestEnvironment( 26 | BrowserDynamicTestingModule, 27 | platformBrowserDynamicTesting() 28 | ); 29 | // Then we find all the tests. 30 | const context = require.context('./', true, /\.spec\.ts$/); 31 | // And load the modules. 32 | context.keys().map(context); 33 | // Finally, start Karma to run the tests. 34 | __karma__.start(); 35 | 36 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/0.13/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', 'angular-cli','requirejs'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-remap-istanbul'), 12 | require('angular-cli/plugins/karma') 13 | ], 14 | files: [ 15 | { pattern: './src/test.ts', watched: false } 16 | ], 17 | preprocessors: { 18 | './src/test.ts': ['angular-cli'] 19 | }, 20 | mime: { 21 | 'text/x-typescript': ['ts','tsx'] 22 | }, 23 | remapIstanbulReporter: { 24 | reports: { 25 | html: 'coverage', 26 | lcovonly: './coverage/coverage.lcov' 27 | } 28 | }, 29 | angularCli: { 30 | config: './angular-cli.json', 31 | environment: 'dev' 32 | }, 33 | reporters: config.angularCli && config.angularCli.codeCoverage 34 | ? ['progress', 'karma-remap-istanbul'] 35 | : ['progress'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false 42 | }); 43 | }; 44 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | // This file includes polyfills needed by Angular and is loaded before the app. 2 | // You can add your own extra polyfills to this file. 3 | import 'core-js/es6/symbol'; 4 | import 'core-js/es6/object'; 5 | import 'core-js/es6/function'; 6 | import 'core-js/es6/parse-int'; 7 | import 'core-js/es6/parse-float'; 8 | import 'core-js/es6/number'; 9 | import 'core-js/es6/math'; 10 | import 'core-js/es6/string'; 11 | import 'core-js/es6/date'; 12 | import 'core-js/es6/array'; 13 | import 'core-js/es6/regexp'; 14 | import 'core-js/es6/map'; 15 | import 'core-js/es6/set'; 16 | import 'core-js/es6/reflect'; 17 | 18 | import 'core-js/es7/reflect'; 19 | import 'zone.js/dist/zone'; 20 | 21 | // If you need to support the browsers/features below, uncomment the import 22 | // and run `npm install import-name-here'; 23 | // Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html 24 | 25 | // Needed for: IE9 26 | // import 'classlist.js'; 27 | 28 | // Animations 29 | // Needed for: All but Chrome and Firefox, Not supported in IE9 30 | // import 'web-animations-js'; 31 | 32 | // Date, currency, decimal and percent pipes 33 | // Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 34 | // import 'intl'; 35 | 36 | // NgClass on SVG elements 37 | // Needed for: IE10, IE11 38 | // import 'classlist.js'; 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ng2-admin-master 2 | 3 | > ng2 admin master theme, build with angular-cli, compile with bootstrap 、ng2-charts and ng2-smart-table. Special Admin Theme for small, medium and large webapp with very clean and aesthetic style and feel. 4 | 5 | 1 Install node.js and angular-cli 6 | 7 | 8 | Download address:http://nodejs.cn/download/ 9 | 10 | ``` 11 | node --version //check version of node 12 | npm -v //check version of npm 13 | ``` 14 | install angular-cli 15 | ``` 16 | npm install -g @angular/cli 17 | ``` 18 | 19 | 2 Download or clone codes from URL 20 | 21 | 22 | 3 Download packages 23 | 24 | 25 | ``` 26 | npm install 27 | ``` 28 | 29 | 4 Run ng2 project 30 | 31 | ``` 32 | ng serve 33 | ``` 34 | 35 | or 36 | 37 | ``` 38 | npm start 39 | ``` 40 | 41 | 5 Package and build your project 42 | 43 | 44 | ``` 45 | ng build 46 | ``` 47 | 48 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 49 | 50 | 51 | 6 How to contact with author 52 | 53 | 54 | ``` 55 | email: liutao20122013@126.com 56 | 57 | wx: frank336699 58 | ``` 59 | 60 | 7 How can I support developers? 61 | 62 | 63 | ``` 64 | Star our GitHub repo ⭐️ 65 | Create pull requests, submit bugs, suggest new features or documentation updates 🔧 66 | ``` 67 | 68 | 8 More details please check blog:[从无到有构建Angular2 后台管理系统的前端架构](http://blog.csdn.net/franktaoge/article/details/60769501#0-qzone-1-62332-d020d2d2a4e8d1a374a433f596ad1440) 69 | 70 | You can enrich your application by add views、config routes and add plugins according to functions in the blog. 71 | 72 | 73 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-ng2-cli", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "angular-cli": {}, 6 | "scripts": { 7 | "ng": "ng", 8 | "start": "ng serve", 9 | "test": "ng test", 10 | "pree2e": "webdriver-manager update --standalone false --gecko false", 11 | "e2e": "protractor", 12 | "build": "ng build --base-href ./" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/common": "^2.3.1", 17 | "@angular/compiler": "^2.3.1", 18 | "@angular/core": "^2.3.1", 19 | "@angular/forms": "^2.3.1", 20 | "@angular/http": "^2.3.1", 21 | "@angular/platform-browser": "^2.3.1", 22 | "@angular/platform-browser-dynamic": "^2.3.1", 23 | "@angular/router": "^3.3.1", 24 | "angular2-generic-table": "^1.1.0", 25 | "bootstrap": "^3.3.7", 26 | "chart.js": "^2.5.0", 27 | "core-js": "^2.4.1", 28 | "jquery": "^2.2.4", 29 | "ng2-bootstrap": "^1.3.3", 30 | "ng2-charts": "^1.5.0", 31 | "ng2-file-upload": "^1.2.0", 32 | "ng2-smart-table": "^0.6.0-1", 33 | "ng2-table": "^1.3.2", 34 | "rxjs": "^5.0.1", 35 | "ts-helpers": "^1.1.1", 36 | "zone.js": "^0.7.2" 37 | }, 38 | "devDependencies": { 39 | "@angular/cli": "^1.0.0", 40 | "@angular/compiler-cli": "^2.3.1", 41 | "@types/jasmine": "2.5.38", 42 | "@types/node": "^6.0.42", 43 | "codelyzer": "~2.0.0-beta.1", 44 | "jasmine-core": "2.5.2", 45 | "jasmine-spec-reporter": "2.5.0", 46 | "karma": "1.2.0", 47 | "karma-chrome-launcher": "^2.0.0", 48 | "karma-cli": "^1.0.1", 49 | "karma-jasmine": "^1.0.2", 50 | "karma-remap-istanbul": "^0.2.1", 51 | "protractor": "~4.0.13", 52 | "ts-node": "1.2.1", 53 | "tslint": "^4.3.0", 54 | "typescript": "~2.0.3" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /images/loading-bars.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /angular-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": { 3 | "version": "1.0.0-beta.28.3", 4 | "name": "my-ng2-cli" 5 | }, 6 | "apps": [ 7 | { 8 | "root": "src", 9 | "outDir": "dist", 10 | "assets": [ 11 | "assets", 12 | "favicon.ico" 13 | ], 14 | "index": "index.html", 15 | "main": "main.ts", 16 | "polyfills": "polyfills.ts", 17 | "test": "test.ts", 18 | "tsconfig": "tsconfig.json", 19 | "prefix": "app", 20 | "styles": [ 21 | "../node_modules/bootstrap/dist/css/bootstrap.min.css", 22 | "styles.css" 23 | ], 24 | "scripts": [ 25 | "../node_modules/jquery/dist/jquery.min.js", 26 | "../node_modules/bootstrap/dist/js/bootstrap.min.js", 27 | "../node_modules/chart.js/dist/Chart.bundle.min.js", 28 | "../src/fileupload/fileinput.min.js" 29 | ], 30 | "environmentSource": "environments/environment.ts", 31 | "environments": { 32 | "dev": "environments/environment.ts", 33 | "prod": "environments/environment.prod.ts" 34 | } 35 | } 36 | ], 37 | "e2e": { 38 | "protractor": { 39 | "config": "./protractor.conf.js" 40 | } 41 | }, 42 | "lint": [ 43 | { 44 | "files": "src/**/*.ts", 45 | "project": "src/tsconfig.json" 46 | }, 47 | { 48 | "files": "e2e/**/*.ts", 49 | "project": "e2e/tsconfig.json" 50 | } 51 | ], 52 | "test": { 53 | "karma": { 54 | "config": "./karma.conf.js" 55 | } 56 | }, 57 | "defaults": { 58 | "styleExt": "css", 59 | "prefixInterfaces": false, 60 | "inline": { 61 | "style": false, 62 | "template": false 63 | }, 64 | "spec": { 65 | "class": false, 66 | "component": true, 67 | "directive": true, 68 | "module": false, 69 | "pipe": true, 70 | "service": true 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/app/login/login.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |

PLEASE LOGIN TO APP

7 | This is the best app ever! 8 |
9 |
10 |
11 |
12 |
Your unique username to app
16 |
Yur strong password
20 |
Remember login

(if this is a private computer)

23 | 24 | Register
25 |
26 |
27 |
28 |
29 |
30 |
HOMER - AngularJS Responsive WebApp
2015 Copyright 31 | Company Name 32 |
33 |
34 |
35 | -------------------------------------------------------------------------------- /src/app/module/view.analysis.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var restful_service_1 = require('../service/restful.service'); 13 | var router_1 = require('@angular/router'); 14 | var app_component_1 = require('../app.component'); 15 | var AnalysisComponent = (function () { 16 | function AnalysisComponent(restfulService, parent, route, router) { 17 | this.restfulService = restfulService; 18 | this.parent = parent; 19 | this.route = route; 20 | this.router = router; 21 | } 22 | AnalysisComponent.prototype.ngOnInit = function () { 23 | this.parent.setActiveByPath(this.parent.analysis); 24 | }; 25 | ; 26 | AnalysisComponent = __decorate([ 27 | core_1.Component({ 28 | selector: 'app-analysis', 29 | templateUrl: "views/analytics.html", 30 | }), 31 | __metadata('design:paramtypes', [restful_service_1.RestfulService, app_component_1.AppComponent, router_1.ActivatedRoute, router_1.Router]) 32 | ], AnalysisComponent); 33 | return AnalysisComponent; 34 | }()); 35 | exports.AnalysisComponent = AnalysisComponent; 36 | //# sourceMappingURL=view.analysis.js.map -------------------------------------------------------------------------------- /src/app/dashboard/dashboard.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit,NgModule } from '@angular/core'; 2 | import { FormsModule } from '@angular/forms'; 3 | import { CommonModule } from '@angular/common'; 4 | import { RouterModule, Routes } from '@angular/router'; 5 | import { ChartsModule } from 'ng2-charts/ng2-charts'; 6 | import { PaginationModule } from 'ng2-bootstrap'; 7 | import { Ng2SmartTableModule } from 'ng2-smart-table'; 8 | import { FileUploadModule } from 'ng2-file-upload'; 9 | 10 | 11 | import { NavComponent } from './nav.component'; 12 | import { DashboardComponent } from './dashboard.component'; 13 | import { lineChartsComponent } from '../charts/lineCharts/lineCharts.component'; 14 | import { pieChartsComponent } from '../charts/pieCharts/pieCharts.component'; 15 | import { DatatableComponent } from '../tables/datatable/datatable.component'; 16 | import { BootstrapComponent } from '../bootstraps/static/bootstrap.component'; 17 | import { PluginComponent } from '../bootstraps/plugin/plugin.component'; 18 | 19 | 20 | const tablesRoutes: Routes = [ 21 | { 22 | path:'main/:id', 23 | component:NavComponent, 24 | children: [ 25 | { path: '', component: DashboardComponent }, 26 | { path: 'dashboard', component: DashboardComponent }, 27 | { path: 'lineCharts', component: lineChartsComponent }, 28 | { path: 'pieCharts', component: pieChartsComponent }, 29 | { path: 'datatable', component: DatatableComponent }, 30 | { path: 'bootstrap-static', component: BootstrapComponent }, 31 | { path: 'bootstrap-plugin', component: PluginComponent } 32 | ] 33 | } 34 | ] 35 | 36 | 37 | @NgModule({ 38 | imports: [ 39 | FormsModule, 40 | CommonModule, 41 | RouterModule.forChild(tablesRoutes), 42 | ChartsModule, 43 | PaginationModule.forRoot(), 44 | Ng2SmartTableModule, 45 | FileUploadModule 46 | 47 | ], 48 | declarations: [ 49 | NavComponent, 50 | DashboardComponent, 51 | lineChartsComponent, 52 | pieChartsComponent, 53 | DatatableComponent, 54 | BootstrapComponent, 55 | PluginComponent 56 | ], 57 | providers: [] 58 | }) 59 | export class DashboardModule { } 60 | -------------------------------------------------------------------------------- /src/app/bootstraps/plugin/plugin.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import {NavComponent} from '../../dashboard/nav.component'; 3 | import {Router, ActivatedRoute, Params} from '@angular/router'; 4 | import {NgClass} from '@angular/common'; 5 | declare var $: any; 6 | // A: 引入FileUpload模块 7 | import {FileUploader} from "ng2-file-upload"; 8 | 9 | 10 | const URL = 'https://evening-anchorage-3159.herokuapp.com/api/'; 11 | 12 | 13 | @Component({ 14 | selector: 'ng2-bootstrap', 15 | templateUrl: './plugin.component.html' 16 | }) 17 | export class PluginComponent implements OnInit { 18 | 19 | // B: 初始化定义uploader变量,用来配置input中的uploader属性 20 | public uploader:FileUploader = new FileUploader({ 21 | url: URL, 22 | method: "POST", 23 | itemAlias: "uploadedfile" 24 | }); 25 | imgUrl=""; 26 | // C: 定义事件,选择文件 27 | selectedFileOnChanged(event:any) { 28 | 29 | var files = event.target.files; 30 | 31 | } 32 | 33 | 34 | // D: 定义事件,上传文件 35 | uploadFile() { 36 | // 上传 37 | this.uploader.queue[0].onSuccess = function (response, status, headers) { 38 | // 上传文件成功 39 | if (status == 200) { 40 | 41 | // 上传文件后获取服务器返回的数据 42 | let tempRes = JSON.parse(response); 43 | console.log(JSON.stringify(tempRes)); 44 | } else { 45 | // 上传文件后获取服务器返回的数据错误 46 | 47 | } 48 | }; 49 | this.uploader.queue[0].upload(); // 开始上传 50 | } 51 | //E:拖曳上传配置方法 52 | public hasBaseDropZoneOver:boolean = false; 53 | 54 | public fileOverBase(e:any):void { 55 | this.hasBaseDropZoneOver = e; 56 | } 57 | 58 | public fileDropOver(e:any):void { 59 | 60 | } 61 | 62 | 63 | 64 | 65 | constructor( 66 | private parent:NavComponent, 67 | private route:ActivatedRoute, 68 | private router:Router) { 69 | } 70 | 71 | ngOnInit() { 72 | this.parent.setActiveByPath("bootstrap", this.parent.plugin); 73 | 74 | $("#file-1").fileinput({ 75 | uploadUrl: '#', // you must set a valid URL here else you will get an error 76 | allowedFileExtensions : ['jpg', 'png','gif'], 77 | overwriteInitial: false, 78 | maxFileSize: 1000, 79 | maxFilesNum: 10, 80 | //allowedFileTypes: ['image', 'video', 'flash'], 81 | slugCallback: function(filename) { 82 | return filename.replace('(', '_').replace(']', '_'); 83 | } 84 | }); 85 | 86 | 87 | 88 | }; 89 | 90 | 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Beidou--login 6 | 7 | 8 | 9 | 10 | 11 | 12 | 29 | 56 | 57 | 64 | 65 |
66 |
67 | 68 |
69 |
70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/app/charts/lineCharts/lineCharts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { NavComponent } from '../../dashboard/nav.component'; 3 | import { Router, ActivatedRoute, Params } from '@angular/router'; 4 | import { NgClass} from '@angular/common'; 5 | import {ChartsModule} from 'ng2-charts/ng2-charts'; 6 | 7 | @Component({ 8 | selector: 'app-charts', 9 | templateUrl: './lineCharts.component.html', 10 | }) 11 | export class lineChartsComponent implements OnInit { 12 | 13 | constructor ( 14 | private parent: NavComponent, 15 | private route: ActivatedRoute, 16 | private router: Router 17 | ) {} 18 | 19 | ngOnInit(){ 20 | this.parent.setActiveByPath("charts",this.parent.lineCharts); 21 | }; 22 | 23 | 24 | // lineChart 25 | public lineChartData:Array = [ 26 | {data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'}, 27 | {data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B'}, 28 | {data: [18, 48, 77, 9, 100, 27, 40], label: 'Series C'} 29 | ]; 30 | public lineChartLabels:Array = ['January', 'February', 'March', 'April', 'May', 'June', 'July']; 31 | public lineChartOptions:any = { 32 | animation: false, 33 | responsive: true 34 | }; 35 | public lineChartColours:Array = [ 36 | { // green 37 | backgroundColor: 'rgba(202,252,209,0.2)', 38 | borderColor: 'rgba(90,202,106,1)', 39 | pointBackgroundColor: 'rgba(148,159,177,1)', 40 | pointBorderColor: '#fff', 41 | pointHoverBackgroundColor: '#fff', 42 | pointHoverBorderColor: 'rgba(148,159,177,0.8)' 43 | }, 44 | { // dark grey 45 | backgroundColor: 'rgba(77,83,96,0.2)', 46 | borderColor: 'rgba(77,83,96,1)', 47 | pointBackgroundColor: 'rgba(77,83,96,1)', 48 | pointBorderColor: '#fff', 49 | pointHoverBackgroundColor: '#fff', 50 | pointHoverBorderColor: 'rgba(77,83,96,1)' 51 | }, 52 | { // gre 53 | backgroundColor: 'rgba(168,226,178,0.2)', 54 | borderColor: 'rgba(5,124,22,1)', 55 | pointBackgroundColor: 'rgba(148,159,177,1)', 56 | pointBorderColor: '#fff', 57 | pointHoverBackgroundColor: '#fff', 58 | pointHoverBorderColor: 'rgba(148,159,177,0.8)' 59 | } 60 | ]; 61 | public lineChartLegend:boolean = true; 62 | public lineChartType:string = 'line'; 63 | 64 | public randomize():void { 65 | let _lineChartData:Array = new Array(this.lineChartData.length); 66 | for (let i = 0; i < this.lineChartData.length; i++) { 67 | _lineChartData[i] = {data: new Array(this.lineChartData[i].data.length), label: this.lineChartData[i].label}; 68 | for (let j = 0; j < this.lineChartData[i].data.length; j++) { 69 | _lineChartData[i].data[j] = Math.floor((Math.random() * 100) + 1); 70 | } 71 | } 72 | this.lineChartData = _lineChartData; 73 | } 74 | 75 | // events 76 | public chartClicked(e:any):void { 77 | console.log(e); 78 | } 79 | 80 | public chartHovered(e:any):void { 81 | console.log(e); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "callable-types": true, 7 | "class-name": true, 8 | "comment-format": [ 9 | true, 10 | "check-space" 11 | ], 12 | "curly": true, 13 | "eofline": true, 14 | "forin": true, 15 | "import-blacklist": [true, "rxjs"], 16 | "import-spacing": true, 17 | "indent": [ 18 | true, 19 | "spaces" 20 | ], 21 | "interface-over-type-literal": true, 22 | "label-position": true, 23 | "max-line-length": [ 24 | true, 25 | 140 26 | ], 27 | "member-access": false, 28 | "member-ordering": [ 29 | true, 30 | "static-before-instance", 31 | "variables-before-functions" 32 | ], 33 | "no-arg": true, 34 | "no-bitwise": true, 35 | "no-console": [ 36 | true, 37 | "debug", 38 | "info", 39 | "time", 40 | "timeEnd", 41 | "trace" 42 | ], 43 | "no-construct": true, 44 | "no-debugger": true, 45 | "no-duplicate-variable": true, 46 | "no-empty": false, 47 | "no-empty-interface": true, 48 | "no-eval": true, 49 | "no-inferrable-types": true, 50 | "no-shadowed-variable": true, 51 | "no-string-literal": false, 52 | "no-string-throw": true, 53 | "no-switch-case-fall-through": true, 54 | "no-trailing-whitespace": true, 55 | "no-unused-expression": true, 56 | "no-use-before-declare": true, 57 | "no-var-keyword": true, 58 | "object-literal-sort-keys": false, 59 | "one-line": [ 60 | true, 61 | "check-open-brace", 62 | "check-catch", 63 | "check-else", 64 | "check-whitespace" 65 | ], 66 | "prefer-const": true, 67 | "quotemark": [ 68 | true, 69 | "single" 70 | ], 71 | "radix": true, 72 | "semicolon": [ 73 | "always" 74 | ], 75 | "triple-equals": [ 76 | true, 77 | "allow-null-check" 78 | ], 79 | "typedef-whitespace": [ 80 | true, 81 | { 82 | "call-signature": "nospace", 83 | "index-signature": "nospace", 84 | "parameter": "nospace", 85 | "property-declaration": "nospace", 86 | "variable-declaration": "nospace" 87 | } 88 | ], 89 | "typeof-compare": true, 90 | "unified-signatures": true, 91 | "variable-name": false, 92 | "whitespace": [ 93 | true, 94 | "check-branch", 95 | "check-decl", 96 | "check-operator", 97 | "check-separator", 98 | "check-type" 99 | ], 100 | 101 | "directive-selector": [true, "attribute", "app", "camelCase"], 102 | "component-selector": [true, "element", "app", "kebab-case"], 103 | "use-input-property-decorator": true, 104 | "use-output-property-decorator": true, 105 | "use-host-property-decorator": true, 106 | "no-input-rename": true, 107 | "no-output-rename": true, 108 | "use-life-cycle-interface": true, 109 | "use-pipe-transform-interface": true, 110 | "component-class-suffix": true, 111 | "directive-class-suffix": true, 112 | "no-access-missing-member": true, 113 | "templates-use-public": true, 114 | "invoke-injectable": true 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/app/dashboard/nav.component.html: -------------------------------------------------------------------------------- 1 | 18 | 44 | 45 | 52 | 53 | 78 | 79 |
80 |
81 | 82 |
83 |
84 | 85 | -------------------------------------------------------------------------------- /src/app/dashboard/nav.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import { Router, ActivatedRoute, Params } from '@angular/router'; 3 | 4 | 5 | @Component({ 6 | selector: 'app-charts', 7 | templateUrl: './nav.component.html', 8 | }) 9 | export class NavComponent implements OnInit { 10 | 11 | constructor ( 12 | private route: ActivatedRoute, 13 | private router: Router 14 | ) {} 15 | 16 | para = ''; 17 | 18 | public lineCharts = ""; 19 | public pieCharts = ""; 20 | public dashboard = ""; 21 | public datatable = ""; 22 | public bootstrap = ""; 23 | public plugin = ""; 24 | 25 | routers = []; 26 | 27 | 28 | 29 | ngOnInit() { 30 | this.route.params.subscribe((params) => { 31 | console.log(params['id']); 32 | this.para=params['id']; 33 | }); 34 | 35 | this.lineCharts = "/main/"+this.para+"/lineCharts"; 36 | this.pieCharts = "/main/"+this.para+"/pieCharts"; 37 | this.dashboard = "/main/"+this.para+"/dashboard"; 38 | this.datatable = "/main/"+this.para+"/datatable"; 39 | this.bootstrap = "/main/"+this.para+"/bootstrap-static"; 40 | this.plugin = "/main/"+this.para+"/bootstrap-plugin"; 41 | 42 | this.routers = [ 43 | { 44 | href: this.dashboard, 45 | name: "Dashboard", 46 | type: false 47 | }, 48 | { 49 | href: 'charts', 50 | name: "Charts", 51 | type: true, 52 | child: [ 53 | {href: this.lineCharts, name: "Line Charts"}, 54 | {href: this.pieCharts, name: "Pie Charts"} 55 | ] 56 | }, 57 | { 58 | href: 'tables', 59 | name: "Tables", 60 | type: true, 61 | child: [ 62 | {href: this.datatable, name: "Data Tables"} 63 | ] 64 | }, 65 | { 66 | href: 'bootstrap', 67 | name: "Bootstrap", 68 | type: true, 69 | child: [ 70 | {href: this.bootstrap, name: "Static Components"}, 71 | {href: this.plugin, name: "Plugin Components"} 72 | ] 73 | } 74 | 75 | ]; 76 | 77 | }; 78 | 79 | setActiveByPath = function (path, childPath) { 80 | for (var i = 0; i < this.routers.length; i++) { 81 | if (this.routers[i].active) { 82 | this.routers[i].active = false; 83 | break; 84 | } 85 | } 86 | for (var i = 0; i < this.routers.length; i++) { 87 | var router = this.routers[i]; 88 | if (router.href == path) { 89 | if (!router.active) { 90 | router.active = true; 91 | if (childPath != "") { 92 | for (var j = 0; j < router.child.length; j++) { 93 | var route = router.child[j]; 94 | if (route.href == childPath) { 95 | route.active = true; 96 | } 97 | } 98 | } 99 | } else { 100 | router.active = false; 101 | } 102 | } 103 | } 104 | }; 105 | changeNavStatis = function (path) { 106 | for (var i = 0; i < this.routers.length; i++) { 107 | if (this.routers[i].active) { 108 | this.routers[i].active = false; 109 | break; 110 | } 111 | } 112 | for (var i = 0; i < this.routers.length; i++) { 113 | var router = this.routers[i]; 114 | if (router.href == path) { 115 | router.active = true; 116 | } 117 | } 118 | }; 119 | changeChildNavStatis = function (path, childPath) { 120 | for (var i = 0; i < this.routers.length; i++) { 121 | var router = this.routers[i]; 122 | if (router.href == path) { 123 | 124 | for (var j = 0; j < router.child.length; j++) { 125 | var route = router.child[j]; 126 | if (route.href != childPath) { 127 | route.active = false; 128 | } else { 129 | route.active = true; 130 | } 131 | } 132 | } 133 | 134 | } 135 | }; 136 | getQueryString = function(name){ 137 | var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 138 | var r = window.location.search.substr(1).match(reg); 139 | if(r!=null)return r[2]; return null; 140 | } 141 | 142 | 143 | 144 | } 145 | -------------------------------------------------------------------------------- /src/app/tables/datatable/datatable.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit} from '@angular/core'; 2 | import {NavComponent} from '../../dashboard/nav.component'; 3 | import {Router, ActivatedRoute, Params} from '@angular/router'; 4 | import {NgClass} from '@angular/common'; 5 | 6 | 7 | @Component({ 8 | selector: 'ng2-table', 9 | 10 | templateUrl: './datatable.component.html' 11 | }) 12 | export class DatatableComponent implements OnInit { 13 | 14 | tableData = [ 15 | {id: 1, username: 'Geek', age: 42, salary: 1234}, 16 | {id: 2, username: 'TOM', age: 52, salary: 2345.64}, 17 | {id: 3, username: 'King', age: 51, salary: 8888}, 18 | {id: 4, username: 'QuEEN', age: 12, salary: 6663}, 19 | {id: 5, username: 'JACK', age: 13, salary: 4567}, 20 | {id: 6, username: 'KGC', age: 15, salary: 9870.123}, 21 | {id: 7, username: 'rose', age: 23, salary: 3456.78}, 22 | {id: 8, username: 'john', age: 78, salary: 6234}, 23 | {id: 9, username: 'lily', age: 56, salary: 7234}, 24 | {id: 10, username: 'hello', age: 34, salary: 8234}, 25 | {id: 11, username: 'james', age: 58, salary: 9234} 26 | ]; 27 | 28 | 29 | 30 | constructor( 31 | private parent:NavComponent, 32 | private route:ActivatedRoute, 33 | private router:Router) { 34 | } 35 | 36 | ngOnInit() { 37 | this.parent.setActiveByPath("tables", this.parent.datatable); 38 | 39 | }; 40 | public totalItems: number = 64; 41 | public currentPage: number = 4; 42 | public smallnumPages: number = 0; 43 | 44 | public setPage(pageNo: number): void { 45 | this.currentPage = pageNo; 46 | } 47 | 48 | public pageChanged(event: any): void { 49 | console.log('Page changed to: ' + event.page); 50 | console.log('Number items per page: ' + event.itemsPerPage); 51 | } 52 | 53 | 54 | settings = { 55 | columns: { 56 | id: { 57 | title: 'ID' 58 | }, 59 | name: { 60 | title: 'Full Name' 61 | }, 62 | username: { 63 | title: 'User Name' 64 | }, 65 | email: { 66 | title: 'Email' 67 | } 68 | }, 69 | mode : "inline", 70 | delete:{ 71 | confirmDelete : true 72 | } 73 | }; 74 | 75 | data = [ 76 | { 77 | id: 1, 78 | name: "Leanne Graham", 79 | username: "Bret", 80 | email: "Sincere@april.biz" 81 | }, 82 | { 83 | id: 2, 84 | name: "Ervin Howell", 85 | username: "Antonette", 86 | email: "Shanna@melissa.tv" 87 | }, 88 | { 89 | id: 3, 90 | name: "Clementine Bauch", 91 | username: "Samantha", 92 | email: "Nathan@yesenia.net" 93 | }, 94 | { 95 | id: 4, 96 | name: "Patricia Lebsack", 97 | username: "Karianne", 98 | email: "Julianne.OConner@kory.org" 99 | }, 100 | { 101 | id: 5, 102 | name: "Chelsey Dietrich", 103 | username: "Kamren", 104 | email: "Lucio_Hettinger@annie.ca" 105 | }, 106 | { 107 | id: 6, 108 | name: "Mrs. Dennis Schulist", 109 | username: "Leopoldo_Corkery", 110 | email: "Karley_Dach@jasper.info" 111 | }, 112 | { 113 | id: 7, 114 | name: "Kurtis Weissnat", 115 | username: "Elwyn.Skiles", 116 | email: "Telly.Hoeger@billy.biz" 117 | }, 118 | { 119 | id: 8, 120 | name: "Nicholas Runolfsdottir V", 121 | username: "Maxime_Nienow", 122 | email: "Sherwood@rosamond.me" 123 | }, 124 | { 125 | id: 9, 126 | name: "Glenna Reichert", 127 | username: "Delphine", 128 | email: "Chaim_McDermott@dana.io" 129 | }, 130 | { 131 | id: 10, 132 | name: "Clementina DuBuque", 133 | username: "Moriah.Stanton", 134 | email: "Rey.Padberg@karina.biz" 135 | }, 136 | { 137 | id: 11, 138 | name: "Nicholas DuBuque", 139 | username: "Nicholas.Stanton", 140 | email: "Rey.Padberg@rosamond.biz" 141 | } 142 | ]; 143 | 144 | onDeleteConfirm(event): void { 145 | console.log("delete function"); 146 | /*if (window.confirm('Are you sure you want to delete?')) { 147 | event.confirm.resolve(); 148 | } else { 149 | event.confirm.reject(); 150 | }*/ 151 | 152 | } 153 | 154 | 155 | } 156 | -------------------------------------------------------------------------------- /src/app/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Dashboard:{{para}}

3 |
4 |
5 |
6 |
7 |

Title text

8 |

20

9 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |

Title text

18 |

160

19 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |

Title text

28 |

750

29 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |

Title text

38 |

0,43

39 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |

$1 206,90

50 |

All Income

51 | Lorem ipsum dolor sit amet, consectetur adipiscing elit vestibulum. 52 |
53 | 54 |
55 |
56 |
57 |
58 |
59 |

Users Activity

60 |
61 |

4 210,160

Social users 62 | 63 |
64 |
65 | Pages / Visit 66 |

7.80

67 |
68 | % New Visits 69 |

76.43%

70 |
71 |
72 |
73 | 74 |
75 |
76 |
77 |
78 |
79 |

Page Views

80 |
81 |

860k+

Social users 83 |
84 | Lorem Ipsum is simply dummy text of the printing and typesetting 85 | industry. Lorem Ipsum has been. 86 | 87 |
88 |
89 | 90 |
91 |
92 |
93 |
94 |
95 |

Today income

96 |
97 |
98 |
99 | 101 |
102 |
103 |
104 |
105 | Today 106 |

$230,00

107 |
108 | Last week 109 |

$7 980,60

110 |
111 |
112 |
113 | 114 |
115 |
116 |
117 |
118 | -------------------------------------------------------------------------------- /src/app/module/analytics.html: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | 147 | 148 | -------------------------------------------------------------------------------- /src/app/bootstraps/plugin/plugin.component.html: -------------------------------------------------------------------------------- 1 |
2 |
5 |
6 | 7 |
8 |
9 |

Bootstrap Plugins

10 | The basic color palette 11 |
12 |
13 |
14 | 18 |
19 |
20 |
21 | 22 | 25 | 26 | 27 | 44 |
45 |
46 |
47 |
48 |
49 | 50 | 56 | 57 | 58 |
59 |
Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.
60 |
Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR.
61 |
Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown.
62 |
Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | 78 |
79 |
80 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 81 |
82 |
83 |
84 |
85 | 92 |
93 |
94 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 95 |
96 |
97 |
98 |
99 | 106 |
107 |
108 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 109 |
110 |
111 |
112 |
113 |
114 |
115 | 150 |
151 |
152 | 161 | 162 |
163 |
164 | 165 |
166 | 167 | Multiple 168 |
169 | 170 | 171 |
176 | Base drop zone 177 |
178 | 179 | 180 |
181 | 182 |
183 | 184 |

Upload queue

185 |

Queue length: {{ uploader?.queue?.length }}

186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 206 | 211 | 225 | 226 | 227 |
NameSizeProgressStatusActions
{{ item?.file?.name }}{{ item?.file?.size/1024/1024 | number:'.2' }} MB 202 |
203 |
204 |
205 |
207 | 208 | 209 | 210 | 212 | 216 | 220 | 224 |
228 | 229 |
230 | 231 |
232 | 233 |
234 |
235 |
236 |
237 |
238 | 239 |
240 |
241 |
242 |
243 | 244 | 245 |
246 |
247 | 248 | 249 | 250 | -------------------------------------------------------------------------------- /src/app/bootstraps/static/bootstrap.component.html: -------------------------------------------------------------------------------- 1 |
2 |
5 |
6 | 7 |
8 |
9 |

Colors and Buttons

10 | The basic color palette 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
PrimaryNavy Blue
24 |
25 |
26 |
Primary 2Violet
27 |
28 |
29 |
InfoBlue
30 |
31 |
32 |
SuccessGreen
33 |
34 |
35 |
WarningYellow
36 |
37 |
38 |
Warning 2Orange
39 |
40 |
41 |
DangerRed
42 |
43 |
44 |
Danger 2Deep red
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 | 59 |
61 |
62 | Buttons - primary colors 63 |
64 |

Use any of the available button classes to quickly create a styled 65 | button.

66 |

67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |

78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 86 | 87 |
89 |
90 | Diferent size 91 |
92 |

If You want larger or smaller buttons You can add 93 | .btn-lg, .btn-sm, or .btn-xs class.

94 |

95 | 96 | 97 |
98 | 99 | 100 |
101 | 102 | 103 |
104 | 105 | 106 |

107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | 115 | 116 |
118 |
119 | Outline buttons 120 |
121 |

Create block level buttons or outline buttons, by adding .btn-block 122 | or .btn-outline.

123 |

124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 |

134 |

135 | 136 |

137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | 147 | 148 |
150 |
151 | Dropdown buttons 152 |
153 |

Droppdowns buttons are avalible with any color and any size.

154 |
155 | 157 | 164 |
165 |
166 | 168 | 175 |
176 |
177 | 179 | 186 |
187 |
188 |
189 | 191 | 198 |
199 |
200 | 202 | 209 |
210 |
211 | 213 | 220 |
221 |
222 |
223 | 225 | 232 |
233 |
234 | 236 | 243 |
244 |
245 | 247 | 254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 | 263 | 264 |
266 |
267 | Button gruped 268 |
269 |

This is a group of buttons, ideal for sytuation where many actions 270 | are related to same element.

271 |
272 | 273 | 274 | 275 |
276 |

277 |
278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 | 299 | 300 |
302 |
303 | Icon Buttons 304 |
305 |

To buttons with any color or any size you can add extra icon on 306 | the left or the right side.

307 | 308 | 310 | 311 | 313 | 314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 | 322 | 323 |
325 |
326 | Icon Buttons with custom size 327 |
328 |

Buttons with icons are avalible wih custom size.

329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 |
337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 | 354 | 355 |
357 |
358 | Buttons miscellaneous 359 |
360 |
361 |
362 |

Circle buttons

363 | 364 | 365 | 366 | 367 | 368 |
369 |

Single toggle button

370 | 371 |
372 |

Checkbox buttons

373 |
376 |
377 |

Radio buttons

378 |
384 |
385 |
386 |
387 |
388 | 389 | 390 | 391 | 392 | 393 |
394 |
395 | 396 |
397 |
398 |
401 |
402 |
403 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 | 417 | -------------------------------------------------------------------------------- /src/fileupload/fileinput.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-fileinput v4.3.6 3 | * http://plugins.krajee.com/file-input 4 | * 5 | * Author: Kartik Visweswaran 6 | * Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com 7 | * 8 | * Licensed under the BSD 3-Clause 9 | * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md 10 | */!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(window.jQuery)}(function(a){"use strict";a.fn.fileinputLocales={},a.fn.fileinputThemes={};var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa;b=".fileinput",c="kvFileinputModal",d=".file-preview-frame:visible",e='style="width:{width};height:{height};"',f='\n\n\n\n\n\n',g='
\n{previewFileIcon}\n
',h=window.URL||window.webkitURL,i=function(a,b,c){return void 0!==a&&(c?a===b:a.match(b))},j=function(a){if("Microsoft Internet Explorer"!==navigator.appName)return!1;if(10===a)return new RegExp("msie\\s"+a,"i").test(navigator.userAgent);var c,b=document.createElement("div");return b.innerHTML="",c=b.getElementsByTagName("i").length,document.body.appendChild(b),b.parentNode.removeChild(b),c},k=function(a,c,d,e){var f=e?c:c.split(" ").join(b+" ")+b;a.off(f).on(f,d)},l={data:{},init:function(a){var b=a.initialPreview,c=a.id;b.length>0&&!fa(b)&&(b=b.split(a.initialPreviewDelimiter)),l.data[c]={content:b,config:a.initialPreviewConfig,tags:a.initialPreviewThumbTags,delimiter:a.initialPreviewDelimiter,previewFileType:a.initialPreviewFileType,previewAsData:a.initialPreviewAsData,template:a.previewGenericTemplate,showZoom:a.fileActionSettings.showZoom,showDrag:a.fileActionSettings.showDrag,getSize:function(b){return a._getSize(b)},parseTemplate:function(b,c,d,e,f,g,h,i){var j=" file-preview-initial";return a._generatePreviewTemplate(b,c,d,e,f,!1,null,j,g,h,i)},msg:function(b){return a._getMsgSelected(b)},initId:a.previewInitId,footer:a._getLayoutTemplate("footer").replace(/\{progress}/g,a._renderThumbProgress()),isDelete:a.initialPreviewShowDelete,caption:a.initialCaption,actions:function(b,c,d,e,f,g,h){return a._renderFileActions(b,c,d,e,f,g,h,!0)}}},fetch:function(a){return l.data[a].content.filter(function(a){return null!==a})},count:function(a,b){return l.data[a]&&l.data[a].content?b?l.data[a].content.length:l.fetch(a).length:0},get:function(b,c,d){var j,k,m,n,o,p,e="init_"+c,f=l.data[b],g=f.config[c],h=f.content[c],i=f.initId+"-"+e,q=ga("previewAsData",g,f.previewAsData);return d=void 0===d||d,h?(m=ga("type",g,f.previewFileType||"generic"),o=ga("filename",g,ga("caption",g)),p=ga("filetype",g,m),n=l.footer(b,c,d,g&&g.size||null),j=q?f.parseTemplate(m,h,o,p,i,n,e):f.parseTemplate("generic",h,o,p,i,n,e,m).replace(/\{content}/g,f.content[c]),f.tags.length&&f.tags[c]&&(j=ja(j,f.tags[c])),ea(g)||ea(g.frameAttr)||(k=a(document.createElement("div")).html(j),k.find(".file-preview-initial").attr(g.frameAttr),j=k.html(),k.remove()),j):""},add:function(b,c,d,e,f){var h,g=a.extend(!0,{},l.data[b]);return fa(c)||(c=c.split(g.delimiter)),f?(h=g.content.push(c)-1,g.config[h]=d,g.tags[h]=e):(h=c.length-1,g.content=c,g.config=d,g.tags=e),l.data[b]=g,h},set:function(b,c,d,e,f){var h,i,g=a.extend(!0,{},l.data[b]);if(c&&c.length&&(fa(c)||(c=c.split(g.delimiter)),i=c.filter(function(a){return null!==a}),i.length)){if(void 0===g.content&&(g.content=[]),void 0===g.config&&(g.config=[]),void 0===g.tags&&(g.tags=[]),f){for(h=0;h'+b+"",caption:d}},footer:function(a,b,c,d){var e=l.data[a];if(c=void 0===c||c,!e||!e.config||0===e.config.length||ea(e.config[b]))return"";var f=e.config[b],g=ga("caption",f),h=ga("width",f,"auto"),i=ga("url",f,!1),j=ga("key",f,null),k=ga("showDelete",f,!0),m=ga("showZoom",f,e.showZoom),n=ga("showDrag",f,e.showDrag),o=i===!1&&c,p=e.isDelete?e.actions(!1,k,m,n,o,i,j):"",q=e.footer.replace(/\{actions}/g,p);return q.replace(/\{caption}/g,g).replace(/\{size}/g,e.getSize(d)).replace(/\{width}/g,h).replace(/\{indicator}/g,"").replace(/\{indicatorTitle}/g,"")}},m=function(a,b){return b=b||0,"number"==typeof a?a:("string"==typeof a&&(a=parseFloat(a)),isNaN(a)?b:a)},n=function(){return!(!window.File||!window.FileReader)},o=function(){var a=document.createElement("div");return!j(9)&&(void 0!==a.draggable||void 0!==a.ondragstart&&void 0!==a.ondrop)},p=function(){return n()&&window.FormData},q=function(a,b){a.removeClass(b).addClass(b)},Y={showRemove:!0,showUpload:!0,showZoom:!0,showDrag:!0,removeIcon:'',removeClass:"btn btn-xs btn-default",removeTitle:"Remove file",uploadIcon:'',uploadClass:"btn btn-xs btn-default",uploadTitle:"Upload file",zoomIcon:'',zoomClass:"btn btn-xs btn-default",zoomTitle:"View Details",dragIcon:'',dragClass:"text-info",dragTitle:"Move / Rearrange",dragSettings:{},indicatorNew:'',indicatorSuccess:'',indicatorError:'',indicatorLoading:'',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading ..."},r='{preview}\n
\n
\n {caption}\n
\n {remove}\n {cancel}\n {upload}\n {browse}\n
\n
',s='{preview}\n
\n{remove}\n{cancel}\n{upload}\n{browse}\n',t='
\n {close}
\n
\n
\n
\n
\n
\n
',v='
×
\n',u='',w='
\n
\n
\n',x='',y='{icon} {label}',z='
{icon} {label}
',A='',B='\n',C='
\n
\n {percent}%\n
\n
',D="
({sizeText})",E='',F='
\n \n {drag}\n
{indicator}
\n
\n
',G='\n',H='',I='',J='{dragIcon}',K='
\n',M=K+' title="{caption}" '+e+'>
\n',N="
{footer}\n
\n",O="{content}\n",P='
{data}
\n",Q='{caption}\n",R='\n",S='\n",T='\n",U='\n'+f+" "+g+"\n\n",V='\n\n'+f+" "+g+"\n\n",W='\n',X='
\n'+g+"\n
\n",Z={main1:r,main2:s,preview:t,close:v,fileIcon:u,caption:w,modalMain:A,modal:B,progress:C,size:D,footer:E,actions:F,actionDelete:G,actionUpload:H,actionZoom:I,actionDrag:J,btnDefault:x,btnLink:y,btnBrowse:z},$={generic:L+O+N,html:L+P+N,image:L+Q+N,text:L+R+N,video:M+S+N,audio:M+T+N,flash:M+U+N,object:M+V+N,pdf:M+W+N,other:M+X+N},aa=["image","html","text","video","audio","flash","pdf","object"],ca={image:{width:"auto",height:"160px"},html:{width:"213px",height:"160px"},text:{width:"213px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"213px",height:"80px"},flash:{width:"213px",height:"160px"},object:{width:"160px",height:"160px"},pdf:{width:"160px",height:"160px"},other:{width:"160px",height:"160px"}},_={image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"100%",height:"100%","min-height":"480px"},text:{width:"100%",height:"100%","min-height":"480px"},video:{width:"auto",height:"100%","max-width":"100%"},audio:{width:"100%",height:"30px"},flash:{width:"auto",height:"480px"},object:{width:"auto",height:"100%","min-height":"480px"},pdf:{width:"100%",height:"100%","min-height":"480px"},other:{width:"auto",height:"100%","min-height":"480px"}},da={image:function(a,b){return i(a,"image.*")||i(b,/\.(gif|png|jpe?g)$/i)},html:function(a,b){return i(a,"text/html")||i(b,/\.(htm|html)$/i)},text:function(a,b){return i(a,"text.*")||i(b,/\.(xml|javascript)$/i)||i(b,/\.(txt|md|csv|nfo|ini|json|php|js|css)$/i)},video:function(a,b){return i(a,"video.*")&&(i(a,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||i(b,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(a,b){return i(a,"audio.*")&&(i(b,/(ogg|mp3|mp?g|wav)$/i)||i(b,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(a,b){return i(a,"application/x-shockwave-flash",!0)||i(b,/\.(swf)$/i)},pdf:function(a,b){return i(a,"application/pdf",!0)||i(b,/\.(pdf)$/i)},object:function(){return!0},other:function(){return!0}},ea=function(b,c){return void 0===b||null===b||0===b.length||c&&""===a.trim(b)},fa=function(a){return Array.isArray(a)||"[object Array]"===Object.prototype.toString.call(a)},ga=function(a,b,c){return c=c||"",b&&"object"==typeof b&&a in b?b[a]:c},ba=function(b,c,d){return ea(b)||ea(b[c])?d:a(b[c])},ha=function(){return Math.round((new Date).getTime()+100*Math.random())},ia=function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},ja=function(b,c){var d=b;return c?(a.each(c,function(a,b){"function"==typeof b&&(b=b()),d=d.split(a).join(b)}),d):d},ka=function(a){var b=a.is("img")?a.attr("src"):a.find("source").attr("src");h.revokeObjectURL(b)},la=function(a){var b=a.lastIndexOf("/");return b===-1&&(b=a.lastIndexOf("\\")),a.split(a.substring(b,b+1)).pop()},ma=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},na=function(a){var b=document,c=b.documentElement;c&&a&&!ma()?c.requestFullscreen?c.requestFullscreen():c.msRequestFullscreen?c.msRequestFullscreen():c.mozRequestFullScreen?c.mozRequestFullScreen():c.webkitRequestFullscreen&&c.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):b.exitFullscreen?b.exitFullscreen():b.msExitFullscreen?b.msExitFullscreen():b.mozCancelFullScreen?b.mozCancelFullScreen():b.webkitExitFullscreen&&b.webkitExitFullscreen()},oa=function(a,b,c){if(c>=a.length)for(var d=c-a.length;d--+1;)a.push(void 0);return a.splice(c,0,a.splice(b,1)[0]),a},pa=function(b,c){var d=this;d.$element=a(b),d._validate()&&(d.isPreviewable=n(),d.isIE9=j(9),d.isIE10=j(10),d.isPreviewable||d.isIE9?(d._init(c),d._listen()):d.$element.removeClass("file-loading"))},pa.prototype={constructor:pa,_init:function(b){var e,c=this,d=c.$element;a.each(b,function(a,b){switch(a){case"minFileCount":case"maxFileCount":case"maxFileSize":c[a]=m(b);break;default:c[a]=b}}),c.fileInputCleared=!1,c.fileBatchCompleted=!0,c.isPreviewable||(c.showPreview=!1),c.uploadFileAttr=ea(d.attr("name"))?"file_data":d.attr("name"),c.reader=null,c.formdata={},c.clearStack(),c.uploadCount=0,c.uploadStatus={},c.uploadLog=[],c.uploadAsyncCount=0,c.loadedImages=[],c.totalImagesCount=0,c.ajaxRequests=[],c.isError=!1,c.ajaxAborted=!1,c.cancelling=!1,e=c._getLayoutTemplate("progress"),c.progressTemplate=e.replace("{class}",c.progressClass),c.progressCompleteTemplate=e.replace("{class}",c.progressCompleteClass),c.progressErrorTemplate=e.replace("{class}",c.progressErrorClass),c.dropZoneEnabled=o()&&c.dropZoneEnabled,c.isDisabled=c.$element.attr("disabled")||c.$element.attr("readonly"),c.isUploadable=p()&&!ea(c.uploadUrl),c.isClickable=c.browseOnZoneClick&&c.showPreview&&(c.isUploadable&&c.dropZoneEnabled||!ea(c.defaultPreviewContent)),c.slug="function"==typeof b.slugCallback?b.slugCallback:c._slugDefault,c.mainTemplate=c.showCaption?c._getLayoutTemplate("main1"):c._getLayoutTemplate("main2"),c.captionTemplate=c._getLayoutTemplate("caption"),c.previewGenericTemplate=c._getPreviewTemplate("generic"),c.resizeImage&&(c.maxImageWidth||c.maxImageHeight)&&(c.imageCanvas=document.createElement("canvas"),c.imageCanvasContext=c.imageCanvas.getContext("2d")),ea(c.$element.attr("id"))&&c.$element.attr("id",ha()),void 0===c.$container?c.$container=c._createContainer():c._refreshContainer(),c.$dropZone=c.$container.find(".file-drop-zone"),c.$progress=c.$container.find(".kv-upload-progress"),c.$btnUpload=c.$container.find(".fileinput-upload"),c.$captionContainer=ba(b,"elCaptionContainer",c.$container.find(".file-caption")),c.$caption=ba(b,"elCaptionText",c.$container.find(".file-caption-name")),c.$previewContainer=ba(b,"elPreviewContainer",c.$container.find(".file-preview")),c.$preview=ba(b,"elPreviewImage",c.$container.find(".file-preview-thumbnails")),c.$previewStatus=ba(b,"elPreviewStatus",c.$container.find(".file-preview-status")),c.$errorContainer=ba(b,"elErrorContainer",c.$previewContainer.find(".kv-fileinput-error")),ea(c.msgErrorClass)||q(c.$errorContainer,c.msgErrorClass),c.$errorContainer.hide(),c.fileActionSettings=a.extend(!0,Y,b.fileActionSettings),c.previewInitId="preview-"+ha(),c.id=c.$element.attr("id"),l.init(c),c._initPreview(!0),c._initPreviewActions(),c.options=b,c._setFileDropZoneTitle(),c.$element.removeClass("file-loading"),c.$element.attr("disabled")&&c.disable(),c._initZoom()},_log:function(a){var b=this,c=b.$element.attr("id");c&&(a='"'+c+'": '+a),"undefined"!=typeof window.console.log?window.console.log(a):window.alert(a)},_validate:function(){var a=this,b="file"===a.$element.attr("type");return b||a._log('The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.'),b},_errorsExist:function(){var c,b=this;return!!b.$errorContainer.find("li").length||(c=a(document.createElement("div")).html(b.$errorContainer.html()),c.find("span.kv-error-close").remove(),c.find("ul").remove(),!!a.trim(c.text()).length)},_errorHandler:function(a,b){var c=this,d=a.target.error;d.code===d.NOT_FOUND_ERR?c._showError(c.msgFileNotFound.replace("{name}",b)):d.code===d.SECURITY_ERR?c._showError(c.msgFileSecured.replace("{name}",b)):d.code===d.NOT_READABLE_ERR?c._showError(c.msgFileNotReadable.replace("{name}",b)):d.code===d.ABORT_ERR?c._showError(c.msgFilePreviewAborted.replace("{name}",b)):c._showError(c.msgFilePreviewError.replace("{name}",b))},_addError:function(a){var b=this,c=b.$errorContainer;a&&c.length&&(c.html(b.errorCloseButton+a),k(c.find(".kv-error-close"),"click",function(){c.fadeOut("slow")}))},_resetErrors:function(a){var b=this,c=b.$errorContainer;b.isError=!1,b.$container.removeClass("has-error"),c.html(""),a?c.fadeOut("slow"):c.hide()},_showFolderError:function(a){var d,b=this,c=b.$errorContainer;a&&(d=b.msgFoldersNotAllowed.replace(/\{n}/g,a),b._addError(d),q(b.$container,"has-error"),c.fadeIn(800),b._raise("filefoldererror",[a,d]))},_showUploadError:function(a,b,c){var d=this,e=d.$errorContainer,f=c||"fileuploaderror",g=b&&b.id?'
  • '+a+"
  • ":"
  • "+a+"
  • ";return 0===e.find("ul").length?d._addError("
      "+g+"
    "):e.find("ul").append(g),e.fadeIn(800),d._raise(f,[b,a]),d.$container.removeClass("file-input-new"),q(d.$container,"has-error"),!0},_showError:function(a,b,c){var d=this,e=d.$errorContainer,f=c||"fileerror";return b=b||{},b.reader=d.reader,d._addError(a),e.fadeIn(800),d._raise(f,[b,a]),d.isUploadable||d._clearFileInput(),d.$container.removeClass("file-input-new"),q(d.$container,"has-error"),d.$btnUpload.attr("disabled",!0),!0},_noFilesError:function(a){var b=this,c=b.minFileCount>1?b.filePlural:b.fileSingle,d=b.msgFilesTooLess.replace("{n}",b.minFileCount).replace("{files}",c),e=b.$errorContainer;b._addError(d),b.isError=!0,b._updateFileDetails(0),e.fadeIn(800),b._raise("fileerror",[a,d]),b._clearFileInput(),q(b.$container,"has-error")},_parseError:function(b,c,d){var e=this,f=a.trim(c+""),g="."===f.slice(-1)?"":".",h=void 0!==b.responseJSON&&void 0!==b.responseJSON.error?b.responseJSON.error:b.responseText;return e.cancelling&&e.msgUploadAborted&&(f=e.msgUploadAborted),e.showAjaxErrorDetails&&h?(h=a.trim(h.replace(/\n\s*\n/g,"\n")),h=h.length>0?"
    "+h+"
    ":"",f+=g+h):f+=g,e.cancelling=!1,d?""+d+": "+f:f},_parseFileType:function(a){var c,d,e,f,b=this;for(f=0;f-1&&(d=b.split(".").pop(),c.previewFileIconSettings&&c.previewFileIconSettings[d]&&(e=c.previewFileIconSettings[d]),c.previewFileExtSettings&&a.each(c.previewFileExtSettings,function(a,b){if(c.previewFileIconSettings[a]&&b(d))return void(e=c.previewFileIconSettings[a])})),e},_parseFilePreviewIcon:function(a,b){var c=this,d=c._getPreviewIcon(b)||c.previewFileIcon;return a.indexOf("{previewFileIcon}")>-1&&(a=a.replace(/\{previewFileIconClass}/g,c.previewFileIconClass).replace(/\{previewFileIcon}/g,d)),a},_raise:function(b,c){var d=this,e=a.Event(b);if(void 0!==c?d.$element.trigger(e,c):d.$element.trigger(e),e.isDefaultPrevented())return!1;if(!e.result)return e.result;switch(b){case"filebatchuploadcomplete":case"filebatchuploadsuccess":case"fileuploaded":case"fileclear":case"filecleared":case"filereset":case"fileerror":case"filefoldererror":case"fileuploaderror":case"filebatchuploaderror":case"filedeleteerror":case"filecustomerror":case"filesuccessremove":break;default:d.ajaxAborted=e.result}return!0},_listenFullScreen:function(a){var d,e,b=this,c=b.$modal;c&&c.length&&(d=c&&c.find(".btn-fullscreen"),e=c&&c.find(".btn-borderless"),d.length&&e.length&&(d.removeClass("active").attr("aria-pressed","false"),e.removeClass("active").attr("aria-pressed","false"),a?d.addClass("active").attr("aria-pressed","true"):e.addClass("active").attr("aria-pressed","true"),c.hasClass("file-zoom-fullscreen")?b._maximizeZoomDialog():a?b._maximizeZoomDialog():e.removeClass("active").attr("aria-pressed","false")))},_listen:function(){var b=this,c=b.$element,d=c.closest("form"),e=b.$container;k(c,"change",a.proxy(b._change,b)),b.showBrowse&&k(b.$btnFile,"click",a.proxy(b._browse,b)),k(d,"reset",a.proxy(b.reset,b)),k(e.find(".fileinput-remove:not([disabled])"),"click",a.proxy(b.clear,b)),k(e.find(".fileinput-cancel"),"click",a.proxy(b.cancel,b)),b._initDragDrop(),b.isUploadable||k(d,"submit",a.proxy(b._submitForm,b)),k(b.$container.find(".fileinput-upload"),"click",a.proxy(b._uploadClick,b)),k(a(window),"resize",function(){b._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)}),k(a(document),"webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",function(){b._listenFullScreen(ma())}),b._initClickable()},_initClickable:function(){var c,b=this;b.isClickable&&(c=b.isUploadable?b.$dropZone:b.$preview.find(".file-default-preview"),q(c,"clickable"),c.attr("tabindex",-1),k(c,"click",function(d){var e=a(d.target);e.parents(".file-preview-thumbnails").length&&!e.parents(".file-default-preview").length||(b.$element.trigger("click"),c.blur())}))},_initDragDrop:function(){var b=this,c=b.$dropZone;b.isUploadable&&b.dropZoneEnabled&&b.showPreview&&(k(c,"dragenter dragover",a.proxy(b._zoneDragEnter,b)),k(c,"dragleave",a.proxy(b._zoneDragLeave,b)),k(c,"drop",a.proxy(b._zoneDrop,b)),k(a(document),"dragenter dragover drop",b._zoneDragDropInit))},_zoneDragDropInit:function(a){a.stopPropagation(),a.preventDefault()},_zoneDragEnter:function(b){var c=this,d=a.inArray("Files",b.originalEvent.dataTransfer.types)>-1;return c._zoneDragDropInit(b),c.isDisabled||!d?(b.originalEvent.dataTransfer.effectAllowed="none",void(b.originalEvent.dataTransfer.dropEffect="none")):void q(c.$dropZone,"file-highlighted")},_zoneDragLeave:function(a){var b=this;b._zoneDragDropInit(a),b.isDisabled||b.$dropZone.removeClass("file-highlighted")},_zoneDrop:function(a){var b=this;a.preventDefault(),b.isDisabled||ea(a.originalEvent.dataTransfer.files)||(b._change(a,"dragdrop"),b.$dropZone.removeClass("file-highlighted"))},_uploadClick:function(a){var d,b=this,c=b.$container.find(".fileinput-upload"),e=!c.hasClass("disabled")&&ea(c.attr("disabled"));if(!a||!a.isDefaultPrevented()){if(!b.isUploadable)return void(e&&"submit"!==c.attr("type")&&(d=c.closest("form"),d.length&&d.trigger("submit"),a.preventDefault()));a.preventDefault(),e&&b.upload()}},_submitForm:function(){var a=this,b=a.$element,c=b.get(0).files;return c&&a.minFileCount>0&&a._getFileCount(c.length)