mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Quick actions for document list
- support for quick actions (folders/documents) - reworked project structure for document list (simplified naming and hierarchy) refs #20, #50
This commit is contained in:
@@ -64,10 +64,16 @@ import {MDL} from 'ng2-alfresco-core/material';
|
||||
[navigate]="navigation"
|
||||
[downloads]="downloads"
|
||||
(itemClick)="onItemClick($event)">
|
||||
<quick-folder-actions>
|
||||
<quick-folder-action title="Delete" handler="system1"></quick-folder-action>
|
||||
</quick-folder-actions>
|
||||
<folder-actions>
|
||||
<folder-action title="Default folder action 1" handler="system1"></folder-action>
|
||||
<folder-action title="Custom folder action" (execute)="myFolderAction1($event)"></folder-action>
|
||||
</folder-actions>
|
||||
<quick-document-actions>
|
||||
<quick-document-action icon="glyphicon glyphicon-pushpin" handler="system1"></quick-document-action>
|
||||
</quick-document-actions>
|
||||
<document-actions>
|
||||
<document-action title="System action" handler="system2"></document-action>
|
||||
<document-action title="Custom action" (execute)="myCustomAction1($event)"></document-action>
|
||||
|
@@ -1,15 +1,23 @@
|
||||
import { DocumentList } from './src/document-list.component';
|
||||
import { DocumentAction } from './src/document-action.component';
|
||||
import { DocumentActionList } from './src/document-action-list.component';
|
||||
import { FolderAction } from './src/folder-action.component';
|
||||
import { FolderActionList } from './src/folder-action-list.component';
|
||||
export * from './src/document-list.component';
|
||||
export * from './src/document-action.component';
|
||||
export * from './src/document-action-list.component';
|
||||
export * from './src/folder-action-list.component';
|
||||
export * from './src/folder-action-list.component';
|
||||
import { DocumentList } from './src/components/document-list';
|
||||
import { DocumentAction } from './src/components/document-action';
|
||||
import { DocumentActionList } from './src/components/document-action-list';
|
||||
import { QuickDocumentAction } from './src/components/quick-document-action';
|
||||
import { QuickDocumentActionList } from './src/components/quick-document-action-list';
|
||||
import { FolderAction } from './src/components/folder-action';
|
||||
import { FolderActionList } from './src/components/folder-action-list';
|
||||
import { QuickFolderAction } from './src/components/quick-folder-action';
|
||||
import { QuickFolderActionList } from './src/components/quick-folder-action-list';
|
||||
export * from './src/components/document-list';
|
||||
export * from './src/components/document-action';
|
||||
export * from './src/components/document-action-list';
|
||||
export * from './src/components/quick-document-action';
|
||||
export * from './src/components/quick-document-action-list';
|
||||
export * from './src/components/folder-action';
|
||||
export * from './src/components/folder-action-list';
|
||||
export * from './src/components/quick-folder-action';
|
||||
export * from './src/components/quick-folder-action-list';
|
||||
declare var _default: {
|
||||
directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof FolderAction | typeof FolderActionList)[];
|
||||
directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof QuickDocumentAction | typeof QuickDocumentActionList | typeof FolderAction | typeof FolderActionList | typeof QuickFolderAction | typeof QuickFolderActionList)[];
|
||||
providers: undefined[];
|
||||
};
|
||||
export default _default;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
System.register(['./src/document-list.component', './src/document-action.component', './src/document-action-list.component', './src/folder-action.component', './src/folder-action-list.component'], function(exports_1, context_1) {
|
||||
System.register(['./src/components/document-list', './src/components/document-action', './src/components/document-action-list', './src/components/quick-document-action', './src/components/quick-document-action-list', './src/components/folder-action', './src/components/folder-action-list', './src/components/quick-folder-action', './src/components/quick-folder-action-list'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var document_list_component_1, document_action_component_1, document_action_list_component_1, folder_action_component_1, folder_action_list_component_1;
|
||||
var document_list_1, document_action_1, document_action_list_1, quick_document_action_1, quick_document_action_list_1, folder_action_1, folder_action_list_1, quick_folder_action_1, quick_folder_action_list_1;
|
||||
var DOCUMENT_LIST_DIRECTIVES;
|
||||
var exportedNames_1 = {
|
||||
'DOCUMENT_LIST_DIRECTIVES': true
|
||||
@@ -15,37 +15,67 @@ System.register(['./src/document-list.component', './src/document-action.compone
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
function (document_list_component_1_1) {
|
||||
document_list_component_1 = document_list_component_1_1;
|
||||
exportStar_1(document_list_component_1_1);
|
||||
function (document_list_1_1) {
|
||||
document_list_1 = document_list_1_1;
|
||||
exportStar_1(document_list_1_1);
|
||||
},
|
||||
function (document_action_component_1_1) {
|
||||
document_action_component_1 = document_action_component_1_1;
|
||||
exportStar_1(document_action_component_1_1);
|
||||
function (document_action_1_1) {
|
||||
document_action_1 = document_action_1_1;
|
||||
exportStar_1(document_action_1_1);
|
||||
},
|
||||
function (document_action_list_component_1_1) {
|
||||
document_action_list_component_1 = document_action_list_component_1_1;
|
||||
exportStar_1(document_action_list_component_1_1);
|
||||
function (document_action_list_1_1) {
|
||||
document_action_list_1 = document_action_list_1_1;
|
||||
exportStar_1(document_action_list_1_1);
|
||||
},
|
||||
function (folder_action_component_1_1) {
|
||||
folder_action_component_1 = folder_action_component_1_1;
|
||||
function (quick_document_action_1_1) {
|
||||
quick_document_action_1 = quick_document_action_1_1;
|
||||
exportStar_1(quick_document_action_1_1);
|
||||
},
|
||||
function (folder_action_list_component_1_1) {
|
||||
folder_action_list_component_1 = folder_action_list_component_1_1;
|
||||
exportStar_1(folder_action_list_component_1_1);
|
||||
exportStar_1(folder_action_list_component_1_1);
|
||||
function (quick_document_action_list_1_1) {
|
||||
quick_document_action_list_1 = quick_document_action_list_1_1;
|
||||
exportStar_1(quick_document_action_list_1_1);
|
||||
},
|
||||
function (folder_action_1_1) {
|
||||
folder_action_1 = folder_action_1_1;
|
||||
exportStar_1(folder_action_1_1);
|
||||
},
|
||||
function (folder_action_list_1_1) {
|
||||
folder_action_list_1 = folder_action_list_1_1;
|
||||
exportStar_1(folder_action_list_1_1);
|
||||
},
|
||||
function (quick_folder_action_1_1) {
|
||||
quick_folder_action_1 = quick_folder_action_1_1;
|
||||
exportStar_1(quick_folder_action_1_1);
|
||||
},
|
||||
function (quick_folder_action_list_1_1) {
|
||||
quick_folder_action_list_1 = quick_folder_action_list_1_1;
|
||||
exportStar_1(quick_folder_action_list_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
exports_1("default",{
|
||||
directives: [document_list_component_1.DocumentList, document_action_component_1.DocumentAction, document_action_list_component_1.DocumentActionList, folder_action_component_1.FolderAction, folder_action_list_component_1.FolderActionList],
|
||||
directives: [
|
||||
document_list_1.DocumentList,
|
||||
document_action_1.DocumentAction,
|
||||
document_action_list_1.DocumentActionList,
|
||||
quick_document_action_1.QuickDocumentAction,
|
||||
quick_document_action_list_1.QuickDocumentActionList,
|
||||
folder_action_1.FolderAction,
|
||||
folder_action_list_1.FolderActionList,
|
||||
quick_folder_action_1.QuickFolderAction,
|
||||
quick_folder_action_list_1.QuickFolderActionList
|
||||
],
|
||||
providers: []
|
||||
});
|
||||
exports_1("DOCUMENT_LIST_DIRECTIVES", DOCUMENT_LIST_DIRECTIVES = [
|
||||
document_list_component_1.DocumentList,
|
||||
document_action_component_1.DocumentAction,
|
||||
document_action_list_component_1.DocumentActionList,
|
||||
folder_action_component_1.FolderAction,
|
||||
folder_action_list_component_1.FolderActionList
|
||||
document_list_1.DocumentList,
|
||||
document_action_1.DocumentAction,
|
||||
document_action_list_1.DocumentActionList,
|
||||
quick_document_action_1.QuickDocumentAction,
|
||||
quick_document_action_list_1.QuickDocumentActionList,
|
||||
folder_action_1.FolderAction,
|
||||
folder_action_list_1.FolderActionList,
|
||||
quick_folder_action_1.QuickFolderAction,
|
||||
quick_folder_action_list_1.QuickFolderActionList
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAiBa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YALrC,oBAAe;gBACX,UAAU,EAAE,CAAC,sCAAY,EAAE,0CAAc,EAAE,mDAAkB,EAAE,sCAAY,EAAE,+CAAgB,CAAC;gBAC9F,SAAS,EAAE,EAAE;aAChB,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,sCAAY;gBACZ,0CAAc;gBACd,mDAAkB;gBAClB,sCAAY;gBACZ,+CAAgB;aACnB,CAAA,CAAC"}
|
||||
{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAmCa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAfrC,oBAAe;gBACX,UAAU,EAAE;oBACR,4BAAY;oBACZ,gCAAc;oBACd,yCAAkB;oBAClB,2CAAmB;oBACnB,oDAAuB;oBACvB,4BAAY;oBACZ,qCAAgB;oBAChB,uCAAiB;oBACjB,gDAAqB;iBACxB;gBACD,SAAS,EAAE,EAAE;aAChB,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,4BAAY;gBACZ,gCAAc;gBACd,yCAAkB;gBAClB,2CAAmB;gBACnB,oDAAuB;gBACvB,4BAAY;gBACZ,qCAAgB;gBAChB,uCAAiB;gBACjB,gDAAqB;aACxB,CAAA,CAAC"}
|
@@ -1,17 +1,35 @@
|
||||
import {DocumentList} from './src/document-list.component';
|
||||
import {DocumentAction} from './src/document-action.component';
|
||||
import {DocumentActionList} from './src/document-action-list.component';
|
||||
import {FolderAction} from './src/folder-action.component';
|
||||
import {FolderActionList} from './src/folder-action-list.component';
|
||||
import {DocumentList} from './src/components/document-list';
|
||||
import {DocumentAction} from './src/components/document-action';
|
||||
import {DocumentActionList} from './src/components/document-action-list';
|
||||
import {QuickDocumentAction} from './src/components/quick-document-action';
|
||||
import {QuickDocumentActionList} from './src/components/quick-document-action-list';
|
||||
import {FolderAction} from './src/components/folder-action';
|
||||
import {FolderActionList} from './src/components/folder-action-list';
|
||||
import {QuickFolderAction} from './src/components/quick-folder-action';
|
||||
import {QuickFolderActionList} from './src/components/quick-folder-action-list';
|
||||
|
||||
export * from './src/document-list.component';
|
||||
export * from './src/document-action.component';
|
||||
export * from './src/document-action-list.component';
|
||||
export * from './src/folder-action-list.component';
|
||||
export * from './src/folder-action-list.component';
|
||||
export * from './src/components/document-list';
|
||||
export * from './src/components/document-action';
|
||||
export * from './src/components/document-action-list';
|
||||
export * from './src/components/quick-document-action';
|
||||
export * from './src/components/quick-document-action-list';
|
||||
export * from './src/components/folder-action';
|
||||
export * from './src/components/folder-action-list';
|
||||
export * from './src/components/quick-folder-action'
|
||||
export * from './src/components/quick-folder-action-list';
|
||||
|
||||
export default {
|
||||
directives: [DocumentList, DocumentAction, DocumentActionList, FolderAction, FolderActionList],
|
||||
directives: [
|
||||
DocumentList,
|
||||
DocumentAction,
|
||||
DocumentActionList,
|
||||
QuickDocumentAction,
|
||||
QuickDocumentActionList,
|
||||
FolderAction,
|
||||
FolderActionList,
|
||||
QuickFolderAction,
|
||||
QuickFolderActionList
|
||||
],
|
||||
providers: []
|
||||
}
|
||||
|
||||
@@ -19,6 +37,10 @@ export const DOCUMENT_LIST_DIRECTIVES: [any] = [
|
||||
DocumentList,
|
||||
DocumentAction,
|
||||
DocumentActionList,
|
||||
QuickDocumentAction,
|
||||
QuickDocumentActionList,
|
||||
FolderAction,
|
||||
FolderActionList
|
||||
FolderActionList,
|
||||
QuickFolderAction,
|
||||
QuickFolderActionList
|
||||
];
|
||||
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"alfresco.service.js","sourceRoot":"","sources":["alfresco.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwBA;gBACI,yBACY,IAAU,EACV,QAAiC;oBADjC,SAAI,GAAJ,IAAI,CAAM;oBACV,aAAQ,GAAR,QAAQ,CAAyB;oBAKrC,UAAK,GAAW,uBAAuB,CAAC;oBACxC,iBAAY,GAAW,sDAAsD,CAAC;oBAJlF,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC;gBAC/B,CAAC;gBAKD,sBAAW,iCAAI;yBAAf;wBACI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;oBACtB,CAAC;yBAED,UAAgB,KAAY;wBACxB,IAAI,CAAC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AAM,CAAC,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,cAAc,CAAC,CAAC;gBAClE,CAAC;gBAlDL;oBAAC,iBAAU,EAAE;;mCAAA;gBAmDb,sBAAC;YAAD,CAAC,AAlDD,IAkDC;YAlDD,6CAkDC,CAAA"}
|
7
ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts
vendored
Normal file
7
ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from './../models/content-action.model';
|
||||
export declare class DocumentActionList {
|
||||
private documentList;
|
||||
constructor(documentList: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './document-list.component'], function(exports_1, context_1) {
|
||||
System.register(['angular2/core', './document-list'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@@ -26,32 +26,34 @@ System.register(['angular2/core', './document-list.component'], function(exports
|
||||
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 core_1, document_list_1;
|
||||
var DocumentActionList;
|
||||
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;
|
||||
function (document_list_1_1) {
|
||||
document_list_1 = document_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
DocumentActionList = (function () {
|
||||
function DocumentActionList(list) {
|
||||
this.list = list;
|
||||
function DocumentActionList(documentList) {
|
||||
this.documentList = documentList;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
DocumentActionList.prototype.registerAction = function (action) {
|
||||
this.list.registerDocumentAction(action);
|
||||
if (action) {
|
||||
this.documentList.documentActions.push(action);
|
||||
}
|
||||
};
|
||||
DocumentActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'document-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_component_1.DocumentList])
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], DocumentActionList);
|
||||
return DocumentActionList;
|
||||
}());
|
||||
@@ -59,4 +61,4 @@ System.register(['angular2/core', './document-list.component'], function(exports
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=document-action-list.component.js.map
|
||||
//# sourceMappingURL=document-action-list.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"document-action-list.js","sourceRoot":"","sources":["document-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,4BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,2CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACnD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,kBAAkB;wBAC5B,QAAQ,EAAE,EAAE;qBACf,CAAC;;sCAAA;gBAYF,yBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,mDAWC,CAAA"}
|
@@ -16,20 +16,22 @@
|
||||
*/
|
||||
|
||||
import {Component} from 'angular2/core';
|
||||
import {DocumentList} from './document-list.component';
|
||||
import {ContentActionModel} from './models/content-action.model';
|
||||
import {DocumentList} from './document-list';
|
||||
import {ContentActionModel} from './../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'document-actions',
|
||||
template: ''
|
||||
})
|
||||
export class DocumentActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
constructor(private documentList: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
this.list.registerDocumentAction(action);
|
||||
if (action) {
|
||||
this.documentList.documentActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OnInit, EventEmitter } from 'angular2/core';
|
||||
import { DocumentActionList } from './document-action-list.component';
|
||||
import { DocumentActionList } from './document-action-list';
|
||||
export declare class DocumentAction implements OnInit {
|
||||
private list;
|
||||
title: string;
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './models/content-action.model', './document-action-list.component'], function(exports_1, context_1) {
|
||||
System.register(['angular2/core', './../models/content-action.model', './document-action-list'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@@ -26,7 +26,7 @@ System.register(['angular2/core', './models/content-action.model', './document-a
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var core_1, content_action_model_1, document_action_list_component_1;
|
||||
var core_1, content_action_model_1, document_action_list_1;
|
||||
var DocumentAction;
|
||||
return {
|
||||
setters:[
|
||||
@@ -36,8 +36,8 @@ System.register(['angular2/core', './models/content-action.model', './document-a
|
||||
function (content_action_model_1_1) {
|
||||
content_action_model_1 = content_action_model_1_1;
|
||||
},
|
||||
function (document_action_list_component_1_1) {
|
||||
document_action_list_component_1 = document_action_list_component_1_1;
|
||||
function (document_action_list_1_1) {
|
||||
document_action_list_1 = document_action_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
DocumentAction = (function () {
|
||||
@@ -92,7 +92,7 @@ System.register(['angular2/core', './models/content-action.model', './document-a
|
||||
selector: 'document-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_action_list_component_1.DocumentActionList])
|
||||
__metadata('design:paramtypes', [document_action_list_1.DocumentActionList])
|
||||
], DocumentAction);
|
||||
return DocumentAction;
|
||||
}());
|
||||
@@ -100,4 +100,4 @@ System.register(['angular2/core', './models/content-action.model', './document-a
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=document-action.component.js.map
|
||||
//# sourceMappingURL=document-action.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"document-action.js","sourceRoot":"","sources":["document-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAOI,wBAAoB,IAAwB;oBAAxB,SAAI,GAAJ,IAAI,CAAoB;oBANnC,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;oBAE/B,oBAAe,GAA4C,EAAE,CAAC;oBAGlE,qEAAqE;oBACrE,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;oBAC7D,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;gBACjE,CAAC;gBAED,iCAAQ,GAAR;oBAAA,iBAkBC;oBAjBG,IAAI,KAAK,GAAG,IAAI,yCAAkB,EAAE,CAAC;oBACrC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;oBAEzB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACf,IAAI,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxD,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;4BACjB,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;wBACnC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACtB,KAAK,CAAC,OAAO,GAAG,UAAC,QAAa;4BAC1B,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gCACd,KAAK,EAAE,QAAQ;6BAClB,CAAC,CAAC;wBACP,CAAC,CAAC;oBACN,CAAC;oBAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;gBAED,8CAAqB,GAArB,UAAsB,QAAa;oBAC/B,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;gBACtC,CAAC;gBAED,8CAAqB,GAArB,UAAsB,QAAa;oBAC/B,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;gBACtC,CAAC;gBAtCD;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,YAAK,EAAE;;+DAAA;gBACR;oBAAC,aAAM,EAAE;;+DAAA;gBAPb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;kCAAA;gBAyCF,qBAAC;YAAD,CAAC,AAxCD,IAwCC;YAxCD,2CAwCC,CAAA"}
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {ContentActionModel, ContentActionHandler} from './models/content-action.model';
|
||||
import {DocumentActionList} from './document-action-list.component';
|
||||
import {ContentActionModel, ContentActionHandler} from './../models/content-action.model';
|
||||
import {DocumentActionList} from './document-action-list';
|
||||
|
||||
@Component({
|
||||
selector: 'document-action',
|
@@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OnInit, EventEmitter } from 'angular2/core';
|
||||
import { AlfrescoService } from './alfresco.service';
|
||||
import { FolderEntity } from './core/entities/folder.entity';
|
||||
import { DocumentEntity } from './core/entities/document.entity';
|
||||
import { ContentActionModel } from './models/content-action.model';
|
||||
import { AlfrescoService } from './../services/alfresco.service';
|
||||
import { FolderEntity } from './../core/entities/folder.entity';
|
||||
import { DocumentEntity } from './../core/entities/document.entity';
|
||||
import { ContentActionModel } from './../models/content-action.model';
|
||||
export declare class DocumentList implements OnInit {
|
||||
private _alfrescoService;
|
||||
navigate: boolean;
|
||||
@@ -36,7 +36,9 @@ export declare class DocumentList implements OnInit {
|
||||
errorMessage: any;
|
||||
route: any[];
|
||||
documentActions: ContentActionModel[];
|
||||
quickDocumentActions: ContentActionModel[];
|
||||
folderActions: ContentActionModel[];
|
||||
quickFolderActions: ContentActionModel[];
|
||||
canNavigateParent(): boolean;
|
||||
constructor(_alfrescoService: AlfrescoService);
|
||||
ngOnInit(): void;
|
||||
@@ -46,7 +48,6 @@ export declare class DocumentList implements OnInit {
|
||||
getContentUrl(document: DocumentEntity): string;
|
||||
getDocumentThumbnailUrl(document: DocumentEntity): string;
|
||||
registerDocumentAction(action: ContentActionModel): void;
|
||||
registerFolderAction(action: ContentActionModel): void;
|
||||
executeContentAction(document: DocumentEntity, action: ContentActionModel): void;
|
||||
private getItemPath(item);
|
||||
private displayFolderContent(path);
|
@@ -1,4 +1,4 @@
|
||||
System.register(['angular2/core', './alfresco.service'], function(exports_1, context_1) {
|
||||
System.register(['angular2/core', './../services/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) {
|
||||
@@ -37,7 +37,9 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con
|
||||
this.currentFolderPath = 'swsdp/documentLibrary';
|
||||
this.route = [];
|
||||
this.documentActions = [];
|
||||
this.quickDocumentActions = [];
|
||||
this.folderActions = [];
|
||||
this.quickFolderActions = [];
|
||||
}
|
||||
DocumentList.prototype.canNavigateParent = function () {
|
||||
return this.navigate &&
|
||||
@@ -97,12 +99,9 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con
|
||||
return this._alfrescoService.getDocumentThumbnailUrl(document);
|
||||
};
|
||||
DocumentList.prototype.registerDocumentAction = function (action) {
|
||||
// do additional registration actions here
|
||||
if (action) {
|
||||
this.documentActions.push(action);
|
||||
};
|
||||
DocumentList.prototype.registerFolderAction = function (action) {
|
||||
// do additional registration actions here
|
||||
this.folderActions.push(action);
|
||||
}
|
||||
};
|
||||
DocumentList.prototype.executeContentAction = function (document, action) {
|
||||
// todo: safety checks
|
||||
@@ -151,7 +150,7 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con
|
||||
styles: [
|
||||
"\n :host .breadcrumb {\n margin-bottom: 4px;\n }\n\n :host .folder-icon {\n float: left;\n margin-right: 10px;\n }\n\n :host .file-icon {\n width: 52px;\n height: 52px;\n float: left;\n margin-right: 10px;\n }\n \n :host .document-header {\n font-size: 24px;\n line-height: 32px;\n }\n \n :host .document-header:hover {\n text-decoration: underline;\n }\n "
|
||||
],
|
||||
template: "\n <ol *ngIf=\"breadcrumb\" class=\"breadcrumb\">\n <li *ngFor=\"#r of route; #last = last\" [class.active]=\"last\" [ngSwitch]=\"last\">\n <span *ngSwitchWhen=\"true\">{{r.name}}</span>\n <a *ngSwitchDefault href=\"#\" (click)=\"goToRoute(r, $event)\">{{r.name}}</a>\n </li>\n </ol>\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\" class=\"list-group-item clearfix\">\n \n <!-- folder actions -->\n <div *ngIf=\"document.isFolder && folderActions.length > 0\" class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" \n aria-haspopup=\"true\" aria-expanded=\"false\">\n Actions <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\">\n <li *ngFor=\"#folderAction of folderActions\">\n <a href=\"#\" (click)=\"executeContentAction(document, folderAction)\">{{folderAction.title}}</a>\n </li>\n </ul>\n </div>\n \n <!-- document actions -->\n <div *ngIf=\"!document.isFolder\" class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" \n aria-haspopup=\"true\" aria-expanded=\"false\">\n Actions <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\">\n <li>\n <a *ngIf=\"downloads && !document.isFolder\" \n href=\"{{getContentUrl(document)}}\" \n download target=\"_blank\">\n Download\n </a>\n </li>\n <li *ngIf=\"documentActions.length > 0\" role=\"separator\" class=\"divider\"></li>\n <li *ngFor=\"#documentAction of documentActions\">\n <a href=\"#\" (click)=\"executeContentAction(document, documentAction)\">{{documentAction.title}}</a>\n </li>\n </ul>\n </div>\n \n <i *ngIf=\"thumbnails && document.isFolder\" class=\"folder-icon {{folderIconClass}}\"\n (click)=\"onItemClick(document, $event)\">\n </i>\n <img *ngIf=\"thumbnails && !document.isFolder\" class=\"file-icon\"\n alt=\"\"\n src=\"{{getDocumentThumbnailUrl(document)}}\"\n (click)=\"onItemClick(document, $event)\">\n <h1 class=\"list-group-item-heading document-header\" (click)=\"onItemClick(document, $event)\" >\n {{document.displayName}}\n </h1>\n <p class=\"list-group-item-text\">{{document.description}}</p>\n <small>\n Modified {{document.modifiedOn}} by {{document.modifiedBy}}\n </small>\n </a>\n </div>\n ",
|
||||
template: "\n <ol *ngIf=\"breadcrumb\" class=\"breadcrumb\">\n <li *ngFor=\"#r of route; #last = last\" [class.active]=\"last\" [ngSwitch]=\"last\">\n <span *ngSwitchWhen=\"true\">{{r.name}}</span>\n <a *ngSwitchDefault href=\"#\" (click)=\"goToRoute(r, $event)\">{{r.name}}</a>\n </li>\n </ol>\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\" class=\"list-group-item clearfix\">\n \n <!-- folder actions -->\n <div *ngIf=\"document.isFolder && folderActions.length > 0\" class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-default\"\n *ngFor=\"#qfa of quickFolderActions\" (click)=\"executeContentAction(document, qfa)\">\n <span *ngIf=\"qfa.icon\" class=\"{{qfa.icon}}\"></span>\n <span *ngIf=\"qfa.title\">{{qfa.title}}</span>\n </button>\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" \n aria-haspopup=\"true\" aria-expanded=\"false\">\n Actions <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\">\n <li *ngFor=\"#folderAction of folderActions\">\n <a href=\"#\" (click)=\"executeContentAction(document, folderAction)\">{{folderAction.title}}</a>\n </li>\n </ul>\n </div>\n \n <!-- document actions -->\n <div *ngIf=\"!document.isFolder\" class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-default\"\n *ngFor=\"#qda of quickDocumentActions\" (click)=\"executeContentAction(document, qda)\">\n <span *ngIf=\"qda.icon\" class=\"{{qda.icon}}\"></span>\n <span *ngIf=\"qda.title\">{{qda.title}}</span>\n </button>\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\" \n aria-haspopup=\"true\" aria-expanded=\"false\">\n Actions <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\">\n <li>\n <a *ngIf=\"downloads && !document.isFolder\" \n href=\"{{getContentUrl(document)}}\" \n download target=\"_blank\">\n Download\n </a>\n </li>\n <li *ngIf=\"documentActions.length > 0\" role=\"separator\" class=\"divider\"></li>\n <li *ngFor=\"#documentAction of documentActions\">\n <a href=\"#\" (click)=\"executeContentAction(document, documentAction)\">{{documentAction.title}}</a>\n </li>\n </ul>\n </div>\n \n <i *ngIf=\"thumbnails && document.isFolder\" class=\"folder-icon {{folderIconClass}}\"\n (click)=\"onItemClick(document, $event)\">\n </i>\n <img *ngIf=\"thumbnails && !document.isFolder\" class=\"file-icon\"\n alt=\"\"\n src=\"{{getDocumentThumbnailUrl(document)}}\"\n (click)=\"onItemClick(document, $event)\">\n <h1 class=\"list-group-item-heading document-header\" (click)=\"onItemClick(document, $event)\" >\n {{document.displayName}}\n </h1>\n <p class=\"list-group-item-text\">{{document.description}}</p>\n <small>\n Modified {{document.modifiedOn}} by {{document.modifiedBy}}\n </small>\n </a>\n </div>\n ",
|
||||
providers: [alfresco_service_1.AlfrescoService]
|
||||
}),
|
||||
__metadata('design:paramtypes', [alfresco_service_1.AlfrescoService])
|
||||
@@ -162,4 +161,4 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=document-list.component.js.map
|
||||
//# sourceMappingURL=document-list.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"document-list.js","sourceRoot":"","sources":["document-list.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAgIA;gBA+BI,sBACY,gBAAiC;oBAAjC,qBAAgB,GAAhB,gBAAgB,CAAiB;oBA9BpC,aAAQ,GAAY,IAAI,CAAC;oBACzB,eAAU,GAAY,KAAK,CAAC;oBACT,oBAAe,GAAW,sBAAsB,CAAC;oBACpE,eAAU,GAAY,IAAI,CAAC;oBAC3B,cAAS,GAAY,IAAI,CAAC;oBAEzB,cAAS,GAAsB,IAAI,mBAAY,EAAE,CAAC;oBAE5D,eAAU,GAAG;wBACT,IAAI,EAAE,kBAAkB;wBACxB,IAAI,EAAE,uBAAuB;qBAChC,CAAC;oBACF,sBAAiB,GAAW,uBAAuB,CAAC;oBAIpD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AC;;qEAAA;gBAC3B;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,EAAE;;+DAAA;gBAER;oBAAC,aAAM,EAAE;;+DAAA;gBAlHb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,MAAM,EAAE;4BACJ,uoBAyBC;yBACJ;wBACD,QAAQ,EAAE,gvIAyET;wBACD,SAAS,EAAE,CAAC,kCAAe,CAAC;qBAC/B,CAAC;;gCAAA;gBA6HF,mBAAC;YAAD,CAAC,AA5HD,IA4HC;YA5HD,uCA4HC,CAAA"}
|
@@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {AlfrescoService} from './alfresco.service';
|
||||
import {FolderEntity} from './core/entities/folder.entity';
|
||||
import {DocumentEntity} from './core/entities/document.entity';
|
||||
import {ContentActionModel} from './models/content-action.model';
|
||||
import {AlfrescoService} from './../services/alfresco.service';
|
||||
import {FolderEntity} from './../core/entities/folder.entity';
|
||||
import {DocumentEntity} from './../core/entities/document.entity';
|
||||
import {ContentActionModel} from './../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'alfresco-document-list',
|
||||
@@ -65,6 +65,11 @@ import {ContentActionModel} from './models/content-action.model';
|
||||
|
||||
<!-- folder actions -->
|
||||
<div *ngIf="document.isFolder && folderActions.length > 0" class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default"
|
||||
*ngFor="#qfa of quickFolderActions" (click)="executeContentAction(document, qfa)">
|
||||
<span *ngIf="qfa.icon" class="{{qfa.icon}}"></span>
|
||||
<span *ngIf="qfa.title">{{qfa.title}}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
Actions <span class="caret"></span>
|
||||
@@ -78,6 +83,11 @@ import {ContentActionModel} from './models/content-action.model';
|
||||
|
||||
<!-- document actions -->
|
||||
<div *ngIf="!document.isFolder" class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default"
|
||||
*ngFor="#qda of quickDocumentActions" (click)="executeContentAction(document, qda)">
|
||||
<span *ngIf="qda.icon" class="{{qda.icon}}"></span>
|
||||
<span *ngIf="qda.title">{{qda.title}}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
Actions <span class="caret"></span>
|
||||
@@ -135,8 +145,11 @@ export class DocumentList implements OnInit {
|
||||
errorMessage;
|
||||
|
||||
route: any[] = [];
|
||||
|
||||
documentActions: ContentActionModel[] = [];
|
||||
quickDocumentActions: ContentActionModel[] = [];
|
||||
folderActions: ContentActionModel[] = [];
|
||||
quickFolderActions: ContentActionModel[] = [];
|
||||
|
||||
canNavigateParent(): boolean {
|
||||
return this.navigate &&
|
||||
@@ -211,13 +224,9 @@ export class DocumentList implements OnInit {
|
||||
}
|
||||
|
||||
registerDocumentAction(action: ContentActionModel) {
|
||||
// do additional registration actions here
|
||||
if (action) {
|
||||
this.documentActions.push(action);
|
||||
}
|
||||
|
||||
registerFolderAction(action: ContentActionModel) {
|
||||
// do additional registration actions here
|
||||
this.folderActions.push(action);
|
||||
}
|
||||
|
||||
executeContentAction(document:DocumentEntity, action: ContentActionModel) {
|
7
ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.d.ts
vendored
Normal file
7
ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from './../models/content-action.model';
|
||||
export declare class FolderActionList {
|
||||
private documentList;
|
||||
constructor(documentList: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './document-list.component'], function(exports_1, context_1) {
|
||||
System.register(['angular2/core', './document-list'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@@ -26,32 +26,34 @@ System.register(['angular2/core', './document-list.component'], function(exports
|
||||
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 core_1, document_list_1;
|
||||
var FolderActionList;
|
||||
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;
|
||||
function (document_list_1_1) {
|
||||
document_list_1 = document_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
FolderActionList = (function () {
|
||||
function FolderActionList(list) {
|
||||
this.list = list;
|
||||
function FolderActionList(documentList) {
|
||||
this.documentList = documentList;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
FolderActionList.prototype.registerAction = function (action) {
|
||||
this.list.registerFolderAction(action);
|
||||
if (action) {
|
||||
this.documentList.folderActions.push(action);
|
||||
}
|
||||
};
|
||||
FolderActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'folder-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_component_1.DocumentList])
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], FolderActionList);
|
||||
return FolderActionList;
|
||||
}());
|
||||
@@ -59,4 +61,4 @@ System.register(['angular2/core', './document-list.component'], function(exports
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=folder-action-list.component.js.map
|
||||
//# sourceMappingURL=folder-action-list.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"folder-action-list.js","sourceRoot":"","sources":["folder-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,0BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,yCAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACjD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,gBAAgB;wBAC1B,QAAQ,EAAE,EAAE;qBACf,CAAC;;oCAAA;gBAYF,uBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,+CAWC,CAAA"}
|
@@ -16,20 +16,22 @@
|
||||
*/
|
||||
|
||||
import {Component} from 'angular2/core';
|
||||
import {DocumentList} from './document-list.component';
|
||||
import {ContentActionModel} from './models/content-action.model';
|
||||
import {DocumentList} from './document-list';
|
||||
import {ContentActionModel} from './../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'folder-actions',
|
||||
template: ''
|
||||
})
|
||||
export class FolderActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
constructor(private documentList: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
this.list.registerFolderAction(action);
|
||||
if (action) {
|
||||
this.documentList.folderActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OnInit, EventEmitter } from 'angular2/core';
|
||||
import { FolderActionList } from './folder-action-list.component';
|
||||
import { FolderActionList } from './folder-action-list';
|
||||
export declare class FolderAction implements OnInit {
|
||||
private list;
|
||||
title: string;
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './models/content-action.model', './folder-action-list.component'], function(exports_1, context_1) {
|
||||
System.register(['angular2/core', './../models/content-action.model', './folder-action-list'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@@ -26,7 +26,7 @@ System.register(['angular2/core', './models/content-action.model', './folder-act
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var core_1, content_action_model_1, folder_action_list_component_1;
|
||||
var core_1, content_action_model_1, folder_action_list_1;
|
||||
var FolderAction;
|
||||
return {
|
||||
setters:[
|
||||
@@ -36,8 +36,8 @@ System.register(['angular2/core', './models/content-action.model', './folder-act
|
||||
function (content_action_model_1_1) {
|
||||
content_action_model_1 = content_action_model_1_1;
|
||||
},
|
||||
function (folder_action_list_component_1_1) {
|
||||
folder_action_list_component_1 = folder_action_list_component_1_1;
|
||||
function (folder_action_list_1_1) {
|
||||
folder_action_list_1 = folder_action_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
FolderAction = (function () {
|
||||
@@ -92,7 +92,7 @@ System.register(['angular2/core', './models/content-action.model', './folder-act
|
||||
selector: 'folder-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [folder_action_list_component_1.FolderActionList])
|
||||
__metadata('design:paramtypes', [folder_action_list_1.FolderActionList])
|
||||
], FolderAction);
|
||||
return FolderAction;
|
||||
}());
|
||||
@@ -100,4 +100,4 @@ System.register(['angular2/core', './models/content-action.model', './folder-act
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=folder-action.component.js.map
|
||||
//# sourceMappingURL=folder-action.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"folder-action.js","sourceRoot":"","sources":["folder-action.ts"],"names":[],"mappings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C;gBAED,4CAAqB,GAArB,UAAsB,QAAa;oBAC/B,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBAC1C,CAAC;gBAtCD;oBAAC,YAAK,EAAE;;2DAAA;gBACR;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,aAAM,EAAE;;6DAAA;gBAPb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,eAAe;wBACzB,QAAQ,EAAE,EAAE;qBACf,CAAC;;gCAAA;gBAyCF,mBAAC;YAAD,CAAC,AAxCD,IAwCC;YAxCD,uCAwCC,CAAA"}
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {ContentActionModel, ContentActionHandler} from './models/content-action.model';
|
||||
import {FolderActionList} from './folder-action-list.component';
|
||||
import {ContentActionModel, ContentActionHandler} from './../models/content-action.model';
|
||||
import {FolderActionList} from './folder-action-list';
|
||||
|
||||
@Component({
|
||||
selector: 'folder-action',
|
7
ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action-list.d.ts
vendored
Normal file
7
ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action-list.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from '../models/content-action.model';
|
||||
export declare class QuickDocumentActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './document-list'], 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_1;
|
||||
var QuickDocumentActionList;
|
||||
return {
|
||||
setters:[
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
},
|
||||
function (document_list_1_1) {
|
||||
document_list_1 = document_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
QuickDocumentActionList = (function () {
|
||||
function QuickDocumentActionList(list) {
|
||||
this.list = list;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
QuickDocumentActionList.prototype.registerAction = function (action) {
|
||||
if (action) {
|
||||
this.list.quickDocumentActions.push(action);
|
||||
}
|
||||
};
|
||||
QuickDocumentActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-document-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], QuickDocumentActionList);
|
||||
return QuickDocumentActionList;
|
||||
}());
|
||||
exports_1("QuickDocumentActionList", QuickDocumentActionList);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-document-action-list.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"quick-document-action-list.js","sourceRoot":"","sources":["quick-document-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,iCAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,gDAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAChD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,QAAQ,EAAE,EAAE;qBACf,CAAC;;2CAAA;gBAYF,8BAAC;YAAD,CAAC,AAXD,IAWC;YAXD,6DAWC,CAAA"}
|
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component} from 'angular2/core';
|
||||
import {DocumentList} from './document-list';
|
||||
import {ContentActionModel} from '../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-document-actions',
|
||||
template: ''
|
||||
})
|
||||
export class QuickDocumentActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
if (action) {
|
||||
this.list.quickDocumentActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
30
ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.d.ts
vendored
Normal file
30
ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OnInit, EventEmitter } from 'angular2/core';
|
||||
import { QuickDocumentActionList } from './quick-document-action-list';
|
||||
export declare class QuickDocumentAction implements OnInit {
|
||||
private list;
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: string;
|
||||
execute: EventEmitter<{}>;
|
||||
private defaultHandlers;
|
||||
constructor(list: QuickDocumentActionList);
|
||||
ngOnInit(): void;
|
||||
handleStandardAction1(document: any): void;
|
||||
handleStandardAction2(document: any): void;
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', '../models/content-action.model', './quick-document-action-list'], 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, content_action_model_1, quick_document_action_list_1;
|
||||
var QuickDocumentAction;
|
||||
return {
|
||||
setters:[
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
},
|
||||
function (content_action_model_1_1) {
|
||||
content_action_model_1 = content_action_model_1_1;
|
||||
},
|
||||
function (quick_document_action_list_1_1) {
|
||||
quick_document_action_list_1 = quick_document_action_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
QuickDocumentAction = (function () {
|
||||
function QuickDocumentAction(list) {
|
||||
this.list = list;
|
||||
this.execute = new core_1.EventEmitter();
|
||||
this.defaultHandlers = {};
|
||||
// todo: just for dev/demo purposes, to be replaced with real actions
|
||||
this.defaultHandlers['system1'] = this.handleStandardAction1;
|
||||
this.defaultHandlers['system2'] = this.handleStandardAction2;
|
||||
}
|
||||
QuickDocumentAction.prototype.ngOnInit = function () {
|
||||
var _this = this;
|
||||
var model = new content_action_model_1.ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
if (this.handler) {
|
||||
var defaultHandler = this.defaultHandlers[this.handler];
|
||||
if (defaultHandler) {
|
||||
model.handler = defaultHandler;
|
||||
}
|
||||
}
|
||||
else if (this.execute) {
|
||||
model.handler = function (document) {
|
||||
_this.execute.emit({
|
||||
value: document
|
||||
});
|
||||
};
|
||||
}
|
||||
this.list.registerAction(model);
|
||||
};
|
||||
QuickDocumentAction.prototype.handleStandardAction1 = function (document) {
|
||||
window.alert('quick doc action 1');
|
||||
};
|
||||
QuickDocumentAction.prototype.handleStandardAction2 = function (document) {
|
||||
window.alert('quick doc action 2');
|
||||
};
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickDocumentAction.prototype, "icon", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickDocumentAction.prototype, "title", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickDocumentAction.prototype, "handler", void 0);
|
||||
__decorate([
|
||||
core_1.Output(),
|
||||
__metadata('design:type', Object)
|
||||
], QuickDocumentAction.prototype, "execute", void 0);
|
||||
QuickDocumentAction = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-document-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [quick_document_action_list_1.QuickDocumentActionList])
|
||||
], QuickDocumentAction);
|
||||
return QuickDocumentAction;
|
||||
}());
|
||||
exports_1("QuickDocumentAction", QuickDocumentAction);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-document-action.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"quick-document-action.js","sourceRoot":"","sources":["quick-document-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAQI,6BAAoB,IAA6B;oBAA7B,SAA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C,CAAC;gBACvC,CAAC;gBAxCD;oBAAC,YAAK,EAAE;;iEAAA;gBACR;oBAAC,YAAK,EAAE;;kEAAA;gBACR;oBAAC,YAAK,EAAE;;oEAAA;gBACR;oBAAC,aAAM,EAAE;;oEAAA;gBARb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,uBAAuB;wBACjC,QAAQ,EAAE,EAAE;qBACf,CAAC;;uCAAA;gBA2CF,0BAAC;YAAD,CAAC,AA1CD,IA0CC;YA1CD,qDA0CC,CAAA"}
|
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {ContentActionModel, ContentActionHandler} from '../models/content-action.model';
|
||||
import {QuickDocumentActionList} from './quick-document-action-list';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-document-action',
|
||||
template: ''
|
||||
})
|
||||
export class QuickDocumentAction implements OnInit {
|
||||
@Input() icon: string;
|
||||
@Input() title: string;
|
||||
@Input() handler: string;
|
||||
@Output() execute = new EventEmitter();
|
||||
|
||||
private defaultHandlers: { [id: string]: ContentActionHandler; } = {};
|
||||
|
||||
constructor(private list: QuickDocumentActionList) {
|
||||
// todo: just for dev/demo purposes, to be replaced with real actions
|
||||
this.defaultHandlers['system1'] = this.handleStandardAction1;
|
||||
this.defaultHandlers['system2'] = this.handleStandardAction2;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let model = new ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
|
||||
if (this.handler) {
|
||||
let defaultHandler = this.defaultHandlers[this.handler];
|
||||
if (defaultHandler) {
|
||||
model.handler = defaultHandler;
|
||||
}
|
||||
} else if (this.execute) {
|
||||
model.handler = (document: any): void => {
|
||||
this.execute.emit({
|
||||
value: document
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
this.list.registerAction(model);
|
||||
}
|
||||
|
||||
handleStandardAction1(document: any) {
|
||||
window.alert('quick doc action 1');
|
||||
}
|
||||
|
||||
handleStandardAction2(document: any) {
|
||||
window.alert('quick doc action 2');
|
||||
}
|
||||
}
|
7
ng2-components/ng2-alfresco-documentlist/src/components/quick-folder-action-list.d.ts
vendored
Normal file
7
ng2-components/ng2-alfresco-documentlist/src/components/quick-folder-action-list.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from '../models/content-action.model';
|
||||
export declare class QuickFolderActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', './document-list'], 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_1;
|
||||
var QuickFolderActionList;
|
||||
return {
|
||||
setters:[
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
},
|
||||
function (document_list_1_1) {
|
||||
document_list_1 = document_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
QuickFolderActionList = (function () {
|
||||
function QuickFolderActionList(list) {
|
||||
this.list = list;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
QuickFolderActionList.prototype.registerAction = function (action) {
|
||||
if (action) {
|
||||
this.list.quickFolderActions.push(action);
|
||||
}
|
||||
};
|
||||
QuickFolderActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-folder-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], QuickFolderActionList);
|
||||
return QuickFolderActionList;
|
||||
}());
|
||||
exports_1("QuickFolderActionList", QuickFolderActionList);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-folder-action-list.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"quick-folder-action-list.js","sourceRoot":"","sources":["quick-folder-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,+BAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,8CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC9C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,sBAAsB;wBAChC,QAAQ,EAAE,EAAE;qBACf,CAAC;;yCAAA;gBAYF,4BAAC;YAAD,CAAC,AAXD,IAWC;YAXD,yDAWC,CAAA"}
|
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component} from 'angular2/core';
|
||||
import {DocumentList} from './document-list';
|
||||
import {ContentActionModel} from '../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-folder-actions',
|
||||
template: ''
|
||||
})
|
||||
export class QuickFolderActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
if (action) {
|
||||
this.list.quickFolderActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
30
ng2-components/ng2-alfresco-documentlist/src/components/quick-folder-action.d.ts
vendored
Normal file
30
ng2-components/ng2-alfresco-documentlist/src/components/quick-folder-action.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OnInit, EventEmitter } from 'angular2/core';
|
||||
import { QuickFolderActionList } from './quick-folder-action-list';
|
||||
export declare class QuickFolderAction implements OnInit {
|
||||
private list;
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: string;
|
||||
execute: EventEmitter<{}>;
|
||||
private defaultHandlers;
|
||||
constructor(list: QuickFolderActionList);
|
||||
ngOnInit(): void;
|
||||
handleStandardAction1(document: any): void;
|
||||
handleStandardAction2(document: any): void;
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', '../models/content-action.model', './quick-folder-action-list'], 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, content_action_model_1, quick_folder_action_list_1;
|
||||
var QuickFolderAction;
|
||||
return {
|
||||
setters:[
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
},
|
||||
function (content_action_model_1_1) {
|
||||
content_action_model_1 = content_action_model_1_1;
|
||||
},
|
||||
function (quick_folder_action_list_1_1) {
|
||||
quick_folder_action_list_1 = quick_folder_action_list_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
QuickFolderAction = (function () {
|
||||
function QuickFolderAction(list) {
|
||||
this.list = list;
|
||||
this.execute = new core_1.EventEmitter();
|
||||
this.defaultHandlers = {};
|
||||
// todo: just for dev/demo purposes, to be replaced with real actions
|
||||
this.defaultHandlers['system1'] = this.handleStandardAction1;
|
||||
this.defaultHandlers['system2'] = this.handleStandardAction2;
|
||||
}
|
||||
QuickFolderAction.prototype.ngOnInit = function () {
|
||||
var _this = this;
|
||||
var model = new content_action_model_1.ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
if (this.handler) {
|
||||
var defaultHandler = this.defaultHandlers[this.handler];
|
||||
if (defaultHandler) {
|
||||
model.handler = defaultHandler;
|
||||
}
|
||||
}
|
||||
else if (this.execute) {
|
||||
model.handler = function (document) {
|
||||
_this.execute.emit({
|
||||
value: document
|
||||
});
|
||||
};
|
||||
}
|
||||
this.list.registerAction(model);
|
||||
};
|
||||
QuickFolderAction.prototype.handleStandardAction1 = function (document) {
|
||||
window.alert('quick folder action 1');
|
||||
};
|
||||
QuickFolderAction.prototype.handleStandardAction2 = function (document) {
|
||||
window.alert('quick folder action 2');
|
||||
};
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickFolderAction.prototype, "icon", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickFolderAction.prototype, "title", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickFolderAction.prototype, "handler", void 0);
|
||||
__decorate([
|
||||
core_1.Output(),
|
||||
__metadata('design:type', Object)
|
||||
], QuickFolderAction.prototype, "execute", void 0);
|
||||
QuickFolderAction = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-folder-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [quick_folder_action_list_1.QuickFolderActionList])
|
||||
], QuickFolderAction);
|
||||
return QuickFolderAction;
|
||||
}());
|
||||
exports_1("QuickFolderAction", QuickFolderAction);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-folder-action.js.map
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"quick-folder-action.js","sourceRoot":"","sources":["quick-folder-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAQI,2BAAoB,IAA2B;oBAA3B,SAAI,GAAJ,IAAI,CAAuB;oBAJrC,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;oBAE/B,oBAAe,GAA4C,EAAE,CAAC;oBAGlE,qEAAqE;oBACrE,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;oBAC7D,IAAI,C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qB;wBAC/B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBA2CF,wBAAC;YAAD,CAAC,AA1CD,IA0CC;YA1CD,iDA0CC,CAAA"}
|
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
|
||||
import {ContentActionModel, ContentActionHandler} from '../models/content-action.model';
|
||||
import {QuickFolderActionList} from './quick-folder-action-list';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-folder-action',
|
||||
template: ''
|
||||
})
|
||||
export class QuickFolderAction implements OnInit {
|
||||
@Input() icon: string;
|
||||
@Input() title: string;
|
||||
@Input() handler: string;
|
||||
@Output() execute = new EventEmitter();
|
||||
|
||||
private defaultHandlers: { [id: string]: ContentActionHandler; } = {};
|
||||
|
||||
constructor(private list: QuickFolderActionList) {
|
||||
// todo: just for dev/demo purposes, to be replaced with real actions
|
||||
this.defaultHandlers['system1'] = this.handleStandardAction1;
|
||||
this.defaultHandlers['system2'] = this.handleStandardAction2;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let model = new ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
|
||||
if (this.handler) {
|
||||
let defaultHandler = this.defaultHandlers[this.handler];
|
||||
if (defaultHandler) {
|
||||
model.handler = defaultHandler;
|
||||
}
|
||||
} else if (this.execute) {
|
||||
model.handler = (document: any): void => {
|
||||
this.execute.emit({
|
||||
value: document
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
this.list.registerAction(model);
|
||||
}
|
||||
|
||||
handleStandardAction1(document: any) {
|
||||
window.alert('quick folder action 1');
|
||||
}
|
||||
|
||||
handleStandardAction2(document: any) {
|
||||
window.alert('quick folder action 2');
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LocationEntity } from "./location.entity";
|
||||
import { LocationEntity } from './location.entity';
|
||||
export declare class DocumentEntity {
|
||||
nodeRef: string;
|
||||
nodeType: string;
|
||||
|
@@ -1,3 +1,19 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"document.entity.js","sourceRoot":"","sources":["document.entity.ts"],"names":[],"mappings":";;;;;;;YAmBA;gBAAA;gBA6BA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AA7BD,IA6BC;YA7BD,2CA6BC,CAAA"}
|
||||
{"version":3,"file":"document.entity.js","sourceRoot":"","sources":["document.entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAKH;gBAAA;gBA6BA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AA7BD,IA6BC;YA7BD,2CA6BC,CAAA"}
|
@@ -14,8 +14,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// contains only limited subset of available fields
|
||||
import {LocationEntity} from "./location.entity";
|
||||
import {LocationEntity} from './location.entity';
|
||||
|
||||
export class DocumentEntity {
|
||||
nodeRef: string;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { DocumentEntity } from "./document.entity";
|
||||
import { DocumentEntity } from './document.entity';
|
||||
export declare class FolderEntity {
|
||||
items: DocumentEntity[];
|
||||
}
|
||||
|
@@ -1,3 +1,19 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"folder.entity.js","sourceRoot":"","sources":["folder.entity.ts"],"names":[],"mappings":";;;;;;;YAkBA,mDAAmD;YACnD;gBAAA;gBAEA,CAAC;gBAAD,mBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uCAEC,CAAA"}
|
||||
{"version":3,"file":"folder.entity.js","sourceRoot":"","sources":["folder.entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAIH,mDAAmD;YACnD;gBAAA;gBAEA,CAAC;gBAAD,mBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uCAEC,CAAA"}
|
@@ -14,7 +14,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {DocumentEntity} from "./document.entity";
|
||||
|
||||
import {DocumentEntity} from './document.entity';
|
||||
|
||||
// contains only limited subset of available fields
|
||||
export class FolderEntity {
|
||||
|
@@ -1,7 +0,0 @@
|
||||
import { DocumentList } from './document-list.component';
|
||||
import { ContentActionModel } from './models/content-action.model';
|
||||
export declare class DocumentActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"document-action-list.component.js","sourceRoot":"","sources":["document-action-list.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,4BAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,2CAAc,GAAd,UAAe,MAA0B;oBACrC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBAZL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,kBAAkB;wBAC5B,QAAQ,EAAE,EAAE;qBACf,CAAC;;sCAAA;gBAUF,yBAAC;YAAD,CAAC,AATD,IASC;YATD,mDASC,CAAA"}
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"document-action.component.js","sourceRoot":"","sources":["document-action.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAOI,wBAAoB,IAAwB;oBAAxB,SAAI,GAAJ,IAAI,CAAoB;oBANnC,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CA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I,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;gBAEO,2CAAoB,GAA5B,UAA6B,IAAI;oBAAjC,iBAQC;oBAPG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;oBAC9B,IAAI,CAAC,gBAAgB;yBAChB,SAAS,CAAC,IAAI,CAAC;yBACf,SAAS,CACN,UAAA,MAAM,IAAI,OAAA,KAAI,CAAC,MAAM,GAAG,MAAM,EAApB,CAAoB,EAC9B,UAAA,KAAK,IAAI,OAAA,KAAI,CAAC,YAAY,GAAQ,KAAK,EAA9B,CAA8B,CAC1C,CAAC;gBACV,CAAC;gBA1HD;oBAAC,YAAK,EAAE;;8DAAA;gBACR;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,CAAC,mBAAmB,CAAC;;qEAAA;gBAC3B;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,EAAE;;+DAAA;gBAER;oBAAC,aAAM,EAAE;;+DAAA;gBAxGb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,MAAM,EAAE;4BACJ,uoBAyBC;yBACJ;wBACD,QAAQ,EAAE,wgHA+DT;wBACD,SAAS,EAAE,CAAC,kCAAe,CAAC;qBAC/B,CAAC;;gCAAA;gBA8HF,mBAAC;YAAD,CAAC,AA7HD,IA6HC;YA7HD,uCA6HC,CAAA"}
|
@@ -1,7 +0,0 @@
|
||||
import { DocumentList } from './document-list.component';
|
||||
import { ContentActionModel } from './models/content-action.model';
|
||||
export declare class FolderActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"folder-action-list.component.js","sourceRoot":"","sources":["folder-action-list.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,0BAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,yCAAc,GAAd,UAAe,MAA0B;oBACrC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;gBAC3C,CAAC;gBAZL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,gBAAgB;wBAC1B,QAAQ,EAAE,EAAE;qBACf,CAAC;;oCAAA;gBAUF,uBAAC;YAAD,CAAC,AATD,IASC;YATD,+CASC,CAAA"}
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"folder-action.component.js","sourceRoot":"","sources":["folder-action.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAOI,sBAAoB,IAAsB;oBAAtB,SAAI,GAAJ,IAAI,CAAkB;oBANjC,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;oBAE/B,oBAAe,GAA4C,EAAE,CAAC;oBAGlE,qEAAqE;oBACrE,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;oBAC7D,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;gBACjE,CAAC;gBAED,+BAAQ,GAAR;oBAAA,iBAkBC;oBAjBG,IAAI,KAAK,GAAG,IAAI,yCAAkB,EAAE,CAAC;oBACrC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;oBAEzB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACf,IAAI,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxD,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;4BACjB,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;wBACnC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACtB,KAAK,CAAC,OAAO,GAAG,UAAC,QAAa;4BAC1B,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gCACd,KAAK,EAAE,QAAQ;6BAClB,CAAC,CAAC;wBACP,CAAC,CAAC;oBACN,CAAC;oBAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;gBAED,4CAAqB,GAArB,UAAsB,QAAa;oBAC/B,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBAC1C,CAAC;gBAED,4CAAqB,GAArB,UAAsB,QAAa;oBAC/B,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBAC1C,CAAC;gBAtCD;oBAAC,YAAK,EAAE;;2DAAA;gBACR;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,aAAM,EAAE;;6DAAA;gBAPb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,eAAe;wBACzB,QAAQ,EAAE,EAAE;qBACf,CAAC;;gCAAA;gBAyCF,mBAAC;YAAD,CAAC,AAxCD,IAwCC;YAxCD,uCAwCC,CAAA"}
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare class ContentActionModel {
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: ContentActionHandler;
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"content-action.model.js","sourceRoot":"","sources":["content-action.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH;gBAAA;gBAGA,CAAC;gBAAD,yBAAC;YAAD,CAAC,AAHD,IAGC;YAHD,mDAGC,CAAA"}
|
||||
{"version":3,"file":"content-action.model.js","sourceRoot":"","sources":["content-action.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH;gBAAA;gBAIA,CAAC;gBAAD,yBAAC;YAAD,CAAC,AAJD,IAIC;YAJD,mDAIC,CAAA"}
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
export class ContentActionModel {
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: ContentActionHandler;
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Http } from 'angular2/http';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FolderEntity } from "./core/entities/folder.entity";
|
||||
import { DocumentEntity } from "./core/entities/document.entity";
|
||||
import { AlfrescoSettingsService } from '../../ng2-alfresco-core/services';
|
||||
import { FolderEntity } from './../core/entities/folder.entity';
|
||||
import { DocumentEntity } from './../core/entities/document.entity';
|
||||
import { AlfrescoSettingsService } from '../../../ng2-alfresco-core/services';
|
||||
export declare class AlfrescoService {
|
||||
private http;
|
||||
private settings;
|
@@ -1,4 +1,20 @@
|
||||
System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../ng2-alfresco-core/services'], function(exports_1, context_1) {
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../../ng2-alfresco-core/services'], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@@ -61,7 +77,9 @@ System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../ng2
|
||||
.catch(this.handleError);
|
||||
};
|
||||
AlfrescoService.prototype.getDocumentThumbnailUrl = function (document) {
|
||||
return this._host + '/alfresco/service/api/node/' + document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
|
||||
return this._host +
|
||||
'/alfresco/service/api/node/' +
|
||||
document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
|
||||
};
|
||||
AlfrescoService.prototype.getContentUrl = function (document) {
|
||||
return this._host + '/alfresco/service/' + document.contentUrl;
|
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"alfresco.service.js","sourceRoot":"","sources":["alfresco.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,yBACY,IAAU,EACV,QAAiC;oBADjC,SAAI,GAAJ,IAAI,CAAM;oBACV,aAAQ,GAAR,QAAQ,CAAyB;oBAKrC,UAAK,GAAW,uBAAuB,CAAC;oBACxC,iBAAY,GAAW,sDAAsD,CAAC;oBAJlF,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC;gBAC/B,CAAC;gBAKD,sBAAW,iCAAI;yBAAf;wBACI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;oBACtB,CAAC;yBAED,UAAgB,KAAY;wBACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;oBACvB,CAAC;;;mBAJA;gBAMO,oCAAU,GAAlB;oBACI,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IA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ApDL;oBAAC,iBAAU,EAAE;;mCAAA;gBAqDb,sBAAC;YAAD,CAAC,AApDD,IAoDC;YApDD,6CAoDC,CAAA"}
|
@@ -14,12 +14,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Response, RequestOptions, Headers} from 'angular2/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {FolderEntity} from "./core/entities/folder.entity";
|
||||
import {DocumentEntity} from "./core/entities/document.entity";
|
||||
import {AlfrescoSettingsService} from '../../ng2-alfresco-core/services';
|
||||
import {FolderEntity} from './../core/entities/folder.entity';
|
||||
import {DocumentEntity} from './../core/entities/document.entity';
|
||||
import {AlfrescoSettingsService} from '../../../ng2-alfresco-core/services';
|
||||
|
||||
@Injectable()
|
||||
export class AlfrescoService {
|
||||
@@ -59,7 +60,9 @@ export class AlfrescoService {
|
||||
}
|
||||
|
||||
getDocumentThumbnailUrl(document: DocumentEntity) {
|
||||
return this._host + '/alfresco/service/api/node/' + document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
|
||||
return this._host +
|
||||
'/alfresco/service/api/node/' +
|
||||
document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&ph=true&lastModified=1';
|
||||
}
|
||||
|
||||
getContentUrl(document: DocumentEntity) {
|
Reference in New Issue
Block a user