Commit 9f414a0a authored by prumde's avatar prumde

Updated for web-animation-js


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174151 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e1a31e68
...@@ -216,6 +216,67 @@ function getContentPluginUI(data, caller, callback) ...@@ -216,6 +216,67 @@ function getContentPluginUI(data, caller, callback)
} }
function getImagePluginUI(data, caller, callback)
{
try
{
var pWindow = window;
if (! window.e12plugin)
{
pWindow = window.parent;
// Changed by Abhishek T on 23-Feb-17 [For checking plugin defination is present or not in current browser document] START
if (! pWindow.e12plugin) return null;
// Changed by Abhishek T on 23-Feb-17 [For checking plugin defination is present or not in current browser document] END
}
if (! data) throw "Given data is null.";
var MetadataKey = pWindow.e12plugin.enums.MetadataKey,
MetadataValue = pWindow.e12plugin.metadata.MetadataValue,
PluginMetadata = pWindow.e12plugin.metadata.PluginMetadata,
AttachmentsPlugin = pWindow.e12plugin.plugins.AttachmentsPlugin,
metadata = new PluginMetadata();
metadata.put(MetadataKey.OBJ_NAME, new MetadataValue(data.OBJ_NAME));
metadata.put(MetadataKey.REF_SERIES, new MetadataValue(data.REF_SER));
metadata.put(MetadataKey.REF_ID, new MetadataValue(data.REF_ID));
metadata.put(MetadataKey.DOC_TYPE, new MetadataValue(data.DOC_TYPE));
metadata.put(MetadataKey.HOST_URL, new MetadataValue(data.HOST_URL));
metadata.put(MetadataKey.ENABLE_SINGLE_IMAGE, new MetadataValue(data.ENABLE_SINGLE_IMAGE));
metadata.put(MetadataKey.IS_HOSTED_MODE, new MetadataValue(!! data.IS_HOSTED_MODE));
attchPlugin = new AttachmentsPlugin();
attchPlugin.init(metadata);
attchPlugin.requestImageArray(function(imgArr) {
console.log("On requestImageArray : caller >> imgArr["+imgArr+"][" + Object.keys(caller) + "] ");
console.log("callback >> [" + callback + " = " + caller[callback] + "] ");
try
{
caller[callback](imgArr);
}
catch(e)
{
console.log(' caller[callback]()' + e);
}
/*
for (var i in imgArr) {
var img = imgArr[i];
img.classList.add('_image');
container.appendChild(img);
}
*/
});
}
catch (ex)
{
window.alert("Exception in getImagePluginUI() : " + ex);
}
}
// left: 37, up: 38, right: 39, down: 40, // left: 37, up: 38, right: 39, down: 40,
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 // spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36
var keys = {37: 1, 38: 1, 39: 1, 40: 1}; var keys = {37: 1, 38: 1, 39: 1, 40: 1};
......
This diff is collapsed.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<script src="/ecm/assets/js/sha256.js"></script> <script src="/ecm/assets/js/sha256.js"></script>
<script src="/ecm/assets/js/e12riaExt/e12riaExt.nocache.js"></script> <script src="/ecm/assets/js/e12riaExt/e12riaExt.nocache.js"></script>
<script src="/ecm/assets/js/e12PluginWrapper.js"></script> <script src="/ecm/assets/js/e12PluginWrapper.js"></script>
<script src="/ecm/assets/js/web-animations.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function initSearch() { function initSearch() {
new UISearch(document.getElementById('sb-search')); new UISearch(document.getElementById('sb-search'));
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
var getAttachmentsPlugin = window.getAttachmentsPluginUI; var getAttachmentsPlugin = window.getAttachmentsPluginUI;
var getContentPlugin = window.getContentPluginUI; var getContentPlugin = window.getContentPluginUI;
var getImagePlugin = window.getImagePluginUI;
function reinitFlickity() { function reinitFlickity() {
fizzyUIUtils.htmlInit( Flickity, 'flickity' ); fizzyUIUtils.htmlInit( Flickity, 'flickity' );
......
...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect'; ...@@ -46,7 +46,7 @@ import 'core-js/es7/reflect';
/** ALL Firefox browsers require the following to support `@angular/animation`. **/ /** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. import 'web-animations-js'; // Run `npm install --save web-animations-js`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment