function zebraPrint($parent, $control, ctrlPropreties) { $control.find('.controlData .actionBtn, .lblImageText').fancybox({ 'width' : '100%', 'height' : '100%', 'modal' : true, 'autoScale' : true, 'transitionIn' : CONST_VALUE_NONE, 'transitionOut' : CONST_VALUE_NONE, 'type' : 'iframe', helpers: { overlay: { css: { 'background': 'rgba(204, 255, 238, 0.8)' } } }, onComplete : function() { fvDataNS.fancyboxParam = {}; //fvDataNS.fancyboxParam.ctrlPropreties = ctrlPropreties; //fvDataNS.fancyboxParam.control = $control; var printData = {}; fvDataNS.fancyboxParam.printData = printData; var zebraPrinter = $parent.zebraPrinter.value; var imageWidth; var zebraTextDirection = CONST_TEXT_DIRECTION_VERTICAL; if($parent.zebraTextDirection && $parent.zebraTextDirection.value == CONST_TEXT_DIRECTION_HORIZONTAL){ zebraTextDirection = CONST_TEXT_DIRECTION_HORIZONTAL; } if(zebraTextDirection == CONST_TEXT_DIRECTION_HORIZONTAL && $parent.paperLength && $parent.paperLength.value != ''){ var paperWidth = $parent.paperLength.value; imageWidth = parseFloat(paperWidth) * CONST_MM_PER_INCH * CONST_PIXEL_PER_MM; }else{ switch(zebraPrinter){ case CONST_ZEBRA_QLN_420: // 4inch imageWidth = CONST_4_INCH_WIDTH * CONST_PIXEL_PER_MM; break; case CONST_ZEBRA_QLN_320: // 3inch imageWidth = CONST_3_INCH_WIDTH * CONST_PIXEL_PER_MM; break; case CONST_ZEBRA_QLN_220: // 2 inch imageWidth = CONST_2_INCH_WIDTH * CONST_PIXEL_PER_MM; break; case CONST_PRN_ZEBRA: var paperWidth = $parent.paperWidth.value; if(paperWidth == CONST_2_INCH){ imageWidth = CONST_2_INCH_WIDTH * CONST_PIXEL_PER_MM; }else if(paperWidth == CONST_3_INCH){ imageWidth = CONST_3_INCH_WIDTH * CONST_PIXEL_PER_MM; }else if(paperWidth == CONST_4_INCH){ imageWidth = CONST_4_INCH_WIDTH * CONST_PIXEL_PER_MM; }else{ imageWidth = CONST_4_INCH_WIDTH * CONST_PIXEL_PER_MM; } break; default: // 4inch imageWidth = 104 * CONST_PIXEL_PER_MM; } } printData.imageWidth = imageWidth; printData.zebraPrinterPaperStyle = $parent.zebraPrinterPaperStyle.value; printData.zebraPrinterFontSize = $parent.zebraPrinterFontSize.value; if(isVersion(VERSION_SUPPORT_TEXT_DIRECTION)){ if(!$parent.zebraTextDirection || !$parent.zebraTextDirection.value){ printData.zebraTextDirection = CONST_TEXT_DIRECTION_VERTICAL; }else{ printData.zebraTextDirection = $parent.zebraTextDirection.value; } } if($parent.numberOfCopyType && $parent.numberOfCopyType.value == CONST_VALUE_OTHER){ if($parent.numberOfCopyQues && $parent.numberOfCopyQues.value !== ''){ var ctrlId = $parent.numberOfCopyQues.value; var controlName = fvDataNS.ctrlMap[ctrlId]; if(controlName != undefined){ var parrentProperties = fvDataNS.dataArray[ctrlPropreties.parrentProperties]; var controlsProperties = getCtrlPropertyInRoot(controlName, parrentProperties); printData.numberOfCopy = controlsProperties.val; }else{ printData.numberOfCopy = '1'; } if(printData.numberOfCopy == undefined && printData.numberOfCopy == ''){ printData.numberOfCopy = '1'; } }else{ printData.numberOfCopy = '1'; } }else{ printData.numberOfCopy = $parent.numberOfCopy.value; } printData.zebraPrinterColumn = $parent.zebraPrinterColumn.value; printData.showPrintCtrlCaption = $parent.showPrintCtrlCaption.value; printData.showPrintCtrlCaptionColon = $parent.showPrintCtrlCaptionColon.value; var zebraPrintColumns = $parent.zebraPrintColumns.value; printData.dataCol1 = []; printData.dataCol2 = []; for(var i=0; i