From 43fefcf74872a038a226d810cbf045584c213b8f Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 3 Aug 2020 20:55:50 -0700 Subject: [PATCH] Add export modal and buttons to library and info page --- data/interfaces/default/export_modal.html | 78 +++++++++++++++++++++++ data/interfaces/default/info.html | 23 ++++++- data/interfaces/default/library.html | 20 ++++++ plexpy/exporter.py | 4 +- plexpy/webserve.py | 7 ++ 5 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 data/interfaces/default/export_modal.html diff --git a/data/interfaces/default/export_modal.html b/data/interfaces/default/export_modal.html new file mode 100644 index 00000000..8919cd65 --- /dev/null +++ b/data/interfaces/default/export_modal.html @@ -0,0 +1,78 @@ +<%doc> +USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE + +For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/ + +Filename: export_modal.html +Version: 0.1 +Variable names: data [list] + +data :: Usable parameters + +== Global keys == + +DOCUMENTATION :: END + + + + \ No newline at end of file diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html index 4c938dea..a3cc5060 100644 --- a/data/interfaces/default/info.html +++ b/data/interfaces/default/info.html @@ -510,6 +510,12 @@ DOCUMENTATION :: END % endif +
+ +
% endif
@@ -629,6 +635,8 @@ DOCUMENTATION :: END
% endif + <%def name="javascriptIncludes()"> @@ -770,7 +778,7 @@ DOCUMENTATION :: END data: { rating_key: rating_key, notifier_id: $('#send-notification-notifier option:selected').val() - }, + }, async: true, success: function (data) { if (data.result === 'success') { @@ -832,6 +840,19 @@ DOCUMENTATION :: END return '
'; } }); + + $("#toggle-export-modal").click(function() { + $.ajax({ + url: 'export_metadata_modal', + data: { rating_key: $(this).data('id') }, + cache: false, + async: true, + complete: function(xhr, status) { + $("#export-modal").html(xhr.responseText); + } + }); + }); + % if data.get('poster_url'):