From: <jon...@us...> - 2013-09-30 15:33:52
|
Revision: 47797 http://sourceforge.net/p/tikiwiki/code/47797 Author: jonnybradley Date: 2013-09-30 15:33:48 +0000 (Mon, 30 Sep 2013) Log Message: ----------- [FIX] wysiwyg: Restore the ckeditor html image toolbar item for html wysiwyg (thanks arildb) Modified Paths: -------------- trunk/lib/toolbars/toolbarslib.php Modified: trunk/lib/toolbars/toolbarslib.php =================================================================== --- trunk/lib/toolbars/toolbarslib.php 2013-09-30 15:13:55 UTC (rev 47796) +++ trunk/lib/toolbars/toolbarslib.php 2013-09-30 15:33:48 UTC (rev 47797) @@ -144,6 +144,7 @@ 'bidiltr', 'bidirtl', 'screencapture', + 'image', 'sheetsave', // spreadsheet ones 'addrow', @@ -570,6 +571,8 @@ return new self( 'BidiLtr' ); case 'bidirtl': return new self( 'BidiRtl' ); + case 'image': + return new self( 'Image' ); } } // }}} @@ -578,6 +581,16 @@ return null; } // }}} + function getWysiwygToken($areaId) { + if ($this->wysiwyg === 'Image') { // cke's own image tool + global $headerlib, $smarty, $prefs; + // can't do upload the cke way yet + $url = 'tiki-list_file_gallery.php?galleryId='.$prefs['home_file_gallery'].'&filegals_manager=fgal_picker'; + $headerlib->add_js('if (typeof window.CKEDITOR !== "undefined") {window.CKEDITOR.config.filebrowserBrowseUrl = "'.$url.'"}', 5); + } + return $this->wysiwyg; + } + function getWysiwygWikiToken( $areaId ) // {{{ // wysiwyg_htmltowiki { switch ($this->wysiwyg) { @@ -1643,15 +1656,8 @@ function getWysiwygToken( $areaId, $add_js = true ) // {{{ { if (!empty($this->wysiwyg) && $add_js) { - if ($this->wysiwyg === 'Image') { // cke's own image tool overrides this so set it up to use our filegal - global $headerlib, $smarty, $prefs; - // can't do upload the cke way yet - $url = 'tiki-list_file_gallery.php?galleryId='.$prefs['home_file_gallery'].'&filegals_manager=fgal_picker'; - $headerlib->add_js('if (typeof window.CKEDITOR !== "undefined") {window.CKEDITOR.config.filebrowserBrowseUrl = "'.$url.'"}', 5); - } else { - $js = "popup_plugin_form('{$areaId}','{$this->pluginName}');"; - $this->setupCKEditorTool($js, $this->wysiwyg, $this->label, $this->icon); - } + $js = "popup_plugin_form('{$areaId}','{$this->pluginName}');"; + $this->setupCKEditorTool($js, $this->wysiwyg, $this->label, $this->icon); } return $this->wysiwyg; } // }}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |