Get rid of global $__skin_path variable (#1488336)
| | |
| | | $RCMAIL->output->add_script(sprintf("rcmail_editor_init(%s)", |
| | | json_encode(array( |
| | | 'mode' => $mode, |
| | | 'skin_path' => '$__skin_path', |
| | | 'lang' => $lang, |
| | | 'skin_path' => $RCMAIL->output->get_skin_path(), |
| | | 'spellcheck' => intval($RCMAIL->config->get('enable_spellcheck')), |
| | | 'spelldict' => intval($RCMAIL->config->get('spellcheck_dictionary')), |
| | | ))), 'foot'); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Getter for the current skin path property |
| | | */ |
| | | public function get_skin_path() |
| | | { |
| | | return $this->config['skin_path']; |
| | | } |
| | | |
| | | /** |
| | | * Check if a specific template exists |
| | | * |
| | | * @param string Template name |
| | |
| | | |
| | | $OUTPUT->include_script('googiespell.js'); |
| | | $OUTPUT->add_script(sprintf( |
| | | "var googie = new GoogieSpell('\$__skin_path/images/googiespell/','?_task=utils&_action=spell&lang=', %s);\n". |
| | | "var googie = new GoogieSpell('%s/images/googiespell/','%s&lang=', %s);\n". |
| | | "googie.lang_chck_spell = \"%s\";\n". |
| | | "googie.lang_rsm_edt = \"%s\";\n". |
| | | "googie.lang_close = \"%s\";\n". |
| | |
| | | "googie.setSpellContainer('spellcheck-control');\n". |
| | | "googie.decorateTextarea('%s');\n". |
| | | "%s.set_env('spellcheck', googie);", |
| | | $RCMAIL->output->get_skin_path(), |
| | | $RCMAIL->url(array('_task' => 'utils', '_action' => 'spell')), |
| | | !empty($dictionary) ? 'true' : 'false', |
| | | JQ(Q(rcube_label('checkspelling'))), |
| | | JQ(Q(rcube_label('resumeediting'))), |