Skip to content

Commit

Permalink
Merge pull request #1906 from Alfresco/development
Browse files Browse the repository at this point in the history
1.5.0
  • Loading branch information
eromano authored May 25, 2017
2 parents 6342c34 + 81270d3 commit f835e43
Show file tree
Hide file tree
Showing 673 changed files with 24,586 additions and 13,002 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ node_modules
workspace.xml
.idea/
dist/
ng2-components/coverage/
!systemjs.config.js
demo-shell-ng2/app/components/router/
ng2-components/ng2-alfresco-userinfo-old/demo/src/app/
ng2-components/ng2-alfresco-userinfo-old/src/services/bpm-user.service.spec.ts
ng2-components/ng2-alfresco-userinfo-old/src/services/ecm-user.service.spec.ts
src/environments/
/ng2-components/ng2-example-webpack/
/ng2-components/config/coverage/
*.npmrc
/demo-shell-ng2/ng2-components/
86 changes: 29 additions & 57 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,42 @@ language: node_js
dist: trusty
sudo: false
node_js:
- "5"
- "6"

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

env:
matrix:
- MODULE=ng2-alfresco-core
- MODULE=ng2-alfresco-datatable
- MODULE=ng2-alfresco-documentlist
- MODULE=ng2-alfresco-login
- MODULE=ng2-alfresco-search
- MODULE=ng2-alfresco-upload
- MODULE=ng2-alfresco-viewer
- MODULE=ng2-alfresco-webscript
- MODULE=ng2-alfresco-tag
- MODULE=ng2-activiti-form
- MODULE=ng2-activiti-tasklist
- MODULE=ng2-activiti-processlist
- MODULE=ng2-activiti-diagrams
- MODULE=ng2-activiti-analytics
- MODULE=ng2-alfresco-userinfo
- MODULE=ng2-alfresco-social
- MODULE=ng2-components-alfresco
- MODULE=ng2-components-activiti
- MODULE=ng2-demo-shell

