-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates directories and placeholder files for new PLUGIN design
- Loading branch information
Showing
8 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/** | ||
* @projectDescription View controller for ONT's "Terms" tab. | ||
* @inherits i2b2.PLUGIN | ||
* @namespace i2b2.PLUGIN. | ||
* @author Nick Benik, Griffin Weber MD PhD | ||
* @version 2.0 | ||
**/ | ||
console.group('Load & Execute component file: PLUGIN'); | ||
console.time('execute time'); | ||
|
||
|
||
|
||
|
||
i2b2.events.afterAllCellsLoaded.add((function() { | ||
// Build the configure object that goes to the plugin-side i2b2 libraries | ||
// Get cells and their known AJAX calls | ||
let ajaxTree = {}; | ||
for (let idx in i2b2) { | ||
if (!idx.includes("PLUGIN") && i2b2[idx].ajax !== undefined) { | ||
// found a cell | ||
ajaxTree[idx] = []; | ||
console.log(idx); | ||
for (let funcName in i2b2[idx].ajax) { | ||
if (funcName.substr(0,1) !== '_' && typeof i2b2[idx].ajax[funcName] === 'function') { | ||
ajaxTree[idx].push(funcName); | ||
} | ||
} | ||
} | ||
} | ||
i2b2.PLUGIN.model.config = {}; | ||
i2b2.PLUGIN.model.config.ajax = ajaxTree; | ||
|
||
// add the list of all known SDX data types | ||
i2b2.PLUGIN.model.config.sdx = Object.keys(i2b2.sdx.TypeControllers); | ||
})); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Below code is executed once the entire cell has been loaded | ||
//================================================================================================== // | ||
i2b2.events.afterCellInit.add((function(cell){ | ||
if (cell.cellCode === "PLUGIN") { | ||
console.debug('[EVENT CAPTURED i2b2.events.afterCellInit]'); | ||
// ___ Register this view with the layout manager ____________________ | ||
i2b2.layout.registerWindowHandler("i2b2.PLUGIN.view", | ||
(function (container, scope) { | ||
// THIS IS THE MASTER FUNCTION THAT IS USED TO INITIALIZE THE WORK CELL'S MAIN VIEW | ||
i2b2.PLUGIN.view.lm_view = container; | ||
|
||
// add the cellWhite flare | ||
let treeTarget = $('<div class="cellWhite" id="i2b2TreeviewOntNav"></div>').appendTo(container._contentElement); | ||
|
||
}).bind(this) | ||
); | ||
} | ||
})); | ||
|
||
|
||
// ================================================================================================== // | ||
console.timeEnd('execute time'); | ||
console.groupEnd(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"files": [ | ||
"PLUGIN_ctrlr_general.js" | ||
], | ||
"preload": [], | ||
"css": [], | ||
"config": { | ||
"name": "Plugins Manager", | ||
"description": "Manager component for modern i2b2v2 plugins.", | ||
"icons": {}, | ||
"category": ["core","plugins"], | ||
"paramTranslation": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* This file is the library that is loaded into a plugin to allow | ||
* communications with the i2b2 cells. | ||
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* This file is the library that is loaded into a plugin to allow | ||
* SDX-style drag and drop with the main i2b2 UI. | ||
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* This file is the library that is loaded into a plugin to allow | ||
* plugins to manage a state which handles iframe contents destruction | ||
* upon iframe movement within the DOM (as performed by Golden Layout) | ||
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Plugin Example</title> | ||
|
||
<script type="text/javascript" src="i2b2-ajax.js" ></script> | ||
|
||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* This is the loader library that handshakes with its iframe parent to get locations for additional library files | ||
* and handles the initialization process (and state restoration) | ||
*/ |