Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13251: fixing initial display of toolbar
  • Loading branch information
MichaelDaum committed Feb 4, 2015
1 parent 8e534c4 commit b86c431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions NatEditPlugin/lib/Foswiki/Plugins/NatEditPlugin/MANIFEST
Expand Up @@ -10,9 +10,6 @@ lib/Foswiki/Plugins/NatEditPlugin/RestAttachments.pm 0644
lib/Foswiki/Plugins/NatEditPlugin/RestSave.pm 0644
locale/NatEditPlugin/de.po 0644
locale/NatEditPlugin/Foswiki.pot 0644
pub/System/NatEditHelpText/nat-editor.png 0644
pub/System/NatEditHelpText/tmce-editor.png 0644
pub/System/NatEditHelpText/wikitext.png 0644
pub/System/NatEditPlugin/jquery.natedit.js 0644
pub/System/NatEditPlugin/jquery.natedit.js.gz 0644
pub/System/NatEditPlugin/jquery.natedit.uncompressed.js 0644
Expand Down
Expand Up @@ -2609,6 +2609,10 @@ $.fn.natedit = function(opts) {
// build main options before element iteration
var thisOpts = $.extend({}, $.NatEditor.defaults, opts);

if (this.is(".foswikiWysiwygEdit") && typeof(tinyMCE) !== 'undefined') {
thisOpts.showToolbar = false;
}

return this.each(function() {
var natedit = new $.NatEditor(this, thisOpts);
});
Expand All @@ -2625,7 +2629,6 @@ $(function() {
$.NatEditor.defaults.scriptUrl = foswiki.getPreference("SCRIPTURL");
$.NatEditor.defaults.pubUrl = foswiki.getPreference("PUBURL");
$.NatEditor.defaults.signatureMarkup = ['-- ', '[['+foswiki.getPreference("WIKIUSERNAME")+']]', ' - '+foswiki.getPreference("SERVERTIME")];
$.NatEditor.defaults.showToolbar = typeof(tinyMCE) === 'undefined' ? true : false;

// listen for natedit
$(".natedit").livequery(function() {
Expand Down

0 comments on commit b86c431

Please sign in to comment.