Index: lib/Foswiki/Plugins/NatEditPlugin/DEPENDENCIES =================================================================== --- lib/Foswiki/Plugins/NatEditPlugin/DEPENDENCIES (revision 7894) +++ lib/Foswiki/Plugins/NatEditPlugin/DEPENDENCIES (working copy) @@ -1,6 +1,5 @@ Foswiki::Plugins::JQueryPlugin,>=3740,perl,Required. -Foswiki::Plugins::SetVariablePlugin,>=4287,perl,Required. -Foswiki::Plugins::UploadPlugin,>=1340,perl,Required. -Foswiki::Plugins::RenderPlugin,>=3644,perl,Required. -Foswiki::Plugins::DBCachePlugin,>=4358,perl,Required. -Foswiki::Plugins::ZonePlugin,>=1.0,perl,Required. +Foswiki::Plugins::SetVariablePlugin,>=4287,perl,Optional. +Foswiki::Plugins::UploadPlugin,>=1340,perl,Optional, require to be able to upload attachments from the editor. +Foswiki::Plugins::RenderPlugin,>=3644,perl,Optional. +Foswiki::Plugins::ZonePlugin,>=1.0,perl,Optional, required for Foswiki < 1.1. Index: templates/preview.natedit.tmpl =================================================================== --- templates/preview.natedit.tmpl (revision 7894) +++ templates/preview.natedit.tmpl (working copy) @@ -1,7 +1,7 @@ -%TMPL:INCLUDE{"preview"}% -%TMPL:INCLUDE{"previewtoolbar"}% -%TMPL:INCLUDE{"editjavascript"}% -%TMPL:DEF{"patterntopiccontents"}%
%TMPL:P{"pagetitlestylewrapper"}% %TMPL:P{"content_pattern"}%
%TMPL:END% +%TMPL:INCLUDE{"preview"}%%{ template: preview.natedit.tmpl +}%%TMPL:INCLUDE{"previewtoolbar"}%%{ +}%%TMPL:INCLUDE{"editjavascript"}%%{ +}%%TMPL:DEF{"patterntopiccontents"}%
%TMPL:P{"pagetitlestylewrapper"}% %TMPL:P{"content_pattern"}%
%TMPL:END% %TMPL:DEF{"content"}%%TMPL:P{context="NatSkinPluginEnabled" then="content_natskin" else="content_pattern"}%%TMPL:END% %TMPL:DEF{"content_pattern"}% %JQREQUIRE{"natedit"}% @@ -9,11 +9,12 @@ %TMPL:P{"previewtoolbar"}%
-
%TEXT%
+
%TEXT% %META{"form"}%
+ Index: templates/edit.natedit.tmpl =================================================================== --- templates/edit.natedit.tmpl (revision 7894) +++ templates/edit.natedit.tmpl (working copy) @@ -1,10 +1,10 @@ -%TMPL:INCLUDE{"edit"}% -%TMPL:INCLUDE{"editjavascript"}% -%TMPL:INCLUDE{"edittoolbar"}% -%TMPL:INCLUDE{"edithelp"}% -%TMPL:INCLUDE{"editdialog"}% -%TMPL:INCLUDE{"uploadplugin"}% -%TMPL:DEF{"titleaction"}%(%IF{"defined 'rev'" then="%MAKETEXT{"restore"}%" else="%MAKETEXT{"edit"}%"}%)%TMPL:END% +%TMPL:INCLUDE{"edit"}%%{ template: edit.natedit.tmpl +}%%TMPL:INCLUDE{"editjavascript"}%%{ +}%%TMPL:INCLUDE{"edittoolbar"}%%{ +}%%TMPL:INCLUDE{"edithelp"}%%{ +}%%TMPL:INCLUDE{"editdialog"}%%{ +}%%TMPL:INCLUDE{"uploadplugin"}%%{ +}%%TMPL:DEF{"titleaction"}%(%IF{"defined 'rev'" then="%MAKETEXT{"restore"}%" else="%MAKETEXT{"edit"}%"}%)%TMPL:END% %TMPL:DEF{"pagetitlestylewrapper"}%%TMPL:END% %TMPL:DEF{"contenttitle"}%

%IF{ "istopic '%WEB%.%TOPIC%'" @@ -92,7 +92,7 @@ %TMPL:DEF{"firsttab"}% %TAB{"%MAKETEXT{"Text"}%" DISafter="$.natedit.fixHeight('#topic');"}% -%TMPL:P{"topicmeta"}% +%TMPL:P{context="DBCachePluginEnabled" then="topicmeta"}% %TMPL:P{"textarea"}% %ENDTAB% %TMPL:END% Index: templates/editdialog.natedit.tmpl =================================================================== --- templates/editdialog.natedit.tmpl (revision 7894) +++ templates/editdialog.natedit.tmpl (working copy) @@ -1,5 +1,5 @@ -%TMPL:INCLUDE{"dialog"}% -%TMPL:DEF{"inserttable"}%%TMPL:END% +%TMPL:DEF{"upload_tab"}%%{ +Only included if UploadPlugin is enabled +}% %TAB{"%MAKETEXT{"Upload"}%" after="jQuery('#ok_button').hide();jQuery('#upload_button').show()"}% +
+
+ + %UPLOADFORM{embed="on" comment="off" target="off" ajax="on" submit="off"}% +
+
+
+ %ENDTAB% +%TMPL:END% + +%TMPL:DEF{"existing_attachments"}%%{ +Only included if UploadPlugin is enabled +}%
+
+

%MAKETEXT{"Existing files:"}%

+
+
+
+%TMPL:END% + %TMPL:DEF{"insertattachment"}% -
-
-

%MAKETEXT{"Existing files:"}%

-
-
-
+ %TMPL:P{context="UploadPluginEnabled" then="existing_attachments"}% %ENDTAB% - %TAB{"%MAKETEXT{"Upload"}%" after="jQuery('#ok_button').hide();jQuery('#upload_button').show()"}% -
-
- - %UPLOADFORM{embed="on" comment="off" target="off" ajax="on" submit="off"}% -
-
-
- %ENDTAB% + %TMPL:P{context="UploadPluginEnabled" then="upload_tab"}% %ENDTABPANE%
Index: templates/edittoolbar.natedit.tmpl =================================================================== --- templates/edittoolbar.natedit.tmpl (revision 7894) +++ templates/edittoolbar.natedit.tmpl (working copy) @@ -1,4 +1,4 @@ - +%{ template: edittoolbar.natedit.tmpl }% %TMPL:DEF{"bottomtopicactions"}%
    Index: templates/editjavascript.natedit.tmpl =================================================================== --- templates/editjavascript.natedit.tmpl (revision 7894) +++ templates/editjavascript.natedit.tmpl (working copy) @@ -1,3 +1,3 @@ -%TMPL:INCLUDE{"editjavascript"}% -%TMPL:DEF{"editjavascript"}%%JQREQUIRE{"natedit"}%%TMPL:END% +%TMPL:INCLUDE{"editjavascript"}%%{ +}%%TMPL:DEF{"editjavascript"}%%JQREQUIRE{"natedit"}%%TMPL:END% %TMPL:DEF{"javascript"}%%TMPL:P{"defaultjavascript"}%%TMPL:P{"editjavascript"}%%TMPL:END%