Move function refresh_all_channels to api.js.
This commit is contained in:
parent
ab1a2364be
commit
1f2c43278a
2 changed files with 11 additions and 10 deletions
|
@ -12,5 +12,14 @@ function refresh_channel(channel_id, force, callback)
|
|||
return common.post(url, data, callback);
|
||||
}
|
||||
|
||||
api.channels.refresh_all_channels =
|
||||
function refresh_all_channels(force, callback)
|
||||
{
|
||||
var url = "/refresh_all_channels";
|
||||
data = new FormData();
|
||||
data.append("force", force)
|
||||
return common.post(url, data, callback);
|
||||
}
|
||||
|
||||
/**************************************************************************************************/
|
||||
api.videos = {};
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
<body>
|
||||
{{header.make_header()}}
|
||||
<div id="content_body">
|
||||
<span><button class="refresh_button" onclick="refresh_all_channels(false, common.refresh)">Refresh new videos</button></span>
|
||||
<span><button class="refresh_button" onclick="refresh_all_channels(true, common.refresh)">Refresh everything</button></span>
|
||||
<span><button class="refresh_button" onclick="api.channels.refresh_all_channels(false, common.refresh)">Refresh new videos</button></span>
|
||||
<span><button class="refresh_button" onclick="api.channels.refresh_all_channels(true, common.refresh)">Refresh everything</button></span>
|
||||
<div>
|
||||
<input type="text" id="new_channel_textbox">
|
||||
<button id="new_channel_button" onclick="add_channel_form(event)">Add new channel</button>
|
||||
|
@ -99,13 +99,5 @@ function add_channel(channel_id, callback)
|
|||
data.append("channel_id", channel_id);
|
||||
return common.post(url, data, callback);
|
||||
}
|
||||
|
||||
function refresh_all_channels(force, callback)
|
||||
{
|
||||
var url = "/refresh_all_channels";
|
||||
data = new FormData();
|
||||
data.append("force", force)
|
||||
return common.post(url, data, callback);
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue