Skip to content

Commit

Permalink
WEBUI-1579,1282,1575,1580 : csp change
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed Oct 25, 2024
1 parent f259637 commit b32a6a5
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 17 deletions.
5 changes: 3 additions & 2 deletions addons/nuxeo-csv/elements/nuxeo-document-import-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Polymer({
<template is="dom-if" if="[[!hasFile]]">
<div class="vertical layout center center-justified flex">
<div class="dropzone-label horizontal layout center center-justified">
<a href="javascript:undefined" on-tap="_showUploadDialog"> [[i18n('csv.import.clickOrDrop')]]</a>
<a href="#" on-tap="_showUploadDialog"> [[i18n('csv.import.clickOrDrop')]]</a>
</div>
</div>
</template>
Expand Down Expand Up @@ -581,7 +581,8 @@ Polymer({
}
},

_showUploadDialog() {
_showUploadDialog(e) {
e.preventDefault();
this.$.uploadFiles.click();
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Polymer({
is-available="{{isProviderAvailable}}"
></nuxeo-liveconnect-box-provider>
<template is="dom-if" if="[[isProviderAvailable]]">
<a href="javascript:undefined" on-tap="_openPicker">
<a href="#" on-tap="_openPicker">
<iron-icon src="[[importPath]]images/box.png"></iron-icon>
[[i18n('liveconnectImportActions.box', 'Box')]]
</a>
Expand All @@ -78,7 +78,8 @@ Polymer({
this.$.provider.updateProviderInfo();
},

_openPicker() {
_openPicker(e) {
e.preventDefault();
this.$.provider.openPicker();
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Polymer({
is-available="{{isProviderAvailable}}"
></nuxeo-liveconnect-google-drive-provider>
<template is="dom-if" if="[[isProviderAvailable]]">
<a href="javascript:undefined" on-tap="_openPicker">
<a href="#" on-tap="_openPicker">
<iron-icon src="[[importPath]]images/google_drive.png"></iron-icon>
[[i18n('liveconnectImportActions.googledrive', 'Google Drive')]]
</a>
Expand All @@ -78,7 +78,8 @@ Polymer({
this.$.provider.updateProviderInfo();
},

_openPicker() {
_openPicker(e) {
e.preventDefault();
this.$.provider.openPicker();
},
});
5 changes: 5 additions & 0 deletions addons/nuxeo-spreadsheet/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { resolve } = require('path');
const { ProvidePlugin } = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const htmlWebpackInjectAttributesPlugin = require('html-webpack-inject-attributes-plugin');

module.exports = {
entry: {
Expand All @@ -16,5 +17,9 @@ module.exports = {
chunks: ['spreadsheet.app'],
template: resolve(__dirname, 'app', 'index.html'),
}),
/* eslint-disable-next-line new-cap */
new htmlWebpackInjectAttributesPlugin({
nonce: 'dummy',
}),
],
};
10 changes: 6 additions & 4 deletions elements/nuxeo-selection/nuxeo-selection-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Polymer({
<span class="count" aria-live="polite">
[[i18n('selectionToolbar.selected.items', selectedItems.length)]]
</span>
<a class="selectionLink" on-tap="toogleSelectedItemsPopup" href="javascript:void(0)">
<a class="selectionLink" on-tap="toogleSelectedItemsPopup" href="#">
<span>[[i18n('selectionToolbar.display.selection')]]</span>
</a>
</template>
Expand All @@ -121,7 +121,7 @@ Polymer({
<template is="dom-if" if="[[selectAllActive]]">
<span class="count" aria-live="polite">[[i18n('selectionToolbar.selected.all', _resultsCount)]]</span>
</template>
<a class="selectionLink" on-tap="clearSelection" href="javascript:void(0)">
<a class="selectionLink" on-tap="clearSelection" href="#">
<span>[[i18n('command.clear')]]</span>
</a>
</div>
Expand Down Expand Up @@ -188,11 +188,13 @@ Polymer({
this.hidden = !this.selectedItems || this.selectedItems.length === 0;
},

toogleSelectedItemsPopup() {
toogleSelectedItemsPopup(e) {
e.preventDefault();
this.$$('#selectedItemsPopup').toggle();
},

clearSelection() {
clearSelection(e) {
e.preventDefault();
this.fire('clear-selected-items');
},
});
5 changes: 3 additions & 2 deletions elements/workflow/nuxeo-document-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Polymer({
</div>
</template>
</div>
<a href="javascript:undefined" on-tap="_toggleGraphDialog" class="view-graph">[[i18n('tasks.viewGraph')]]</a>
<a href="#" on-tap="_toggleGraphDialog" class="view-graph">[[i18n('tasks.viewGraph')]]</a>
<div class="horizontal spaced">
<span>[[i18n(tasks.directive)]]</span>
</div>
Expand Down Expand Up @@ -314,7 +314,8 @@ Polymer({
.finally(() => this._setProcessing(false));
},

_toggleGraphDialog() {
_toggleGraphDialog(e) {
e.preventDefault();
this.$.graph.show();
},

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"expose-loader": "^1.0.1",
"glob": "^7.1.3",
"html-loader": "^1.3.2",
"html-webpack-inject-attributes-plugin": "^1.0.6",
"html-webpack-plugin": "^5.6.0",
"http-server": "^0.11.1",
"husky": "^4.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ limitations under the License.
</div>
</nuxeo-app>
<script src="vendor/webcomponentsjs/webcomponents-loader.js"></script>
<script src="vendor/webcomponentsjs/webcomponents-loader.js" nonce="dummy"></script>
<script src="vendor/html-imports/html-imports.min.js"></script>
<script src="vendor/html-imports/html-imports.min.js" nonce="dummy"></script>
<script src="vendor/web-animations/web-animations-next-lite.min.js"></script>
<script src="vendor/web-animations/web-animations-next-lite.min.js" nonce="dummy"></script>
<script src="config.jsp"></script>
<script src="config.jsp" nonce="dummy"></script>
<script src="main.bundle.js"></script>
<script src="main.bundle.js" nonce="dummy"></script>
</body>
Expand Down

0 comments on commit b32a6a5

Please sign in to comment.