diff --git a/views/episodes.tpl b/views/episodes.tpl index d129b5edd..586e36dec 100644 --- a/views/episodes.tpl +++ b/views/episodes.tpl @@ -361,8 +361,11 @@ }); $('#search_missing_subtitles').on('click', function(){ - $('#loader_text').text("Searching for missing subtitles..."); - window.location = '{{base_url}}search_missing_subtitles/{{no}}'; + $(this).addClass('disabled'); + $(this).find('i:first').addClass('loading'); + $.ajax({ + url: '{{base_url}}search_missing_subtitles/{{no}}' + }) }); $('.remove_subtitles').on('click', function(){ @@ -418,7 +421,7 @@ }); }); - $('a:not(.manual_search), .menu .item, button:not(#config, .cancel)').on('click', function(){ + $('a:not(.manual_search), .menu .item, button:not(#config, .cancel, #search_missing_subtitles)').on('click', function(){ $('#loader').addClass('active'); }); diff --git a/views/menu.tpl b/views/menu.tpl index 10b6bec2b..9bea9b648 100644 --- a/views/menu.tpl +++ b/views/menu.tpl @@ -19,6 +19,8 @@ .searchicon { color: white !important; } + div.disabled { pointer-events: none; } + button.disabled { pointer-events: none; } @@ -222,13 +224,13 @@ + + + \ No newline at end of file diff --git a/views/movie.tpl b/views/movie.tpl index f43ef0a0b..8f6b96664 100644 --- a/views/movie.tpl +++ b/views/movie.tpl @@ -94,7 +94,7 @@
- + <% subs_languages = ast.literal_eval(str(details[7])) subs_languages_list = [] @@ -314,9 +314,12 @@ window.location = '{{base_url}}scan_disk_movie/{{no}}'; }); - $('#search_missing_subtitles').on('click', function(){ - $('#loader_text').text("Searching for missing subtitles..."); - window.location = '{{base_url}}search_missing_subtitles_movie/{{no}}'; + $('#search_missing_subtitles_movie').on('click', function(){ + $(this).addClass('disabled'); + $(this).find('i:first').addClass('loading'); + $.ajax({ + url: '{{base_url}}search_missing_subtitles_movie/{{no}}' + }) }); $('.remove_subtitles').on('click', function(){ @@ -371,7 +374,7 @@ }); }); - $('a, .menu .item, button:not(#config, .cancel, .manual_search)').on('click', function(){ + $('a, .menu .item, button:not(#config, .cancel, .manual_search, #search_missing_subtitles_movie)').on('click', function(){ $('#loader').addClass('active'); }); diff --git a/views/system.tpl b/views/system.tpl index 40c9482d2..c53716bb5 100644 --- a/views/system.tpl +++ b/views/system.tpl @@ -62,7 +62,7 @@
- +
@@ -73,7 +73,7 @@ %for task in task_list: - + @@ -346,7 +346,11 @@ }); $('.execute').on('click', function(){ - window.location = '{{base_url}}execute/' + $(this).data("taskid"); + $(this).addClass('disabled'); + $(this).find('i:first').addClass('loading'); + $.ajax({ + url: '{{base_url}}execute/' + $(this).data("taskid") + }) }); $('a:not(.tabs), button:not(.cancel, #download_log), #restart').on('click', function(){ diff --git a/views/wantedmovies.tpl b/views/wantedmovies.tpl index df87d8edd..1b2140068 100644 --- a/views/wantedmovies.tpl +++ b/views/wantedmovies.tpl @@ -139,7 +139,7 @@
Name
{{task[0]}} {{task[1]}} {{task[2]}}