Files
luos/workflow/engine/xmlform/inputdocs/inputdocs_Options.xml
2014-04-21 10:21:03 -04:00

67 lines
2.6 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu">
<MNU_ADD type="link" value="" link="#" onclick="inputdocsAdd(); return false;" colAlign="left" colWidth="100">
<en><![CDATA[New]]></en>
</MNU_ADD>
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<PRO_UID type="private"/>
<inputdocsEdit type="private" defaultValue="../inputdocs/inputdocs_Edit"/>
<inputdocsDelete type="private" defaultValue="../inputdocs/inputdocs_Delete"/>
<js type="javascript" replaceTags="1"><![CDATA[
var currentPagedTable = @#PAGED_TABLE_ID;
function inputdocsAdd(){//alert('@G::encryptlink(@#inputdocsEdit)?PRO_UID=@%PRO_UID');
popupWindow('@G::LoadTranslation(ID_NEW_INPUTDOCS)', '@G::encryptlink(@#inputdocsEdit)?PRO_UID=@%PRO_UID' , 500, 410);
}
function inputdocsEdit( uid ) {// alert('@G::encryptlink(@#inputdocsEdit)?INP_DOC_UID='+ uid);
popupWindow('@G::LoadTranslation(ID_EDIT_INPUTDOCS)', '@G::encryptlink(@#inputdocsEdit)?INP_DOC_UID='+ uid , 500, 410);
}
function validate_form(){
var sw = true;
sw = sw && (getField('INP_DOC_TITLE').value!='');
return sw;
}
function inputdocsSave( form ) {
var nameInput = getField('INP_DOC_TITLE').value;
var proUid = getField('PRO_UID').value;
if(getField('INP_DOC_UID').value==''){
if (validate_form()){
reqName=ajax_function(form.action,'lookForNameInput','NAMEINPUT='+encodeURIComponent(nameInput)+'&proUid='+encodeURIComponent(proUid),'POST') ;
if(reqName){
ajax_post( form.action, form, 'POST' );
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
}else{
alert(G_STRINGS.ID_EXIST_INPUTDOCUMENT);return false;
}
}else{
alert('@G::LoadTranslation(ID_INPUT_DOC_TITLE_REQUIRED)'); return false;
}
}else{
if (validate_form()){
ajax_post( form.action, form, 'POST' );
currentPopupWindow.remove();
@#PAGED_TABLE_ID.refresh();
}else{
alert('@G::LoadTranslation(ID_INPUT_DOC_TITLE_REQUIRED)'); return false;
}
}
}
function inputdocsDelete( uid ) {
result = ajax_function('@G::encryptlink(@#inputdocsDelete)','getRelationInfDoc','INP_DOC_UID='+uid,'POST');
labelToshow = (result)?'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_IDOCUMENT)':'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_DOCUMENT)';
new leimnud.module.app.confirm().make({
label:labelToshow,
action:function()
{
ajax_function('@G::encryptlink(@#inputdocsDelete)','deleteInputDocument','INP_DOC_UID='+uid,'POST');
@#PAGED_TABLE_ID.refresh();
}.extend(this)
});
}
]]></js>
<SEARCH_FILTER_FORM type="private"/>
</dynaForm>