<apex:page id="Page" showHeader="false" sidebar="false" Controller="PersonalEvaluationClipEditController" applyBodyTag="false" applyHtmlTag="false" action="{!init}">
|
<apex:stylesheet value="{!URLFOR($Resource.PersonalEvaluationCss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.SurveyForce, 'jquery.js')}"/>
|
<script type="text/javascript" src="{!URLFOR($Resource.SurveyForce, 'survey_jui.js')}" ></script>
|
<script type="text/javascript">
|
|
(function($) {
|
var a = $.ui.mouse.prototype._mouseMove;
|
$.ui.mouse.prototype._mouseMove = function(b) {
|
if($.browser.msie && document.documentMode >= 9) {
|
b.button = 1;
|
};
|
a.apply(this,[b]);
|
}
|
}(jQuery));
|
|
$(document).ready(function() {
|
$("#justClipList").sortable({
|
axis: 'y', opacity: .6, tolerance: 'pointer', revert: true,
|
update: function(event, ui) {
|
var elemParent = $('#justClipList');
|
var childrenList = elemParent.children();
|
var childIds = new Array();
|
var cIds = "";
|
for(var i = 0; i < childrenList.length; i++){
|
cIds = cIds + childrenList[i].id + ",";
|
}
|
|
cIds = cIds.substr(0, cIds.length - 1);
|
jQuery("input[id*='newOrderList']").val(cIds);
|
jQuery("input[id*='saveOrder1']").effect("pulsate", { times: 2 }, 1000);
|
jQuery("input[id*='saveOrder2']").effect("pulsate", { times: 2 }, 1000);
|
}
|
});
|
|
PersonalEvaluationClipEditController.getAttachmentBody('{!sid}', function(res, event) {
|
if(event.status) {
|
result = res;
|
|
if (result['AttCnt'] > 0) {
|
for (var i = 1; i <= result['AttCnt']; i++) {
|
var body = result[i]['Body'];
|
var id = result[i]['Id'];
|
for (var j = 0; j < result['AttCnt']; j++) {
|
if (document.getElementById("Page:Form:Repeat:" + j + ":attId") != null && id == document.getElementById("Page:Form:Repeat:" + j + ":attId").value) {
|
var imgDiv = document.getElementById("img_div_" + j);
|
imgDiv.innerHTML = '<img src="data:image/png;base64,' + body + '"></img>';
|
}
|
|
}
|
}
|
}
|
} else {
|
alert(event.message);
|
}}, {buffer: false, escape: true, timeout: 20000});
|
});
|
|
function confirmDelete(delno){
|
if(confirm("删除该剪贴图,确定吗?")){
|
deleteClip(delno);
|
}
|
}
|
</script>
|
<apex:form id="Form">
|
<apex:pageMessages />
|
|
<apex:actionFunction name="deleteClip" action="{!deleteClip}" rerender="Form">
|
<apex:param name="param1" value="" assignTo="{!delLineNo}"/>
|
</apex:actionFunction>
|
|
<div class="clip_btnDiv"><apex:commandButton id="saveOrder1" value="{!$Label.LABS_SF_SaveOrder}" rerender="Form" action="{!saveOrder}" style="width:100px"/> <apex:commandButton value="{!$Label.LABS_SF_FIXED}" rerender="dummy" action="{!complete}" style="width:100px"/></div>
|
<apex:inputHidden id="newOrderList" value="{!newOrder}"/>
|
<div id="justClipList">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!clipList}" var="c" id="Repeat">
|
<div id="{!c.lineNo}" class="clip_dragDiv" title="拖动以排序">
|
<apex:inputHidden id="attId" value="{!c.attId}" />
|
<apex:outputPanel id="Panel">
|
<div class="clip_menu">
|
<apex:commandButton value="{!$Label.LABS_SF_Delete}" rerender="Form" onclick="confirmDelete('{!c.lineNo}');" style="width:100px" />
|
<div class="clip_lineNo">{!c.lineNo}</div>
|
</div>
|
<div>{!c.reportName}</div>
|
<div id="img_div_{!cnt}" style="width:322px; height:262px"></div>
|
<div class="clip_textarea"><apex:inputTextarea value="{!c.comment}" cols="50" rows="10"/></div>
|
<br/>
|
</apex:outputPanel>
|
</div>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</div>
|
<br/>
|
<div class="clip_btnDiv"><apex:commandButton id="saveOrder2" value="{!$Label.LABS_SF_SaveOrder}" rerender="Form" action="{!saveOrder}" style="width:100px"/> <apex:commandButton value="{!$Label.LABS_SF_FIXED}" rerender="dummy" action="{!complete}" style="width:100px"/></div>
|
</apex:form>
|
</apex:page>
|