Link to modules eliminated
This commit is contained in:
1 parent
e2f8a304df
commit
d8e4d6170a
9 files changed
-459
No files matched your search
@@ -1,141 +0,0 @@
|
||||
|
||||
function newKeyVaultModule() {
|
||||
|
||||
const MODULE_NAME = "Key Vault Module Button";
|
||||
const INFO_LOG = false;
|
||||
const ERROR_LOG = true;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
var thisObject = {
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer, // returns the inner most container that holds the point received by parameter.
|
||||
initialize: initialize
|
||||
};
|
||||
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
thisObject.container = container;
|
||||
|
||||
thisObject.container.frame.width = 50;
|
||||
thisObject.container.frame.height = BOTTOM_SPACE_HEIGHT;
|
||||
|
||||
container.frame.position.x = viewPort.visibleArea.topLeft.x + thisObject.container.frame.width * 2;
|
||||
container.frame.position.y = viewPort.visibleArea.bottomLeft.y;
|
||||
|
||||
container.isDraggeable = false;
|
||||
container.isClickeable = true;
|
||||
|
||||
let icon;
|
||||
let canDrawIcon = false;
|
||||
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] initialize -> Entering function."); }
|
||||
|
||||
if (window.canvasApp.executingAt === 'Master App') {
|
||||
return;
|
||||
}
|
||||
|
||||
icon = new Image();
|
||||
|
||||
icon.onload = onImageLoad;
|
||||
|
||||
function onImageLoad() {
|
||||
canDrawIcon = true;
|
||||
}
|
||||
|
||||
icon.src = window.canvasApp.urlPrefix + "Images/Icons/key-vault-module.png";
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent("onMouseClick", onClick);
|
||||
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE); }
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] initialize -> err.message = " + err.message); }
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE); }
|
||||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] onClick -> Entering function."); }
|
||||
|
||||
window.open('https://keyVault.advancedalgos.net', '_blank');
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] onClick -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); }
|
||||
|
||||
let container;
|
||||
|
||||
/* First we check if this point is inside this object UI. */
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
|
||||
return this.container;
|
||||
|
||||
} else {
|
||||
|
||||
/* This point does not belong to this space. */
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] getContainer -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] draw -> Entering function."); }
|
||||
|
||||
thisObject.container.frame.draw(false, false);
|
||||
|
||||
if (canDrawIcon === false) { return; }
|
||||
|
||||
let breakpointsHeight = 15;
|
||||
|
||||
let imageHeight = 15;
|
||||
let imageWidth = 15;
|
||||
|
||||
let imagePoint = {
|
||||
x: 10,
|
||||
y: thisObject.container.frame.height / 2 - imageHeight / 2 + breakpointsHeight
|
||||
};
|
||||
|
||||
imagePoint = thisObject.container.frame.frameThisPoint(imagePoint);
|
||||
|
||||
browserCanvasContext.drawImage(icon, imagePoint.x, imagePoint.y, imageWidth, imageHeight);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] draw -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
|
||||
function newTeamsModule() {
|
||||
|
||||
const MODULE_NAME = "Teams Module Button";
|
||||
const INFO_LOG = false;
|
||||
const ERROR_LOG = true;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
var thisObject = {
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer, // returns the inner most container that holds the point received by parameter.
|
||||
initialize: initialize
|
||||
};
|
||||
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
thisObject.container = container;
|
||||
|
||||
thisObject.container.frame.width = 50;
|
||||
thisObject.container.frame.height = BOTTOM_SPACE_HEIGHT;
|
||||
|
||||
container.frame.position.x = viewPort.visibleArea.topLeft.x + thisObject.container.frame.width * 1;
|
||||
container.frame.position.y = viewPort.visibleArea.bottomLeft.y;
|
||||
|
||||
container.isDraggeable = false;
|
||||
container.isClickeable = true;
|
||||
|
||||
let icon;
|
||||
let canDrawIcon = false;
|
||||
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] initialize -> Entering function."); }
|
||||
|
||||
if (window.canvasApp.executingAt === 'Master App') {
|
||||
return;
|
||||
}
|
||||
|
||||
icon = new Image();
|
||||
|
||||
icon.onload = onImageLoad;
|
||||
|
||||
function onImageLoad() {
|
||||
canDrawIcon = true;
|
||||
}
|
||||
|
||||
icon.src = window.canvasApp.urlPrefix + "Images/Icons/teams-module.png";
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent("onMouseClick", onClick);
|
||||
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE); }
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] initialize -> err.message = " + err.message); }
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE); }
|
||||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] onClick -> Entering function."); }
|
||||
|
||||
window.open('https://teams.advancedalgos.net', '_blank');
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] onClick -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); }
|
||||
|
||||
let container;
|
||||
|
||||
/* First we check if this point is inside this object UI. */
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
|
||||
return this.container;
|
||||
|
||||
} else {
|
||||
|
||||
/* This point does not belong to this space. */
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] getContainer -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] draw -> Entering function."); }
|
||||
|
||||
thisObject.container.frame.draw(false, false);
|
||||
|
||||
if (canDrawIcon === false) { return; }
|
||||
|
||||
let breakpointsHeight = 15;
|
||||
|
||||
let imageHeight = 15;
|
||||
let imageWidth = 15;
|
||||
|
||||
let imagePoint = {
|
||||
x: 10,
|
||||
y: thisObject.container.frame.height / 2 - imageHeight / 2 + breakpointsHeight
|
||||
};
|
||||
|
||||
imagePoint = thisObject.container.frame.frameThisPoint(imagePoint);
|
||||
|
||||
browserCanvasContext.drawImage(icon, imagePoint.x, imagePoint.y, imageWidth, imageHeight);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] draw -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
|
||||
function newUsersModule() {
|
||||
|
||||
const MODULE_NAME = "Users Module Button";
|
||||
const INFO_LOG = false;
|
||||
const ERROR_LOG = true;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
var thisObject = {
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer, // returns the inner most container that holds the point received by parameter.
|
||||
initialize: initialize
|
||||
};
|
||||
|
||||
var container = newContainer();
|
||||
container.initialize();
|
||||
thisObject.container = container;
|
||||
|
||||
thisObject.container.frame.width = 50;
|
||||
thisObject.container.frame.height = BOTTOM_SPACE_HEIGHT;
|
||||
|
||||
container.frame.position.x = viewPort.visibleArea.topLeft.x + thisObject.container.frame.width * 0;
|
||||
container.frame.position.y = viewPort.visibleArea.bottomLeft.y;
|
||||
|
||||
container.isDraggeable = false;
|
||||
container.isClickeable = true;
|
||||
|
||||
let icon;
|
||||
let canDrawIcon = false;
|
||||
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] initialize -> Entering function."); }
|
||||
|
||||
if (window.canvasApp.executingAt === 'Master App') {
|
||||
return;
|
||||
}
|
||||
|
||||
icon = new Image();
|
||||
|
||||
icon.onload = onImageLoad;
|
||||
|
||||
function onImageLoad() {
|
||||
canDrawIcon = true;
|
||||
}
|
||||
|
||||
icon.src = window.canvasApp.urlPrefix + "Images/Icons/users-module.png";
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent("onMouseClick", onClick);
|
||||
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE); }
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] initialize -> err.message = " + err.message); }
|
||||
if (callBackFunction !== undefined) { callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE); }
|
||||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] onClick -> Entering function."); }
|
||||
|
||||
window.open('https://users.advancedalgos.net', '_blank');
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] onClick -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); }
|
||||
|
||||
let container;
|
||||
|
||||
/* First we check if this point is inside this object UI. */
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
|
||||
return this.container;
|
||||
|
||||
} else {
|
||||
|
||||
/* This point does not belong to this space. */
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] getContainer -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
|
||||
try {
|
||||
|
||||
if (INFO_LOG === true) { logger.write("[INFO] draw -> Entering function."); }
|
||||
|
||||
thisObject.container.frame.draw(false, false);
|
||||
|
||||
if (canDrawIcon === false) { return; }
|
||||
|
||||
let breakpointsHeight = 15;
|
||||
|
||||
let imageHeight = 15;
|
||||
let imageWidth = 15;
|
||||
|
||||
let imagePoint = {
|
||||
x: 10,
|
||||
y: thisObject.container.frame.height / 2 - imageHeight / 2 + breakpointsHeight
|
||||
};
|
||||
|
||||
imagePoint = thisObject.container.frame.frameThisPoint(imagePoint);
|
||||
|
||||
browserCanvasContext.drawImage(icon, imagePoint.x, imagePoint.y, imageWidth, imageHeight);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] draw -> err.message = " + err.message); }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 466 B |
Binary file not shown.
|
Before Width: | Height: | Size: 560 B |
Binary file not shown.
|
Before Width: | Height: | Size: 464 B |
@@ -59,9 +59,6 @@
|
||||
</Compile>
|
||||
<Compile Include="CloudVM\Exchange\ExchangeAPI.js" />
|
||||
<Compile Include="Exchange\ExchangeAPI.js" />
|
||||
<Compile Include="BottomSpace\KeyVaultModule.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Server\Exchange\ExchangeAPI.js" />
|
||||
<Compile Include="Server\Exchange\exchangeUtils.js" />
|
||||
<Compile Include="Globals.js">
|
||||
@@ -72,9 +69,6 @@
|
||||
<Compile Include="Server\Exchange\Wrappers\binanceClient.js" />
|
||||
<Compile Include="Server\Exchange\Wrappers\poloniex.js" />
|
||||
<Compile Include="Server\Exchange\Wrappers\poloniexClient.js" />
|
||||
<Compile Include="BottomSpace\TeamsModule.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TopSpace\Login.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -151,9 +145,6 @@
|
||||
<Compile Include="BottomSpace\PlayStopButton.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BottomSpace\UsersModule.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebDebugLog.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -31,9 +31,6 @@
|
||||
|
||||
"BottomSpace/DeleteTradingHistory.js",
|
||||
"BottomSpace/ChartAspectRatio.js",
|
||||
"BottomSpace/UsersModule.js",
|
||||
"BottomSpace/TeamsModule.js",
|
||||
"BottomSpace/KeyVaultModule.js",
|
||||
"BottomSpace/PlayStopButton.js",
|
||||
|
||||
"TopSpace/CompanyLogo.js",
|
||||
|
||||
@@ -4,9 +4,6 @@ function newBottomSpace() {
|
||||
var thisObject = {
|
||||
deleteTradingHistory: undefined,
|
||||
chartAspectRatio: undefined,
|
||||
UsersModule: undefined,
|
||||
TeamsModule: undefined,
|
||||
KeyVaultModule: undefined,
|
||||
playStopButton: undefined,
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
@@ -36,15 +33,6 @@ function newBottomSpace() {
|
||||
thisObject.chartAspectRatio = newChartAspectRatio();
|
||||
thisObject.chartAspectRatio.initialize();
|
||||
|
||||
thisObject.UsersModule = newUsersModule();
|
||||
thisObject.UsersModule.initialize();
|
||||
|
||||
thisObject.TeamsModule = newTeamsModule();
|
||||
thisObject.TeamsModule.initialize();
|
||||
|
||||
thisObject.KeyVaultModule = newKeyVaultModule();
|
||||
thisObject.KeyVaultModule.initialize();
|
||||
|
||||
thisObject.playStopButton = newPlayStopButton();
|
||||
thisObject.playStopButton.initialize();
|
||||
}
|
||||
@@ -59,15 +47,6 @@ function newBottomSpace() {
|
||||
container = thisObject.chartAspectRatio.getContainer(point);
|
||||
if (container !== undefined) { return container; }
|
||||
|
||||
container = thisObject.UsersModule.getContainer(point);
|
||||
if (container !== undefined) { return container; }
|
||||
|
||||
container = thisObject.TeamsModule.getContainer(point);
|
||||
if (container !== undefined) { return container; }
|
||||
|
||||
container = thisObject.KeyVaultModule.getContainer(point);
|
||||
if (container !== undefined) { return container; }
|
||||
|
||||
container = thisObject.playStopButton.getContainer(point);
|
||||
if (container !== undefined) { return container; }
|
||||
|
||||
@@ -84,9 +63,6 @@ function newBottomSpace() {
|
||||
drawBackground();
|
||||
thisObject.deleteTradingHistory.draw();
|
||||
thisObject.chartAspectRatio.draw();
|
||||
thisObject.UsersModule.draw();
|
||||
thisObject.TeamsModule.draw();
|
||||
thisObject.KeyVaultModule.draw();
|
||||
thisObject.playStopButton.draw();
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user