MDL-35177 add tinymce plugin icons

This commit is contained in:
Petr Škoda 2012-09-01 11:36:13 +02:00
parent 569f1ad63b
commit 03f48b4797
7 changed files with 8 additions and 1 deletions

View file

@ -145,7 +145,7 @@ class tiynce_subplugins_settings extends admin_setting {
* @return string
*/
public function output_html($data, $query='') {
global $CFG, $OUTPUT;
global $CFG, $OUTPUT, $PAGE;
require_once("$CFG->libdir/editorlib.php");
require_once("$CFG->libdir/pluginlib.php");
require_once(__DIR__.'/lib.php');
@ -198,6 +198,13 @@ class tiynce_subplugins_settings extends admin_setting {
$displayname = html_writer::tag('span', $namestr, array('class'=>'dimmed_text'));
}
if ($PAGE->theme->resolve_image_location('icon', 'tinymce_' . $name)) {
$icon = $OUTPUT->pix_icon('icon', '', 'tinymce_' . $name, array('class' => 'smallicon pluginicon'));
} else {
$icon = $OUTPUT->pix_icon('spacer', '', 'moodle', array('class' => 'smallicon pluginicon noicon'));
}
$displayname = $icon . ' ' . $displayname;
// Add available buttons.
$buttons = implode(', ', $plugin->get_buttons());
$buttons = html_writer::tag('span', $buttons, array('class'=>'tinymcebuttons'));

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB