fix bug + thêm mẫu người mới trên thiết bị
This commit is contained in:
@@ -1,7 +1,24 @@
|
||||
$(function () {
|
||||
common.dateTimePickerByClass("datepicker", "HH:mm DD/MM/YYYY");
|
||||
common.dateTimePickerDay("birthday");
|
||||
$("#Code").select2();
|
||||
$("#Code").select2({
|
||||
tags: true,
|
||||
createTag: function (params) {
|
||||
return {
|
||||
id: params.term,
|
||||
text: params.term,
|
||||
newOption: true
|
||||
};
|
||||
},
|
||||
templateResult: function (data) {
|
||||
var $result = $("<span></span>");
|
||||
$result.text(data.text);
|
||||
if (data.newOption) {
|
||||
$result.append(" <em>(Thêm mới)</em>");
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
});
|
||||
$("input[name='AllData']").change(function () {
|
||||
if ($('input[name=AllData]').is(':checked')) {
|
||||
window.location = $("input[name='URL']").val() + "?all=true" + "&from=" + $("input[name='From']").val() + "&to=" + $("input[name='To']").val();
|
||||
@@ -26,6 +43,12 @@ function _form(e) {
|
||||
var confidence = JSON.parse($(e).attr("data-confidence"));
|
||||
$("#closest-img").attr("src", confidence.img != "" ? confidence.img : "/images/user2-160x160.jpg");
|
||||
$("#closest-name").html(confidence.name + " [" + confidence.score + "]");
|
||||
|
||||
clearData();
|
||||
}
|
||||
|
||||
function clearData() {
|
||||
$('#Code').val("").trigger('change');
|
||||
}
|
||||
|
||||
function _close() {
|
||||
|
||||
Reference in New Issue
Block a user