compiled assets and connection module

This commit is contained in:
Thilina
2021-06-28 08:14:48 +02:00
parent a042ee67ec
commit 74309fc922
8 changed files with 60 additions and 16 deletions

View 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;

View 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 };

File diff suppressed because one or more lines are too long

2
web/dist/common.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -34737,12 +34737,13 @@ function download(name, closeCallback, closeCallbackData) {
fileParts = data.filename.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');
win.focus();
} else {
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}"/>`;
}
modJs.showMessage('Download File Attachment', link, closeCallback, closeCallbackData);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long