mirror of https://gitee.com/karson/fastadmin.git
parent
c7582f7efe
commit
a88f91046c
|
|
@ -66,6 +66,8 @@ return [
|
||||||
'Operation failed' => '操作失败',
|
'Operation failed' => '操作失败',
|
||||||
'Invalid parameters' => '参数不正确',
|
'Invalid parameters' => '参数不正确',
|
||||||
'Change password failure' => '修改密码失败',
|
'Change password failure' => '修改密码失败',
|
||||||
|
'Are you sure you want to sign out?' => '确定要退出登录吗?',
|
||||||
|
'Confirm sign out' => '确定退出',
|
||||||
'All' => '全部',
|
'All' => '全部',
|
||||||
'Url' => '物理路径',
|
'Url' => '物理路径',
|
||||||
'Imagewidth' => '宽度',
|
'Imagewidth' => '宽度',
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,24 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
$(document).on("click", ".sidebar-toggle", function () {
|
$(document).on("click", ".sidebar-toggle", function () {
|
||||||
$("body").toggleClass("sidebar-open");
|
$("body").toggleClass("sidebar-open");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "a[href*='user/logout']", function () {
|
||||||
|
var that = this;
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET', dataType: 'html', url: $(that).attr("href"),
|
||||||
|
success: function (data, status, xhr) {
|
||||||
|
Fast.api.ajax({url: $(that).attr("href"), loading:false, data: {__token__: xhr.getResponseHeader('__token__')}}, function (data, ret) {
|
||||||
|
Layer.msg(ret.msg, {icon: 1}, function () {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}, error: function (xhr, type) {
|
||||||
|
Layer.msg(__('Network error'), {icon: 2});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Frontend.api = $.extend(Fast.api, Frontend.api);
|
Frontend.api = $.extend(Fast.api, Frontend.api);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue