mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#33 reomve dist
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
workspace.xml
|
workspace.xml
|
||||||
.idea/
|
.idea/
|
||||||
|
dist/
|
1
demo-shell-ng2/.gitignore
vendored
1
demo-shell-ng2/.gitignore
vendored
@@ -4,3 +4,4 @@ bower_components/
|
|||||||
app/**/*.js
|
app/**/*.js
|
||||||
app/**/*.js.map
|
app/**/*.js.map
|
||||||
.idea
|
.idea
|
||||||
|
dist/
|
@@ -8,7 +8,7 @@ Install the npm packages described in the `package.json` and verify that it work
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install
|
$ npm install
|
||||||
$ npm start
|
$ npm run build.dev
|
||||||
```
|
```
|
||||||
You're ready to write your application.
|
You're ready to write your application.
|
||||||
|
|
||||||
|
46
demo-shell-ng2/dist/app/app.component.html
vendored
46
demo-shell-ng2/dist/app/app.component.html
vendored
@@ -1,46 +0,0 @@
|
|||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="navbar-brand navbar-alfresco-logo" [routerLink]="['Home']">
|
|
||||||
<img src="app/img/blank.gif">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li [class.active]="isActive(['Home'])">
|
|
||||||
<a [routerLink]="['Home']">Home <span class="sr-only">(current)</span></a>
|
|
||||||
</li>
|
|
||||||
<li [class.active]="isActive(['Page1'])">
|
|
||||||
<a [routerLink]="['Page1']">Uploader</a>
|
|
||||||
</li>
|
|
||||||
<li [class.active]="isActive(['Page2'])">
|
|
||||||
<a [routerLink]="['Page2']">Page 2</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
||||||
<span class="glyphicon glyphicon-menu-hamburger"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="#">Action</a></li>
|
|
||||||
<li><a href="#">Another action</a></li>
|
|
||||||
<li><a href="#">Something else here</a></li>
|
|
||||||
<li role="separator" class="divider"></li>
|
|
||||||
<li><a *ngIf="!isLoggedIn()" [routerLink]="['Login']">Login</a></li>
|
|
||||||
<li><a *ngIf="isLoggedIn()" href="#" (click)="onLogout($event)">Logout</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<!--<router-outlet></router-outlet>-->
|
|
||||||
<auth-router-outlet></auth-router-outlet>
|
|
105
demo-shell-ng2/dist/app/app.component.js
vendored
105
demo-shell-ng2/dist/app/app.component.js
vendored
@@ -1,105 +0,0 @@
|
|||||||
System.register(['angular2/core', './services/form-service', "angular2/router", "./components/login", "./services/authentication", "./components/AuthRouterOutlet", "./components/core/SideMenu", "./components/core/navbar.component", "./components/form-design-toolbar.component", "./components/forms.view", "./components/page1.view", "./components/page2.view"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, form_service_1, router_1, login_1, authentication_1, AuthRouterOutlet_1, SideMenu_1, navbar_component_1, form_design_toolbar_component_1, forms_view_1, page1_view_1, page2_view_1;
|
|
||||||
var AppComponent;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (form_service_1_1) {
|
|
||||||
form_service_1 = form_service_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (login_1_1) {
|
|
||||||
login_1 = login_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
},
|
|
||||||
function (AuthRouterOutlet_1_1) {
|
|
||||||
AuthRouterOutlet_1 = AuthRouterOutlet_1_1;
|
|
||||||
},
|
|
||||||
function (SideMenu_1_1) {
|
|
||||||
SideMenu_1 = SideMenu_1_1;
|
|
||||||
},
|
|
||||||
function (navbar_component_1_1) {
|
|
||||||
navbar_component_1 = navbar_component_1_1;
|
|
||||||
},
|
|
||||||
function (form_design_toolbar_component_1_1) {
|
|
||||||
form_design_toolbar_component_1 = form_design_toolbar_component_1_1;
|
|
||||||
},
|
|
||||||
function (forms_view_1_1) {
|
|
||||||
forms_view_1 = forms_view_1_1;
|
|
||||||
},
|
|
||||||
function (page1_view_1_1) {
|
|
||||||
page1_view_1 = page1_view_1_1;
|
|
||||||
},
|
|
||||||
function (page2_view_1_1) {
|
|
||||||
page2_view_1 = page2_view_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
AppComponent = (function () {
|
|
||||||
function AppComponent(auth, router) {
|
|
||||||
this.auth = auth;
|
|
||||||
this.router = router;
|
|
||||||
this.target = 'http://192.168.99.100:8080/alfresco/service/api/upload';
|
|
||||||
this.multi = 'true';
|
|
||||||
this.accept = 'image/*';
|
|
||||||
this.droppable = false;
|
|
||||||
}
|
|
||||||
AppComponent.prototype.toggleMenu = function (menu, $event) {
|
|
||||||
if (menu) {
|
|
||||||
menu.toggle();
|
|
||||||
}
|
|
||||||
if ($event) {
|
|
||||||
$event.preventDefault();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
AppComponent.prototype.isActive = function (instruction) {
|
|
||||||
return this.router.isRouteActive(this.router.generate(instruction));
|
|
||||||
};
|
|
||||||
AppComponent.prototype.isLoggedIn = function () {
|
|
||||||
return this.auth.isLoggedIn();
|
|
||||||
};
|
|
||||||
AppComponent.prototype.onLogout = function (event) {
|
|
||||||
var _this = this;
|
|
||||||
event.preventDefault();
|
|
||||||
this.auth.logout()
|
|
||||||
.subscribe(function () { return _this.router.navigate(['Login']); });
|
|
||||||
};
|
|
||||||
AppComponent = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'my-app',
|
|
||||||
templateUrl: 'app/app.component.html',
|
|
||||||
directives: [router_1.ROUTER_DIRECTIVES, AuthRouterOutlet_1.AuthRouterOutlet, SideMenu_1.SideMenu, navbar_component_1.AppNavBar, form_design_toolbar_component_1.FormDesignToolbar],
|
|
||||||
providers: [form_service_1.FormService]
|
|
||||||
}),
|
|
||||||
router_1.RouteConfig([
|
|
||||||
{ path: '/', name: 'Home', component: page2_view_1.Page2View, useAsDefault: true },
|
|
||||||
{ path: '/login', name: 'Login', component: login_1.Login },
|
|
||||||
{ path: '/forms', name: 'Forms', component: forms_view_1.FormsView },
|
|
||||||
{ path: '/page1', name: 'Page1', component: page1_view_1.Page1View },
|
|
||||||
{ path: '/page2', name: 'Page2', component: page2_view_1.Page2View }
|
|
||||||
]),
|
|
||||||
__metadata('design:paramtypes', [authentication_1.Authentication, router_1.Router])
|
|
||||||
], AppComponent);
|
|
||||||
return AppComponent;
|
|
||||||
}());
|
|
||||||
exports_1("AppComponent", AppComponent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=app.component.js.map
|
|
1
demo-shell-ng2/dist/app/app.component.js.map
vendored
1
demo-shell-ng2/dist/app/app.component.js.map
vendored
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4BA;gBAOI,sBACW,IAAoB,EACpB,MAAc;oBADd,SAAI,GAAJ,IAAI,CAAgB;oBACpB,WAAM,GAAN,MAAM,CAAQ;oBAPzB,WAAM,GAAW,wDAAwD,CAAC;oBAC1E,UAAK,GAAW,MAAM,CAAC;oBACvB,WAAM,GAAU,SAAS,CAAC;oBAC1B,cAAS,GAAY,KAAK,CAAC;gBAKzB,CAAC;gBAEH,iCAAU,GAAV,UAAW,IAAc,EAAE,MAAM;oBAC7B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;wBACP,IAAI,CAAC,MAAM,EAAE,CAAC;oBAClB,CAAC;oBACD,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC5B,CAAC;gBACL,CAAC;gBAED,+BAAQ,GAAR,UAAS,WAAkB;oBACvB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;gBACxE,CAA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 +0,0 @@
|
|||||||
System.register(['angular2/core', 'angular2/router', './components/login', './services/authentication', './components/AuthRouterOutlet', './components/home.view', './components/page1.view', './components/page2.view', 'ng2-alfresco/components'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, router_1, login_1, authentication_1, AuthRouterOutlet_1, home_view_1, page1_view_1, page2_view_1, components_1;
|
|
||||||
var AppComponent;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (login_1_1) {
|
|
||||||
login_1 = login_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
},
|
|
||||||
function (AuthRouterOutlet_1_1) {
|
|
||||||
AuthRouterOutlet_1 = AuthRouterOutlet_1_1;
|
|
||||||
},
|
|
||||||
function (home_view_1_1) {
|
|
||||||
home_view_1 = home_view_1_1;
|
|
||||||
},
|
|
||||||
function (page1_view_1_1) {
|
|
||||||
page1_view_1 = page1_view_1_1;
|
|
||||||
},
|
|
||||||
function (page2_view_1_1) {
|
|
||||||
page2_view_1 = page2_view_1_1;
|
|
||||||
},
|
|
||||||
function (components_1_1) {
|
|
||||||
components_1 = components_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let AppComponent = class AppComponent {
|
|
||||||
constructor(auth, router, alfrescoService) {
|
|
||||||
this.auth = auth;
|
|
||||||
this.router = router;
|
|
||||||
alfrescoService.host = 'http://192.168.99.100:8080';
|
|
||||||
}
|
|
||||||
isActive(instruction) {
|
|
||||||
return this.router.isRouteActive(this.router.generate(instruction));
|
|
||||||
}
|
|
||||||
isLoggedIn() {
|
|
||||||
return this.auth.isLoggedIn();
|
|
||||||
}
|
|
||||||
onLogout(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
this.auth.logout()
|
|
||||||
.subscribe(() => this.router.navigate(['Login']));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
AppComponent = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'my-app',
|
|
||||||
templateUrl: 'app/app.component.html',
|
|
||||||
directives: [router_1.ROUTER_DIRECTIVES, AuthRouterOutlet_1.AuthRouterOutlet]
|
|
||||||
}),
|
|
||||||
router_1.RouteConfig([
|
|
||||||
{ path: '/', name: 'Home', component: home_view_1.HomeView, useAsDefault: true },
|
|
||||||
{ path: '/login', name: 'Login', component: login_1.Login },
|
|
||||||
{ path: '/page1', name: 'Page1', component: page1_view_1.Page1View },
|
|
||||||
{ path: '/page2', name: 'Page2', component: page2_view_1.Page2View }
|
|
||||||
]),
|
|
||||||
__metadata('design:paramtypes', [authentication_1.Authentication, router_1.Router, components_1.AlfrescoService])
|
|
||||||
], AppComponent);
|
|
||||||
exports_1("AppComponent", AppComponent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=app.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;;;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,CAAC;;4BAAA;YACF,uCAuBC,CAAA","file":"app.component.js","sourcesContent":["import {Component} from 'angular2/core';\nimport {Router, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';\nimport {Login} from './components/login';\nimport {Authentication} from './services/authentication';\nimport {AuthRouterOutlet} from './components/AuthRouterOutlet';\nimport {HomeView} from './components/home.view';\nimport {Page1View} from './components/page1.view';\nimport {Page2View} from './components/page2.view';\nimport {AlfrescoService} from 'ng2-alfresco/components';\n\n@Component({\n selector: 'my-app',\n templateUrl: 'app/app.component.html',\n directives: [ROUTER_DIRECTIVES, AuthRouterOutlet]\n})\n@RouteConfig([\n {path: '/', name: 'Home', component: HomeView, useAsDefault: true},\n {path: '/login', name: 'Login', component: Login},\n {path: '/page1', name: 'Page1', component: Page1View},\n {path: '/page2', name: 'Page2', component: Page2View}\n])\nexport class AppComponent {\n\n constructor(public auth:Authentication,\n public router:Router,\n alfrescoService:AlfrescoService) {\n alfrescoService.host = 'http://192.168.99.100:8080';\n }\n\n isActive(instruction:any[]):boolean {\n return this.router.isRouteActive(this.router.generate(instruction));\n }\n\n isLoggedIn():boolean {\n return this.auth.isLoggedIn();\n }\n\n onLogout(event) {\n event.preventDefault();\n this.auth.logout()\n .subscribe(\n () => this.router.navigate(['Login'])\n );\n }\n}\n"]}
|
|
@@ -1,60 +0,0 @@
|
|||||||
System.register(['angular2/core', 'angular2/router', '../services/authentication'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
||||||
return function (target, key) { decorator(target, key, paramIndex); }
|
|
||||||
};
|
|
||||||
var core_1, router_1, authentication_1;
|
|
||||||
var AuthRouterOutlet;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let AuthRouterOutlet = class AuthRouterOutlet extends router_1.RouterOutlet {
|
|
||||||
constructor(_elementRef, _loader, _parentRouter, nameAttr, authentication) {
|
|
||||||
super(_elementRef, _loader, _parentRouter, nameAttr);
|
|
||||||
this.authentication = authentication;
|
|
||||||
this.router = _parentRouter;
|
|
||||||
this.publicRoutes = [
|
|
||||||
'', 'login', 'signup'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
activate(instruction) {
|
|
||||||
if (this._canActivate(instruction.urlPath)) {
|
|
||||||
return super.activate(instruction);
|
|
||||||
}
|
|
||||||
this.router.navigate(['Login']);
|
|
||||||
}
|
|
||||||
_canActivate(url) {
|
|
||||||
return this.publicRoutes.indexOf(url) !== -1
|
|
||||||
|| this.authentication.isLoggedIn();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
AuthRouterOutlet = __decorate([
|
|
||||||
core_1.Directive({ selector: 'auth-router-outlet' }),
|
|
||||||
__param(3, core_1.Attribute('name')),
|
|
||||||
__metadata('design:paramtypes', [core_1.ElementRef, core_1.DynamicComponentLoader, router_1.Router, String, authentication_1.Authentication])
|
|
||||||
], AuthRouterOutlet);
|
|
||||||
exports_1("AuthRouterOutlet", AuthRouterOutlet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=AuthRouterOutlet.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["components/AuthRouterOutlet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAKA,sDAAsC,qBAAY;gBAK9C,YACI,WAAuB,EAAE,OAA+B,EACxD,aAAqB,EAAqB,QAAgB,EAClD,cAA8B;oBAEtC,MAAM,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;oBAF7C,mBAAc,GAAd,cAAc,CAAgB;oBAItC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;oBAC5B,IAAI,CAAC,YAAY,GAAG;wBAChB,EAAE,EAAE,OAAO,EAAE,QAAQ;qBACxB,CAAC;gBACN,CAAC;gBAED,QAAQ,CAAC,WAAiC;oBACtC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;wBACzC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;oBACvC,CAAC;oBAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpC,CAAC;gBAED,YAAY,CAAC,GAAG;oBACZ,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;2BACrC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;gBAC5C,CAAC;YACL,CAAC;YA/BD;gBAAC,gBAAS,CAAC,EAAC,QAAQ,EAAE,oBAAoB,EAAC,CAAC;2BAQZ,gBAAS,CAAC,MAAM,CAAC;;gCARL;YAC5C,+CA8BC,CAAA","file":"AuthRouterOutlet.js","sourcesContent":["import { ElementRef, DynamicComponentLoader, Directive, Attribute } from 'angular2/core';\nimport { Router, RouterOutlet, ComponentInstruction } from 'angular2/router';\nimport {Authentication} from '../services/authentication';\n\n@Directive({selector: 'auth-router-outlet'})\nexport class AuthRouterOutlet extends RouterOutlet {\n\n publicRoutes: Array<string>;\n private router: Router;\n\n constructor(\n _elementRef: ElementRef, _loader: DynamicComponentLoader,\n _parentRouter: Router, @Attribute('name') nameAttr: string,\n private authentication: Authentication\n ) {\n super(_elementRef, _loader, _parentRouter, nameAttr);\n\n this.router = _parentRouter;\n this.publicRoutes = [\n '', 'login', 'signup'\n ];\n }\n\n activate(instruction: ComponentInstruction) {\n if (this._canActivate(instruction.urlPath)) {\n return super.activate(instruction);\n }\n\n this.router.navigate(['Login']);\n }\n\n _canActivate(url) {\n return this.publicRoutes.indexOf(url) !== -1\n || this.authentication.isLoggedIn();\n }\n}\n"]}
|
|
@@ -1,81 +0,0 @@
|
|||||||
System.register(['angular2/core', 'ng2-alfresco/components'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, components_1;
|
|
||||||
var HomeView;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (components_1_1) {
|
|
||||||
components_1 = components_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let HomeView = class HomeView {
|
|
||||||
constructor() {
|
|
||||||
this.thumbnails = true;
|
|
||||||
this.breadcrumb = false;
|
|
||||||
this.navigation = true;
|
|
||||||
this.downloads = true;
|
|
||||||
this.events = [];
|
|
||||||
}
|
|
||||||
onItemClick($event) {
|
|
||||||
console.log($event.value);
|
|
||||||
this.events.push({
|
|
||||||
name: 'Item Clicked',
|
|
||||||
value: $event.value
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
HomeView = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'home-view',
|
|
||||||
template: `
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
<li><label><input type="checkbox" [(ngModel)]="thumbnails"> Thumbnails</label></li>
|
|
||||||
<li><label><input type="checkbox" [(ngModel)]="breadcrumb"> Breadcrumb</label></li>
|
|
||||||
<li><label><input type="checkbox" [(ngModel)]="navigation"> Navigation</label></li>
|
|
||||||
<li><label><input type="checkbox" [(ngModel)]="downloads"> Downloads</label></li>
|
|
||||||
</ul>
|
|
||||||
<hr>
|
|
||||||
<ul class="list-unstyled" style="font-size: 10px">
|
|
||||||
<li *ngFor="#event of events">
|
|
||||||
<strong>{{event.name}}</strong>: {{event.value.displayName}}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10">
|
|
||||||
<alfresco-document-list #list
|
|
||||||
[thumbnails]="thumbnails"
|
|
||||||
[breadcrumb]="breadcrumb"
|
|
||||||
[navigate]="navigation"
|
|
||||||
[downloads]="downloads"
|
|
||||||
(itemClick)="onItemClick($event)">
|
|
||||||
</alfresco-document-list>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
directives: [components_1.DocumentList]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], HomeView);
|
|
||||||
exports_1("HomeView", HomeView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=home.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["components/home.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAoCA;gBAAA;oBACI,eAAU,GAAY,IAAI,CAAC;oBAC3B,eAAU,GAAY,KAAK,CAAC;oBAC5B,eAAU,GAAY,IAAI,CAAC;oBAC3B,cAAS,GAAY,IAAI,CAAC;oBAE1B,WAAM,GAAU,EAAE,CAAC;gBASvB,CAAC;gBAPG,WAAW,CAAC,MAAM;oBACd,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;wBACb,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,MAAM,CAAC,KAAK;qBACtB,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAhDD;gBAAC,gBAAS,CAAC;oBACP,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BT;oBACD,UAAU,EAAE,CAAC,yBAAY,CAAC;iBAC7B,CAAC;;wBAAA;YACF,+BAeC,CAAA","file":"home.view.js","sourcesContent":["import {Component} from 'angular2/core';\nimport {DocumentList} from 'ng2-alfresco/components';\n\n@Component({\n selector: 'home-view',\n template: `\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-2\">\n <ul class=\"list-unstyled\">\n <li><label><input type=\"checkbox\" [(ngModel)]=\"thumbnails\"> Thumbnails</label></li>\n <li><label><input type=\"checkbox\" [(ngModel)]=\"breadcrumb\"> Breadcrumb</label></li>\n <li><label><input type=\"checkbox\" [(ngModel)]=\"navigation\"> Navigation</label></li>\n <li><label><input type=\"checkbox\" [(ngModel)]=\"downloads\"> Downloads</label></li>\n </ul>\n <hr>\n <ul class=\"list-unstyled\" style=\"font-size: 10px\">\n <li *ngFor=\"#event of events\">\n <strong>{{event.name}}</strong>: {{event.value.displayName}}\n </li>\n </ul>\n </div>\n <div class=\"col-md-10\">\n <alfresco-document-list #list \n [thumbnails]=\"thumbnails\"\n [breadcrumb]=\"breadcrumb\"\n [navigate]=\"navigation\"\n [downloads]=\"downloads\"\n (itemClick)=\"onItemClick($event)\">\n </alfresco-document-list>\n </div>\n </div>\n </div>\n `,\n directives: [DocumentList]\n})\nexport class HomeView {\n thumbnails: boolean = true;\n breadcrumb: boolean = false;\n navigation: boolean = true;\n downloads: boolean = true;\n\n events: any[] = [];\n\n onItemClick($event) {\n console.log($event.value);\n this.events.push({\n name: 'Item Clicked',\n value: $event.value\n });\n }\n}\n"]}
|
|
70
demo-shell-ng2/dist/app/app/components/login.js
vendored
70
demo-shell-ng2/dist/app/app/components/login.js
vendored
@@ -1,70 +0,0 @@
|
|||||||
System.register(['angular2/core', 'angular2/router', 'angular2/common', '../services/authentication'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, router_1, common_1, authentication_1;
|
|
||||||
var Login;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (common_1_1) {
|
|
||||||
common_1 = common_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let Login = class Login {
|
|
||||||
constructor(fb, auth, router) {
|
|
||||||
this.auth = auth;
|
|
||||||
this.router = router;
|
|
||||||
this.error = false;
|
|
||||||
this.form = fb.group({
|
|
||||||
username: ['', common_1.Validators.compose([common_1.Validators.required, common_1.Validators.minLength(4)])],
|
|
||||||
password: ['', common_1.Validators.required]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
isErrorStyle(field) {
|
|
||||||
if (field.valid) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onSubmit(value, event) {
|
|
||||||
event.preventDefault();
|
|
||||||
this.auth.login('POST', value.username, value.password)
|
|
||||||
.subscribe((token) => this.router.navigate(['Home']), () => {
|
|
||||||
this.error = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Login = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'login',
|
|
||||||
directives: [router_1.ROUTER_DIRECTIVES, common_1.FORM_DIRECTIVES],
|
|
||||||
templateUrl: 'app/template/login.component.html',
|
|
||||||
styleUrls: ['app/style/login.component.css'],
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [common_1.FormBuilder, authentication_1.Authentication, router_1.Router])
|
|
||||||
], Login);
|
|
||||||
exports_1("Login", Login);
|
|
||||||
}
|
|
||||||
}
|
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EAAE,OAAO;oBACjB,UAAU,EAAE,CAAC,0BAAiB,EAAE,wBAAe,CAAC;oBAChD,WAAW,EAAE,mCAAmC;oBAChD,SAAS,EAAE,CAAC,+BAA+B,CAAC;iBAC/C,CAAC;;qBAAA;YACF,yBA6BC,CAAA","file":"login.js","sourcesContent":["import {Component} from 'angular2/core';\nimport {Router, ROUTER_DIRECTIVES} from 'angular2/router';\nimport {FORM_DIRECTIVES, ControlGroup, FormBuilder, Validators} from 'angular2/common';\nimport {Authentication} from '../services/authentication';\n\n@Component({\n selector: 'login',\n directives: [ROUTER_DIRECTIVES, FORM_DIRECTIVES],\n templateUrl: 'app/template/login.component.html',\n styleUrls: ['app/style/login.component.css'],\n})\nexport class Login {\n form:ControlGroup;\n error:boolean = false;\n\n isErrorStyle(field:ControlGroup) {\n if (field.valid) {\n return false;\n } else {\n return true;\n }\n }\n\n constructor(fb:FormBuilder, public auth:Authentication, public router:Router) {\n this.form = fb.group({\n username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],\n password: ['', Validators.required]\n });\n }\n\n onSubmit(value:any, event) {\n event.preventDefault();\n this.auth.login('POST', value.username, value.password)\n .subscribe(\n (token:any) => this.router.navigate(['Home']),\n () => {\n this.error = true;\n }\n );\n }\n}\n"]}
|
|
115
demo-shell-ng2/dist/app/app/components/page1.view.js
vendored
115
demo-shell-ng2/dist/app/app/components/page1.view.js
vendored
@@ -1,115 +0,0 @@
|
|||||||
System.register(['angular2/core', 'ng2-uploader/ng2-uploader'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, ng2_uploader_1;
|
|
||||||
var Page1View;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (ng2_uploader_1_1) {
|
|
||||||
ng2_uploader_1 = ng2_uploader_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let Page1View = class Page1View {
|
|
||||||
constructor() {
|
|
||||||
this.options = {
|
|
||||||
url: 'http://192.168.99.100:8080/alfresco/service/api/upload',
|
|
||||||
withCredentials: true,
|
|
||||||
authToken: btoa('admin:admin'),
|
|
||||||
authTokenPrefix: 'Basic',
|
|
||||||
fieldName: 'filedata',
|
|
||||||
formFields: {
|
|
||||||
siteid: 'swsdp',
|
|
||||||
containerid: 'documentLibrary'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.dropProgress = 0;
|
|
||||||
this.dropResp = [];
|
|
||||||
this.zone = new core_1.NgZone({ enableLongStackTrace: false });
|
|
||||||
}
|
|
||||||
handleUpload(data) {
|
|
||||||
if (data && data.response) {
|
|
||||||
data = JSON.parse(data.response);
|
|
||||||
this.uploadFile = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
handleDropUpload(data) {
|
|
||||||
let index = this.dropResp.findIndex(x => x.id === data.id);
|
|
||||||
if (index === -1) {
|
|
||||||
this.dropResp.push(data);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.zone.run(() => {
|
|
||||||
this.dropResp[index] = data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let total = 0, uploaded = 0;
|
|
||||||
this.dropResp.forEach(resp => {
|
|
||||||
total += resp.progress.total;
|
|
||||||
uploaded += resp.progress.loaded;
|
|
||||||
});
|
|
||||||
this.dropProgress = Math.floor(uploaded / (total / 100));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Page1View = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'page1-view',
|
|
||||||
styles: [
|
|
||||||
`
|
|
||||||
:host .dropzone {
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
margin-top: 2px;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
],
|
|
||||||
template: `
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<h2>Upload File</h2>
|
|
||||||
<input type="file"
|
|
||||||
[ng-file-select]="options"
|
|
||||||
(onUpload)="handleUpload($event)">
|
|
||||||
<div>
|
|
||||||
Response: {{ uploadFile | json }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<h2>Drag and Drop file demo</h2>
|
|
||||||
<div class="col-md-4 col-md-offset-3">
|
|
||||||
<div [ng-file-drop]="options" (onUpload)="handleDropUpload($event)" class="dropzone">
|
|
||||||
Drop file here...
|
|
||||||
</div>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="progress-bar" [style.width]="dropProgress + '%'"></div>
|
|
||||||
<span class="percent">{{ dropProgress }}%</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
directives: [ng2_uploader_1.UPLOAD_DIRECTIVES]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Page1View);
|
|
||||||
exports_1("Page1View", Page1View);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=page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,CAAC,CAAC,CAAC;oBACP,CAAC;oBAED,IAAI,KAAK,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC;oBAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI;wBACtB,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;wBAC7B,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;oBACrC,CAAC,CAAC,CAAC;oBAEH,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;gBAC7D,CAAC;YACL,CAAC;YAzFD;gBAAC,gBAAS,CAAC;oBACP,QAAQ,EAAE,YAAY;oBACtB,MAAM,EAAE;wBACJ;;;;;;;;;;SAUC;qBACJ;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;KAwBT;oBACD,UAAU,EAAE,CAAC,gCAAiB,CAAC;iBAClC,CAAC;;yBAAA;YACF,iCA+CC,CAAA","file":"page1.view.js","sourcesContent":["import {Component, NgZone} from 'angular2/core';\nimport {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader';\n\n@Component({\n selector: 'page1-view',\n styles: [\n `\n :host .dropzone {\n width: 100%;\n height: 100px;\n background-color: #f5f5f5;\n margin-top: 2px;\n margin-bottom: 2px;\n box-shadow: inset 0 1px 2px rgba(0,0,0,.1);\n text-align: center;\n }\n `\n ],\n template: `\n <div class=\"container\">\n <div class=\"row\">\n <h2>Upload File</h2>\n <input type=\"file\" \n [ng-file-select]=\"options\"\n (onUpload)=\"handleUpload($event)\">\n <div>\n Response: {{ uploadFile | json }}\n </div>\n </div>\n <div class=\"row\">\n <h2>Drag and Drop file demo</h2>\n <div class=\"col-md-4 col-md-offset-3\">\n <div [ng-file-drop]=\"options\" (onUpload)=\"handleDropUpload($event)\" class=\"dropzone\">\n Drop file here...\n </div>\n <div class=\"progress\">\n <div class=\"progress-bar\" [style.width]=\"dropProgress + '%'\"></div>\n <span class=\"percent\">{{ dropProgress }}%</span>\n </div>\n </div>\n </div>\n </div>\n `,\n directives: [UPLOAD_DIRECTIVES]\n})\nexport class Page1View {\n uploadFile:any;\n options:Object = {\n url: 'http://192.168.99.100:8080/alfresco/service/api/upload',\n withCredentials: true,\n authToken: btoa('admin:admin'),\n authTokenPrefix: 'Basic',\n fieldName: 'filedata',\n formFields: {\n siteid: 'swsdp',\n containerid: 'documentLibrary'\n }\n };\n\n zone:NgZone;\n dropProgress:number = 0;\n dropResp:any[] = [];\n\n constructor() {\n this.zone = new NgZone({enableLongStackTrace: false});\n }\n\n handleUpload(data):void {\n if (data && data.response) {\n data = JSON.parse(data.response);\n this.uploadFile = data;\n }\n }\n\n handleDropUpload(data):void {\n let index = this.dropResp.findIndex(x => x.id === data.id);\n if (index === -1) {\n this.dropResp.push(data);\n } else {\n this.zone.run(() => {\n this.dropResp[index] = data;\n });\n }\n\n let total = 0, uploaded = 0;\n this.dropResp.forEach(resp => {\n total += resp.progress.total;\n uploaded += resp.progress.loaded;\n });\n\n this.dropProgress = Math.floor(uploaded / (total / 100));\n }\n}\n"]}
|
|
@@ -1,46 +0,0 @@
|
|||||||
System.register(['angular2/core', 'ng2-alfresco/components'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, components_1;
|
|
||||||
var Page2View;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (components_1_1) {
|
|
||||||
components_1 = components_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let Page2View = class Page2View {
|
|
||||||
};
|
|
||||||
Page2View = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'page2-view',
|
|
||||||
template: `
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<h2>Page 2</h2>
|
|
||||||
<hello-world></hello-world>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
directives: [components_1.HelloWorld]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Page2View);
|
|
||||||
exports_1("Page2View", Page2View);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=page2.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["components/page2.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAeA;YAEA,CAAC;YAdD;gBAAC,gBAAS,CAAC;oBACP,QAAQ,EAAE,YAAY;oBACtB,QAAQ,EAAE;;;;;;;KAOT;oBACD,UAAU,EAAE,CAAC,uBAAU,CAAC;iBAC3B,CAAC;;yBAAA;YACF,iCAEC,CAAA","file":"page2.view.js","sourcesContent":["import {Component} from 'angular2/core';\nimport {HelloWorld} from 'ng2-alfresco/components';\n\n@Component({\n selector: 'page2-view',\n template: `\n <div class=\"container\">\n <div class=\"row\">\n <h2>Page 2</h2>\n <hello-world></hello-world>\n </div>\n </div>\n `,\n directives: [HelloWorld]\n})\nexport class Page2View {\n\n}\n"]}
|
|
36
demo-shell-ng2/dist/app/app/main.js
vendored
36
demo-shell-ng2/dist/app/app/main.js
vendored
@@ -1,36 +0,0 @@
|
|||||||
System.register(['angular2/platform/browser', './app.component', 'angular2/router', 'angular2/http', './services/authentication', 'ng2-alfresco/components'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var browser_1, app_component_1, router_1, http_1, authentication_1, components_1;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (browser_1_1) {
|
|
||||||
browser_1 = browser_1_1;
|
|
||||||
},
|
|
||||||
function (app_component_1_1) {
|
|
||||||
app_component_1 = app_component_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (http_1_1) {
|
|
||||||
http_1 = http_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
},
|
|
||||||
function (components_1_1) {
|
|
||||||
components_1 = components_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
browser_1.bootstrap(app_component_1.AppComponent, [
|
|
||||||
router_1.ROUTER_PROVIDERS,
|
|
||||||
http_1.HTTP_PROVIDERS,
|
|
||||||
authentication_1.Authentication,
|
|
||||||
components_1.ALFRESCO_PROVIDERS
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=main.js.map
|
|
1
demo-shell-ng2/dist/app/app/main.js.map
vendored
1
demo-shell-ng2/dist/app/app/main.js.map
vendored
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;YAOA,mBAAS,CAAC,4BAAY,EAAE;gBACpB,yBAAgB;gBAChB,qBAAc;gBACd,+BAAc;gBACd,+BAAkB;aACrB,CAAC,CAAC","file":"main.js","sourcesContent":["import {bootstrap} from 'angular2/platform/browser';\nimport {AppComponent} from './app.component';\nimport {ROUTER_PROVIDERS} from 'angular2/router';\nimport {HTTP_PROVIDERS} from 'angular2/http';\nimport {Authentication} from './services/authentication';\nimport {ALFRESCO_PROVIDERS} from 'ng2-alfresco/components';\n\nbootstrap(AppComponent, [\n ROUTER_PROVIDERS,\n HTTP_PROVIDERS,\n Authentication,\n ALFRESCO_PROVIDERS\n]);\n"]}
|
|
@@ -1,97 +0,0 @@
|
|||||||
System.register(['angular2/core', 'rxjs/Rx', 'angular2/http'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, Rx_1, http_1;
|
|
||||||
var Authentication;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (Rx_1_1) {
|
|
||||||
Rx_1 = Rx_1_1;
|
|
||||||
},
|
|
||||||
function (http_1_1) {
|
|
||||||
http_1 = http_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
let Authentication = class Authentication {
|
|
||||||
constructor(http) {
|
|
||||||
this.http = http;
|
|
||||||
this._host = 'http://192.168.99.100:8080';
|
|
||||||
this._baseUrl = this._host + '/alfresco/service/api/';
|
|
||||||
this.token = localStorage.getItem('token');
|
|
||||||
}
|
|
||||||
isLoggedIn() {
|
|
||||||
return !!localStorage.getItem('token');
|
|
||||||
}
|
|
||||||
login(method, username, password) {
|
|
||||||
if (method === 'GET') {
|
|
||||||
return this.loginGet(username, password);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return this.loginPost(username, password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
loginGet(username, password) {
|
|
||||||
const searchParams = new http_1.URLSearchParams();
|
|
||||||
searchParams.set('u', username);
|
|
||||||
searchParams.set('pw', password);
|
|
||||||
return this.http.get(this._baseUrl + 'login', { search: searchParams })
|
|
||||||
.map((res) => {
|
|
||||||
let data = JSON.parse(xml2json(res.text(), ' '));
|
|
||||||
this.token = data.ticket;
|
|
||||||
this.saveJwt(this.token);
|
|
||||||
})
|
|
||||||
.catch(this.handleError);
|
|
||||||
}
|
|
||||||
loginPost(username, password) {
|
|
||||||
let credentials = '{ username: ' + username + ', password: ' + password + ' }';
|
|
||||||
let headers = new http_1.Headers();
|
|
||||||
headers.append('Content-Type', 'application/json');
|
|
||||||
return this.http.post(this._baseUrl + 'login', credentials, {
|
|
||||||
headers: headers
|
|
||||||
})
|
|
||||||
.map((res) => {
|
|
||||||
let response = res.json();
|
|
||||||
this.token = response.data.ticket;
|
|
||||||
this.saveJwt(this.token);
|
|
||||||
})
|
|
||||||
.catch(this.handleError);
|
|
||||||
}
|
|
||||||
saveJwt(jwt) {
|
|
||||||
if (jwt) {
|
|
||||||
localStorage.setItem('token', jwt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
logout() {
|
|
||||||
this.token = undefined;
|
|
||||||
localStorage.removeItem('token');
|
|
||||||
return Rx_1.Observable.of(true);
|
|
||||||
}
|
|
||||||
handleError(error) {
|
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
|
||||||
// instead of just logging it to the console
|
|
||||||
console.error(error);
|
|
||||||
return Rx_1.Observable.throw(error.json().error || 'Server error');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Authentication = __decorate([
|
|
||||||
core_1.Injectable(),
|
|
||||||
__metadata('design:paramtypes', [http_1.Http])
|
|
||||||
], Authentication);
|
|
||||||
exports_1("Authentication", Authentication);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=authentication.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["services/authentication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;YAOA;gBAMI,YAAmB,IAAS;oBAAT,SAAI,GAAJ,IAAI,CAAK;oBAHpB,UAAK,GAAU,4BAA4B,CAAC;oBAC5C,aAAQ,GAAU,IAAI,CAAC,KAAK,GAAG,wBAAwB,CAAC;oBAG5D,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBAED,UAAU;oBACN,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC3C,CAAC;gBAED,KAAK,CAAC,MAAa,EAAE,QAAe,EAAE,QAAe;oBACjD,EAAE,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC;wBACnB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAC7C,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAC9C,CAAC;gBACL,CAAC;gBAED,QAAQ,CAAC,QAAe,EAAE,QAAe;oBACrC,MAAM,YAAY,GAAG,IAAI,sBAAe,EAAE,CAAC;oBAC3C,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;oBAChC,YAAY,CAAC,GAAG,CAAC,I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AC,GAAG,CAAC,CAAC,CAAC;wBACN,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;oBACvC,CAAC;gBACL,CAAC;gBAED,MAAM;oBACF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;oBACvB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;oBAEjC,MAAM,CAAC,eAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;gBAC/B,CAAC;gBAEO,WAAW,CAAC,KAAc;oBAC9B,mFAAmF;oBACnF,4CAA4C;oBAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM,CAAC,eAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,cAAc,CAAC,CAAC;gBAClE,CAAC;YACL,CAAC;YAzED;gBAAC,iBAAU,EAAE;;8BAAA;YACb,2CAwEC,CAAA","file":"authentication.js","sourcesContent":["import {Injectable} from 'angular2/core';\nimport {Observable} from 'rxjs/Rx';\nimport {Http, Headers, URLSearchParams, Response} from 'angular2/http';\n\ndeclare var xml2json:any;\n\n@Injectable()\nexport class Authentication {\n token:string;\n\n private _host:string = 'http://192.168.99.100:8080';\n private _baseUrl:string = this._host + '/alfresco/service/api/';\n\n constructor(public http:Http) {\n this.token = localStorage.getItem('token');\n }\n\n isLoggedIn() {\n return !!localStorage.getItem('token');\n }\n\n login(method:string, username:string, password:string) {\n if (method === 'GET') {\n return this.loginGet(username, password);\n } else {\n return this.loginPost(username, password);\n }\n }\n\n loginGet(username:string, password:string) {\n const searchParams = new URLSearchParams();\n searchParams.set('u', username);\n searchParams.set('pw', password);\n\n return this.http.get(this._baseUrl + 'login', {search: searchParams})\n .map((res:any) => {\n let data = JSON.parse(xml2json(res.text(), ' '));\n this.token = data.ticket;\n this.saveJwt(this.token);\n })\n .catch(this.handleError);\n }\n\n loginPost(username:string, password:string) {\n let credentials = '{ username: ' + username + ', password: ' + password + ' }';\n\n let headers = new Headers();\n headers.append('Content-Type', 'application/json');\n\n return this.http.post(this._baseUrl + 'login', credentials, {\n headers: headers\n })\n .map((res:any) => {\n let response = res.json();\n this.token = response.data.ticket;\n this.saveJwt(this.token);\n })\n .catch(this.handleError);\n }\n\n saveJwt(jwt) {\n if (jwt) {\n localStorage.setItem('token', jwt);\n }\n }\n\n logout() {\n this.token = undefined;\n localStorage.removeItem('token');\n\n return Observable.of(true);\n }\n\n private handleError(error:Response) {\n // in a real world app, we may send the error to some remote logging infrastructure\n // instead of just logging it to the console\n console.error(error);\n return Observable.throw(error.json().error || 'Server error');\n }\n}\n"]}
|
|
@@ -1,66 +0,0 @@
|
|||||||
System.register(['angular2/core', 'angular2/router', '../services/authentication'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __extends = (this && this.__extends) || function (d, b) {
|
|
||||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
||||||
function __() { this.constructor = d; }
|
|
||||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
||||||
};
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
||||||
return function (target, key) { decorator(target, key, paramIndex); }
|
|
||||||
};
|
|
||||||
var core_1, router_1, authentication_1;
|
|
||||||
var AuthRouterOutlet;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
AuthRouterOutlet = (function (_super) {
|
|
||||||
__extends(AuthRouterOutlet, _super);
|
|
||||||
function AuthRouterOutlet(_elementRef, _loader, _parentRouter, nameAttr, authentication) {
|
|
||||||
_super.call(this, _elementRef, _loader, _parentRouter, nameAttr);
|
|
||||||
this.authentication = authentication;
|
|
||||||
this.router = _parentRouter;
|
|
||||||
this.publicRoutes = [
|
|
||||||
'', 'login', 'signup'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
AuthRouterOutlet.prototype.activate = function (instruction) {
|
|
||||||
if (this._canActivate(instruction.urlPath)) {
|
|
||||||
return _super.prototype.activate.call(this, instruction);
|
|
||||||
}
|
|
||||||
this.router.navigate(['Login']);
|
|
||||||
};
|
|
||||||
AuthRouterOutlet.prototype._canActivate = function (url) {
|
|
||||||
return this.publicRoutes.indexOf(url) !== -1
|
|
||||||
|| this.authentication.isLoggedIn();
|
|
||||||
};
|
|
||||||
AuthRouterOutlet = __decorate([
|
|
||||||
core_1.Directive({ selector: 'auth-router-outlet' }),
|
|
||||||
__param(3, core_1.Attribute('name')),
|
|
||||||
__metadata('design:paramtypes', [core_1.ElementRef, core_1.DynamicComponentLoader, router_1.Router, String, authentication_1.Authentication])
|
|
||||||
], AuthRouterOutlet);
|
|
||||||
return AuthRouterOutlet;
|
|
||||||
}(router_1.RouterOutlet));
|
|
||||||
exports_1("AuthRouterOutlet", AuthRouterOutlet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=AuthRouterOutlet.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"AuthRouterOutlet.js","sourceRoot":"","sources":["AuthRouterOutlet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAKA;gBAAsC,oCAAY;gBAK9C,0BACI,WAAuB,EAAE,OAA+B,EACxD,aAAqB,EAAqB,QAAgB,EAClD,cAA8B;oBAEtC,kBAAM,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;oBAF7C,mBAAc,GAAd,cAAc,CAAgB;oBAItC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;oBAC5B,IAAI,CAAC,YAAY,GAAG;wBAChB,EAAE,EAAE,OAAO,EAAE,QAAQ;qBACxB,CAAC;gBACN,CAAC;gBAED,mCAAQ,GAAR,UAAS,WAAiC;oBACtC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;wBACzC,MAAM,CAAC,gBAAK,CAAC,QAAQ,YAAC,WAAW,CAAC,CAAC;oBACvC,CAAC;oBAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpC,CAAC;gBAED,uCAAY,GAAZ,UAAa,GAAG;oBACZ,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;2BACrC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;gBAC5C,CAAC;gBA9BL;oBAAC,gBAAS,CAAC,EAAC,QAAQ,EAAE,oBAAoB,EAAC,CAAC;+BAQZ,gBAAS,CAAC,MAAM,CAAC;;oCARL;gBA+B5C,uBAAC;YAAD,CAAC,AA9BD,CAAsC,qBAAY,GA8BjD;YA9BD,+CA8BC,CAAA"}
|
|
@@ -1,61 +0,0 @@
|
|||||||
System.register(['angular2/core', 'angular2/http', 'rxjs/Observable'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, http_1, Observable_1;
|
|
||||||
var AlfrescoService;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (http_1_1) {
|
|
||||||
http_1 = http_1_1;
|
|
||||||
},
|
|
||||||
function (Observable_1_1) {
|
|
||||||
Observable_1 = Observable_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
AlfrescoService = (function () {
|
|
||||||
function AlfrescoService(http) {
|
|
||||||
this.http = http;
|
|
||||||
this._host = 'http://192.168.99.100:8080';
|
|
||||||
this._baseUrl = this._host + '/alfresco/service/slingshot/doclib/doclist/all/site/';
|
|
||||||
}
|
|
||||||
AlfrescoService.prototype.getFolder = function (folder) {
|
|
||||||
var headers = new http_1.Headers({
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Authorization': 'Basic ' + btoa('admin:admin')
|
|
||||||
});
|
|
||||||
var options = new http_1.RequestOptions({ headers: headers });
|
|
||||||
return this.http
|
|
||||||
.get(this._baseUrl + folder, options)
|
|
||||||
.map(function (res) { return res.json(); })
|
|
||||||
.do(function (data) { return console.log(data); }) // eyeball results in the console
|
|
||||||
.catch(this.handleError);
|
|
||||||
};
|
|
||||||
AlfrescoService.prototype.handleError = function (error) {
|
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
|
||||||
// instead of just logging it to the console
|
|
||||||
console.error(error);
|
|
||||||
return Observable_1.Observable.throw(error.json().error || 'Server error');
|
|
||||||
};
|
|
||||||
AlfrescoService = __decorate([
|
|
||||||
core_1.Injectable(),
|
|
||||||
__metadata('design:paramtypes', [http_1.Http])
|
|
||||||
], AlfrescoService);
|
|
||||||
return AlfrescoService;
|
|
||||||
}());
|
|
||||||
exports_1("AlfrescoService", AlfrescoService);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=alfresco.service.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"alfresco.service.js","sourceRoot":"","sources":["alfresco.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;YAMA;gBACI,yBAAoB,IAAU;oBAAV,SAAI,GAAJ,IAAI,CAAM;oBAEtB,UAAK,GAAW,4BAA4B,CAAC;oBAC7C,aAAQ,GAAW,IAAI,CAAC,KAAK,GAAG,sDAAsD,CAAC;gBAH9D,CAAC;gBAKlC,mCAAS,GAAT,UAAU,MAAc;oBACpB,IAAI,OAAO,GAAG,IAAI,cAAO,CAAC;wBACtB,cAAc,EAAE,kBAAkB;wBAClC,eAAe,EAAE,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;qBAClD,CAAC,CAAC;oBACH,IAAI,OAAO,GAAG,IAAI,qBAAc,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;oBACvD,MAAM,CAAC,IAAI,CAAC,IAAI;yBACX,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAM,EAAE,OAAO,CAAC;yBACpC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAe,GAAG,CAAC,IAAI,EAAE,EAAzB,CAAyB,CAAC;yBACrC,EAAE,CAAC,UAAA,IAAI,IAAI,OAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAjB,CAAiB,CAAC,CAAC,iCAAiC;yBAC/D,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACjC,CAAC;gBAEO,qCAAW,GAAnB,UAAqB,KAAe;oBAChC,mFAAmF;oBACnF,4CAA4C;oBAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM,CAAC,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,cAAc,CAAC,CAAC;gBAClE,CAAC;gBAzBL;oBAAC,iBAAU,EAAE;;mCAAA;gBA0Bb,sBAAC;YAAD,CAAC,AAzBD,IAyBC;YAzBD,6CAyBC,CAAA"}
|
|
@@ -1,65 +0,0 @@
|
|||||||
System.register(["angular2/core"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var SideMenu;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
SideMenu = (function () {
|
|
||||||
function SideMenu(el) {
|
|
||||||
this.el = el;
|
|
||||||
this.title = '';
|
|
||||||
this.direction = 'left';
|
|
||||||
this.isOpen = false;
|
|
||||||
}
|
|
||||||
SideMenu.prototype.onClick = function (event) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
};
|
|
||||||
SideMenu.prototype.toggle = function () {
|
|
||||||
this.isOpen = !this.isOpen;
|
|
||||||
};
|
|
||||||
SideMenu.prototype.open = function () {
|
|
||||||
this.isOpen = true;
|
|
||||||
};
|
|
||||||
SideMenu.prototype.close = function () {
|
|
||||||
this.isOpen = false;
|
|
||||||
};
|
|
||||||
__decorate([
|
|
||||||
core_1.Input(),
|
|
||||||
__metadata('design:type', String)
|
|
||||||
], SideMenu.prototype, "title", void 0);
|
|
||||||
__decorate([
|
|
||||||
core_1.Input(),
|
|
||||||
__metadata('design:type', String)
|
|
||||||
], SideMenu.prototype, "direction", void 0);
|
|
||||||
SideMenu = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'side-menu',
|
|
||||||
host: {
|
|
||||||
'(click)': 'onClick($event)',
|
|
||||||
},
|
|
||||||
template: "\n <nav class=\"cbp-spmenu cbp-spmenu-vertical cbp-spmenu-{{direction}} inline-menu\" \n [ngClass]=\"{ 'cbp-spmenu-open': isOpen }\">\n <h3>\n {{title}}\n <a href=\"#\" class=\"menu-close pull-right\" (click)=\"close()\">\n <i class=\"glyphicon glyphicon-remove\"></i>\n </a>\n </h3>\n <ng-content></ng-content>\n </nav>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [core_1.ElementRef])
|
|
||||||
], SideMenu);
|
|
||||||
return SideMenu;
|
|
||||||
}());
|
|
||||||
exports_1("SideMenu", SideMenu);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=SideMenu.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"SideMenu.js","sourceRoot":"","sources":["SideMenu.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAqBA;gBAKI,kBAAoB,EAAc;oBAAd,OAAE,GAAF,EAAE,CAAY;oBAJzB,UAAK,GAAW,EAAE,CAAC;oBACnB,cAAS,GAAW,MAAM,CAAC;oBACpC,WAAM,GAAY,KAAK,CAAC;gBAIxB,CAAC;gBAED,0BAAO,GAAP,UAAQ,KAAK;oBACT,KAAK,CAAC,cAAc,EAAE,CAAC;oBACvB,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC5B,CAAC;gBAED,yBAAM,GAAN;oBACI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC/B,CAAC;gBAED,uBAAI,GAAJ;oBACI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gBACvB,CAAC;gBAED,wBAAK,GAAL;oBACI,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;gBACxB,CAAC;gBAvBD;oBAAC,YAAK,EAAE;;uDAAA;gBACR;oBAAC,YAAK,EAAE;;2DAAA;gBArBZ;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,WAAW;wBACrB,IAAI,EAAE;4BACF,SAAS,EAAE,iBAAiB;yBAE/B;wBACD,QAAQ,EAAE,kcAWT;qBACJ,CAAC;;4BAAA;gBA0BF,eAAC;YAAD,CAAC,AAzBD,IAyBC;YAzBD,+BAyBC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|||||||
System.register([], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var DocumentEntity;
|
|
||||||
return {
|
|
||||||
setters:[],
|
|
||||||
execute: function() {
|
|
||||||
DocumentEntity = (function () {
|
|
||||||
function DocumentEntity() {
|
|
||||||
}
|
|
||||||
return DocumentEntity;
|
|
||||||
}());
|
|
||||||
exports_1("DocumentEntity", DocumentEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=document.entity.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"document.entity.js","sourceRoot":"","sources":["document.entity.ts"],"names":[],"mappings":";;;;;;;YAGA;gBAAA;gBA6BA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AA7BD,IA6BC;YA7BD,2CA6BC,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|||||||
System.register([], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var FolderEntity;
|
|
||||||
return {
|
|
||||||
setters:[],
|
|
||||||
execute: function() {
|
|
||||||
// contains only limited subset of available fields
|
|
||||||
FolderEntity = (function () {
|
|
||||||
function FolderEntity() {
|
|
||||||
}
|
|
||||||
return FolderEntity;
|
|
||||||
}());
|
|
||||||
exports_1("FolderEntity", FolderEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=folder.entity.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"folder.entity.js","sourceRoot":"","sources":["folder.entity.ts"],"names":[],"mappings":";;;;;;;YAEA,mDAAmD;YACnD;gBAAA;gBAEA,CAAC;gBAAD,mBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uCAEC,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|||||||
System.register([], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var LocationEntity, LocationParentEntity;
|
|
||||||
return {
|
|
||||||
setters:[],
|
|
||||||
execute: function() {
|
|
||||||
// contains only limited subset of available fields
|
|
||||||
LocationEntity = (function () {
|
|
||||||
function LocationEntity() {
|
|
||||||
}
|
|
||||||
return LocationEntity;
|
|
||||||
}());
|
|
||||||
exports_1("LocationEntity", LocationEntity);
|
|
||||||
LocationParentEntity = (function () {
|
|
||||||
function LocationParentEntity() {
|
|
||||||
}
|
|
||||||
return LocationParentEntity;
|
|
||||||
}());
|
|
||||||
exports_1("LocationParentEntity", LocationParentEntity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=location.entity.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"location.entity.js","sourceRoot":"","sources":["location.entity.ts"],"names":[],"mappings":";;;;;;;YAAA,mDAAmD;YACnD;gBAAA;gBAQA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AARD,IAQC;YARD,2CAQC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,2BAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uDAEC,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|||||||
System.register(["angular2/core"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var AppNavBar;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
AppNavBar = (function () {
|
|
||||||
function AppNavBar() {
|
|
||||||
}
|
|
||||||
AppNavBar = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'app-navbar',
|
|
||||||
template: "\n <nav class=\"navbar navbar-default navbar-fixed-top\">\n <div class=\"container-fluid\">\n <ng-content></ng-content>\n </div>\n </nav>\n ",
|
|
||||||
styles: [
|
|
||||||
"\n :host .image-button {\n padding-bottom: 10px;\n padding-top: 12px;\n max-height: 50px;\n }\n "
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], AppNavBar);
|
|
||||||
return AppNavBar;
|
|
||||||
}());
|
|
||||||
exports_1("AppNavBar", AppNavBar);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=navbar.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"navbar.component.js","sourceRoot":"","sources":["navbar.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAqBA;gBAAA;gBAEA,CAAC;gBArBD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,YAAY;wBACtB,QAAQ,EAAE,oMAMT;wBACD,MAAM,EAAE;4BACJ,wJAMC;yBACJ;qBACJ,CAAC;;6BAAA;gBAGF,gBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,iCAEC,CAAA"}
|
|
71
demo-shell-ng2/dist/app/components/core/tabs.js
vendored
71
demo-shell-ng2/dist/app/components/core/tabs.js
vendored
@@ -1,71 +0,0 @@
|
|||||||
System.register(['angular2/core'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var Tabs, Tab;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
Tabs = (function () {
|
|
||||||
function Tabs() {
|
|
||||||
this.tabs = [];
|
|
||||||
}
|
|
||||||
Tabs.prototype.selectTab = function (tab, $event) {
|
|
||||||
this.tabs.forEach(function (tab) {
|
|
||||||
tab.active = false;
|
|
||||||
});
|
|
||||||
tab.active = true;
|
|
||||||
if ($event) {
|
|
||||||
$event.preventDefault();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Tabs.prototype.addTab = function (tab) {
|
|
||||||
if (this.tabs.length === 0) {
|
|
||||||
tab.active = true;
|
|
||||||
}
|
|
||||||
this.tabs.push(tab);
|
|
||||||
};
|
|
||||||
Tabs = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'tabs',
|
|
||||||
template: "\n <ul class=\"nav nav-tabs\">\n <li *ngFor=\"#tab of tabs\" (click)=\"selectTab(tab, $event)\" [class.active]=\"tab.active\">\n <a href=\"#\">{{tab.title}}</a>\n </li>\n </ul>\n <ng-content></ng-content>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Tabs);
|
|
||||||
return Tabs;
|
|
||||||
}());
|
|
||||||
exports_1("Tabs", Tabs);
|
|
||||||
Tab = (function () {
|
|
||||||
function Tab(tabs) {
|
|
||||||
tabs.addTab(this);
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
core_1.Input('tabTitle'),
|
|
||||||
__metadata('design:type', Object)
|
|
||||||
], Tab.prototype, "title", void 0);
|
|
||||||
Tab = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'tab',
|
|
||||||
template: "\n <div [hidden]=\"!active\">\n <ng-content></ng-content>\n </div>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [Tabs])
|
|
||||||
], Tab);
|
|
||||||
return Tab;
|
|
||||||
}());
|
|
||||||
exports_1("Tab", Tab);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["tabs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAaA;gBAAA;oBACI,SAAI,GAAU,EAAE,CAAC;gBAkBrB,CAAC;gBAhBG,wBAAS,GAAT,UAAU,GAAO,EAAE,MAAM;oBACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;wBACjB,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC;oBACvB,CAAC,CAAC,CAAC;oBACH,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC;oBAClB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC5B,CAAC;gBACL,CAAC;gBAED,qBAAM,GAAN,UAAO,GAAO;oBACV,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;wBACzB,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC;oBACtB,CAAC;oBACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACxB,CAAC;gBA7BL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,MAAM;wBAChB,QAAQ,EAAE,8QAOT;qBACJ,CAAC;;wBAAA;gBAoBF,WAAC;YAAD,CAAC,AAnBD,IAmBC;YAnBD,uBAmBC,CAAA;YAWD;gBAII,aAAY,IAAU;oBAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC;gBALD;oBAAC,YAAK,CAAC,UAAU,CAAC;;kDAAA;gBATtB;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,KAAK;wBACf,QAAQ,EAAE,mGAIT;qBACJ,CAAC;;uBAAA;gBAQF,UAAC;YAAD,CAAC,AAPD,IAOC;YAPD,qBAOC,CAAA"}
|
|
@@ -1,95 +0,0 @@
|
|||||||
System.register(["angular2/core", "./alfresco.service"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, alfresco_service_1;
|
|
||||||
var DocumentList;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (alfresco_service_1_1) {
|
|
||||||
alfresco_service_1 = alfresco_service_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
DocumentList = (function () {
|
|
||||||
function DocumentList(_alfrescoService) {
|
|
||||||
this._alfrescoService = _alfrescoService;
|
|
||||||
// example: <alfresco-document-list [navigate]="false"></alfresco-document-list>
|
|
||||||
this.navigate = true;
|
|
||||||
this.rootFolderPath = 'swsdp/documentLibrary';
|
|
||||||
this.currentFolderPath = 'swsdp/documentLibrary';
|
|
||||||
this.route = [];
|
|
||||||
}
|
|
||||||
DocumentList.prototype.canNavigateParent = function () {
|
|
||||||
return this.currentFolderPath !== this.rootFolderPath;
|
|
||||||
};
|
|
||||||
DocumentList.prototype.ngOnInit = function () {
|
|
||||||
this.route.push(this.rootFolderPath);
|
|
||||||
this.displayFolderContent(this.rootFolderPath);
|
|
||||||
};
|
|
||||||
DocumentList.prototype.displayFolderContent = function (path) {
|
|
||||||
var _this = this;
|
|
||||||
this.currentFolderPath = path;
|
|
||||||
this._alfrescoService
|
|
||||||
.getFolder(path)
|
|
||||||
.subscribe(function (folder) { return _this.folder = folder; }, function (error) { return _this.errorMessage = error; });
|
|
||||||
};
|
|
||||||
DocumentList.prototype.onNavigateParentClick = function ($event) {
|
|
||||||
if ($event) {
|
|
||||||
$event.preventDefault();
|
|
||||||
}
|
|
||||||
if (this.navigate) {
|
|
||||||
this.route.pop();
|
|
||||||
var parent = this.route.length > 0 ? this.route[this.route.length - 1] : this.rootFolderPath;
|
|
||||||
if (parent) {
|
|
||||||
this.displayFolderContent(parent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
DocumentList.prototype.onItemClick = function (item, $event) {
|
|
||||||
if ($event) {
|
|
||||||
$event.preventDefault();
|
|
||||||
}
|
|
||||||
if (this.navigate && item) {
|
|
||||||
if (item.isFolder) {
|
|
||||||
var path = this.getItemPath(item);
|
|
||||||
this.route.push(path);
|
|
||||||
this.displayFolderContent(path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
DocumentList.prototype.getItemPath = function (item) {
|
|
||||||
var container = item.location.container;
|
|
||||||
var path = item.location.path !== '/' ? (item.location.path + '/') : '/';
|
|
||||||
var relativePath = container + path + item.fileName;
|
|
||||||
return item.location.site + '/' + relativePath;
|
|
||||||
};
|
|
||||||
__decorate([
|
|
||||||
core_1.Input(),
|
|
||||||
__metadata('design:type', Boolean)
|
|
||||||
], DocumentList.prototype, "navigate", void 0);
|
|
||||||
DocumentList = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'alfresco-document-list',
|
|
||||||
template: "\n <div *ngIf=\"folder\" class=\"list-group\">\n <a href=\"#\" *ngIf=\"canNavigateParent()\" (click)=\"onNavigateParentClick($event)\" class=\"list-group-item\">\n <i class=\"fa fa-level-up\"></i> ...\n </a>\n <a href=\"#\" *ngFor=\"#document of folder.items\" (click)=\"onItemClick(document, $event)\" class=\"list-group-item\">\n <i *ngIf=\"document.isFolder\" class=\"fa fa-folder-o\"></i>\n {{document.displayName}}\n </a>\n </div>\n ",
|
|
||||||
providers: [alfresco_service_1.AlfrescoService]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [alfresco_service_1.AlfrescoService])
|
|
||||||
], DocumentList);
|
|
||||||
return DocumentList;
|
|
||||||
}());
|
|
||||||
exports_1("DocumentList", DocumentList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=document-list.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"document-list.component.js","sourceRoot":"","sources":["document-list.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAoBA;gBAgBI,sBACY,gBAAiC;oBAAjC,qBAAgB,GAAhB,gBAAgB,CAAiB;oBAf7C,gFAAgF;oBACvE,aAAQ,GAAY,IAAI,CAAC;oBAElC,mBAAc,GAAW,uBAAuB,CAAC;oBACjD,sBAAiB,GAAW,uBAAuB,CAAC;oBAI5C,UAAK,GAAa,EAAE,CAAC;gBAQ1B,CAAC;gBANJ,wCAAiB,GAAjB;oBACI,MAAM,CAAC,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,cAAc,CAAC;gBAC1D,CAAC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AAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC;wBACxB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;4BAChB,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;4BAClC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;4BACtB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;wBACpC,CAAC;oBACL,CAAC;gBACL,CAAC;gBAEO,kCAAW,GAAnB,UAAoB,IAAoB;oBACpC,IAAI,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;oBACxC,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAE,GAAG,GAAG,CAAC;oBAC1E,IAAI,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;oBACpD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,GAAG,YAAY,CAAC;gBACnD,CAAC;gBAjED;oBAAC,YAAK,EAAE;;8DAAA;gBAlBZ;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,QAAQ,EAAE,kiBAUT;wBACD,SAAS,EAAE,CAAC,kCAAe,CAAC;qBAC/B,CAAC;;gCAAA;gBAsEF,mBAAC;YAAD,CAAC,AArED,IAqEC;YArED,uCAqEC,CAAA"}
|
|
@@ -1,113 +0,0 @@
|
|||||||
System.register(["angular2/core"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var FormDesignSurface;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
FormDesignSurface = (function () {
|
|
||||||
function FormDesignSurface(elementRef) {
|
|
||||||
this.elementRef = elementRef;
|
|
||||||
//el.nativeElement.style.backgroundColor = 'yellow';
|
|
||||||
}
|
|
||||||
Object.defineProperty(FormDesignSurface.prototype, "selectedWidget", {
|
|
||||||
get: function () {
|
|
||||||
return this._selectedWidget;
|
|
||||||
},
|
|
||||||
set: function (val) {
|
|
||||||
if (this.selectedWidget && this.selectedWidget != val) {
|
|
||||||
this._selectedWidget.classList.remove('selected');
|
|
||||||
}
|
|
||||||
this._selectedWidget = val;
|
|
||||||
if (this._selectedWidget) {
|
|
||||||
this._selectedWidget.classList.add('selected');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
enumerable: true,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
FormDesignSurface.prototype.ngOnInit = function () {
|
|
||||||
// Create root container
|
|
||||||
var container = widgets.container.create();
|
|
||||||
container.dataset.widgetType = 'container';
|
|
||||||
this.setupWidget(container);
|
|
||||||
this.elementRef.nativeElement.appendChild(container);
|
|
||||||
};
|
|
||||||
FormDesignSurface.prototype.setupWidget = function (widget) {
|
|
||||||
// initialize all drop placeholders
|
|
||||||
var dropPlaceholders = widget.querySelectorAll('.drop-zone');
|
|
||||||
for (var i = 0; i < dropPlaceholders.length; i++) {
|
|
||||||
var placeholder = dropPlaceholders[i];
|
|
||||||
var z = new dropZone({
|
|
||||||
element: placeholder,
|
|
||||||
onDrop: this.onWidgetDrop.bind(this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// initialize clicks
|
|
||||||
if (widget.dataset['widgetId']) {
|
|
||||||
widget.addEventListener('mouseup', this.onWidgetMouseUp.bind(this), false);
|
|
||||||
}
|
|
||||||
// wire child element clicks
|
|
||||||
var nested = widget.querySelectorAll('[data-widget-id]');
|
|
||||||
for (var x = 0; x < nested.length; x++) {
|
|
||||||
nested[x].addEventListener('mouseup', this.onWidgetMouseUp.bind(this), false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FormDesignSurface.prototype.onWidgetMouseUp = function (e) {
|
|
||||||
var wid = e.currentTarget.dataset.widgetId;
|
|
||||||
if (wid) {
|
|
||||||
console.log('Selected Widget Id: ' + wid);
|
|
||||||
this.selectedWidget = e.currentTarget;
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FormDesignSurface.prototype.onWidgetDrop = function (dz, opts) {
|
|
||||||
var widgetType = opts.widgetType;
|
|
||||||
if (widgetType) {
|
|
||||||
var component = widgets[widgetType];
|
|
||||||
if (component) {
|
|
||||||
var widget = component.create();
|
|
||||||
if (widget) {
|
|
||||||
widget.dataset.widgetType = widgetType;
|
|
||||||
this.setupWidget(widget);
|
|
||||||
// insert widget before drop zone
|
|
||||||
var container = dz.parentElement;
|
|
||||||
container.insertBefore(widget, dz);
|
|
||||||
// create new drop zone
|
|
||||||
var zone = new dropZone({
|
|
||||||
onDrop: this.onWidgetDrop.bind(this),
|
|
||||||
minHeight: '5px'
|
|
||||||
});
|
|
||||||
// insert new drop zone before widget
|
|
||||||
container.insertBefore(zone.element, widget);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FormDesignSurface = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'form-design-surface',
|
|
||||||
template: '<div></div>'
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [core_1.ElementRef])
|
|
||||||
], FormDesignSurface);
|
|
||||||
return FormDesignSurface;
|
|
||||||
}());
|
|
||||||
exports_1("FormDesignSurface", FormDesignSurface);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=form-design-surface.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"form-design-surface.component.js","sourceRoot":"","sources":["form-design-surface.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YASA;gBAII,2BAAmB,UAAsB;oBAAtB,eAAU,GAAV,UAAU,CAAY;oBACrC,oDAAoD;gBACxD,CAAC;gBAED,sBAAI,6CAAc;yBAAlB;wBACI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;oBAChC,CAAC;yBAED,UAAmB,GAAY;wBAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,IAAI,GAAG,CAAC,CAAC,CAAC;4BACpD,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;wBACtD,CAAC;wBACD,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;wBAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;4BACvB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;wBACnD,CAAC;oBACL,CAAC;;;mBAVA;gBAYD,oCAAQ,GAAR;oBACI,wBAAwB;oBACxB,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;oBAC3C,SAAS,CAAC,OAAO,CAAC,UAAU,GAAG,WAAW,CAAC;oBAC3C,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,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AAE,aAAa;qBAC1B,CAAC;;qCAAA;gBAuFF,wBAAC;YAAD,CAAC,AAtFD,IAsFC;YAtFD,iDAsFC,CAAA"}
|
|
@@ -1,66 +0,0 @@
|
|||||||
System.register(["angular2/core", "../services/form-service"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, form_service_1;
|
|
||||||
var FormDesignToolbar;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (form_service_1_1) {
|
|
||||||
form_service_1 = form_service_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
FormDesignToolbar = (function () {
|
|
||||||
function FormDesignToolbar(_formService) {
|
|
||||||
this._formService = _formService;
|
|
||||||
}
|
|
||||||
FormDesignToolbar.prototype.ngOnInit = function () {
|
|
||||||
this.categories = this._formService.getWidgetCategories();
|
|
||||||
// Stores drag ghost elements
|
|
||||||
this.dragCache = document.getElementById('drag-images-cache');
|
|
||||||
};
|
|
||||||
FormDesignToolbar.prototype.onElementDragStart = function (e) {
|
|
||||||
e.dataTransfer.effectAllowed = 'move';
|
|
||||||
var widgetType = e.target.dataset.widgetType;
|
|
||||||
var payload = { "widgetType": widgetType };
|
|
||||||
e.dataTransfer.setData('text', JSON.stringify(payload));
|
|
||||||
//var dragImage = getDragImage(widgetType);
|
|
||||||
var dragImage = this._formService.getDragImage(widgetType);
|
|
||||||
this.dragCache.appendChild(dragImage);
|
|
||||||
//e.dataTransfer.setDragImage(dragImage, dragImage.offsetWidth / 2, 0);
|
|
||||||
e.dataTransfer.setDragImage(dragImage, 0, 0);
|
|
||||||
e.stopPropagation();
|
|
||||||
};
|
|
||||||
FormDesignToolbar.prototype.onElementDragEnd = function (e) {
|
|
||||||
if (this.dragCache) {
|
|
||||||
this.dragCache.innerHTML = '';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
FormDesignToolbar = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'form-design-toolbar',
|
|
||||||
providers: [form_service_1.FormService],
|
|
||||||
//encapsulation: ViewEncapsulation.Native,
|
|
||||||
styles: ["\n .category-header {\n color: #555;\n padding: 11px;\n margin: 0;\n background: #e7e7e7;\n cursor: default;\n font-size: 14px;\n font-weight: bold;\n }\n \n a.toolbar-item {\n cursor: move;\n \n display: block;\n color: #777;\n font-size: 1.1em;\n font-weight: 300;\n text-decoration: none;\n \n border-bottom: 1px solid #e7e7e7;\n padding: 1em;\n }\n \n a.toolbar-item:hover {\n color: #555;\n background: #f8f8f8;\n }\n \n a.toolbar-item:active, a.toolbar-item.active {\n color: #fff;\n border-color: #428bca;\n background-color: #428bca;\n }\n "],
|
|
||||||
template: "\n <template ngFor #category [ngForOf]=\"categories\">\n <h3 class=\"category-header\">{{category.name}}</h3>\n <a *ngFor=\"#widget of category.widgets\" class=\"toolbar-item\" attr.data-widget-type=\"{{widget.type}}\" draggable=\"true\"\n (dragstart)=\"onElementDragStart($event)\" (dragend)=\"onElementDragEnd($event)\">\n <i class=\"{{widget.iconClass || 'fa fa-puzzle-piece'}}\"></i> {{widget.name}}\n </a>\n </template>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [form_service_1.FormService])
|
|
||||||
], FormDesignToolbar);
|
|
||||||
return FormDesignToolbar;
|
|
||||||
}());
|
|
||||||
exports_1("FormDesignToolbar", FormDesignToolbar);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=form-design-toolbar.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"form-design-toolbar.component.js","sourceRoot":"","sources":["form-design-toolbar.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAoDA;gBAKI,2BACY,YAAyB;oBAAzB,iBAAY,GAAZ,YAAY,CAAa;gBAClC,CAAC;gBAEJ,oCAAQ,GAAR;oBACI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;oBAC1D,6BAA6B;oBAC7B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;gBAClE,CAAC;gBAED,8CAAkB,GAAlB,UAAmB,CAAC;oBAChB,CAAC,CAAC,YAAY,CAAC,aAAa,GAAG,MAAM,CAAC;oBAEtC,IAAI,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;oBAE7C,IAAI,OAAO,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;oBAC3C,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;oBAExD,2CAA2C;oBAC3C,IAAI,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;oBAC3D,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;oBACtC,uEAAuE;oBACvE,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAE7C,CAAC,CAAC,eAAe,EAAE,CAAC;gBACxB,CAAC;gBAED,4CAAgB,GAAhB,UAAiB,CAAC;oBACd,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;wBACjB,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;oBAClC,CAAC;gBACL,CAAC;gBArFL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,qBAAqB;wBAC/B,SAAS,EAAE,CAAC,0BAAW,CAAC;wBACxB,0CAA0C;wBAC1C,MAAM,EAAE,CAAC,w2BAkCR,CAAC;wBACF,QAAQ,EAAE,4fAQT;qBACJ,CAAC;;qCAAA;gBAuCF,wBAAC;YAAD,CAAC,AAtCD,IAsCC;YAtCD,iDAsCC,CAAA"}
|
|
41
demo-shell-ng2/dist/app/components/forms.view.js
vendored
41
demo-shell-ng2/dist/app/components/forms.view.js
vendored
@@ -1,41 +0,0 @@
|
|||||||
System.register(['angular2/core', "./form-design-surface.component"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, form_design_surface_component_1;
|
|
||||||
var FormsView;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (form_design_surface_component_1_1) {
|
|
||||||
form_design_surface_component_1 = form_design_surface_component_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
FormsView = (function () {
|
|
||||||
function FormsView() {
|
|
||||||
}
|
|
||||||
FormsView = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'forms-view',
|
|
||||||
template: "\n <div class=\"container\" style=\"width:970px;\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <!-- Design surface -->\n <form-design-surface></form-design-surface>\n </div>\n </div>\n </div>\n ",
|
|
||||||
directives: [form_design_surface_component_1.FormDesignSurface]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], FormsView);
|
|
||||||
return FormsView;
|
|
||||||
}());
|
|
||||||
exports_1("FormsView", FormsView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=forms.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"forms.view.js","sourceRoot":"","sources":["forms.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAiBA;gBAAA;gBAKA,CAAC;gBAnBD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,YAAY;wBACtB,QAAQ,EAAE,wTAST;wBACD,UAAU,EAAE,CAAC,iDAAiB,CAAC;qBAClC,CAAC;;6BAAA;gBAMF,gBAAC;YAAD,CAAC,AALD,IAKC;YALD,iCAKC,CAAA"}
|
|
38
demo-shell-ng2/dist/app/components/home.view.js
vendored
38
demo-shell-ng2/dist/app/components/home.view.js
vendored
@@ -1,38 +0,0 @@
|
|||||||
System.register(['angular2/core'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var HomeView;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
HomeView = (function () {
|
|
||||||
function HomeView() {
|
|
||||||
}
|
|
||||||
HomeView = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'home-view',
|
|
||||||
template: "\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h1>Home View</h1>\n </div>\n </div>\n </div>\n ",
|
|
||||||
directives: []
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], HomeView);
|
|
||||||
return HomeView;
|
|
||||||
}());
|
|
||||||
exports_1("HomeView", HomeView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=home.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"home.view.js","sourceRoot":"","sources":["home.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAeA;gBAAA;gBACA,CAAC;gBAdD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,WAAW;wBACrB,QAAQ,EAAE,2NAQT;wBACD,UAAU,EAAE,EAAE;qBACjB,CAAC;;4BAAA;gBAEF,eAAC;YAAD,CAAC,AADD,IACC;YADD,+BACC,CAAA"}
|
|
62
demo-shell-ng2/dist/app/components/login.js
vendored
62
demo-shell-ng2/dist/app/components/login.js
vendored
@@ -1,62 +0,0 @@
|
|||||||
System.register(["angular2/core", "angular2/router", "angular2/common", "../services/authentication"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, router_1, common_1, authentication_1;
|
|
||||||
var Login;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (common_1_1) {
|
|
||||||
common_1 = common_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
Login = (function () {
|
|
||||||
function Login(fb, auth, router) {
|
|
||||||
this.auth = auth;
|
|
||||||
this.router = router;
|
|
||||||
this.error = false;
|
|
||||||
this.form = fb.group({
|
|
||||||
username: ['', common_1.Validators.required],
|
|
||||||
password: ['', common_1.Validators.required]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Login.prototype.onSubmit = function (value, event) {
|
|
||||||
var _this = this;
|
|
||||||
//event.preventDefault();
|
|
||||||
this.auth.login(value.username, value.password)
|
|
||||||
.subscribe(
|
|
||||||
//(token: any) => this.router.navigate(['../Home']),
|
|
||||||
function (token) { return _this.router.navigate(['Home']); }, function () { _this.error = true; });
|
|
||||||
};
|
|
||||||
Login = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'login',
|
|
||||||
directives: [router_1.ROUTER_DIRECTIVES, common_1.FORM_DIRECTIVES],
|
|
||||||
template: "\n <div class=\"row\">\n <div class=\"col-md-4 col-md-offset-4\">\n <form [ngFormModel]=\"form\" (submit)=\"onSubmit(form.value, $event)\">\n <div *ngIf=\"error\">Check your password</div>\n <div class=\"form-group\">\n <label for=\"username\">Username</label>\n <input class=\"form-control\" type=\"text\" ngControl=\"username\">\n </div>\n <div class=\"form-group\">\n <label for=\"password\">Password</label>\n <input class=\"form-control\" type=\"password\" ngControl=\"password\">\n </div>\n <button type=\"submit\" class=\"btn btn-default\" [disabled]=\"!form.valid\">Login</button>\n </form>\n </div>\n </div>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [common_1.FormBuilder, authentication_1.Authentication, router_1.Router])
|
|
||||||
], Login);
|
|
||||||
return Login;
|
|
||||||
}());
|
|
||||||
exports_1("Login", Login);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=login.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"login.js","sourceRoot":"","sources":["login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2BA;gBAII,eAAY,EAAe,EAAS,IAAoB,EAAS,MAAc;oBAA3C,SAAI,GAAJ,IAAI,CAAgB;oBAAS,WAAM,GAAN,MAAM,CAAQ;oBAF/E,UAAK,GAAY,KAAK,CAAC;oBAGnB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC;wBACjB,QAAQ,EAAG,CAAC,EAAE,EAAE,mBAAU,CAAC,QAAQ,CAAC;wBACpC,QAAQ,EAAG,CAAC,EAAE,EAAE,mBAAU,CAAC,QAAQ,CAAC;qBACvC,CAAC,CAAC;gBACP,CAAC;gBAED,wBAAQ,GAAR,UAAS,KAAU,EAAE,KAAK;oBAA1B,iBAQC;oBAPG,yBAAyB;oBACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;yBAC1C,SAAS;oBACN,oDAAoD;oBACpD,UAAC,KAAU,IAAK,OAAA,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAA9B,CAA8B,EAC9C,cAAQ,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAC/B,CAAC;gBACV,CAAC;gBAzCL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,OAAO;wBACjB,UAAU,EAAE,CAAC,0BAAiB,EAAE,wBAAe,CAAC;wBAChD,QAAQ,EAAE,g4BAiBT;qBACJ,CAAC;;yBAAA;gBAqBF,YAAC;YAAD,CAAC,AApBD,IAoBC;YApBD,yBAoBC,CAAA"}
|
|
41
demo-shell-ng2/dist/app/components/page1.view.js
vendored
41
demo-shell-ng2/dist/app/components/page1.view.js
vendored
@@ -1,41 +0,0 @@
|
|||||||
System.register(["angular2/core", "./document-list.component"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, document_list_component_1;
|
|
||||||
var Page1View;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (document_list_component_1_1) {
|
|
||||||
document_list_component_1 = document_list_component_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
Page1View = (function () {
|
|
||||||
function Page1View() {
|
|
||||||
}
|
|
||||||
Page1View = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'page1-view',
|
|
||||||
template: "\n <div class=\"container\">\n <div class=\"row\">\n <alfresco-document-list></alfresco-document-list>\n </div>\n </div>\n ",
|
|
||||||
directives: [document_list_component_1.DocumentList]
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Page1View);
|
|
||||||
return Page1View;
|
|
||||||
}());
|
|
||||||
exports_1("Page1View", Page1View);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=page1.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"page1.view.js","sourceRoot":"","sources":["page1.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAaA;gBAAA;gBAEA,CAAC;gBAbD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,YAAY;wBACtB,QAAQ,EAAE,mLAMT;wBACD,UAAU,EAAE,CAAC,sCAAY,CAAC;qBAC7B,CAAC;;6BAAA;gBAGF,gBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,iCAEC,CAAA"}
|
|
38
demo-shell-ng2/dist/app/components/page2.view.js
vendored
38
demo-shell-ng2/dist/app/components/page2.view.js
vendored
@@ -1,38 +0,0 @@
|
|||||||
System.register(["angular2/core"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var Page2View;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
Page2View = (function () {
|
|
||||||
function Page2View() {
|
|
||||||
this.username = 'Unicorn';
|
|
||||||
}
|
|
||||||
Page2View = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'page2-view',
|
|
||||||
template: "\n <div class=\"container\">\n <div class=\"row\">\n <h1>Page 2</h1>\n <input [(ngModel)]=\"username\">\n <span>Username: {{username}}</span>\n <hello-world [text]=\"username\"></hello-world>\n <hello-world text=\"test user\"></hello-world>\n <alfresco-login (submit)=methodAngular></alfresco-login>\n </div>\n </div>\n "
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Page2View);
|
|
||||||
return Page2View;
|
|
||||||
}());
|
|
||||||
exports_1("Page2View", Page2View);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=page2.view.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"page2.view.js","sourceRoot":"","sources":["page2.view.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAgBA;gBAAA;oBACI,aAAQ,GAAW,SAAS,CAAC;gBACjC,CAAC;gBAjBD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,YAAY;wBACtB,QAAQ,EAAE,ocAWT;qBACJ,CAAC;;6BAAA;gBAGF,gBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,iCAEC,CAAA"}
|
|
7
demo-shell-ng2/dist/app/css/app.css
vendored
7
demo-shell-ng2/dist/app/css/app.css
vendored
@@ -1,7 +0,0 @@
|
|||||||
body { padding-top: 70px; }
|
|
||||||
|
|
||||||
/* Utils */
|
|
||||||
|
|
||||||
.p-10 {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
25
demo-shell-ng2/dist/app/css/theme/navbar.css
vendored
25
demo-shell-ng2/dist/app/css/theme/navbar.css
vendored
File diff suppressed because one or more lines are too long
BIN
demo-shell-ng2/dist/app/img/blank.gif
vendored
BIN
demo-shell-ng2/dist/app/img/blank.gif
vendored
Binary file not shown.
Before Width: | Height: | Size: 43 B |
178
demo-shell-ng2/dist/app/js/xml2json.js
vendored
178
demo-shell-ng2/dist/app/js/xml2json.js
vendored
@@ -1,178 +0,0 @@
|
|||||||
/* This work is licensed under Creative Commons GNU LGPL License.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
License: http://creativecommons.org/licenses/LGPL/2.1/
|
|
||||||
Version: 0.9
|
|
||||||
Author: Stefan Goessner/2006
|
|
||||||
Web: http://goessner.net/
|
|
||||||
*/
|
|
||||||
var parseXml;
|
|
||||||
|
|
||||||
if (typeof window.DOMParser != "undefined") {
|
|
||||||
parseXml = function(xmlStr) {
|
|
||||||
return ( new window.DOMParser() ).parseFromString(xmlStr, "text/xml");
|
|
||||||
};
|
|
||||||
} else if (typeof window.ActiveXObject != "undefined" &&
|
|
||||||
new window.ActiveXObject("Microsoft.XMLDOM")) {
|
|
||||||
parseXml = function(xmlStr) {
|
|
||||||
var xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
|
|
||||||
xmlDoc.async = "false";
|
|
||||||
xmlDoc.loadXML(xmlStr);
|
|
||||||
return xmlDoc;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
throw new Error("No XML parser found");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function xml2json(xml, tab) {
|
|
||||||
var X = {
|
|
||||||
toObj: function(xml) {
|
|
||||||
var o = {};
|
|
||||||
if (xml.nodeType==1) { // element node ..
|
|
||||||
if (xml.attributes.length) // element with attributes ..
|
|
||||||
for (var i=0; i<xml.attributes.length; i++)
|
|
||||||
o["@"+xml.attributes[i].nodeName] = (xml.attributes[i].nodeValue||"").toString();
|
|
||||||
if (xml.firstChild) { // element has child nodes ..
|
|
||||||
var textChild=0, cdataChild=0, hasElementChild=false;
|
|
||||||
for (var n=xml.firstChild; n; n=n.nextSibling) {
|
|
||||||
if (n.nodeType==1) hasElementChild = true;
|
|
||||||
else if (n.nodeType==3 && n.nodeValue.match(/[^ \f\n\r\t\v]/)) textChild++; // non-whitespace text
|
|
||||||
else if (n.nodeType==4) cdataChild++; // cdata section node
|
|
||||||
}
|
|
||||||
if (hasElementChild) {
|
|
||||||
if (textChild < 2 && cdataChild < 2) { // structured element with evtl. a single text or/and cdata node ..
|
|
||||||
X.removeWhite(xml);
|
|
||||||
for (var n=xml.firstChild; n; n=n.nextSibling) {
|
|
||||||
if (n.nodeType == 3) // text node
|
|
||||||
o["#text"] = X.escape(n.nodeValue);
|
|
||||||
else if (n.nodeType == 4) // cdata node
|
|
||||||
o["#cdata"] = X.escape(n.nodeValue);
|
|
||||||
else if (o[n.nodeName]) { // multiple occurence of element ..
|
|
||||||
if (o[n.nodeName] instanceof Array)
|
|
||||||
o[n.nodeName][o[n.nodeName].length] = X.toObj(n);
|
|
||||||
else
|
|
||||||
o[n.nodeName] = [o[n.nodeName], X.toObj(n)];
|
|
||||||
}
|
|
||||||
else // first occurence of element..
|
|
||||||
o[n.nodeName] = X.toObj(n);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { // mixed content
|
|
||||||
if (!xml.attributes.length)
|
|
||||||
o = X.escape(X.innerXml(xml));
|
|
||||||
else
|
|
||||||
o["#text"] = X.escape(X.innerXml(xml));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (textChild) { // pure text
|
|
||||||
if (!xml.attributes.length)
|
|
||||||
o = X.escape(X.innerXml(xml));
|
|
||||||
else
|
|
||||||
o["#text"] = X.escape(X.innerXml(xml));
|
|
||||||
}
|
|
||||||
else if (cdataChild) { // cdata
|
|
||||||
if (cdataChild > 1)
|
|
||||||
o = X.escape(X.innerXml(xml));
|
|
||||||
else
|
|
||||||
for (var n=xml.firstChild; n; n=n.nextSibling)
|
|
||||||
o["#cdata"] = X.escape(n.nodeValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!xml.attributes.length && !xml.firstChild) o = null;
|
|
||||||
}
|
|
||||||
else if (xml.nodeType==9) { // document.node
|
|
||||||
o = X.toObj(xml.documentElement);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
alert("unhandled node type: " + xml.nodeType);
|
|
||||||
return o;
|
|
||||||
},
|
|
||||||
toJson: function(o, name, ind) {
|
|
||||||
var json = name ? ("\""+name+"\"") : "";
|
|
||||||
if (o instanceof Array) {
|
|
||||||
for (var i=0,n=o.length; i<n; i++)
|
|
||||||
o[i] = X.toJson(o[i], "", ind+"\t");
|
|
||||||
json += (name?":[":"[") + (o.length > 1 ? ("\n"+ind+"\t"+o.join(",\n"+ind+"\t")+"\n"+ind) : o.join("")) + "]";
|
|
||||||
}
|
|
||||||
else if (o == null)
|
|
||||||
json += (name&&":") + "null";
|
|
||||||
else if (typeof(o) == "object") {
|
|
||||||
var arr = [];
|
|
||||||
for (var m in o)
|
|
||||||
arr[arr.length] = X.toJson(o[m], m, ind+"\t");
|
|
||||||
json += (name?":{":"{") + (arr.length > 1 ? ("\n"+ind+"\t"+arr.join(",\n"+ind+"\t")+"\n"+ind) : arr.join("")) + "}";
|
|
||||||
}
|
|
||||||
else if (typeof(o) == "string")
|
|
||||||
json += (name&&":") + "\"" + o.toString() + "\"";
|
|
||||||
else
|
|
||||||
json += (name&&":") + o.toString();
|
|
||||||
return json;
|
|
||||||
},
|
|
||||||
innerXml: function(node) {
|
|
||||||
var s = ""
|
|
||||||
if ("innerHTML" in node)
|
|
||||||
s = node.innerHTML;
|
|
||||||
else {
|
|
||||||
var asXml = function(n) {
|
|
||||||
var s = "";
|
|
||||||
if (n.nodeType == 1) {
|
|
||||||
s += "<" + n.nodeName;
|
|
||||||
for (var i=0; i<n.attributes.length;i++)
|
|
||||||
s += " " + n.attributes[i].nodeName + "=\"" + (n.attributes[i].nodeValue||"").toString() + "\"";
|
|
||||||
if (n.firstChild) {
|
|
||||||
s += ">";
|
|
||||||
for (var c=n.firstChild; c; c=c.nextSibling)
|
|
||||||
s += asXml(c);
|
|
||||||
s += "</"+n.nodeName+">";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
s += "/>";
|
|
||||||
}
|
|
||||||
else if (n.nodeType == 3)
|
|
||||||
s += n.nodeValue;
|
|
||||||
else if (n.nodeType == 4)
|
|
||||||
s += "<![CDATA[" + n.nodeValue + "]]>";
|
|
||||||
return s;
|
|
||||||
};
|
|
||||||
for (var c=node.firstChild; c; c=c.nextSibling)
|
|
||||||
s += asXml(c);
|
|
||||||
}
|
|
||||||
return s;
|
|
||||||
},
|
|
||||||
escape: function(txt) {
|
|
||||||
return txt.replace(/[\\]/g, "\\\\")
|
|
||||||
.replace(/[\"]/g, '\\"')
|
|
||||||
.replace(/[\n]/g, '\\n')
|
|
||||||
.replace(/[\r]/g, '\\r');
|
|
||||||
},
|
|
||||||
removeWhite: function(e) {
|
|
||||||
e.normalize();
|
|
||||||
for (var n = e.firstChild; n; ) {
|
|
||||||
if (n.nodeType == 3) { // text node
|
|
||||||
if (!n.nodeValue.match(/[^ \f\n\r\t\v]/)) { // pure whitespace text node
|
|
||||||
var nxt = n.nextSibling;
|
|
||||||
e.removeChild(n);
|
|
||||||
n = nxt;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
n = n.nextSibling;
|
|
||||||
}
|
|
||||||
else if (n.nodeType == 1) { // element node
|
|
||||||
X.removeWhite(n);
|
|
||||||
n = n.nextSibling;
|
|
||||||
}
|
|
||||||
else // any other node
|
|
||||||
n = n.nextSibling;
|
|
||||||
}
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xml = parseXml(xml);
|
|
||||||
if (xml.nodeType == 9) // document node
|
|
||||||
xml = xml.documentElement;
|
|
||||||
var json = X.toJson(X.toObj(X.removeWhite(xml)), xml.nodeName, "\t");
|
|
||||||
return "{\n" + tab + (tab ? json.replace(/\t/g, tab) : json.replace(/\t|\n/g, "")) + "\n}";
|
|
||||||
}
|
|
31
demo-shell-ng2/dist/app/main.js
vendored
31
demo-shell-ng2/dist/app/main.js
vendored
@@ -1,31 +0,0 @@
|
|||||||
System.register(['angular2/platform/browser', './app.component', "angular2/router", 'angular2/http', "./services/authentication"], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var browser_1, app_component_1, router_1, http_1, authentication_1;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (browser_1_1) {
|
|
||||||
browser_1 = browser_1_1;
|
|
||||||
},
|
|
||||||
function (app_component_1_1) {
|
|
||||||
app_component_1 = app_component_1_1;
|
|
||||||
},
|
|
||||||
function (router_1_1) {
|
|
||||||
router_1 = router_1_1;
|
|
||||||
},
|
|
||||||
function (http_1_1) {
|
|
||||||
http_1 = http_1_1;
|
|
||||||
},
|
|
||||||
function (authentication_1_1) {
|
|
||||||
authentication_1 = authentication_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
browser_1.bootstrap(app_component_1.AppComponent, [
|
|
||||||
router_1.ROUTER_PROVIDERS,
|
|
||||||
http_1.HTTP_PROVIDERS,
|
|
||||||
authentication_1.Authentication
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=main.js.map
|
|
1
demo-shell-ng2/dist/app/main.js.map
vendored
1
demo-shell-ng2/dist/app/main.js.map
vendored
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;YAMA,mBAAS,CAAC,4BAAY,EAAE;gBACpB,yBAAgB;gBAChB,qBAAc;gBACd,+BAAc;aACjB,CAAC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|||||||
System.register(["angular2/core", 'rxjs/Rx'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1, Rx_1;
|
|
||||||
var Authentication;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
},
|
|
||||||
function (Rx_1_1) {
|
|
||||||
Rx_1 = Rx_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
Authentication = (function () {
|
|
||||||
function Authentication() {
|
|
||||||
this.token = localStorage.getItem('token');
|
|
||||||
}
|
|
||||||
Authentication.prototype.isLoggedIn = function () {
|
|
||||||
return !!localStorage.getItem('token');
|
|
||||||
};
|
|
||||||
Authentication.prototype.login = function (username, password) {
|
|
||||||
if (username === 'test' && password === 'test') {
|
|
||||||
this.token = 'token';
|
|
||||||
localStorage.setItem('token', this.token);
|
|
||||||
return Rx_1.Observable.of('token');
|
|
||||||
}
|
|
||||||
return Rx_1.Observable.throw('authentication failure');
|
|
||||||
};
|
|
||||||
Authentication.prototype.logout = function () {
|
|
||||||
this.token = undefined;
|
|
||||||
localStorage.removeItem('token');
|
|
||||||
return Rx_1.Observable.of(true);
|
|
||||||
};
|
|
||||||
Authentication = __decorate([
|
|
||||||
core_1.Injectable(),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], Authentication);
|
|
||||||
return Authentication;
|
|
||||||
}());
|
|
||||||
exports_1("Authentication", Authentication);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=authentication.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["authentication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAIA;gBAGI;oBACI,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC/C,CAAC;gBAED,mCAAU,GAAV;oBACI,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC3C,CAAC;gBAED,8BAAK,GAAL,UAAM,QAAgB,EAAE,QAAgB;oBACpC,EAAE,CAAC,CAAC,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;wBAC7C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;wBACrB,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;wBAC1C,MAAM,CAAC,eAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;oBAClC,CAAC;oBAED,MAAM,CAAC,eAAU,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;gBACtD,CAAC;gBAED,+BAAM,GAAN;oBACI,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;oBACvB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;oBAEjC,MAAM,CAAC,eAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;gBAC/B,CAAC;gBA3BL;oBAAC,iBAAU,EAAE;;kCAAA;gBA4Bb,qBAAC;YAAD,CAAC,AA3BD,IA2BC;YA3BD,2CA2BC,CAAA"}
|
|
76
demo-shell-ng2/dist/app/services/form-service.js
vendored
76
demo-shell-ng2/dist/app/services/form-service.js
vendored
@@ -1,76 +0,0 @@
|
|||||||
System.register(['angular2/core'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var FormService;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
FormService = (function () {
|
|
||||||
function FormService() {
|
|
||||||
}
|
|
||||||
FormService.prototype.getWidgetCategories = function () {
|
|
||||||
var result = [];
|
|
||||||
var categories = {};
|
|
||||||
var keys = Object.keys(widgets);
|
|
||||||
keys.forEach(function (key) {
|
|
||||||
var w = widgets[key];
|
|
||||||
var categoryName = w.category || 'Misc';
|
|
||||||
var category = categories[categoryName];
|
|
||||||
if (!category) {
|
|
||||||
category = {
|
|
||||||
name: categoryName,
|
|
||||||
widgets: []
|
|
||||||
};
|
|
||||||
categories[categoryName] = category;
|
|
||||||
}
|
|
||||||
category.widgets.push({
|
|
||||||
type: key,
|
|
||||||
name: w.name,
|
|
||||||
iconClass: w.iconClass
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Object.keys(categories).sort().forEach(function (key) {
|
|
||||||
result.push(categories[key]);
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
FormService.prototype.getDragImage = function (widgetType) {
|
|
||||||
var w = widgets[widgetType];
|
|
||||||
// try getting exported drag image
|
|
||||||
if (w && typeof w.getDragImage === 'function') {
|
|
||||||
var img = w.getDragImage();
|
|
||||||
if (img) {
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// create default drag image
|
|
||||||
var dragImage = document.createElement('button');
|
|
||||||
dragImage.className = 'btn btn-default drag-image';
|
|
||||||
dragImage.textContent = w.name;
|
|
||||||
dragImage.style.minWidth = '100px';
|
|
||||||
return dragImage;
|
|
||||||
};
|
|
||||||
FormService = __decorate([
|
|
||||||
core_1.Injectable(),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], FormService);
|
|
||||||
return FormService;
|
|
||||||
}());
|
|
||||||
exports_1("FormService", FormService);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=form-service.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"form-service.js","sourceRoot":"","sources":["form-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAMA;gBAAA;gBAgDA,CAAC;gBA/CG,yCAAmB,GAAnB;oBACI,IAAI,MAAM,GAAG,EAAE,CAAC;oBAChB,IAAI,UAAU,GAAG,EAAE,CAAC;oBACpB,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChC,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG;wBACtB,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;wBACrB,IAAI,YAAY,GAAG,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC;wBACxC,IAAI,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;wBACxC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;4BACZ,QAAQ,GAAG;gCACP,IAAI,EAAE,YAAY;gCAClB,OAAO,EAAE,EAAE;6BACd,CAAC;4BACF,UAAU,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC;wBAExC,CAAC;wBACD,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;4BAClB,IAAI,EAAE,GAAG;4BACT,IAAI,EAAE,CAAC,CAAC,IAAI;4BACZ,SAAS,EAAE,CAAC,CAAC,SAAS;yBACzB,CAAC,CAAC;oBACP,CAAC,CAAC,CAAC;oBAEH,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,GAAG;wBAChD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;oBACjC,CAAC,CAAC,CAAC;oBAEH,MAAM,CAAC,MAAM,CAAC;gBAClB,CAAC;gBAED,kCAAY,GAAZ,UAAa,UAAkB;oBAC3B,IAAI,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;oBAC5B,kCAAkC;oBAClC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC;wBAC5C,IAAI,GAAG,GAAI,CAAC,CAAC,YAAY,EAAE,CAAC;wBAC5B,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;4BACN,MAAM,CAAC,GAAG,CAAC;wBACf,CAAC;oBACL,CAAC;oBAED,4BAA4B;oBAC5B,IAAI,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;oBACjD,SAAS,CAAC,SAAS,GAAG,4BAA4B,CAAC;oBACnD,SAAS,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;oBAC/B,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;oBACnC,MAAM,CAAC,SAAS,CAAC;gBACrB,CAAC;gBAhDL;oBAAC,iBAAU,EAAE;;+BAAA;gBAiDb,kBAAC;YAAD,CAAC,AAhDD,IAgDC;YAhDD,qCAgDC,CAAA"}
|
|
41
demo-shell-ng2/dist/app/single.component.js
vendored
41
demo-shell-ng2/dist/app/single.component.js
vendored
@@ -1,41 +0,0 @@
|
|||||||
System.register(['angular2/core'], function(exports_1, context_1) {
|
|
||||||
"use strict";
|
|
||||||
var __moduleName = context_1 && context_1.id;
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
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;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
||||||
};
|
|
||||||
var core_1;
|
|
||||||
var SingleComponent;
|
|
||||||
return {
|
|
||||||
setters:[
|
|
||||||
function (core_1_1) {
|
|
||||||
core_1 = core_1_1;
|
|
||||||
}],
|
|
||||||
execute: function() {
|
|
||||||
SingleComponent = (function () {
|
|
||||||
function SingleComponent() {
|
|
||||||
this.target = 'http://localhost:8888/alfresco/service/api/upload';
|
|
||||||
this.multi = 'true';
|
|
||||||
this.accept = 'image/*';
|
|
||||||
this.droppable = false;
|
|
||||||
}
|
|
||||||
SingleComponent = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'my-app',
|
|
||||||
templateUrl: 'app/template/single.component.html'
|
|
||||||
}),
|
|
||||||
__metadata('design:paramtypes', [])
|
|
||||||
], SingleComponent);
|
|
||||||
return SingleComponent;
|
|
||||||
}());
|
|
||||||
exports_1("SingleComponent", SingleComponent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=single.component.js.map
|
|
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"single.component.js","sourceRoot":"","sources":["single.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAOA;gBAAA;oBACI,WAAM,GAAW,mDAAmD,CAAC;oBACrE,UAAK,GAAW,MAAM,CAAC;oBACvB,WAAM,GAAU,SAAS,CAAC;oBAC1B,cAAS,GAAY,KAAK,CAAC;gBAE/B,CAAC;gBAXD;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,QAAQ;wBAClB,WAAW,EAAE,oCAAoC;qBACpD,CAAC;;mCAAA;gBAQF,sBAAC;YAAD,CAAC,AAND,IAMC;YAND,6CAMC,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|||||||
body {
|
|
||||||
padding-top: 40px;
|
|
||||||
padding-bottom: 40px;
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-signin {
|
|
||||||
max-width: 330px;
|
|
||||||
padding: 15px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.form-signin .form-signin-heading,
|
|
||||||
.form-signin .checkbox {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.form-signin .checkbox {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.form-signin .form-control {
|
|
||||||
position: relative;
|
|
||||||
height: auto;
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.form-signin .form-control:focus {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
.form-signin input[type="username"] {
|
|
||||||
margin-bottom: -1px;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
}
|
|
||||||
.form-signin input[type="password"] {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
}
|
|
@@ -1,29 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-md-4 col-md-offset-4">
|
|
||||||
<form [ngFormModel]="form" (submit)="onSubmit(form.value, $event)" class="form-signin">
|
|
||||||
<div [ngClass]="{'has-error': isErrorStyle(form.controls.username)}" class="form-group">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<input id="username" class="form-control " type="text" placeholder="username" ngControl="username">
|
|
||||||
<div [hidden]="form.controls.username.valid || form.controls.username.pristine" class="alert alert-danger">
|
|
||||||
<p *ngIf="form.controls.username.dirty && form.controls.username.errors && form.controls.username.errors.minlength">
|
|
||||||
Your username needs to be at least 4 characters.
|
|
||||||
</p>
|
|
||||||
<p *ngIf="form.controls.username.hasError('required')">
|
|
||||||
Username is required
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div [ngClass]="{'has-error': isErrorStyle(form.controls.password)}" class="form-group">
|
|
||||||
<label for="password">Password</label>
|
|
||||||
<input id="password" class="form-control" type="password" placeholder="password" ngControl="password">
|
|
||||||
<div [hidden]="form.controls.password.valid || form.controls.password.pristine" class="alert alert-danger">
|
|
||||||
<p *ngIf="form.controls.password.hasError('required')">
|
|
||||||
Password is required
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary btn-block" [disabled]="!form.valid">Login</button>
|
|
||||||
<div *ngIf="error" class="alert alert-danger">You have entered an invalid username or password</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
63
demo-shell-ng2/dist/index.html
vendored
63
demo-shell-ng2/dist/index.html
vendored
@@ -1,63 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<base href="/">
|
|
||||||
<title>File Share - Angular 2</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
|
|
||||||
<link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
|
||||||
<link href="app/css/app.css" rel="stylesheet">
|
|
||||||
<!-- Custom theme -->
|
|
||||||
<link rel="stylesheet" href="app/css/theme/navbar.css">
|
|
||||||
|
|
||||||
<!-- 1. Load libraries -->
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
|
||||||
|
|
||||||
<!--<script src="node_modules/ng2-uploader/bundles/ng2-uploader.js"></script>-->
|
|
||||||
|
|
||||||
<script src="node_modules/jquery/dist/jquery.min.js"></script>
|
|
||||||
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
|
||||||
|
|
||||||
<script src="/app/js/xml2json.js"></script>
|
|
||||||
|
|
||||||
<!-- 2. Configure SystemJS -->
|
|
||||||
<script>
|
|
||||||
System.config({
|
|
||||||
map: {
|
|
||||||
'ng2-uploader': 'node_modules/ng2-uploader',
|
|
||||||
'ng2-alfresco': 'node_modules/ng2-alfresco'
|
|
||||||
},
|
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'ng2-uploader': {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'ng2-alfresco': {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<!-- 3. Display the application -->
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<my-app>Loading...</my-app>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user