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:INCLUDE{"dialog"}%%{ template: editidialog.natedit.tmpl
+}%%TMPL:DEF{"inserttable"}%
%ADDTOZONE{
"body"
text=""
@@ -76,6 +76,29 @@
%TMPL:END%
+%TMPL:DEF{"upload_tab"}%%{
+Only included if UploadPlugin is enabled
+}% %TAB{"%MAKETEXT{"Upload"}%" after="jQuery('#ok_button').hide();jQuery('#upload_button').show()"}%
+
+ %ENDTAB%
+%TMPL:END%
+
+%TMPL:DEF{"existing_attachments"}%%{
+Only included if UploadPlugin is enabled
+}%
+%TMPL:END%
+
%TMPL:DEF{"insertattachment"}%
%ADDTOZONE{
"body"
@@ -106,22 +129,9 @@
-
+ %TMPL:P{context="UploadPluginEnabled" then="existing_attachments"}%
%ENDTAB%
- %TAB{"%MAKETEXT{"Upload"}%" after="jQuery('#ok_button').hide();jQuery('#upload_button').show()"}%
-
- %ENDTAB%
+ %TMPL:P{context="UploadPluginEnabled" then="upload_tab"}%
%ENDTABPANE%