배경이미지 출력순서 고정

main
이범준 12 months ago
parent 6306bc0637
commit e29fdaaa35

@ -4,8 +4,8 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptArtclStng; import cokr.xit.fims.sprt.OtptArtclStng;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptStngQuery; import cokr.xit.fims.sprt.OtptStngQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -13,7 +13,13 @@ import cokr.xit.foundation.data.DataObject;
@Mapper("otptStngMapper") @Mapper("otptStngMapper")
public interface OtptStngMapper extends AbstractMapper { public interface OtptStngMapper extends AbstractMapper {
/** ..<br /> /** .<br />
* @param query
* @return
*/
DataObject selectOtptBscStng(OtptStngQuery otptStngQuery);
/** .<br />
* @param query * @param query
* @return * @return
*/ */
@ -25,4 +31,6 @@ public interface OtptStngMapper extends AbstractMapper {
int insertArtclStng(OtptArtclStng insert); int insertArtclStng(OtptArtclStng insert);
} }

@ -12,8 +12,8 @@ import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng; import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng;
import cokr.xit.fims.cmmn.pdf.PDFFormat; import cokr.xit.fims.cmmn.pdf.PDFFormat;
import cokr.xit.fims.cmmn.pdf.format.Advntce; import cokr.xit.fims.cmmn.pdf.format.Advntce;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptArtclStng; import cokr.xit.fims.sprt.OtptArtclStng;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptStngQuery; import cokr.xit.fims.sprt.OtptStngQuery;
import cokr.xit.fims.sprt.dao.OtptStngMapper; import cokr.xit.fims.sprt.dao.OtptStngMapper;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;
@ -25,6 +25,18 @@ public class OtptStngBean extends AbstractComponent {
@Resource(name = "otptStngMapper") @Resource(name = "otptStngMapper")
private OtptStngMapper otptStngMapper; private OtptStngMapper otptStngMapper;
/** .
* @param query
* @return
*/
public DataObject getOtptBscStng(OtptStngQuery otptStngQuery) {
return otptStngMapper.selectOtptBscStng(otptStngQuery);
}
/** .
* @param query
* @return
*/
public Map<String, Object> getOtptArtclStngMap(OtptStngQuery query){ public Map<String, Object> getOtptArtclStngMap(OtptStngQuery query){
Map<String,Object> otptStngMap = new HashMap<String,Object>(); Map<String,Object> otptStngMap = new HashMap<String,Object>();
@ -62,7 +74,11 @@ public class OtptStngBean extends AbstractComponent {
return otptStngMap; return otptStngMap;
} }
public boolean saveOtptStng(OtptForm otptForm) { /** .
* @param otptForm
* @return
*/
public boolean saveOtptArtclStng(OtptForm otptForm) {
try { try {
String userId = currentUser().getId(); String userId = currentUser().getId();
@ -102,4 +118,6 @@ public class OtptStngBean extends AbstractComponent {
return true; return true;
} }
} }

@ -2,9 +2,11 @@ package cokr.xit.fims.sprt.service.bean;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -348,7 +350,23 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
otptStngQuery.setSndngSeCd(sndngSeCd); otptStngQuery.setSndngSeCd(sndngSeCd);
otptStngQuery.setPaperSeCd(paperSeCd); otptStngQuery.setPaperSeCd(paperSeCd);
List<DataObject> otptStng = otptStngMapper.selectOtptArtclStngList(otptStngQuery); List<DataObject> otptArtclStngList = otptStngMapper.selectOtptArtclStngList(otptStngQuery);
pdfFormat.appendOtptAttribute(otptArtclStngList);
Comparator<DataObject> comparator1 = (item1, item2) -> {
int int1 = item1.string("UNIQUE_YN").equals("Y") ? 0 : 1;
int int2 = item2.string("UNIQUE_YN").equals("Y") ? 0 : 1;
return Integer.compare(int1, int2);
};
Comparator<DataObject> comparator2 = (item1, item2) -> {
int int1 = item1.number("OTPT_ARTCL_ORDR").intValue();
int int2 = item2.number("OTPT_ARTCL_ORDR").intValue();
return Integer.compare(int1, int2);
};;
otptArtclStngList = otptArtclStngList.stream()
.sorted(comparator1.thenComparing(comparator2)).collect(Collectors.toList());
for(DataObject dataObject : dataObjectList) { for(DataObject dataObject : dataObjectList) {
//페이지생성(건별) //페이지생성(건별)
@ -364,23 +382,23 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
pdfPrintUtil.renderFoldLine(contentStream, paperWidth, paperHeight); pdfPrintUtil.renderFoldLine(contentStream, paperWidth, paperHeight);
for(DataObject otptItemStng : otptStng) { for(DataObject otptArtclStng : otptArtclStngList) {
String otptArtclNm = otptItemStng.string("OTPT_ARTCL_NM"); String otptArtclNm = otptArtclStng.string("OTPT_ARTCL_NM");
DefaultOtptArtclStng prototypeStng = prototypeStngList.stream() DefaultOtptArtclStng prototypeStng = prototypeStngList.stream()
.filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0); .filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0);
float[] pstn = pdfPrintUtil.getPstnStng(prototypeStng, otptItemStng, paperSeCd); float[] pstn = pdfPrintUtil.getPstnStng(prototypeStng, otptArtclStng, paperSeCd);
float[] size = pdfPrintUtil.getSize(prototypeStng, otptItemStng); float[] size = pdfPrintUtil.getSize(prototypeStng, otptArtclStng);
boolean forPost = prototypeStng.isForPost(); boolean forPost = prototypeStng.isForPost();
String defaultValue = prototypeStng.getOtptBscVl(); String defaultValue = prototypeStng.getOtptBscVl();
if(prototypeStng.getComponentType().equals("text")) { if(prototypeStng.getComponentType().equals("text")) {
String align = pdfPrintUtil.getAlign(prototypeStng, otptItemStng); String align = pdfPrintUtil.getAlign(prototypeStng, otptArtclStng);
PDType0Font font = pdfPrintUtil.getFontType(prototypeStng, otptItemStng, fontMap); PDType0Font font = pdfPrintUtil.getFontType(prototypeStng, otptArtclStng, fontMap);
int fontSz = pdfPrintUtil.getFontSize(prototypeStng, otptItemStng); int fontSz = pdfPrintUtil.getFontSize(prototypeStng, otptArtclStng);
RenderingMode fontStyle = pdfPrintUtil.getFontStyle(prototypeStng, otptItemStng); RenderingMode fontStyle = pdfPrintUtil.getFontStyle(prototypeStng, otptArtclStng);
PDColor fontColor = pdfPrintUtil.getFontColor(prototypeStng, otptItemStng); PDColor fontColor = pdfPrintUtil.getFontColor(prototypeStng, otptArtclStng);
String textValue = pdfFormat.getMappingValue(otptArtclNm,defaultValue,forPost,dataObject,printOption,pdfPrintUtil); String textValue = pdfFormat.getMappingValue(otptArtclNm,defaultValue,forPost,dataObject,printOption,pdfPrintUtil);

@ -427,13 +427,13 @@ public class Sprt01Controller extends ApplicationController {
ModelAndView mav = new ModelAndView("fims/sprt/sprt01200-main"); ModelAndView mav = new ModelAndView("fims/sprt/sprt01200-main");
mav.addObject("pageName", "sprt01200-main"); mav.addObject("pageName", "sprt01200-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054","FIM047","FIM078"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054","FIM047","FIM078","FIM080");
mav.addObject("FIM047List", commonCodes.get("FIM047")); mav.addObject("FIM047List", commonCodes.get("FIM047"));
mav.addObject("FIM054List", commonCodes.get("FIM054")); mav.addObject("FIM054List", commonCodes.get("FIM054"));
mav.addObject("FIM078List", commonCodes.get("FIM078")); mav.addObject("FIM078List", commonCodes.get("FIM078"));
mav.addObject("FIM080List", commonCodes.get("FIM080"));
addCodes(commonCodes, mav, "FIM047", "FIM054", "FIM078"); addCodes(commonCodes, mav, "FIM047", "FIM054", "FIM078","FIM080");
return mav; return mav;
} }
@ -445,10 +445,7 @@ public class Sprt01Controller extends ApplicationController {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
Map<String,Object> otptArtclStngMap = otptStngBean.getOtptArtclStngMap(otptStngQuery); //출력 설정 제목
mav.addObject("otptArtclStngMap", otptArtclStngMap);
String institute = currentUser().getInstitute(); String institute = currentUser().getInstitute();
String account = currentUser().getAccount(); String account = currentUser().getAccount();
ManagedUser currentUser = userMapper.getUser(account, institute); ManagedUser currentUser = userMapper.getUser(account, institute);
@ -474,6 +471,16 @@ public class Sprt01Controller extends ApplicationController {
String otptStngTitle = "["+sggNm+", "+taskSeNm+"]"+" "+sndngSeNm+" "+"("+otptPaperSeNm+")"; String otptStngTitle = "["+sggNm+", "+taskSeNm+"]"+" "+sndngSeNm+" "+"("+otptPaperSeNm+")";
mav.addObject("otptStngTitle", otptStngTitle); mav.addObject("otptStngTitle", otptStngTitle);
//출력물 기본 설정
DataObject otptBscStng = new DataObject();
otptBscStng = otptStngBean.getOtptBscStng(otptStngQuery);
mav.addObject("otptGlobalStng", otptBscStng);
//출력 요소별 설정
Map<String,Object> otptArtclStngMap = otptStngBean.getOtptArtclStngMap(otptStngQuery);
mav.addObject("otptArtclStngMap", otptArtclStngMap);
return mav; return mav;
} }
@ -484,7 +491,7 @@ public class Sprt01Controller extends ApplicationController {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false; boolean saved = false;
saved = otptStngBean.saveOtptStng(otptForm); saved = otptStngBean.saveOtptArtclStng(otptForm);
mav.addObject("saved", saved); mav.addObject("saved", saved);
return mav; return mav;

@ -2,6 +2,25 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.sprt.dao.OtptStngMapper"> <mapper namespace="cokr.xit.fims.sprt.dao.OtptStngMapper">
<select id="selectOtptBscStng" parameterType="cokr.xit.fims.sprt.OtptStngQuery" resultType="dataobject">
/* 출력물 기본 설정 조회(otptStngMapper.selectOtptBscStng) */
SELECT OTPT_BSC_ID
, SGG_CD
, TASK_SE_CD
, SNDNG_SE_CD
, PAPER_SE_CD
, FOLD_LINE_PSTN_SE_CD
, BCRN_IMG_PATH
, BCRN_IMG_FILE_NM
, OTPT_PHOTO_CNT
FROM TB_OTPT_BSC_STNG
WHERE USE_YN = 'Y'
AND SGG_CD = #{sggCd}
AND TASK_SE_CD = #{taskSeCd}
AND SNDNG_SE_CD = #{sndngSeCd}
AND PAPER_SE_CD = #{paperSeCd}
</select>
<select id="selectOtptArtclStngList" parameterType="cokr.xit.fims.sprt.OtptStngQuery" resultType="dataobject"> <select id="selectOtptArtclStngList" parameterType="cokr.xit.fims.sprt.OtptStngQuery" resultType="dataobject">
/* 출력 항목 설정 조회(otptStngMapper.selectOtptArtclStngList) */ /* 출력 항목 설정 조회(otptStngMapper.selectOtptArtclStngList) */
SELECT OTPT_FORM_ID SELECT OTPT_FORM_ID
@ -19,6 +38,7 @@ SELECT OTPT_FORM_ID
, FONT_COLOR , FONT_COLOR
, FONT_STYLE , FONT_STYLE
, TEXT_SORT , TEXT_SORT
, OTPT_ARTCL_ORDR
FROM TB_OTPT_FORM_STNG FROM TB_OTPT_FORM_STNG
WHERE USE_YN = 'Y' WHERE USE_YN = 'Y'
AND SGG_CD = #{sggCd} AND SGG_CD = #{sggCd}

@ -37,8 +37,14 @@
</div> </div>
</div> </div>
<h3 id="currentOtpt--${pageName}" class="bg-lighter" style="min-height:30px;"> <div class="d-flex justify-content-between">
</h3> <span id="currentOtpt--${pageName}" class="bg-lighter h3" style="min-height:30px;">
</span>
<form id="frmGlobalEdit--${pageName}">
<span id="otptGlobalStng--${pageName}">
</span>
</form>
</div>
<div class="row mb-3 justify-content-start"> <div class="row mb-3 justify-content-start">
<div class="col-md-12"> <div class="col-md-12">
@ -210,21 +216,52 @@
</tr> </tr>
</template> </template>
<template id="dropdownTemplate--${pageNmae}"> <template id="dropdownTemplate--${pageName}">
<li><a class="dropdown-item" onclick="{onclick}">{DSCRP}</a></li> <li><a class="dropdown-item" onclick="{onclick}">{DSCRP}</a></li>
</template> </template>
<template id="foldLinePstnTemplate--${pageName}">
<span class="px-2">
<label class="col-form-label bg-lighter px-2">접는선 위치</label>
<label>
<input type="radio" name="foldLinePstnSeCd" value="">
미표시
</label>
<c:forEach items="${FIM080List}" var="item">
<label>
<input type="radio" name="foldLinePstnSeCd" value="${item.code}">
${item.value}
</label>
</c:forEach>
</span>
</template>
<template id="bcrnTemplate--${pageName}">
<span class="px-2">
<label class="col-form-label bg-lighter px-2">배경이미지</label>
<button type="button">배경이미지</button>
</span>
</template>
<template id="photoCntTemplate--${pageName}">
<span class="px-2">
<label class="col-form-label bg-lighter px-2">사진 출력</label>
<input type="text" name="otptPhotoCnt" class="form-control w-px-50" /> 장
</span>
</template>
<script> <script>
var FIM054 = new CommonCodes(${FIM054}); var FIM054 = new CommonCodes(${FIM054});
var FIM047 = new CommonCodes(${FIM047}); var FIM047 = new CommonCodes(${FIM047});
var FIM078 = new CommonCodes(${FIM078}); var FIM078 = new CommonCodes(${FIM078});
var FIM080 = new CommonCodes(${FIM080});
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = {};
$(document).ready(function(){ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.otptGlobalStng = {};
$P.otptArtclStngMap = {}; $P.otptArtclStngMap = {};
$("#btnSave--${pageName}").attr("disabled","disabled"); $("#btnSave--${pageName}").attr("disabled","disabled");
@ -246,6 +283,8 @@ $(document).ready(function(){
$("#btnUniqueDel--${pageName}").removeAttr("disabled"); $("#btnUniqueDel--${pageName}").removeAttr("disabled");
$("#btnMultipleAdd--${pageName}").removeAttr("disabled"); $("#btnMultipleAdd--${pageName}").removeAttr("disabled");
$("#btnMultipleDel--${pageName}").removeAttr("disabled"); $("#btnMultipleDel--${pageName}").removeAttr("disabled");
$("#currentOtpt--${pageName}").text("");
$("#otptGlobalStng--${pageName}").html("");
$("#tbodyUnique--${pageName}").html(""); $("#tbodyUnique--${pageName}").html("");
$("#tbodyMultiple--${pageName}").html(""); $("#tbodyMultiple--${pageName}").html("");
@ -255,12 +294,19 @@ $(document).ready(function(){
$("#frmEdit--${pageName}").find("[name='paperSeCd']").val(query.paperSeCd); $("#frmEdit--${pageName}").find("[name='paperSeCd']").val(query.paperSeCd);
$("#currentOtpt--${pageName}").text(resp.otptStngTitle); $("#currentOtpt--${pageName}").text(resp.otptStngTitle);
if(resp.otptGlobalStng != null){
$P.otptGlobalStng = resp.otptGlobalStng;
} else {
$P.otptGlobalStng = {};
}
$P.otptArtclStngMap = resp.otptArtclStngMap; $P.otptArtclStngMap = resp.otptArtclStngMap;
$P.renderOtptStngGrid("tbodyUnique--${pageName}", $P.renderOtptGlobalStng($P.otptGlobalStng);
$P.renderOtptArtclStngGrid("tbodyUnique--${pageName}",
$P.otptArtclStngMap.unique.prototypeList, $P.otptArtclStngMap.unique.prototypeList,
$P.otptArtclStngMap.unique.dataList); $P.otptArtclStngMap.unique.dataList);
$P.renderOtptStngGrid("tbodyMultiple--${pageName}", $P.renderOtptArtclStngGrid("tbodyMultiple--${pageName}",
$P.otptArtclStngMap.multiple.prototypeList, $P.otptArtclStngMap.multiple.prototypeList,
$P.otptArtclStngMap.multiple.dataList); $P.otptArtclStngMap.multiple.dataList);
} }
@ -268,7 +314,29 @@ $(document).ready(function(){
} }
$P.renderOtptStngGrid = (tbodyId, prototypeList, dataList) => { //출력 전역 설정 렌더링
$P.renderOtptGlobalStng = (otptGlobalStng) => {
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
if(paperSeCd == "01"){
$("#otptGlobalStng--${pageName}").append(document.getElementById("foldLinePstnTemplate--${pageName}").innerHTML);
if(otptGlobalStng.foldLinePstnSeCd == null){
otptGlobalStng.foldLinePstnSeCd = "";
}
$("#frmGlobalEdit--${pageName}")
.find(":radio[name='foldLinePstnSeCd']")
.filter("[value='"+otptGlobalStng.foldLinePstnSeCd+"']")
.prop("checked", true);
}
$("#otptGlobalStng--${pageName}").append(document.getElementById("bcrnTemplate--${pageName}").innerHTML);
$("#otptGlobalStng--${pageName}").append(document.getElementById("photoCntTemplate--${pageName}").innerHTML);
}
//출력 요소 그리드 렌더링
$P.renderOtptArtclStngGrid = (tbodyId, prototypeList, dataList) => {
var components = "<option value='' data-component-type=''>선택</option>"; var components = "<option value='' data-component-type=''>선택</option>";
@ -336,7 +404,8 @@ $(document).ready(function(){
} }
var rowSpinButtons = $(this).find("td[data-col='otptArtclOrdr']").find("button"); var rowSpinButtons = $(this).find("td[data-col='otptArtclOrdr']").find("button");
fnMakeRowSpinner(this,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv));
fnMakeRowSpinner(this,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv), $P.validForBackground);
}); });
} }
@ -381,7 +450,7 @@ $(document).ready(function(){
var selectableArr = prototypeList.filter(item => existArr.indexOf(item.otptArtclNm) == -1); var selectableArr = prototypeList.filter(item => existArr.indexOf(item.otptArtclNm) == -1);
var template = document.getElementById("dropdownTemplate--${pageNmae}"); var template = document.getElementById("dropdownTemplate--${pageName}");
if(selectableArr.length < 1){ if(selectableArr.length < 1){
var li = template.innerHTML; var li = template.innerHTML;
@ -435,7 +504,7 @@ $(document).ready(function(){
scrollDiv = "scrollMultiple--${pageName}"; scrollDiv = "scrollMultiple--${pageName}";
} }
var rowSpinButtons = $(lastTr).find("td[data-col='otptArtclOrdr']").find("button"); var rowSpinButtons = $(lastTr).find("td[data-col='otptArtclOrdr']").find("button");
fnMakeRowSpinner(lastTr,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv)); fnMakeRowSpinner(lastTr,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv), $P.validForBackground);
if(otptArtclNm != null && otptArtclNm != ""){ if(otptArtclNm != null && otptArtclNm != ""){
@ -482,6 +551,13 @@ $(document).ready(function(){
} else { } else {
$("#scrollMultiple--${pageName}").scrollTop($("#scrollMultiple--${pageName}")[0].scrollHeight); $("#scrollMultiple--${pageName}").scrollTop($("#scrollMultiple--${pageName}")[0].scrollHeight);
} }
if(otptArtclNm == "background"){ //배경이미지 순서 보정
if($("#tbodyUnique--${pageName}").find("tr").length >= 2){
$("#tbodyUnique--${pageName}").find("tr").eq(0).before(lastTr);
}
}
} }
//행 삭제 //행 삭제
@ -658,6 +734,23 @@ $(document).ready(function(){
} }
$P.validForBackground = (eventInfo) => {
if(eventInfo.clickedButtonType == "up"){
if($P.fnGetElement(eventInfo.siblingRow,"otptArtclNm").value == "background"){
alert("배경이미지 순서는 변경할 수 없습니다.");
return false;
}
}
if(eventInfo.clickedButtonType == "down"){
if($P.fnGetElement(eventInfo.currentRow,"otptArtclNm").value == "background"){
alert("배경이미지 순서는 변경할 수 없습니다.");
return false;
}
}
return true;
};
$("#theadUnique--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML); $("#theadUnique--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML);
$("#theadMultiple--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML); $("#theadMultiple--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML);

@ -52,7 +52,15 @@ function fnMakeOptionStyleSelect(selectEl){
/************************************************************************** /**************************************************************************
* 위치 이동 가능한 테이블 * 위치 이동 가능한 테이블
**************************************************************************/ **************************************************************************/
function fnMakeRowSpinner(tableRowEl, upBtnEl, downBtnEl, scrollEl){ function fnMakeRowSpinner(tableRowEl, upBtnEl, downBtnEl, scrollEl, validFunc){
if(validFunc != undefined && validFunc != null){
tableRowEl.validForComponent = validFunc;
} else {
tableRowEl.validForComponent = function(eventInfo){
return true;
};
}
$(upBtnEl).on("click", function(){ $(upBtnEl).on("click", function(){
var tbody = $(tableRowEl).parent(); var tbody = $(tableRowEl).parent();
@ -69,6 +77,17 @@ function fnMakeRowSpinner(tableRowEl, upBtnEl, downBtnEl, scrollEl){
var beforeIndex = $(tableRowEl).index() - 1; var beforeIndex = $(tableRowEl).index() - 1;
var beforeTr = $(tbody).find("tr").eq(beforeIndex); var beforeTr = $(tbody).find("tr").eq(beforeIndex);
var eventInfo = {
clickedButtonType : "up",
currentRow : tableRowEl,
siblingRow : beforeTr
};
if(!tableRowEl.validForComponent(eventInfo)){
return;
}
var rowStart = beforeTr.offset().top; var rowStart = beforeTr.offset().top;
var rowHeight = beforeTr.outerHeight(); var rowHeight = beforeTr.outerHeight();
var rowMiddle = rowStart+(rowHeight/2); var rowMiddle = rowStart+(rowHeight/2);
@ -99,6 +118,17 @@ function fnMakeRowSpinner(tableRowEl, upBtnEl, downBtnEl, scrollEl){
var afterIndex = $(tableRowEl).index() + 1; var afterIndex = $(tableRowEl).index() + 1;
var afterTr = $(tbody).find("tr").eq(afterIndex); var afterTr = $(tbody).find("tr").eq(afterIndex);
var eventInfo = {
clickedButtonType : "down",
currentRow : tableRowEl,
siblingRow : afterTr
};
if(!tableRowEl.validForComponent(eventInfo)){
return;
}
var rowStart = afterTr.offset().top; var rowStart = afterTr.offset().top;
var rowHeight = afterTr.outerHeight(); var rowHeight = afterTr.outerHeight();
var rowMiddle = rowStart+(rowHeight/2); var rowMiddle = rowStart+(rowHeight/2);

Loading…
Cancel
Save