diff --git a/views/episodes.html b/views/episodes.html
index 8524dce91..77223d051 100644
--- a/views/episodes.html
+++ b/views/episodes.html
@@ -343,6 +343,57 @@
+
+
+
{% endblock body %}
{% block tail %}
@@ -1034,6 +1085,7 @@
tools += ' ';
tools += ' ';
tools += ' ';
+ tools += ' ';
return tools;
}
@@ -1097,6 +1149,48 @@
}
});
});
+
+ $('#episode_tools_result').on('click', '.subtitles_mod_color', function (e) {
+ e.preventDefault();
+
+ $('#subzero_color_data_language').val($(this).attr("data-language"))
+ $('#subzero_color_data_path').val($(this).attr("data-path"))
+
+ $('#episodeToolsModal').modal('hide');
+ $('#episodeSubtitleModColorModal')
+ .modal({
+ focus: false
+ });
+ });
+
+ $('#subtitles_mod_color_form').on('submit', function (e) {
+ e.preventDefault();
+
+ const values = {
+ language: $('#subzero_color_data_language').val(),
+ subtitlesPath: $('#subzero_color_data_path').val(),
+ mod: 'color(name=' + $('#subzero_color_name').val() + ')',
+ };
+
+ $.ajax({
+ url: "{{ url_for('api.submods') }}",
+ type: "POST",
+ dataType: "json",
+ data: values,
+
+ beforeSend: function () {
+ $('#subtitles_mod_color_save_button').html('Loading...
');
+ },
+ complete: function () {
+ $('#episodeSubtitleModColorModal').modal('hide');
+ }
+ });
+ });
+
+ $('#episodeSubtitleModColorModal').on('hidden.bs.modal', function (e) {
+ $('#subtitles_mod_color_save_button_span').html('');
+ });
+
});
function seriesDetailsRefresh() {
diff --git a/views/movie.html b/views/movie.html
index 90f4719da..2e6f009cc 100644
--- a/views/movie.html
+++ b/views/movie.html
@@ -346,6 +346,57 @@
+
+
+
{% endblock body %}
{% block tail %}
@@ -842,6 +893,7 @@
tools += ' ';
tools += ' ';
tools += ' ';
+ tools += ' ';
return tools;
}
@@ -904,6 +956,47 @@
}
});
});
+
+ $('#movie_tools_result').on('click', '.subtitles_mod_color', function (e) {
+ e.preventDefault();
+
+ $('#subzero_color_data_language').val($(this).attr("data-language"))
+ $('#subzero_color_data_path').val($(this).attr("data-path"))
+
+ $('#movieToolsModal').modal('hide');
+ $('#movieSubtitleModColorModal')
+ .modal({
+ focus: false
+ });
+ });
+
+ $('#subtitles_mod_color_form').on('submit', function (e) {
+ e.preventDefault();
+
+ const values = {
+ language: $('#subzero_color_data_language').val(),
+ subtitlesPath: $('#subzero_color_data_path').val(),
+ mod: 'color(name=' + $('#subzero_color_name').val() + ')',
+ };
+
+ $.ajax({
+ url: "{{ url_for('api.submods') }}",
+ type: "POST",
+ dataType: "json",
+ data: values,
+
+ beforeSend: function () {
+ $('#subtitles_mod_color_save_button').html('Loading...
');
+ },
+ complete: function () {
+ $('#movieSubtitleModColorModal').modal('hide');
+ }
+ });
+ });
+
+ $('#movieSubtitleModColorModal').on('hidden.bs.modal', function (e) {
+ $('#subtitles_mod_color_save_button_span').html('');
+ });
});
function movieDetailsRefresh() {