mirror of
https://github.com/newnius/YAO-portal.git
synced 2025-12-15 09:36:43 +00:00
init & add agent & add job
This commit is contained in:
27
static/script.js
Normal file
27
static/script.js
Normal file
@@ -0,0 +1,27 @@
|
||||
$(function () {
|
||||
$("#btn-signout").click(function (e) {
|
||||
e.preventDefault();
|
||||
var ajax = $.ajax({
|
||||
url: window.config.BASE_URL + "/service?action=user_signout",
|
||||
type: 'POST',
|
||||
data: {}
|
||||
});
|
||||
ajax.done(function (res) {
|
||||
window.location.pathname = "/";
|
||||
});
|
||||
});
|
||||
|
||||
$("#btn-oauth-login").click(function (e) {
|
||||
e.preventDefault();
|
||||
var ajax = $.ajax({
|
||||
url: window.config.BASE_URL + "/service?action=oauth_get_url",
|
||||
type: 'POST',
|
||||
data: {}
|
||||
});
|
||||
ajax.done(function (res) {
|
||||
window.location.href = res['url'];
|
||||
});
|
||||
});
|
||||
|
||||
$('.date-picker').datetimepicker();
|
||||
});
|
||||
Reference in New Issue
Block a user