103 lines
3.8 KiB
XML
Executable File
103 lines
3.8 KiB
XML
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<dynaForm type="xmlmenu"><MNU_ADD type="link" value="" link="#" onclick="outputdocsAdd(); 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"/><![CDATA[>
|
|
]]><outputdocs_New type="private" defaultValue="../outputdocs/outputdocs_New"/><outputdocs_Edit type="private" defaultValue="../outputdocs/outputdocs_Edit"/><outputdocs_Properties type="private" defaultValue="../outputdocs/outputdocs_Properties"/><outputdocs_Delete type="private" defaultValue="../outputdocs/outputdocs_Delete"/><js type="javascript" replaceTags="1"><![CDATA[
|
|
var currentPagedTable = @#PAGED_TABLE_ID;
|
|
var outputdocsEditor;
|
|
|
|
function outputdocsAdd(){
|
|
popupWindow('@G::LoadTranslation(ID_OUTPUT_DOCUMENTS)', '@G::encryptlink(@#outputdocs_New)?PRO_UID=@%PRO_UID' , 600, 410);
|
|
}
|
|
|
|
function PopupCenter(pageURL, title,w,h) {
|
|
clientWinSize = getClientWindowSize();
|
|
|
|
var left = (screen.width/2)-(w/2);
|
|
var top = (screen.height/2);//-(h/2);
|
|
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
|
|
}
|
|
////////////////////////////////////////////////////
|
|
|
|
var outputdocsEditor;
|
|
function outputdocsEdit( uid, typ ) {
|
|
|
|
if (( _BROWSER.name == 'msie' ) && ( _BROWSER.version < '9' )) {
|
|
PopupCenter('../outputdocs/outputdocs_Edit?OUT_DOC_UID=' + uid, 's', 800, 410);
|
|
return false;
|
|
}
|
|
|
|
wi=770; he=510;
|
|
if ( typ == 'JRXML' || typ == 'ACROFORM' ) { wi=500; he=310; }
|
|
|
|
outputdocsEditor = new leimnud.module.panel();
|
|
outputdocsEditor.options={
|
|
limit : true,
|
|
size : {w:800,h:450},
|
|
position : {x:0,y:0,center:true},
|
|
title : '',
|
|
control : {close:true,resize:false},fx: {modal:false},
|
|
fx : {shadow:false,modal:false}
|
|
};
|
|
|
|
outputdocsEditor.make();
|
|
|
|
|
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
|
url : '../outputdocs/outputdocs_Ajax',
|
|
args: 'action=loadOutputEditor&OUT_DOC_UID='+uid+'&OUT_DOC_TYPE='+typ
|
|
});
|
|
|
|
outputdocsEditor.loader.show();
|
|
oRPC.callback = function(rpc) {
|
|
outputdocsEditor.loader.hide();
|
|
outputdocsEditor.addContent(rpc.xmlhttp.responseText);
|
|
var scs=rpc.xmlhttp.responseText.extractScript();
|
|
scs.evalScript();
|
|
}.extend(this);
|
|
oRPC.make();
|
|
}
|
|
|
|
function outputdocsProperties( uid ) {
|
|
popupWindow('@G::LoadTranslation(ID_OUTPUT_DOCUMENTS)', '@G::encryptlink(@#outputdocs_Properties)?OUT_DOC_UID='+ uid , 600, 530);
|
|
}
|
|
|
|
function outputdocsPropertiesSave( form ) {
|
|
var doc = getField("OUT_DOC_FILENAME");
|
|
if(doc.value=='')
|
|
{ alert(G_STRINGS.ID_FILEGENERATED);
|
|
}
|
|
else
|
|
{
|
|
/*ajax_post( form.action, form, 'POST', function(){
|
|
currentPopupWindow.remove();
|
|
@#PAGED_TABLE_ID.refresh();
|
|
},
|
|
true
|
|
);*/
|
|
ajax_post( form.action, form, 'POST' );
|
|
currentPopupWindow.remove();
|
|
@#PAGED_TABLE_ID.refresh();
|
|
|
|
}
|
|
}
|
|
|
|
function outputdocsSave( form ) {
|
|
tinyMCE.execCommand('mceRemoveControl',false,'form[OUT_DOC_TEMPLATE]');
|
|
form.action = '../outputdocs/outputdocs_Save';
|
|
ajax_post( form.action, form, 'POST' );
|
|
outputdocsEditor.remove();
|
|
@#PAGED_TABLE_ID.refresh();
|
|
|
|
}
|
|
|
|
function outputdocsDelete( uid ) {
|
|
new leimnud.module.app.confirm().make({
|
|
label:'@G::LoadTranslation(ID_MSG_CONFIRM_DELETE_OUTDOC)',
|
|
action:function()
|
|
{
|
|
ajax_function('@G::encryptlink(@#outputdocs_Delete)','','OUT_DOC_UID='+uid,'POST');
|
|
@#PAGED_TABLE_ID.refresh();
|
|
}.extend(this)
|
|
});
|
|
}
|
|
]]></js><SEARCH_FILTER_FORM type="private"/></dynaForm>
|