2 if (isset($this) && isset($this->template
->js_header
))
3 $this->template
->js_header
->js
= array_unique($this->xtra_js
);
8 if (!empty($base_href)) {
9 echo (!empty($base_href)) ?
'<base href="'.$base_href.'" />' : '';
13 <meta http
-equiv
="X-UA-Compatible" content
="IE=8" /> <!-- Please remove me
-->
14 <meta http
-equiv
="Content-Type" content
="text/html;charset=UTF-8">
16 <title
><?php
echo (isset($title)) ? Kohana
::config('config.product_name').' ยป '.html
::specialchars($title) : Kohana
::config('config.product_name') ?
></title
>
19 echo html
::link('application/views/icons/16x16/favicon.ico','icon','image/icon');
20 echo html
::link('application/media/css/jquery.fancybox.css', 'stylesheet', 'text/css', false, 'screen');
21 echo html
::link('application/media/css/jquery.notify.css', 'stylesheet', 'text/css', false, 'screen');
22 echo html
::link('application/media/js/jquery.qtip.custom/jquery.qtip.css', 'stylesheet', 'text/css', false, 'screen');
25 <link href
="<?php echo ninja::add_path('css/'.$current_skin.'common.css'); ?>" type
="text/css" rel
="stylesheet" media
="all" />
26 <link href
="<?php echo ninja::add_path('css/'.$current_skin.'print.css'); ?>" type
="text/css" rel
="stylesheet" media
="print" />
27 <link type
="text/css" rel
="stylesheet" href
="<?php echo ninja::add_path('css/'.$current_skin.'jquery-ui-custom.css') ?>" media
="screen" />
28 <script type
="text/javascript">
29 /* Hack for lack of console.log() in ie7 */
30 if (!window
.console
) console
= {log
: function() {}, error
: function() {}, dir
: function() {}};
34 echo html
::script('application/media/js/jquery.js');
35 echo html
::script('application/media/js/jquery-ui.min.js');
36 echo html
::script('application/media/js/jquery.fancybox.js');
37 echo html
::script('application/media/js/jquery.field.js');
38 echo html
::script('application/media/js/jquery.form.js');
39 echo html
::script('application/media/js/jquery.easywidgets.min.js');
40 echo html
::script('application/media/js/jquery.autocomplete.min');
41 echo html
::script('application/media/js/jquery.selectboxes.min.js');
42 echo html
::script('application/media/js/jquery.jeditable.min');
43 echo html
::script('application/media/js/jquery.query.js');
44 echo html
::script('application/media/js/jquery.jgrowl.js');
45 echo html
::script('application/media/js/jquery.qtip.custom/jquery.qtip.js');
46 echo html
::script('application/media/js/jquery.hotkeys.min.js');
47 echo html
::script('application/media/js/jquery.contextMenu.js');
48 echo html
::script('application/media/js/date.js');
49 echo html
::script('application/views/js/global_search.js');
50 echo html
::script('application/media/js/jquery.notify.js');
51 echo html
::script('application/media/js/ajax.commands.js');
53 <script type
="text/javascript">
56 $cgi_esc_html_tags = config
::get_cgi_cfg_key('escape_html_tags');
57 if (empty($cgi_esc_html_tags)) {
58 $cgi_esc_html_tags = 0;
60 if (Auth
::instance()->logged_in()) { ?
>
62 var _site_domain
= '<?php echo Kohana::config('config
.site_domain
') ?>';
63 var _csrf_token
= '<?php echo csrf::token() ?>';
64 var _index_page
= '<?php echo Kohana::config('config
.index_page
') ?>';
65 var _current_uri
= '<?php echo Router::$controller.'/'.Router::$method ?>';
66 var _controller_name
= '<?php echo str_replace("op5", null, Router::$controller) ?>';
67 var _logo_path
= '<?php echo Kohana::config('config
.logos_path
').(substr(Kohana::config('config
.logos_path
'), -1) == '/' ? '' : '/'); ?>';
68 var _escape_html_tags
= <?php
echo $cgi_esc_html_tags ?
>;
69 var _widget_refresh_msg
= '<?php echo _('Refresh rate
for all widgets has been updated to %s sec
'); ?>';
70 var _widget_refresh_error
= '<?php echo _('Unable to update refresh rate
for all widgets
.'); ?>';
71 var _widget_global_refresh_error
= '<?php echo _('An error was encountered when trying to update refresh rate
for all widgets
.'); ?>';
72 var _widget_order_error
= '<?php echo _('Unable to fetch widget order from database
.'); ?>';
73 var _widget_settings_msg
= '<?php echo _('Settings
for widget %s was updated
'); ?>';
74 var _widget_settings_error
= '<?php echo _('Unable to fetch setting
for widget %s
'); ?>';
75 var _widget_notfound_error
= '<?php echo _('Unable to find widget %s
'); ?>';
76 var _page_refresh_msg
= '<?php echo _('Updated page refresh rate to %s seconds
'); ?>';
77 var _listview_refresh_msg
= '<?php echo _('Updated
list view refresh rate to %s seconds
'); ?>';
78 var _settings_msg
= '<?php echo _('The settings were updated
'); ?>';
79 var _success_header
= '<?php echo _('Success
'); ?>';
80 var _error_header
= '<?php echo _('ERROR
'); ?>';
81 var _form_error_header
= '<?php echo _("The form couldn\'t be processed since it contains one or more errors.%sPlease correct the following error(s) and try again:%s"); ?>';
82 var _command_empty_field
= '<?php echo _("Field \'%s\' is required but empty"); ?>';
83 var _loading_str
= '<?php echo _("Loading..."); ?>';
84 var _wait_str
='<?php echo _('Please wait
') ?>';
85 var _refresh_paused_msg
='<?php echo _('Page refresh has been paused
.') ?>';
86 var _refresh_unpaused_msg
='<?php echo _('Page refresh has been restored
.') ?>';
87 var _listview_refresh_paused_msg
='<?php echo _('List view refresh has been paused
.') ?>';
88 var _listview_refresh_unpaused_msg
='<?php echo _('List view refresh has been restored
.') ?>';
89 var _search_save_error
= '<?php echo _("Length of \'%s\' must be between %s and %s characters.") ?>';
90 var _search_string_field
= '<?php echo _('Search
string') ?>';
91 var _search_remove_confirm
= '<?php echo _('Are you sure that you wish to remove this saved search?
') ?>';
92 var _search_name_field
= '<?php echo _('Name
') ?>';
93 var _search_save_ok
= '<?php echo _('OK
') ?>';
94 var _search_save_error
= '<?php echo _('ERROR
') ?>';
95 var _search_saved_ok
= '<?php echo _('Your search was successfully saved
.') ?>';
96 var _search_saved_error
= '<?php echo _('An error occured when trying to save your search
.') ?>';
97 var _nothing_selected_error
= '<?php echo _('Please select at least one item
.') ?>';
98 var _no_action_error
= '<?php echo _('Please select an action
.') ?>';
99 var _date_format
= <?php
echo json_encode(nagstat
::date_format()); ?
>;
100 var _server_utc_offset
= <?php
echo date
::utc_offset(date_default_timezone_get()); ?
>;
101 var _notes_url_target
= "<?php echo config::get('nagdefault.notes_url_target', '*'); ?>";
102 var _action_url_target
= "<?php echo config::get('nagdefault.action_url_target', '*'); ?>";
104 <?php
if ($keycommands_active === 1) { ?
>
106 var _keycommands_active
='<?php echo config::get('keycommands
.activated
', '*', true); ?>';
107 var _keycommand_search
='<?php echo config::get('keycommands
.search
', '*', true); ?>';
108 var _keycommand_pause
='<?php echo config::get('keycommands
.pause
', '*', true); ?>';
109 var _keycommand_forward
='<?php echo config::get('keycommands
.forward
', '*', true); ?>';
110 var _keycommand_back
='<?php echo config::get('keycommands
.back
', '*', true); ?>';
112 var _keycommands_active
='0';
115 var _popup_delay
='<?php echo config::get('config
.popup_delay
', '*', true); ?>';
117 var loading_img
= '/application/media/images/loading.gif';
118 // Usage: $(your_element).qtip($.extend(true, {}, qtip_default, {your_qtip_options: 'here'}))
121 viewport
: $
(window
), // requires a plugin
137 classes
: 'qtip-light qtip-pnp'
141 if (!empty($js_strings)) {
145 if (!empty($inline_js)) {
146 echo '$(document).ready(function() {';
154 echo (!empty($css_header)) ?
$css_header : '';
155 refresh
::lv_control();
156 $basepath = 'modules/lsfilter/';
157 echo html
::script($basepath.'media/js/lib.js');
158 echo html
::script($basepath.'media/js/LSFilterSaved.js');
160 if (!isset($disable_refresh) ||
$disable_refresh === false) {
166 <link type
="text/css" rel
="stylesheet" href
="<?php echo ninja::add_path('css/default/ie7.css') ?>" />
167 <?php
echo (Router
::$controller.'/'.Router
::$method == 'histogram/generate') ? html
::script('application/media/js/excanvas.compiled.js') : ''; ?
>
170 <?php
echo html
::script('application/views/js/common.js'); ?
>
171 <?php
echo (!empty($js_header)) ?
$js_header : ''; ?
>