compiled assets and connection module
This commit is contained in:
11
web/admin/src/connection/index.js
Normal file
11
web/admin/src/connection/index.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { ConnectionAdapter } from './lib';
|
||||||
|
|
||||||
|
function init(data) {
|
||||||
|
const modJsList = {};
|
||||||
|
modJsList.tabConnection = new ConnectionAdapter(data);
|
||||||
|
window.modJs = modJsList.tabConnection;
|
||||||
|
window.modJsList = modJsList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
window.initAdminConnection = init;
|
||||||
32
web/admin/src/connection/lib.js
Normal file
32
web/admin/src/connection/lib.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* Author: Thilina Hasantha
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import ReactModalAdapterBase from '../../../api/ReactModalAdapterBase';
|
||||||
|
import ConnectionTab from './components/ConnectionTab';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AssetTypeAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
class ConnectionAdapter extends ReactModalAdapterBase {
|
||||||
|
constructor(data) {
|
||||||
|
super('', '', '', '');
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
get(callBackData) {
|
||||||
|
const { components } = this.data;
|
||||||
|
ReactDOM.render(
|
||||||
|
<ConnectionTab {...components}/>,
|
||||||
|
document.getElementById('connectionData'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
initSourceMappings() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { ConnectionAdapter };
|
||||||
8
web/dist/admin-bundle.js
vendored
8
web/dist/admin-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
web/dist/common.js
vendored
2
web/dist/common.js
vendored
File diff suppressed because one or more lines are too long
10
web/dist/modules-bundle.js
vendored
10
web/dist/modules-bundle.js
vendored
File diff suppressed because one or more lines are too long
5
web/dist/third-party.js
vendored
5
web/dist/third-party.js
vendored
@@ -34737,12 +34737,13 @@ function download(name, closeCallback, closeCallbackData) {
|
|||||||
fileParts = data.filename.split('?');
|
fileParts = data.filename.split('?');
|
||||||
fileParts = fileParts[0].split('.');
|
fileParts = fileParts[0].split('.');
|
||||||
|
|
||||||
if (jQuery.inArray(fileParts[fileParts.length - 1], viewableFiles) >= 0) {
|
|
||||||
|
if (jQuery.inArray(data.ext, viewableFiles) >= 0) {
|
||||||
const win = window.open(data.filename, '_blank');
|
const win = window.open(data.filename, '_blank');
|
||||||
win.focus();
|
win.focus();
|
||||||
} else {
|
} else {
|
||||||
link = `<a href="${data.filename}" target="_blank">Download File <i class="icon-download-alt"></i> </a>`;
|
link = `<a href="${data.filename}" target="_blank">Download File <i class="icon-download-alt"></i> </a>`;
|
||||||
if (jQuery.inArray(fileParts[fileParts.length - 1], viewableImages) >= 0) {
|
if (jQuery.inArray(data.ext, viewableImages) >= 0) {
|
||||||
link += `<br/><br/><img style="max-width:545px;max-height:350px;" src="${data.filename}"/>`;
|
link += `<br/><br/><img style="max-width:545px;max-height:350px;" src="${data.filename}"/>`;
|
||||||
}
|
}
|
||||||
modJs.showMessage('Download File Attachment', link, closeCallback, closeCallbackData);
|
modJs.showMessage('Download File Attachment', link, closeCallback, closeCallbackData);
|
||||||
|
|||||||
4
web/dist/vendorAntd.js
vendored
4
web/dist/vendorAntd.js
vendored
File diff suppressed because one or more lines are too long
4
web/dist/vendorOther.js
vendored
4
web/dist/vendorOther.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user