BUG 8175 Adjustment to loaded, form of triggers in trigger tab.

This commit is contained in:
Hector Cortez
2011-12-14 12:23:48 -04:00
parent 2064874efd
commit 71e744043b
2 changed files with 60 additions and 1 deletions

View File

@@ -139,7 +139,7 @@
<input
style="" class='module_app_button___gray ' id="cancel"
name="cancel" type='button' value="{ID_CANCEL}"
onclick="currentPopupWindow.remove();triggerFromLibrary(); return false;" />
onclick="currentPopupWindow.remove(); if(typeof triggerFromLibrary == 'function'){ triggerFromLibrary(); } return false;" />
</td>
</tr>

View File

@@ -21,6 +21,8 @@
<URL_DYNAFORM_EDITOR type="private" defaultValue="../dynaforms/dynaforms_Editor"/>
<triggersEdit type="private" defaultValue="../triggers/triggers_Edit"/>
<PAGED_TABLE_ID type="private"/>
@@ -70,6 +72,63 @@
window.location.href = "@G::encryptlink(@#URL_DYNAFORM_EDITOR)?PRO_UID="+pro_uid+"&DYN_UID="+uid;
}
// Additional functions required in triggers
function triggerEditWizardSource (sUID){
popupWindow('@G::LoadTranslation(ID_EDIT_TRIGGERS)', '@G::encryptlink(@#triggersEdit)?TRI_UID=' + sUID +'&BYPASS=1' , 770, 510);
}
function triggerSave(form)
{
var triUid = "";
if(document.getElementById('TRI_UID')) {
var triUid = document.getElementById('TRI_UID').value;
}
if(triUid==''){
var triTitle =document.getElementById('TRI_TITLE').value;
if(triTitle==''){
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);
return false;
}
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'&proUid='+(document.getElementById('PRO_UID').value),'POST');
if(!reqName){
alert(G_STRINGS.ID_EXIST_TRIGGERS);
return false;
} else {
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
}
} else {
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
}
}
function triggerSave1(form)
{
var triUid = "";
if(getField('TRI_UID')) {
var triUid = getField('TRI_UID').value;
}
if(triUid == ''){
var triTitle =getField('TRI_TITLE').value.trim();
if(triTitle==''){
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);
return false;
}
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'&proUid='+(getField('PRO_UID').value),'POST');
if(!reqName){
alert(G_STRINGS.ID_EXIST_TRIGGERS);
return false;
} else {
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
}
} else {
ajax_post(form.action, form, 'POST');
currentPopupWindow.remove();
}
}
]]></js>
</dynaForm>