Commit f06a1991 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review

Merge "Allowing the tinymce imagebrowser to have lang strings (Bug #1440947)"

parents caa28af8 b804652e
......@@ -95,7 +95,16 @@ function pieform_element_wysiwyg_get_headdata() {
$result .= " tinyMCE.execCommand('mceRemoveEditor', false, '$editor');\n";
}
$result .= "});</script>";
return array('tinymce', $result);
require_once(get_config('docroot') . 'artefact/file/lib.php');
$strings = PluginArtefactFile::jsstrings('filebrowser');
$jsstrings = '';
foreach ($strings as $section => $sectionstrings) {
foreach ($sectionstrings as $s) {
$jsstrings .= "strings.$s=" . json_encode(get_raw_string($s, $section)) . ';';
}
}
$headdata = '<script type="application/javascript">' . $jsstrings . '</script>';
return array('tinymce', $result, $headdata);
}
return array();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment