static protected $_inlineScript = array();
/**
- * Has popupJs been called?
- *
- * @var boolean
- */
- static protected $_popupjscalled = false;
-
- /**
* Logs a message to the global Horde log backend.
*
* @param mixed $message Either a string or an object with a
*/
static public function popupJs($url, $options = array())
{
- if (!self::$_popupjscalled) {
- Horde::addScriptFile('popup.js', 'horde', true);
- Horde::addInlineScript('Horde.popup_block_text=' . Horde_Serialize::serialize(_("A popup window could not be opened. Your browser may be blocking popups."), Horde_Serialize::JSON), 'dom');
- self::$_popupjscalled = true;
- }
+ Horde::addScriptFile('popup.js', 'horde', true);
$params = new stdClass;
$pos = strpos($url, '?');
$this->add('prototype.js', 'horde', true);
}
+ // Add localized string for popup.js
+ if (($file == 'popup.js') && ($app = 'horde')) {
+ Horde::addInlineScript('Horde.popup_block_text=' . Horde_Serialize::serialize(_("A popup window could not be opened. Your browser may be blocking popups."), Horde_Serialize::JSON), 'dom');
+ }
+
// Explicitly check for a directly serve-able version of the script.
$path = $registry->get('fileroot', $app);
if (!$direct &&