1: <?php
2: /**
3: * Copyright 2014 Horde LLC (http://www.horde.org/)
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @category Horde
9: * @copyright 2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * This class identifies the javascript necessary to output the base
16: * javascript needed for dynamic views.
17: *
18: * @author Michael Slusarz <slusarz@horde.org>
19: * @category Horde
20: * @copyright 2014 Horde LLC
21: * @license http://www.horde.org/licenses/gpl GPL
22: * @package IMP
23: */
24: class IMP_Script_Package_DynamicBase extends Horde_Script_Package
25: {
26: /**
27: * Constructor.
28: */
29: public function __construct()
30: {
31: global $injector;
32:
33: $ob = new Horde_Script_File_JsDir('dimpcore.js', 'imp');
34:
35: try {
36: $hooks = $injector->getInstance('Horde_Core_Hooks');
37: $dprefs = $hooks->callHook('dynamic_prefs', 'imp');
38: foreach ($dprefs as $key => $val) {
39: $ob->jsvars['DimpCore.prefs.' . $key] = $val;
40: }
41: } catch (Horde_Exception $e) {}
42:
43: $this->_files[] = $ob;
44:
45: $this->_files[] = new Horde_Script_File_JsDir('viewport_utils.js', 'imp');
46: $this->_files[] = new Horde_Script_File_JsDir('contextsensitive.js', 'horde');
47: $this->_files[] = new Horde_Script_File_JsDir('imple.js', 'horde');
48: }
49:
50: }
51: