Commit d69d6ea5 authored by Van's avatar Van

🎨 #12743

parent e0ac84f4
......@@ -19,7 +19,7 @@
* @description index for admin
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.2.0.0, Apr 5, 2018
* @version 1.3.0.0, Mar 30, 2019
*/
Util.htmlDecode = function (code) {
......@@ -241,6 +241,12 @@ $.extend(Admin.prototype, {
return Label.editorLeaveLabel
}
}
$(document).ajaxError(function (event, xhr, options, exc) {
if (xhr.status !== 200) {
$('#tipMsg').text(xhr.status + ': '+ exc)
}
})
},
/**
* @description tools and article collapse
......
......@@ -190,7 +190,7 @@ admin.article = {
admin.article.isConfirm = false
},
complete: function () {
complete: function (jqXHR, textStatus) {
that._removeDisabled()
$('#loadMsg').text('')
},
......@@ -560,19 +560,3 @@ admin.register.article = {
$('#tipMsg').text(Label.uploadMsg)
},
}
function getUUID () {
var d = new Date().getTime()
var ret = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,
function (c) {
var r = (d + Math.random() * 16) % 16 | 0
d = Math.floor(d / 16)
return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16)
})
ret = ret.replace(new RegExp('-', 'g'), '')
return ret
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment