JsBugs merged
This commit is contained in:
@@ -164,8 +164,5 @@
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var checkAccountAjax = `@Url.Page("./Index", "CheckAccount")`;
|
||||
var saveCreateCameraAccountUrl = `@Url.Page("./Index", "CreateCameraAccount")`;
|
||||
|
||||
console.log(checkAccountAjax);
|
||||
console.log(saveCreateCameraAccountUrl);
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/CameraAccounts/js/modalcameraaccount.js?ver=@clientVersion"></script>
|
||||
@@ -216,7 +216,7 @@
|
||||
{
|
||||
@foreach (var item in Model.WorkshopSettingsDetails.ShiftsList.OrderBy(x => x.Placement))
|
||||
{
|
||||
<div class="d-flex flex-grow-1 flex-md-grow-0 gap-3 align-items-center ps-3">
|
||||
<div class="d-flex flex-grow-1 flex-md-grow-0 gap-3 align-items-center">
|
||||
<span class="d-none d-md-block" style="font-size: 10px; font-weight: 500; color: #5C5C5C;">
|
||||
@if (item.Placement == ShiftPlacement.First)
|
||||
{
|
||||
@@ -257,7 +257,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mostamar-description ps-3 ">
|
||||
<div class="mostamar-description">
|
||||
مجموعه بدون وقفه و بصورت مستمر فعال میباشد
|
||||
</div>
|
||||
}
|
||||
@@ -265,7 +265,7 @@
|
||||
else
|
||||
{
|
||||
|
||||
<div class="d-flex flex-grow-1 flex-md-grow-0 gap-3 align-items-center ps-3">
|
||||
<div class="d-flex flex-grow-1 flex-md-grow-0 gap-3 align-items-center">
|
||||
<span class="d-none d-md-block" style="font-size: 10px; font-weight: 500; color: #5C5C5C;">
|
||||
نوبت اول
|
||||
</span>
|
||||
|
||||
@@ -110,6 +110,11 @@
|
||||
var ajaxServiceLayout = new AjaxService(antiForgeryTokenLayout);
|
||||
|
||||
$(document).ready(function () {
|
||||
statusCameraAccountAndWorkshopSetting();
|
||||
});
|
||||
|
||||
function statusCameraAccountAndWorkshopSetting()
|
||||
{
|
||||
ajaxServiceLayout.get(statusCameraAccountAndWorkshopSettingUrl)
|
||||
.then(response => {
|
||||
const disableIds = [
|
||||
@@ -137,7 +142,7 @@
|
||||
$('#RollCallSubMenu').addClass('disable');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#MainModal').on('hidden.bs.modal', function () {
|
||||
$("#ModalContent").html("");
|
||||
|
||||
@@ -41,70 +41,70 @@ $(document).ready(function () {
|
||||
element.val(value);
|
||||
});
|
||||
|
||||
new Cleave(this', {
|
||||
new Cleave(this, {
|
||||
delimiters: ['/', '/'],
|
||||
blocks: [4, 2, 2],
|
||||
numericOnly: true
|
||||
});
|
||||
// new Cleave(this, {
|
||||
// date: true,
|
||||
// delimiter: '/',
|
||||
// datePattern: ['Y', 'm', 'd']
|
||||
// });
|
||||
});
|
||||
// new Cleave(this, {
|
||||
// date: true,
|
||||
// delimiter: '/',
|
||||
// datePattern: ['Y', 'm', 'd']
|
||||
// });
|
||||
});
|
||||
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
$(".checkAll").change(function () {
|
||||
//let dataValYear = $('#year').val();
|
||||
//let dataValMonth = $('#month').val();
|
||||
//let dataValPersonel = Number($('#employeeId').val());
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
$(".checkAll").change(function () {
|
||||
//let dataValYear = $('#year').val();
|
||||
//let dataValMonth = $('#month').val();
|
||||
//let dataValPersonel = Number($('#employeeId').val());
|
||||
|
||||
//if ((dataValYear == '' || dataValMonth == '') && dataValPersonel == 0) {
|
||||
//$('#dropdown-year').addClass("errored");
|
||||
//$('#dropdown-month').addClass("errored");
|
||||
//if ((dataValYear == '' || dataValMonth == '') && dataValPersonel == 0) {
|
||||
//$('#dropdown-year').addClass("errored");
|
||||
//$('#dropdown-month').addClass("errored");
|
||||
|
||||
//$(this).prop('checked', false);
|
||||
//$('.alert-msg').show();
|
||||
//$('.alert-msg p').text('جهت انتخاب گروهی قراردادها ابتدا میبایست سال و ماه مورد نظر را انتخاب نمائید.');
|
||||
//setTimeout(function () {
|
||||
// $('.alert-msg').hide();
|
||||
// $('.alert-msg p').text('');
|
||||
// $('#dropdown-year').removeClass("errored");
|
||||
// $('#dropdown-month').removeClass("errored");
|
||||
//},
|
||||
//3500);
|
||||
//} else {
|
||||
//loadAllToPrint();
|
||||
$('input:checkbox').not(this).not("#group, #list").prop('checked', this.checked);
|
||||
//$(this).prop('checked', false);
|
||||
//$('.alert-msg').show();
|
||||
//$('.alert-msg p').text('جهت انتخاب گروهی قراردادها ابتدا میبایست سال و ماه مورد نظر را انتخاب نمائید.');
|
||||
//setTimeout(function () {
|
||||
// $('.alert-msg').hide();
|
||||
// $('.alert-msg p').text('');
|
||||
// $('#dropdown-year').removeClass("errored");
|
||||
// $('#dropdown-month').removeClass("errored");
|
||||
//},
|
||||
//3500);
|
||||
//} else {
|
||||
//loadAllToPrint();
|
||||
$('input:checkbox').not(this).not("#group, #list").prop('checked', this.checked);
|
||||
|
||||
|
||||
//}
|
||||
});
|
||||
//}
|
||||
});
|
||||
|
||||
$("input:checkbox").not("#group,#list,.checkAll").change(function () {
|
||||
if ($("input:checkbox").not("#group,#list,.checkAll").filter(":not(:checked)").length) {
|
||||
$(".checkAll").prop("checked", false);
|
||||
} else {
|
||||
$(".checkAll").prop("checked", true);
|
||||
}
|
||||
});
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
$("input:checkbox").not("#group,#list,.checkAll").change(function () {
|
||||
if ($("input:checkbox").not("#group,#list,.checkAll").filter(":not(:checked)").length) {
|
||||
$(".checkAll").prop("checked", false);
|
||||
} else {
|
||||
$(".checkAll").prop("checked", true);
|
||||
}
|
||||
});
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
|
||||
//*********************ستون نام پرسنل در حالتی که فقط اسم پرسنل هست باید هاید بشه************************
|
||||
$("#searchJustName").hide();
|
||||
//*********************ستون نام پرسنل در حالتی که فقط اسم پرسنل هست باید هاید بشه************************
|
||||
$("#searchJustName").hide();
|
||||
|
||||
//************تنظیم چک باکس تایپ لیست*******************
|
||||
$('#group, #groupMobile').change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#list , #listMobile').prop('checked', false);
|
||||
}
|
||||
});
|
||||
//************تنظیم چک باکس تایپ لیست*******************
|
||||
$('#group, #groupMobile').change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#list , #listMobile').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#list, #listMobile').change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#group , #groupMobile').prop('checked', false);
|
||||
}
|
||||
});
|
||||
$('#list, #listMobile').change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#group , #groupMobile').prop('checked', false);
|
||||
}
|
||||
});
|
||||
//************تنظیم چک باکس تایپ لیست*******************
|
||||
});
|
||||
|
||||
@@ -393,8 +393,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
</button>
|
||||
${detailsPermission
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-flex d-none" style="width: 30px;height: 30px;padding: 0;" onclick="DetailLoan(${item.id})">
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-flex d-none" style="width: 30px;height: 30px;padding: 0;" onclick="DetailLoan(${item.id})">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -405,8 +405,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</button>`
|
||||
:
|
||||
`<button type="button" class="btn-detail position-relative d-md-flex d-none disable" style="width: 30px;height: 30px;padding: 0;">
|
||||
:
|
||||
`<button type="button" class="btn-detail position-relative d-md-flex d-none disable" style="width: 30px;height: 30px;padding: 0;">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -418,8 +418,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</button>`}
|
||||
${deletePermission
|
||||
?
|
||||
`<button data-remove-id="${item.id}" type="button" class="btn-delete removeLoan d-md-block d-none">
|
||||
?
|
||||
`<button data-remove-id="${item.id}" type="button" class="btn-delete removeLoan d-md-block d-none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
@@ -428,8 +428,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>`
|
||||
:
|
||||
`<button type="button" class="btn-delete removeLoan d-md-block d-none disable">
|
||||
:
|
||||
`<button type="button" class="btn-delete removeLoan d-md-block d-none disable">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
@@ -438,7 +438,7 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>`
|
||||
}
|
||||
}
|
||||
<button type="button" class="btn-operation-more btn-open-div position-relative d-md-none d-block">
|
||||
<span class="align-items-center d-flex justify-content-center">
|
||||
<span class="mx-1">عملیات</span>
|
||||
@@ -492,8 +492,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</button>
|
||||
|
||||
${detailsPermission
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${item.id})">
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${item.id})">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -504,8 +504,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</button>`
|
||||
:
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex disable w-100">
|
||||
:
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex disable w-100">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -517,8 +517,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</button>`}
|
||||
${deletePermission
|
||||
?
|
||||
`<button data-remove-id="${item.id}" type="button" class="btn-delete removeLoan w-100">
|
||||
?
|
||||
`<button data-remove-id="${item.id}" type="button" class="btn-delete removeLoan w-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
@@ -527,8 +527,8 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>`
|
||||
:
|
||||
`<button type="button" class="btn-delete removeLoan disable w-100">
|
||||
:
|
||||
`<button type="button" class="btn-delete removeLoan disable w-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
@@ -537,12 +537,12 @@ function htmlLoadSimpleListData(loadLoanListData) {
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>`
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
|
||||
pageIndexJs++;
|
||||
});
|
||||
|
||||
@@ -805,7 +805,7 @@ function htmlLoadWithEmployeeDataByFullname(loadLoanListData) {
|
||||
<div class="Rtable-cell--content text-center">${item.personnelCode}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content">${item.totalAmountFa + " ریال" ?? "-"}</div>
|
||||
<div class="Rtable-cell--content">${item.totalAmountFa + " ریال" ?? "-"}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-flex d-none width4">
|
||||
<div class="Rtable-cell--content">${item.amountPerMonth + " ریال"}</div>
|
||||
@@ -1029,7 +1029,7 @@ function htmlLoadWithEmployeeMobileDataByFullname(loadLoanListData) {
|
||||
</button>
|
||||
${detailsPermission
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${loanItem.id})">
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${loanItem.id})">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -1187,7 +1187,7 @@ function htmlLoadWithEmployeeMobileDataByDate(loadLoanListData) {
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div>مبلغ</div>
|
||||
<div>${loanItem.totalAmountFa + " ریال" ??"-"}</div>
|
||||
<div>${loanItem.totalAmountFa + " ریال" ?? "-"}</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div>مبلغ هر ماه</div>
|
||||
@@ -1203,7 +1203,7 @@ function htmlLoadWithEmployeeMobileDataByDate(loadLoanListData) {
|
||||
|
||||
${detailsPermission
|
||||
?
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${loanItem.id})">
|
||||
`<button type="button" class="btn-detail position-relative d-md-none d-flex w-100" onclick="DetailLoan(${loanItem.id})">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>
|
||||
@@ -1361,7 +1361,7 @@ function removeAjax(id) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function DetailLoan(LoanId) {
|
||||
var id = Number(LoanId);
|
||||
var url = `/Client/Company/Loan/Index?id=${id}&handler=Detail`;
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
var eyeShow = $('.eyeShow');
|
||||
var eyeClose = $('.eyeClose');
|
||||
var reEyeShow = $('.reEyeShow');
|
||||
var reEyeClose = $('.reEyeClose');
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
|
||||
$("#username").on("input", function () {
|
||||
var currentValue = $(this).val();
|
||||
$(this).val(currentValue.replace(/[^a-zA-Z0-9_\-\$\#\@\!\^\&\%\*]/g, ''));
|
||||
});
|
||||
|
||||
$('#username, #signupInputPassword, #repeat_password').on('keyup', function () {
|
||||
if ($('#username').val() && $('#signupInputPassword').val() && $('#repeat_password').val() && $('#signupInputPassword').val() === $('#repeat_password').val()) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
});
|
||||
|
||||
$('#repeat_password, #signupInputPassword').on('keyup', function() {
|
||||
if ($('#signupInputPassword').val() !== $('#repeat_password').val()) {
|
||||
$('#passwordErrorMessage').text('گذرواژه یکسان نیست');
|
||||
} else {
|
||||
$('#passwordErrorMessage').text('');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click','#accountModalModal button', function() {
|
||||
|
||||
// alert($(this));
|
||||
// $(this).find('input').type ? 'text' : 'password';
|
||||
// document.getElementById('hybrid').type = 'password';
|
||||
$("#accountModalModal button").find('input').attr("type", "text");
|
||||
|
||||
// var input=document.getElementById(some-id);
|
||||
// var input2= input.cloneNode(false);
|
||||
// input2.type='password';
|
||||
// input.parentNode.replaceChild(input2,input);
|
||||
});
|
||||
|
||||
function passFunction() {
|
||||
var x = document.getElementById("signupInputPassword");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
eyeShow.hide();
|
||||
eyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function rePassFunction() {
|
||||
var x = document.getElementById("repeat_password");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
reEyeShow.hide();
|
||||
reEyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function passwordCheck(password) {
|
||||
if (password.length >= 8)
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[0-9])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[A-Z])/))
|
||||
strength += 1;
|
||||
|
||||
displayBar(strength);
|
||||
}
|
||||
|
||||
function displayBar(strength) {
|
||||
$(".password-strength-group").attr('data-strength', strength);
|
||||
}
|
||||
|
||||
$("#signupInputPassword").keyup(function () {
|
||||
strength = 0;
|
||||
var password = $(this).val();
|
||||
passwordCheck(password);
|
||||
});
|
||||
|
||||
//$(document).ready(function () {
|
||||
//var typingTimer;
|
||||
//var typingInterval = 1500;
|
||||
|
||||
//$("#username").on('keyup', function () {
|
||||
// // removed
|
||||
//});
|
||||
//});
|
||||
|
||||
|
||||
function checkAccountExist() {
|
||||
var username = $('#username').val();
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').addClass("d-none");
|
||||
$('#loadingSpinner').removeClass("d-none");
|
||||
$('.btn-register').addClass('disable');
|
||||
|
||||
try {
|
||||
const response = $.ajax({
|
||||
async: false,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
url: checkAccountAjax,
|
||||
data: { username: username },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken }
|
||||
});
|
||||
|
||||
var res = response.responseJSON;
|
||||
|
||||
if (res.success) {
|
||||
registerAccount();
|
||||
} else {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(res.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 2000);
|
||||
$('.btn-register').removeClass('disable');
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
$('.btn-register').removeClass('disable');
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function registerAccount() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveCreateCameraAccountUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2500);
|
||||
|
||||
$('#ajaxCameraAccountDataLoad').html('');
|
||||
loadDataCameraAccountAjax();
|
||||
$('#MainModal').modal('hide');
|
||||
statusCameraAccountAndWorkshopSetting();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.error("AJAX Error:", err);
|
||||
console.log("Full Response:", xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user