diff options
author | Robin Krahl <me@robin-krahl.de> | 2014-08-25 20:32:05 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2014-08-25 20:32:05 +0200 |
commit | 7132b7fbda7e5a140c0992d01e08cbc2f25963b5 (patch) | |
tree | 8869367427f01f8329263713e59632cf2c91dff4 /mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | |
parent | 8deeb71274124b2c93a64b49dc3581cee4453cd9 (diff) | |
download | LrMediaWiki-7132b7fbda7e5a140c0992d01e08cbc2f25963b5.tar.gz LrMediaWiki-7132b7fbda7e5a140c0992d01e08cbc2f25963b5.tar.bz2 |
Fix #9: Add 'Preview generated wikitext' button to export dialog.
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua')
-rwxr-xr-x | mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua index bd903f5..4eb1491 100755 --- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua +++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua @@ -233,6 +233,18 @@ MediaWikiExportServiceProvider.sectionsForTopOfDialog = function(viewFactory, pr title = LOC '$$$/LrMediaWiki/Section/Licensing/Categories/Details=separate with ;',
},
},
+
+ viewFactory:row {
+ spacing = viewFactory:control_spacing(),
+
+ viewFactory:push_button {
+ title = LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext',
+ action = function(button)
+ local wikitext = MediaWikiInterface.buildFileDescription('<!-- description -->', propertyTable.info_source, '<!-- date -->', propertyTable.info_author, propertyTable.info_license, propertyTable.info_other, propertyTable.info_categories, '<!-- per-file categories -->')
+ LrDialogs.message(LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext', wikitext, 'info')
+ end,
+ },
+ },
},
}
end
|