/** * Uses function wrappers to make the data immutable from JS */ protected function output() { return '<script type="text/javascript">' . 'var hm_empty_folder = function() { return "' . $this->trans('So alone') . '"; };' . 'var hm_debug = function() { return "' . (DEBUG_MODE ? '1' : '0') . '"; };' . 'var hm_page_name = function() { return "' . $this->html_safe($this->get('router_page_name')) . '"; };' . 'var hm_list_path = function() { return "' . $this->html_safe($this->get('list_path', '')) . '"; };' . 'var hm_list_parent = function() { return "' . $this->html_safe($this->get('list_parent', '')) . '"; };' . 'var hm_msg_uid = function() { return "' . $this->html_safe($this->get('uid', '')) . '"; };' . 'var hm_encrypt_ajax_requests = function() { return "' . $this->html_safe($this->get('encrypt_ajax_requests', '')) . '"; };' . 'var hm_encrypt_local_storage = function() { return "' . $this->html_safe($this->get('encrypt_local_storage', '')) . '"; };' . 'var hm_flag_image_src = function() { return "' . Hm_Image_Sources::$star . '"; };' . format_data_sources($this->get('data_sources', array()), $this) . '</script>'; }
/** * Uses function wrappers to make the data immutable from JS */ protected function output() { return '<script type="text/javascript">' . 'var hm_empty_folder = function() { return "' . $this->trans('So alone') . '"; };' . 'var hm_debug = function() { return "' . (DEBUG_MODE ? '1' : '0') . '"; };' . 'var hm_page_name = function() { return "' . $this->html_safe($this->get('router_page_name')) . '"; };' . 'var hm_list_path = function() { return "' . $this->html_safe($this->get('list_path', '')) . '"; };' . 'var hm_list_parent = function() { return "' . $this->html_safe($this->get('list_parent', '')) . '"; };' . 'var hm_msg_uid = function() { return "' . $this->html_safe($this->get('uid', '')) . '"; };' . format_data_sources($this->get('data_sources', array()), $this) . '</script>'; }