function scJQGeneralAdd() { scLoadScInput('input:text.sc-js-input'); scLoadScInput('input:password.sc-js-input'); scLoadScInput('input:checkbox.sc-js-input'); scLoadScInput('input:radio.sc-js-input'); scLoadScInput('select.sc-js-input'); scLoadScInput('textarea.sc-js-input'); } // scJQGeneralAdd function scFocusField(sField) { var $oField = $('#id_sc_field_' + sField); if (0 == $oField.length) { $oField = $('input[name=' + sField + ']'); } if (0 == $oField.length && document.F1.elements[sField]) { $oField = $(document.F1.elements[sField]); } if ($oField.length > 0) { switch ($oField[0].name) { case 'enabled': case 'status': case 'is_client': case 'job_title': case 'source': case 'first_name': case 'company': case 'last_name': case 'phone': case 'email': case 'mobile': case 'address': case 'city': case 'state': case 'zip_code': case 'country': sc_exib_ocult_pag('form_contacts_mob_form0'); break; case 'notes': sc_exib_ocult_pag('form_contacts_mob_form1'); break; } } if ($("#id_ac_" + sField).length > 0) { if ($oField.hasClass("select2-hidden-accessible")) { if (false == scSetFocusOnField($oField, sField)) { setTimeout(function() { scSetFocusOnField($oField, sField); }, 500); } } else { if (false == scSetFocusOnField($oField, sField)) { if (false == scSetFocusOnField($("#id_ac_" + sField, sField))) { setTimeout(function() { scSetFocusOnField($("#id_ac_" + sField, sField)); }, 500); } } else { setTimeout(function() { scSetFocusOnField($oField, sField); }, 500); } } } else { setTimeout(function() { scSetFocusOnField($oField, sField); }, 500); } } // scFocusField function scSetFocusOnField($oField, sField) { if ($oField.length > 0 && $oField[0].offsetHeight > 0 && $oField[0].offsetWidth > 0 && !$oField[0].disabled) { if (sField == 'country' || sField == 'source') { $oField.select2('open'); } else { $oField[0].focus(); } return true; } return false; } // scSetFocusOnField function scEventControl_init(iSeqRow) { scEventControl_data["enabled" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["status" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["is_client" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["job_title" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["source" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["first_name" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["company" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["last_name" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["phone" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["email" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["mobile" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["address" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["city" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["state" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["zip_code" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["country" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; scEventControl_data["notes" + iSeqRow] = {"blur": false, "change": false, "autocomp": false, "original": "", "calculated": ""}; } function scEventControl_active(iSeqRow) { if (scEventControl_data["enabled" + iSeqRow] && scEventControl_data["enabled" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["enabled" + iSeqRow] && scEventControl_data["enabled" + iSeqRow]["change"]) { return true; } if (scEventControl_data["status" + iSeqRow] && scEventControl_data["status" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["status" + iSeqRow] && scEventControl_data["status" + iSeqRow]["change"]) { return true; } if (scEventControl_data["is_client" + iSeqRow] && scEventControl_data["is_client" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["is_client" + iSeqRow] && scEventControl_data["is_client" + iSeqRow]["change"]) { return true; } if (scEventControl_data["job_title" + iSeqRow] && scEventControl_data["job_title" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["job_title" + iSeqRow] && scEventControl_data["job_title" + iSeqRow]["change"]) { return true; } if (scEventControl_data["source" + iSeqRow] && scEventControl_data["source" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["source" + iSeqRow] && scEventControl_data["source" + iSeqRow]["change"]) { return true; } if (scEventControl_data["first_name" + iSeqRow] && scEventControl_data["first_name" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["first_name" + iSeqRow] && scEventControl_data["first_name" + iSeqRow]["change"]) { return true; } if (scEventControl_data["company" + iSeqRow] && scEventControl_data["company" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["company" + iSeqRow] && scEventControl_data["company" + iSeqRow]["change"]) { return true; } if (scEventControl_data["last_name" + iSeqRow] && scEventControl_data["last_name" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["last_name" + iSeqRow] && scEventControl_data["last_name" + iSeqRow]["change"]) { return true; } if (scEventControl_data["phone" + iSeqRow] && scEventControl_data["phone" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["phone" + iSeqRow] && scEventControl_data["phone" + iSeqRow]["change"]) { return true; } if (scEventControl_data["email" + iSeqRow] && scEventControl_data["email" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["email" + iSeqRow] && scEventControl_data["email" + iSeqRow]["change"]) { return true; } if (scEventControl_data["mobile" + iSeqRow] && scEventControl_data["mobile" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["mobile" + iSeqRow] && scEventControl_data["mobile" + iSeqRow]["change"]) { return true; } if (scEventControl_data["address" + iSeqRow] && scEventControl_data["address" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["address" + iSeqRow] && scEventControl_data["address" + iSeqRow]["change"]) { return true; } if (scEventControl_data["city" + iSeqRow] && scEventControl_data["city" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["city" + iSeqRow] && scEventControl_data["city" + iSeqRow]["change"]) { return true; } if (scEventControl_data["state" + iSeqRow] && scEventControl_data["state" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["state" + iSeqRow] && scEventControl_data["state" + iSeqRow]["change"]) { return true; } if (scEventControl_data["zip_code" + iSeqRow] && scEventControl_data["zip_code" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["zip_code" + iSeqRow] && scEventControl_data["zip_code" + iSeqRow]["change"]) { return true; } if (scEventControl_data["country" + iSeqRow] && scEventControl_data["country" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["country" + iSeqRow] && scEventControl_data["country" + iSeqRow]["change"]) { return true; } if (scEventControl_data["notes" + iSeqRow] && scEventControl_data["notes" + iSeqRow]["blur"]) { return true; } if (scEventControl_data["notes" + iSeqRow] && scEventControl_data["notes" + iSeqRow]["change"]) { return true; } return false; } // scEventControl_active function scEventControl_onFocus(oField, iSeq) { var fieldId, fieldName; fieldId = $(oField).attr("id"); fieldName = fieldId.substr(12); scEventControl_data[fieldName]["blur"] = true; if ("source" + iSeq == fieldName) { scEventControl_data[fieldName]["blur"] = false; } if ("country" + iSeq == fieldName) { scEventControl_data[fieldName]["blur"] = false; } scEventControl_data[fieldName]["change"] = false; } // scEventControl_onFocus function scEventControl_onBlur(sFieldName) { scEventControl_data[sFieldName]["blur"] = false; if (scEventControl_data[sFieldName]["change"]) { if (scEventControl_data[sFieldName]["original"] == $("#id_sc_field_" + sFieldName).val() || scEventControl_data[sFieldName]["calculated"] == $("#id_sc_field_" + sFieldName).val()) { scEventControl_data[sFieldName]["change"] = false; } } } // scEventControl_onBlur function scEventControl_onChange(sFieldName) { scEventControl_data[sFieldName]["change"] = false; } // scEventControl_onChange function scEventControl_onAutocomp(sFieldName) { scEventControl_data[sFieldName]["autocomp"] = false; } // scEventControl_onChange var scEventControl_data = {}; function scJQEventsAdd(iSeqRow) { $('#id_sc_field_first_name' + iSeqRow).bind('blur', function() { sc_form_contacts_first_name_onblur('#id_sc_field_first_name' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_first_name_onfocus(this, iSeqRow, event) }); $('#id_sc_field_last_name' + iSeqRow).bind('blur', function() { sc_form_contacts_last_name_onblur('#id_sc_field_last_name' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_last_name_onfocus(this, iSeqRow, event) }); $('#id_sc_field_email' + iSeqRow).bind('blur', function() { sc_form_contacts_email_onblur('#id_sc_field_email' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_email_onfocus(this, iSeqRow, event) }); $('#id_sc_field_phone' + iSeqRow).bind('blur', function() { sc_form_contacts_phone_onblur('#id_sc_field_phone' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_phone_onfocus(this, iSeqRow, event) }); $('#id_sc_field_mobile' + iSeqRow).bind('blur', function() { sc_form_contacts_mobile_onblur('#id_sc_field_mobile' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_mobile_onfocus(this, iSeqRow, event) }); $('#id_sc_field_company' + iSeqRow).bind('blur', function() { sc_form_contacts_company_onblur('#id_sc_field_company' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_company_onfocus(this, iSeqRow, event) }); $('#id_sc_field_job_title' + iSeqRow).bind('blur', function() { sc_form_contacts_job_title_onblur('#id_sc_field_job_title' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_job_title_onfocus(this, iSeqRow, event) }); $('#id_sc_field_address' + iSeqRow).bind('blur', function() { sc_form_contacts_address_onblur('#id_sc_field_address' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_address_onfocus(this, iSeqRow, event) }); $('#id_sc_field_city' + iSeqRow).bind('blur', function() { sc_form_contacts_city_onblur('#id_sc_field_city' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_city_onfocus(this, iSeqRow, event) }); $('#id_sc_field_state' + iSeqRow).bind('blur', function() { sc_form_contacts_state_onblur('#id_sc_field_state' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_state_onfocus(this, iSeqRow, event) }); $('#id_sc_field_zip_code' + iSeqRow).bind('blur', function() { sc_form_contacts_zip_code_onblur('#id_sc_field_zip_code' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_zip_code_onfocus(this, iSeqRow, event) }); $('#id_sc_field_country' + iSeqRow).bind('select2:close', function() { sc_form_contacts_country_onblur('#id_sc_field_country' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_country_onfocus(this, iSeqRow, event) }); $('#id_sc_field_source' + iSeqRow).bind('select2:close', function() { sc_form_contacts_source_onblur('#id_sc_field_source' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_source_onfocus(this, iSeqRow, event) }); $('#id_sc_field_status' + iSeqRow).bind('blur', function() { sc_form_contacts_status_onblur('#id_sc_field_status' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_status_onfocus(this, iSeqRow, event) }); $('#id_sc_field_notes' + iSeqRow).bind('blur', function() { sc_form_contacts_notes_onblur('#id_sc_field_notes' + iSeqRow, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_notes_onfocus(this, iSeqRow, event) }); $('#id_sc_field_is_client' + iSeqRow).bind('blur', function() { sc_form_contacts_is_client_onblur('#id_sc_field_is_client' + iSeqRow, iSeqRow, event) }) .bind('click', function() { sc_form_contacts_is_client_onclick(this, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_is_client_onfocus(this, iSeqRow, event) }); $('#id_sc_field_enabled' + iSeqRow).bind('blur', function() { sc_form_contacts_enabled_onblur('#id_sc_field_enabled' + iSeqRow, iSeqRow, event) }) .bind('click', function() { sc_form_contacts_enabled_onclick(this, iSeqRow, event) }) .bind('focus', function() { sc_form_contacts_enabled_onfocus(this, iSeqRow, event) }); $('.sc-ui-checkbox-enabled' + iSeqRow).on('click', function() { scMarkFormAsChanged(); }); $('.sc-ui-radio-status' + iSeqRow).on('click', function() { scMarkFormAsChanged(); }); $('.sc-ui-checkbox-is_client' + iSeqRow).on('click', function() { scMarkFormAsChanged(); }); } // scJQEventsAdd Upload_Cancel = false; function sc_form_contacts_first_name_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_first_name(); scCssBlur(oThis); } function sc_form_contacts_first_name_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_last_name_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_last_name(); scCssBlur(oThis); } function sc_form_contacts_last_name_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_email_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_email(); scCssBlur(oThis); } function sc_form_contacts_email_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_phone_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_phone(); scCssBlur(oThis); } function sc_form_contacts_phone_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_mobile_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_mobile(); scCssBlur(oThis); } function sc_form_contacts_mobile_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_company_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_company(); scCssBlur(oThis); } function sc_form_contacts_company_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_job_title_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_job_title(); scCssBlur(oThis); } function sc_form_contacts_job_title_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_address_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_address(); scCssBlur(oThis); } function sc_form_contacts_address_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_city_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_city(); scCssBlur(oThis); } function sc_form_contacts_city_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_state_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_state(); scCssBlur(oThis); } function sc_form_contacts_state_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_zip_code_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_zip_code(); scCssBlur(oThis); } function sc_form_contacts_zip_code_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_country_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_country(); scCssBlur(oThis); } function sc_form_contacts_country_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_source_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_source(); scCssBlur(oThis); } function sc_form_contacts_source_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_status_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_status(); scCssBlur(oThis); } function sc_form_contacts_status_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_notes_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_notes(); scCssBlur(oThis); } function sc_form_contacts_notes_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_is_client_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_is_client(); scCssBlur(oThis); } function sc_form_contacts_is_client_onclick(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_event_is_client_onclick(); } function sc_form_contacts_is_client_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function sc_form_contacts_enabled_onblur(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_validate_enabled(); scCssBlur(oThis); } function sc_form_contacts_enabled_onclick(oThis, iSeqRow, event) { do_ajax_form_contacts_mob_event_enabled_onclick(); } function sc_form_contacts_enabled_onfocus(oThis, iSeqRow, event) { scEventControl_onFocus(oThis, iSeqRow); scCssFocus(oThis); } function displayChange_page(page, status) { if ("0" == page) { displayChange_page_0(status); } if ("1" == page) { displayChange_page_1(status); } } function displayChange_page_0(status) { displayChange_block("0", status); displayChange_block("1", status); displayChange_block("2", status); } function displayChange_page_1(status) { displayChange_block("3", status); } function displayChange_block(block, status) { if ("0" == block) { displayChange_block_0(status); } if ("1" == block) { displayChange_block_1(status); } if ("2" == block) { displayChange_block_2(status); } if ("3" == block) { displayChange_block_3(status); } } function displayChange_block_0(status) { displayChange_field("enabled", "", status); displayChange_field("status", "", status); displayChange_field("is_client", "", status); } function displayChange_block_1(status) { displayChange_field("job_title", "", status); displayChange_field("source", "", status); displayChange_field("first_name", "", status); displayChange_field("company", "", status); displayChange_field("last_name", "", status); displayChange_field("phone", "", status); displayChange_field("email", "", status); displayChange_field("mobile", "", status); } function displayChange_block_2(status) { displayChange_field("address", "", status); displayChange_field("city", "", status); displayChange_field("state", "", status); displayChange_field("zip_code", "", status); displayChange_field("country", "", status); } function displayChange_block_3(status) { displayChange_field("notes", "", status); } function displayChange_row(row, status) { displayChange_field_enabled(row, status); displayChange_field_status(row, status); displayChange_field_is_client(row, status); displayChange_field_job_title(row, status); displayChange_field_source(row, status); displayChange_field_first_name(row, status); displayChange_field_company(row, status); displayChange_field_last_name(row, status); displayChange_field_phone(row, status); displayChange_field_email(row, status); displayChange_field_mobile(row, status); displayChange_field_address(row, status); displayChange_field_city(row, status); displayChange_field_state(row, status); displayChange_field_zip_code(row, status); displayChange_field_country(row, status); displayChange_field_notes(row, status); } function displayChange_field(field, row, status) { if ("enabled" == field) { displayChange_field_enabled(row, status); } if ("status" == field) { displayChange_field_status(row, status); } if ("is_client" == field) { displayChange_field_is_client(row, status); } if ("job_title" == field) { displayChange_field_job_title(row, status); } if ("source" == field) { displayChange_field_source(row, status); } if ("first_name" == field) { displayChange_field_first_name(row, status); } if ("company" == field) { displayChange_field_company(row, status); } if ("last_name" == field) { displayChange_field_last_name(row, status); } if ("phone" == field) { displayChange_field_phone(row, status); } if ("email" == field) { displayChange_field_email(row, status); } if ("mobile" == field) { displayChange_field_mobile(row, status); } if ("address" == field) { displayChange_field_address(row, status); } if ("city" == field) { displayChange_field_city(row, status); } if ("state" == field) { displayChange_field_state(row, status); } if ("zip_code" == field) { displayChange_field_zip_code(row, status); } if ("country" == field) { displayChange_field_country(row, status); } if ("notes" == field) { displayChange_field_notes(row, status); } } function displayChange_field_enabled(row, status) { var fieldId; } function displayChange_field_status(row, status) { var fieldId; } function displayChange_field_is_client(row, status) { var fieldId; } function displayChange_field_job_title(row, status) { var fieldId; } function displayChange_field_source(row, status) { var fieldId; if ("on" == status) { Ctrl_Disabled = false; if ("all" == row) { var fieldList = $(".css_source__obj"); for (var i = 0; i < fieldList.length; i++) { $($(fieldList[i]).attr("id")).select2("destroy"); } } else { if ($('#select2-id_sc_field_source' + row + '-container').hasClass('scFormInputDisabled')) { Ctrl_Disabled = true; } $("#id_sc_field_source" + row).select2("destroy"); } scJQSelect2Add(row, "source"); if (Ctrl_Disabled) { $('#select2-id_sc_field_source' + row + '-container').addClass('scFormInputDisabled') } } } function displayChange_field_first_name(row, status) { var fieldId; } function displayChange_field_company(row, status) { var fieldId; } function displayChange_field_last_name(row, status) { var fieldId; } function displayChange_field_phone(row, status) { var fieldId; } function displayChange_field_email(row, status) { var fieldId; } function displayChange_field_mobile(row, status) { var fieldId; } function displayChange_field_address(row, status) { var fieldId; } function displayChange_field_city(row, status) { var fieldId; } function displayChange_field_state(row, status) { var fieldId; } function displayChange_field_zip_code(row, status) { var fieldId; } function displayChange_field_country(row, status) { var fieldId; if ("on" == status) { Ctrl_Disabled = false; if ("all" == row) { var fieldList = $(".css_country__obj"); for (var i = 0; i < fieldList.length; i++) { $($(fieldList[i]).attr("id")).select2("destroy"); } } else { if ($('#select2-id_sc_field_country' + row + '-container').hasClass('scFormInputDisabled')) { Ctrl_Disabled = true; } $("#id_sc_field_country" + row).select2("destroy"); } scJQSelect2Add(row, "country"); if (Ctrl_Disabled) { $('#select2-id_sc_field_country' + row + '-container').addClass('scFormInputDisabled') } } } function displayChange_field_notes(row, status) { var fieldId; } function scRecreateSelect2() { displayChange_field_source("all", "on"); displayChange_field_country("all", "on"); } function scResetPagesDisplay() { $(".sc-form-page").show(); } function scHidePage(pageNo) { $("#id_form_contacts_mob_form" + pageNo).hide(); } function scCheckNoPageSelected() { if (!$(".sc-form-page").filter(".scTabActive").filter(":visible").length) { var inactiveTabs = $(".sc-form-page").filter(".scTabInactive").filter(":visible"); if (inactiveTabs.length) { var tabNo = $(inactiveTabs[0]).attr("id").substr(28); } } } var sc_jq_calendar_value = {}; function scJQCalendarAdd(iSeqRow) { $("#id_sc_field_created_at" + iSeqRow).datepicker('destroy'); $("#id_sc_field_created_at" + iSeqRow).datepicker({ beforeShow: function(input, inst) { var $oField = $(this), aParts = $oField.val().split(" "), sTime = ""; sc_jq_calendar_value["#id_sc_field_created_at" + iSeqRow] = $oField.val(); if (2 == aParts.length) { sTime = " " + aParts[1]; } if ('' == sTime || ' ' == sTime) { sTime = '