BUG 9319 "Problema con el Case Label" SOLVED
- By changing the "Case Label", this is not updated in the APP_CACHE_VIEW table - Solved problem to changing the "Case Label", now is updated in the APP_CACHE_VIEW table - Improvement in file, compliance with the standard PSR2 Note: - When you change the "Case Title" of a task, affecting every case, if it is the current task of the case (otherwise it would not affect the APP_CACHE_VIEW table) - If a task is saved empty the "Case Title" the APP_TITLE take the value #APP_NUMBER (all cases are in the task, this in APP_CACHE_VIEW table)
This commit is contained in:
@@ -76,7 +76,7 @@ var saveDataTaskTemporal = function(iForm)
|
||||
oTaskData.TAS_TYPE_DAY = getField('TAS_TYPE_DAY').value;
|
||||
oTaskData.TAS_CALENDAR = getField('TAS_CALENDAR').value;
|
||||
oTaskData.TAS_TRANSFER_FLY = (getField('TAS_TRANSFER_FLY').checked ? 'TRUE' : 'FALSE');
|
||||
|
||||
|
||||
var fieldEval = new input(getField('TAS_DURATION'));
|
||||
if (getField('TAS_DURATION').value.trim() == '') {
|
||||
fieldEval.failed();
|
||||
@@ -178,82 +178,72 @@ var saveDataTaskTemporal = function(iForm)
|
||||
var saveTaskData = function(oForm, iForm, iType)
|
||||
{
|
||||
iLastTab = iForm;
|
||||
|
||||
|
||||
if (!saveDataTaskTemporal(iForm)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
oTaskData.TAS_UID = getField("TAS_UID").value;
|
||||
|
||||
|
||||
/*
|
||||
while (oTaskData.TAS_TITLE.charAt(0)==" "){
|
||||
oTaskData.TAS_TITLE = oTaskData.TAS_TITLE.substring(1,oTaskData.TAS_TITLE.length) ;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
oTaskData.TAS_TITLE = oTaskData.TAS_TITLE.trim();
|
||||
|
||||
|
||||
if (oTaskData.TAS_TITLE == "") {
|
||||
alert(G_STRINGS.ID_REQ_TITLE );
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//Panel processing //iForm = 6 //Case Labels
|
||||
var pnlProcessing;
|
||||
|
||||
pnlProcessing = new leimnud.module.panel();
|
||||
|
||||
pnlProcessing.options = {
|
||||
//title: "",
|
||||
//theme: this.options.theme,
|
||||
limit: true,
|
||||
size: {w: 250, h: 110},
|
||||
position: {x: 50, y: 50, center: true},
|
||||
control: {close: false, resize: false},
|
||||
statusBar: true,
|
||||
fx:{shadow: true, modal: true}
|
||||
};
|
||||
|
||||
pnlProcessing.make();
|
||||
|
||||
//pnlProcessing.loader.show();
|
||||
pnlProcessing.addContent("<div style=\"margin-left: 1em; padding: 0.80em 0 1em 4em; background: url(/images/classic/loader_B.gif) no-repeat left top;\">" + _("ID_PROCESSING") + "</div>");
|
||||
|
||||
|
||||
//Set AJAX
|
||||
var sParameters = "function=saveTaskData";
|
||||
|
||||
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url: "../tasks/tasks_Ajax",
|
||||
method: "POST",
|
||||
args: sParameters + "&oData=" + oTaskData.toJSONString()
|
||||
});
|
||||
|
||||
|
||||
oRPC.callback = function (rpc) {
|
||||
//pnlProcessing.loader.hide();
|
||||
pnlProcessing.remove();
|
||||
|
||||
var res = rpc.xmlhttp.responseText.parseJSON();
|
||||
|
||||
if (oTaskData.TAS_TITLE) {
|
||||
Pm.data.db.task[getField("INDEX").value].label = Pm.data.db.task[getField("INDEX").value].object.elements.label.innerHTML = oTaskData.TAS_TITLE.replace(re2, "&");
|
||||
}
|
||||
|
||||
|
||||
if (oTaskData.TAS_START) {
|
||||
oTaskData.TAS_START = ((oTaskData.TAS_START == "TRUE")? true : false);
|
||||
Pm.data.render.setTaskINI({task: oTaskData.TAS_UID, value: oTaskData.TAS_START});
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
new leimnud.module.app.info().make({
|
||||
var option = {
|
||||
label: changesSavedLabel
|
||||
});
|
||||
}
|
||||
|
||||
switch (res.status) {
|
||||
case "CRONCL":
|
||||
option = {
|
||||
label: changesSavedLabel + "<br /><br />" + _("APP_TITLE_CASE_LABEL_UPDATE"),
|
||||
width: 350,
|
||||
height: 175
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
new leimnud.module.app.info().make(option);
|
||||
}
|
||||
catch (e) {
|
||||
//No show confirmation
|
||||
}
|
||||
|
||||
|
||||
Pm.tmp.propertiesPanel.remove();
|
||||
}.extend(this);
|
||||
|
||||
|
||||
oRPC.make();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user