BUG 9297 Al crear un nuevo skin y seleccionar el uxmodern despliega... SOLVED
- It was found that an alert was displayed with a not very specific error - Skin_ajax was modified to allow the skin uxmodern to be copied, moreover to clarify the type of error.
This commit is contained in:
@@ -24,6 +24,7 @@ if (in_array($_REQUEST ['action'],$restrictedFunctions)) {
|
|||||||
|
|
||||||
|
|
||||||
$functionName = $_REQUEST ['action'];
|
$functionName = $_REQUEST ['action'];
|
||||||
|
//echo $_REQUEST ['action'];
|
||||||
$functionParams = isset($_REQUEST ['params']) ? $_REQUEST ['params'] : array();
|
$functionParams = isset($_REQUEST ['params']) ? $_REQUEST ['params'] : array();
|
||||||
|
|
||||||
$functionName();
|
$functionName();
|
||||||
@@ -48,7 +49,8 @@ function skinList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function newSkin($baseSkin='classic') {
|
function newSkin($baseSkin='classic') {
|
||||||
//G::pr($_REQUEST);
|
//G::pr($_REQUEST);
|
||||||
|
|
||||||
$skinBase = $baseSkin != "" ? strtolower($baseSkin) : 'classic';
|
$skinBase = $baseSkin != "" ? strtolower($baseSkin) : 'classic';
|
||||||
if ((isset($_REQUEST['skinBase'])) && ($_REQUEST['skinBase'] != "")) {
|
if ((isset($_REQUEST['skinBase'])) && ($_REQUEST['skinBase'] != "")) {
|
||||||
$skinBase = strtolower($_REQUEST['skinBase']);
|
$skinBase = strtolower($_REQUEST['skinBase']);
|
||||||
@@ -81,15 +83,20 @@ function newSkin($baseSkin='classic') {
|
|||||||
|
|
||||||
//All validations OK then create skin
|
//All validations OK then create skin
|
||||||
switch ($skinBase) {
|
switch ($skinBase) {
|
||||||
case 'classic': //Special Copy of this dir + xmlreplace
|
case 'uxmodern':
|
||||||
//$configurationFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'config.xml';
|
copy_skin_folder(G::ExpandPath("skinEngine") . 'uxmodern' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
|
||||||
copy_skin_folder(G::ExpandPath("skinEngine") . 'base' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml","baseCss"));
|
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
|
||||||
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
|
break;
|
||||||
break;
|
case 'classic':
|
||||||
default: //Commmon copy/paste of a folder + xmlrepalce
|
//Special Copy of this dir + xmlreplace
|
||||||
copy_skin_folder(PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
|
copy_skin_folder(G::ExpandPath("skinEngine") . 'base' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml","baseCss"));
|
||||||
$pathBase=PATH_CUSTOM_SKINS.$skinBase;
|
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
//Commmon copy/paste of a folder + xmlrepalce
|
||||||
|
copy_skin_folder(PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
|
||||||
|
$pathBase=PATH_CUSTOM_SKINS.$skinBase;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
//ReBuild config file
|
//ReBuild config file
|
||||||
//TODO: Improve this pre_replace lines
|
//TODO: Improve this pre_replace lines
|
||||||
@@ -330,4 +337,4 @@ function copy_skin_folder($path, $dest, $exclude=array()) {
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ newSkin = function(){
|
|||||||
Ext.getCmp("newDialog").destroy();
|
Ext.getCmp("newDialog").destroy();
|
||||||
|
|
||||||
if( !action.result ) {
|
if( !action.result ) {
|
||||||
Ext.MessageBox.alert("error", _('ID_ERROR'));
|
Ext.MessageBox.alert("error", action.response.responseText);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Ext.MessageBox.alert("error", action.result.error);
|
Ext.MessageBox.alert("error", action.result.error);
|
||||||
|
|||||||
Reference in New Issue
Block a user