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