BUG 000 Validacion para prevenir un error JS cuando el objeto parent no existe
- Cuando el contenido de un iframe (como los listados) es abierto en una ventana nueva y se accede a los casos da un error JS porque se trata de acceder a un metodo del parent, que en este caso no existe - Se agrego una validacion para prevenir este error
This commit is contained in:
@@ -83,7 +83,12 @@ $G_SUB_MENU = 'caseOptions';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = '_';
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}')");
|
||||
$oHeadPublisher->addScriptCode("
|
||||
if (typeof parent != 'undefined') {
|
||||
if (parent.showCaseNavigatorPanel) {
|
||||
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}');
|
||||
}
|
||||
}");
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
|
||||
@@ -84,7 +84,12 @@
|
||||
/* Render page */
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}')");
|
||||
$oHeadPublisher->addScriptCode("
|
||||
if (typeof parent != 'undefined') {
|
||||
if (parent.showCaseNavigatorPanel) {
|
||||
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}');
|
||||
}
|
||||
}");
|
||||
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');");
|
||||
$oHeadPublisher->addScriptCode("
|
||||
if (typeof parent != 'undefined') {
|
||||
if (parent.showCaseNavigatorPanel) {
|
||||
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}');
|
||||
}
|
||||
}");
|
||||
// DEPRECATED this script call is marked for removal since almost all the interface is extJS based
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
|
||||
Reference in New Issue
Block a user