Commit b1e612b2 authored by prumde's avatar prumde

updated for Image Element


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174435 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4c046e98
......@@ -3,8 +3,21 @@
border-top-left-radius: 5px;
width: 100%;
height: calc( 100% - 70px);
text-align: center;
}
.ecm-image:before {
content: ' ';
display: inline-block;
vertical-align: middle;
height: 100%;
}
.ecm-card > ecm-image > .ecm-image > img
{
height: 330px;
}
.ecm-image-icon {
float: left;
/*background-color: mediumvioletred;*/
......
import { Component, OnInit, AfterViewChecked, Input, ViewChild, ElementRef, ViewEncapsulation } from '@angular/core';
declare var getAttachmentsPlugin: any;
declare var getImagePlugin: any;
@Component({
selector: 'ecm-image',
......@@ -35,7 +36,8 @@ export class EcmImageComponent implements OnInit, AfterViewChecked {
}
else
{
this.initAttachImage(this.object,this.refSer, this.refId, 'V', this.isSingleImage, this.height, this.width);
//this.initAttachImage(this.object,this.refSer, this.refId, 'V', this.isSingleImage, this.height, this.width);
this.initSingleImage(this.object,this.refSer, this.refId);
}
}
......@@ -53,7 +55,7 @@ export class EcmImageComponent implements OnInit, AfterViewChecked {
console.log("initImage calling /ibase/rest/E12ExtService/getAttachDocument ");
console.log("created imageUrl " + this.imageUrl);
}
/*
initAttachImage(objName:string, refSer:string, refId:string, uiMode:string, isSingleImage:any, height:string, width:string)
{
console.log("loadImage check window.getAttachmentsPlugin ");
......@@ -93,7 +95,8 @@ export class EcmImageComponent implements OnInit, AfterViewChecked {
this.targetDiv.nativeElement.innerHTML = "";
}
}
/*
*/
initSingleImage(objName:string, refSer:string, refId:string)
{
console.log("initSingleImage check window.getImagePlugin ");
......@@ -107,8 +110,6 @@ export class EcmImageComponent implements OnInit, AfterViewChecked {
OBJ_NAME : objName,
REF_SER : refSer,
REF_ID : refId,//ITEM_CODE
// host url can be empty in browser
// for mobile devices it has be specified correctly
HOST_URL : "",
DOC_TYPE : "",
IS_HOSTED_MODE : true || false,
......@@ -116,10 +117,14 @@ export class EcmImageComponent implements OnInit, AfterViewChecked {
}, this, 'imageCallback');
}
imageCallback(data:any) {
console.log("imageCallback data>>" + data);
imageCallback(imgData:any) {
console.log("imageCallback imgData>>" + imgData);
if( imgData && imgData[0]) {
this.targetDiv.nativeElement.appendChild( imgData[0] );
this.loadingDiv.nativeElement.style.display = 'none';
}
}
*/
ngAfterViewChecked()
{
......
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