mirror of https://gitee.com/karson/fastadmin.git
Compare commits
No commits in common. "d4c866cb5544e26ea2a23b196790340a36f24464" and "76024147aa3f475087f1f7dbb7505afade978617" have entirely different histories.
d4c866cb55
...
76024147aa
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length})" />
|
<input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length})" />
|
||||||
<span class="input-group-btn" style="padding:0;border:none;">
|
<span class="input-group-btn" style="padding:0;border:none;">
|
||||||
<img src="{:captcha_src()}" width="107" height="32" class="captcha-img" onclick="this.src = '{:captcha_src()}?r=' + Math.random();"/>
|
<img src="{:captcha_src()}" width="107" height="32" onclick="this.src = '{:captcha_src()}?r=' + Math.random();"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="msg-box n-right" style="left:0;top:33px;text-align: left;" for="captcha"></span>
|
<span class="msg-box n-right" style="left:0;top:33px;text-align: left;" for="captcha"></span>
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'cookie']
|
||||||
//如果登录已经超时,重新提醒登录
|
//如果登录已经超时,重新提醒登录
|
||||||
if (uid && uid != ret.data.uid) {
|
if (uid && uid != ret.data.uid) {
|
||||||
Controller.api.userinfo.set(null);
|
Controller.api.userinfo.set(null);
|
||||||
$(".operate[data-name='" + name + "'] .btn-install:first").trigger("click");
|
$(".operate[data-name='" + name + "'] .btn-install").trigger("click");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
top.Fast.api.open(ret.data.payurl, __('Pay now'), {
|
top.Fast.api.open(ret.data.payurl, __('Pay now'), {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
var Frontend = {
|
var Frontend = {
|
||||||
api: {
|
api: {
|
||||||
//发送验证码
|
//发送验证码
|
||||||
sendcaptcha: function (btn, type, data, success, error) {
|
sendcaptcha: function (btn, type, data, callback) {
|
||||||
$(btn).addClass("disabled", true).text("发送中...");
|
$(btn).addClass("disabled", true).text("发送中...");
|
||||||
var si = {};
|
var si = {};
|
||||||
Frontend.api.ajax({url: $(btn).data("url"), data: data}, function (data, ret) {
|
Frontend.api.ajax({url: $(btn).data("url"), data: data}, function (data, ret) {
|
||||||
|
|
@ -17,15 +17,11 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
$(btn).addClass("disabled").text(seconds + "秒后可再次发送");
|
$(btn).addClass("disabled").text(seconds + "秒后可再次发送");
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
if (typeof success == 'function') {
|
if (typeof callback == 'function') {
|
||||||
success.call(this, data, ret);
|
callback.call(this, data, ret);
|
||||||
}
|
}
|
||||||
}, function (data, ret) {
|
}, function () {
|
||||||
$(btn).removeClass("disabled").text('发送验证码');
|
$(btn).removeClass("disabled").text('发送验证码');
|
||||||
|
|
||||||
if (typeof error == 'function') {
|
|
||||||
error.call(this, data, ret);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//准备验证码
|
//准备验证码
|
||||||
|
|
@ -43,8 +39,6 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
data.captcha = $("input[name=captcha]", form).val();
|
data.captcha = $("input[name=captcha]", form).val();
|
||||||
Frontend.api.sendcaptcha(btn, type, data, function (data, ret) {
|
Frontend.api.sendcaptcha(btn, type, data, function (data, ret) {
|
||||||
Layer.close(index);
|
Layer.close(index);
|
||||||
}, function (data, ret) {
|
|
||||||
$("img.captcha-img", form).trigger("click");
|
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
};
|
};
|
||||||
var origincallback = function (start, end) {
|
var origincallback = function (start, end) {
|
||||||
$(this.element).val(start.format(this.locale.format) + " - " + end.format(this.locale.format));
|
$(this.element).val(start.format(this.locale.format) + " - " + end.format(this.locale.format));
|
||||||
$(this.element).trigger('change').trigger('validate');
|
$(this.element).trigger('change');
|
||||||
};
|
};
|
||||||
$(".datetimerange", form).each(function () {
|
$(".datetimerange", form).each(function () {
|
||||||
var callback = typeof $(this).data('callback') == 'function' ? $(this).data('callback') : origincallback;
|
var callback = typeof $(this).data('callback') == 'function' ? $(this).data('callback') : origincallback;
|
||||||
|
|
@ -227,7 +227,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
callback.call(picker, picker.startDate, picker.endDate);
|
callback.call(picker, picker.startDate, picker.endDate);
|
||||||
});
|
});
|
||||||
$(this).on('cancel.daterangepicker', function (ev, picker) {
|
$(this).on('cancel.daterangepicker', function (ev, picker) {
|
||||||
$(this).val('').trigger('change').trigger('validate');
|
$(this).val('').trigger('change');
|
||||||
});
|
});
|
||||||
$(this).daterangepicker($.extend(true, {}, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
|
$(this).daterangepicker($.extend(true, {}, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -833,11 +833,8 @@ define(['jquery', 'bootstrap'], function ($, undefined) {
|
||||||
},
|
},
|
||||||
search: function (value, row, index) {
|
search: function (value, row, index) {
|
||||||
var field = this.field;
|
var field = this.field;
|
||||||
if (typeof this.customField !== 'undefined') {
|
if (typeof this.customField !== 'undefined' && typeof row[this.customField] !== 'undefined') {
|
||||||
var customValue = this.customField.split('.').reduce(function (obj, key) {
|
value = row[this.customField];
|
||||||
return obj === null || obj === undefined ? '' : obj[key];
|
|
||||||
}, row);
|
|
||||||
value = Fast.api.escape(customValue);
|
|
||||||
field = this.customField;
|
field = this.customField;
|
||||||
}
|
}
|
||||||
return '<a href="javascript:;" class="searchit" data-toggle="tooltip" title="' + __('Click to search %s', value) + '" data-field="' + field + '" data-value="' + value + '">' + value + '</a>';
|
return '<a href="javascript:;" class="searchit" data-toggle="tooltip" title="' + __('Click to search %s', value) + '" data-field="' + field + '" data-value="' + value + '">' + value + '</a>';
|
||||||
|
|
@ -861,11 +858,8 @@ define(['jquery', 'bootstrap'], function ($, undefined) {
|
||||||
colorArr = $.extend(colorArr, this.custom);
|
colorArr = $.extend(colorArr, this.custom);
|
||||||
}
|
}
|
||||||
var field = this.field;
|
var field = this.field;
|
||||||
if (typeof this.customField !== 'undefined') {
|
if (typeof this.customField !== 'undefined' && typeof row[this.customField] !== 'undefined') {
|
||||||
var customValue = this.customField.split('.').reduce(function (obj, key) {
|
value = row[this.customField];
|
||||||
return obj === null || obj === undefined ? '' : obj[key];
|
|
||||||
}, row);
|
|
||||||
value = Fast.api.escape(customValue);
|
|
||||||
field = this.customField;
|
field = this.customField;
|
||||||
}
|
}
|
||||||
if (typeof that.searchList === 'object' && typeof that.custom === 'undefined') {
|
if (typeof that.searchList === 'object' && typeof that.custom === 'undefined') {
|
||||||
|
|
@ -1017,11 +1011,17 @@ define(['jquery', 'bootstrap'], function ($, undefined) {
|
||||||
url + (url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + '{ids}' : url;
|
url + (url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + '{ids}' : url;
|
||||||
url = url.replace(/\{(.*?)\}/gi, function (matched) {
|
url = url.replace(/\{(.*?)\}/gi, function (matched) {
|
||||||
matched = matched.substring(1, matched.length - 1);
|
matched = matched.substring(1, matched.length - 1);
|
||||||
var temp = matched.split('.').reduce(function (obj, key) {
|
if (matched.indexOf(".") !== -1) {
|
||||||
return obj === null || obj === undefined ? '' : obj[key];
|
var temp = row;
|
||||||
}, row);
|
var arr = matched.split(/\./);
|
||||||
temp = Fast.api.escape(temp);
|
for (var i = 0; i < arr.length; i++) {
|
||||||
return temp;
|
if (typeof temp[arr[i]] !== 'undefined') {
|
||||||
|
temp = temp[arr[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return typeof temp === 'object' ? '' : temp;
|
||||||
|
}
|
||||||
|
return row[matched];
|
||||||
});
|
});
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue