Improvemnets in the skins cookies, and dynaforms editor
This commit is contained in:
@@ -43,9 +43,18 @@ var verifyLogin = function() {
|
||||
case 'saveJavascript':
|
||||
dynaformEditor.saveJavascript();
|
||||
break;
|
||||
case 'changeJavascriptCode':
|
||||
dynaformEditor.changeJavascriptCode(false);
|
||||
break;
|
||||
case 'close':
|
||||
dynaformEditor.close();
|
||||
break;
|
||||
case 'saveProperties':
|
||||
dynaformEditor.saveProperties(false);
|
||||
break;
|
||||
case 'changeFormType':
|
||||
changeFormType(false);
|
||||
break;
|
||||
case 'changeToPreview':
|
||||
dynaformEditor.changeToPreview();
|
||||
break;
|
||||
@@ -329,7 +338,7 @@ var dynaformEditor={
|
||||
this.saveJavascript();
|
||||
break;
|
||||
case "properties":
|
||||
this.saveProperties();
|
||||
this.saveProperties(false);
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -354,7 +363,7 @@ var dynaformEditor={
|
||||
this.saveJavascript();
|
||||
break;
|
||||
case "properties":
|
||||
this.saveProperties();
|
||||
this.saveProperties(false);
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -402,13 +411,20 @@ var dynaformEditor={
|
||||
}
|
||||
this.responseAction = true;
|
||||
},
|
||||
saveProperties:function()
|
||||
saveProperties:function(checkSessionPersists)
|
||||
{
|
||||
checkSessionPersists = typeof(checkSessionPersists) != 'undefined' ? checkSessionPersists : true;
|
||||
if (checkSessionPersists) {
|
||||
if (!sessionPersits()) {
|
||||
showPrompt('saveProperties');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var form=this.views["properties"].getElementsByTagName("form")[0];
|
||||
var post=ajax_getForm(form);
|
||||
var response=this.ajax.set_properties(this.A,this.dynUid,post);
|
||||
if (response!=0){
|
||||
G.alert(response["*message"]);
|
||||
if (typeof(response["*message"])==="string") {
|
||||
G.alert(response["*message"]);
|
||||
}
|
||||
this.responseAction = true;
|
||||
},
|
||||
@@ -785,8 +801,15 @@ var dynaformEditor={
|
||||
showRowById('JS_TITLE');hideRowById('JS_LIST');hideRowById('JS');}
|
||||
|
||||
},
|
||||
changeJavascriptCode:function()
|
||||
changeJavascriptCode:function(checkSessionPersists)
|
||||
{
|
||||
checkSessionPersists = typeof(checkSessionPersists) != 'undefined' ? checkSessionPersists : true;
|
||||
if (checkSessionPersists) {
|
||||
if (!sessionPersits()) {
|
||||
showPrompt('changeJavascriptCode');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var field=getField("JS_LIST","dynaforms_JSEditor");
|
||||
var value=field.value;
|
||||
if (this.currentJS)
|
||||
|
||||
@@ -69,7 +69,6 @@ if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
if ($aRow) {
|
||||
setcookie("workspaceSkin", SYS_SKIN, time() + 24*60*60, "/sys".SYS_SYS);
|
||||
if ($aRow['LOG_STATUS'] != 'CLOSED' && $aRow['LOG_END_DATE'] == null) {
|
||||
$weblog = new LoginLog();
|
||||
|
||||
@@ -111,6 +110,8 @@ if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
|
||||
setcookie("workspaceSkin", SYS_SKIN, time() + 24*60*60, "/sys".SYS_SYS);
|
||||
|
||||
if (strlen($msg) > 0) {
|
||||
$_SESSION['G_MESSAGE'] = $msg;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,28 @@ if(document.getElementById("form[DYN_TYPE]").value=="grid"){
|
||||
hideRowById('ADJUSTGRIDSWIDTH');
|
||||
}
|
||||
|
||||
function changeFormType(checkSessionPersists) {
|
||||
checkSessionPersists = typeof(checkSessionPersists) != 'undefined' ? checkSessionPersists : true;
|
||||
if (checkSessionPersists) {
|
||||
if (!sessionPersits()) {
|
||||
showPrompt('changeFormType');
|
||||
return;
|
||||
}
|
||||
}
|
||||
var proUid = document.getElementById("form[PRO_UID]").value;
|
||||
var dynUid = document.getElementById("form[DYN_UID]").value;
|
||||
|
||||
if(document.getElementById("form[DYN_TYPE]").value=="grid"){
|
||||
validateGridConversion(proUid,dynUid);
|
||||
} else {
|
||||
changeToolbar("xmlform");
|
||||
showRowById('WIDTH');
|
||||
showRowById('NEXTSTEPSAVE');
|
||||
showRowById('PRINTDYNAFORM');
|
||||
showRowById('ADJUSTGRIDSWIDTH');
|
||||
}
|
||||
}
|
||||
|
||||
function getElementsByClassNameCrossBrowser(searchClass,node,tag) {
|
||||
|
||||
var classElements = new Array();
|
||||
@@ -112,20 +134,7 @@ function getElementsByClassNameCrossBrowser(searchClass,node,tag) {
|
||||
// this evaluates whenever a change is made and if its posible to convert
|
||||
// a dynaform grid into a normal dynaform and vice versa.
|
||||
|
||||
leimnud.event.add(getField('DYN_TYPE'), 'change', function() {
|
||||
var proUid = document.getElementById("form[PRO_UID]").value;
|
||||
var dynUid = document.getElementById("form[DYN_UID]").value;
|
||||
|
||||
if(document.getElementById("form[DYN_TYPE]").value=="grid"){
|
||||
validateGridConversion(proUid,dynUid);
|
||||
} else {
|
||||
changeToolbar("xmlform");
|
||||
showRowById('WIDTH');
|
||||
showRowById('NEXTSTEPSAVE');
|
||||
showRowById('PRINTDYNAFORM');
|
||||
showRowById('ADJUSTGRIDSWIDTH');
|
||||
}
|
||||
});
|
||||
leimnud.event.add(getField('DYN_TYPE'), 'change', changeFormType);
|
||||
|
||||
// function validateGridConversion
|
||||
// @param proUid process id
|
||||
|
||||
Reference in New Issue
Block a user