install:
- if ([ "$MODULE" == "ng2-components-alfresco" -o "$MODULE" == "ng2-components-activiti" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
(./scripts/npm-build-all.sh -gitjsapi development || exit 1;);
fi
fi

script:
- if ([ "$MODULE" == "ng2-components-activiti" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-activiti*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-components-alfresco" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-alfresco*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-demo-shell" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/start.sh -t -ss || exit 1;);
else
(./scripts/start.sh -dev -t -ss -gitjsapi development || exit 1;);
fi
fi

before_script:
- if ([ "$MODULE" != "ng2-alfresco-core" ]); then
(cd ng2-components/ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-alfresco-documentlist" ] || [ "$MODULE" == "ng2-alfresco-webscript" ] || [ "$MODULE" == "ng2-activiti-processlist" ] || [ "$MODULE" == "ng2-activiti-tasklist" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-tasklist" ] || [ "$MODULE" == "ng2-activiti-processlist" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-form; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-processlist" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-form; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-tasklist; npm link ng2-alfresco-core; npm link ng2-alfresco-datatable; npm link ng2-activiti-form; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-analytics" ]); then
(cd ng2-components/ng2-activiti-diagrams; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-alfresco-search" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-alfresco-documentlist; npm link ng2-alfresco-core; npm link ng2-alfresco-datatable; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- cd ng2-components/$MODULE;
script: npm install && npm run travis && npm run test
# Send coverage data to Coveralls
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
Expand All @@ -61,18 +47,4 @@ cache:
- ./node_modules/material-design-lite
- ./node_modules/material-design-icons
- demo-shell-ng2/node_modules
- ng2-components/ng2-activiti-form/node_modules
- ng2-components/ng2-activiti-processlist/node_modules
- ng2-components/ng2-activiti-tasklist/node_modules
- ng2-components/ng2-alfresco-core/node_modules
- ng2-components/ng2-alfresco-datatable/node_modules
- ng2-components/ng2-alfresco-documentlist/node_modules
- ng2-components/ng2-alfresco-login/node_modules
- ng2-components/ng2-alfresco-search/node_modules
- ng2-components/ng2-alfresco-upload/node_modules
- ng2-components/ng2-alfresco-viewer/node_modules
- ng2-components/ng2-alfresco-webscript/node_modules
- ng2-components/ng2-alfresco-tag/node_modules
- ng2-components/ng2-activiti-analytics/node_modules
- ng2-components/ng2-alfresco-userinfo/node_modules
- ng2-components/ng2-activiti-diagrams/node_modules
- ng2-components/node_modules
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"**/.hg": true,
"**/.DS_Store": true,
"**/*.js": { "when": "$(basename).ts"},
"**/*.js.map": { "when": "$(basename)"},
"**/*.js.map": { "when": "$(basename).ts"},
"**/*.d.ts": { "when": "$(basename).ts"},
"**/coverage": true
},
"editor.renderIndentGuides": true
"editor.renderIndentGuides": true,
"tslint.configFile": "ng2-components/config/assets/tslint.json"
}
61 changes: 22 additions & 39 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,36 @@ branches:
- dev-build-test

environment:
nodejs_version: "5"
nodejs_version: "6"

matrix:
- COMPONENT_NAME: ng2-alfresco-core
- COMPONENT_NAME: ng2-alfresco-datatable
- COMPONENT_NAME: ng2-alfresco-documentlist
- COMPONENT_NAME: ng2-alfresco-login
- COMPONENT_NAME: ng2-alfresco-search
- COMPONENT_NAME: ng2-alfresco-upload
- COMPONENT_NAME: ng2-alfresco-viewer
- COMPONENT_NAME: ng2-alfresco-tag
- COMPONENT_NAME: ng2-alfresco-webscript
- COMPONENT_NAME: ng2-activiti-form
- COMPONENT_NAME: ng2-activiti-tasklist
- COMPONENT_NAME: ng2-activiti-processlist
- COMPONENT_NAME: ng2-activiti-diagrams
- COMPONENT_NAME: ng2-activiti-analytics
- COMPONENT_NAME: ng2-alfresco-userinfo
- COMPONENT_NAME: ng2-alfresco-social
- COMPONENT_NAME: ng2-components-activiti
- COMPONENT_NAME: ng2-components-alfresco
- COMPONENT_NAME: ng2-demo-shell

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install module
- IF %COMPONENT_NAME% NEQ ng2-alfresco-core (cd ng2-components/ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-documentlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-search (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-search (cd ng2-components/ng2-alfresco-documentlist && npm link ng2-alfresco-core && npm link ng2-alfresco-datatable && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-tasklist && npm link ng2-alfresco-core && npm link ng2-alfresco-datatable && npm link ng2-activiti-form && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-webscript (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-analytics (cd ng2-components/ng2-activiti-diagrams && npm link link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- cd ng2-components/%COMPONENT_NAME%
- npm run travis

# Post-install test scripts.
test_script:
- npm install
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
- if %COMPONENT_NAME% EQU ng2-components-activiti (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" -gitjsapi development|| exit 1)
)
- if %COMPONENT_NAME% EQU ng2-components-alfresco (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" -gitjsapi development|| exit 1)
)
- if %COMPONENT_NAME% EQU ng2-demo-shell (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh start.sh -t -ss || exit 1)
else
(cd scripts && sh start.sh -dev -t -ss -gitjsapi development|| exit 1)
)

# Don't actually build.
build: off
3 changes: 3 additions & 0 deletions demo-shell-ng2/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
typings/
node_modules/
bower_components/
ng2-components/
app/**/*.js
app/**/*.js.map
app/**/*.d.ts

!app/js/Polyline.js
.idea
versions.json
Expand Down
2 changes: 1 addition & 1 deletion demo-shell-ng2/app/components/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class AboutComponent implements OnInit {

ngOnInit() {
this.http.get('/versions.json').subscribe(response => {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)', 'g');
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)');

let alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
this.logService.log(val);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
(taskCreated)="onTaskCreated($event)"
(taskDeleted)="onTaskDeleted($event)">
</activiti-task-details>
<hr>
<h5>Attachments</h5>
<adf-task-attachment-list *ngIf="currentTaskId"
[taskId]="currentTaskId"
(attachmentClick)="onAttachmentClick($event)">
</adf-task-attachment-list>
</div>
</div>
</div>
Expand Down Expand Up @@ -149,6 +155,7 @@
<hr>
<analytics-report-list
[appId]="appId"
[selectFirst]="selectFirstReport"
(reportClick)="onReportClick($event)"
#analyticsreportlist>
</analytics-report-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class ActivitiDemoComponent implements AfterViewInit {
appId: number = null;

fileShowed: boolean = false;
selectFirstReport: boolean = false;

content: Blob;
contentName: string;
Expand Down Expand Up @@ -213,14 +214,8 @@ export class ActivitiDemoComponent implements AfterViewInit {
}

onReportDeleted() {
this.selectFirstReport = true;
this.analyticsreportlist.reload();
this.selectFirstElementInReportList();
}

selectFirstElementInReportList() {
if (!this.analyticsreportlist.isReportsEmpty()) {
this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]);
}
}

navigateStartProcess() {
Expand Down Expand Up @@ -259,6 +254,12 @@ export class ActivitiDemoComponent implements AfterViewInit {
this.contentName = content.name;
}

onAttachmentClick(content: any) {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}

onTaskCreated(data: any) {
this.currentTaskId = data.parentTaskId;
this.taskList.reload();
Expand Down
4 changes: 4 additions & 0 deletions demo-shell-ng2/app/components/files/files.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
.error-message--text {
color: #d50000;
}

.adf-not-overlay-viewer {
height:900px;
}
16 changes: 15 additions & 1 deletion demo-shell-ng2/app/components/files/files.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[contextMenuActions]="true"
[contentActions]="true"
[allowDropFiles]="true"
[sorting]="['name', 'desc']"
(error)="onNavigationError($event)"
(success)="resetError()"
(preview)="showFile($event)"
Expand All @@ -44,6 +45,8 @@
-->

</data-column>
<!-- Notes: has performance problems due to multiple files/folders causing separate HTTP calls to get tags -->
<!--
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.TAG' | translate}}"
key="id"
Expand All @@ -52,6 +55,7 @@
<alfresco-tag-node-list [nodeId]="entry.data.getValue(entry.row, entry.col)"></alfresco-tag-node-list>
</template>
</data-column>
-->
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
key="createdByUser.displayName"
Expand Down Expand Up @@ -140,7 +144,7 @@
</section>

<section>
<md-slide-toggle [(ngModel)]="disableWithNoPermission">Disable when user has no permissions</md-slide-toggle>
<md-slide-toggle [(ngModel)]="disableWithNoPermission">Disable upload button when user has no permissions</md-slide-toggle>
</section>

<h5>Upload</h5>
Expand Down Expand Up @@ -195,5 +199,15 @@ <h5>Upload</h5>
</extension-viewer>

</alfresco-viewer>

<!-- Comment the viewer above and uncomment that one below if you want test the overlay false viewer-->

<!--<div *ngIf="fileShowed" class="adf-not-overlay-viewer">-->
<!--<alfresco-viewer [(showViewer)]="fileShowed"-->
<!--[fileNodeId]="fileNodeId"-->
<!--[overlayMode]="false">-->
<!--</alfresco-viewer>-->
<!--</div>-->

</div>

6 changes: 3 additions & 3 deletions demo-shell-ng2/app/components/setting/setting.component.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.setting-card.mdl-card {
width: 320px;
height: 320px;
width: 100%;
height: 100%;
}

.setting-card > .mdl-card__title {
Expand Down Expand Up @@ -30,6 +30,6 @@
display: table-row;
}

.adf-setting-input-padding{
.adf-setting-input-padding {
padding-top: 0px !important;
}
13 changes: 7 additions & 6 deletions demo-shell-ng2/app/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import 'core-js/es6';
import 'core-js/es7/reflect';
import 'intl';

// IE 8-11
require('zone.js/dist/zone');
require('zone.js/dist/zone'); // IE 8-11
require('element.scrollintoviewifneeded-polyfill'); // IE/FF

if (process.env.ENV === 'production') {
// Production
// Production

} else {
// Development
// Development

Error['stackTraceLimit'] = Infinity;
Error['stackTraceLimit'] = Infinity;

require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/long-stack-trace-zone');
}
Loading

0 comments on commit f835e43

Please sign in to comment.