Commit 1831e942 authored by prumde's avatar prumde

updated for Image Element


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