الدعم
للعمل معنا: الأساتذة المؤطرين - استئناف نموذج
'); getResume(id, -1, 'js-resume-section-view', 'view', 'personal'); jQuery("#addressFormContainer").append('
');getResume(id, -1, "js-resume-address-section-view", "view", "address");jQuery("#instituteFormContainer").append('
');getResume(id, -1, "js-resume-institute-section-view", "view", "institute");jQuery("#employerFormContainer").append('
');getResume(id, -1, "js-resume-employer-section-view", "view", "employer");jQuery("#skillsFormContainer").append('
');getResume(id, -1, "js-resume-skills-section-view", "view", "skills");jQuery("#editorFormContainer").append('
');getResume(id, -1, "js-resume-editor-section-view", "view", "editor");jQuery("#referenceFormContainer").append('
');getResume(id, -1, "js-resume-reference-section-view", "view", "reference");jQuery("#languageFormContainer").append('
');getResume(id, -1, "js-resume-language-section-view", "view", "language"); } else { getResume(id, -1, "resumeFormContainer", "form", "personal"); } }); function deleteResumeSection(resumeid, sectionid, isadmin, section) { var result = confirm("هل أنت متأكد من حذف"); if(result == true){ jQuery("#ajax-loader").show(); if (jQuery("#js_main_wrapper").find("form").length > 0 || jQuery("#resumeFormContainer").find("form").length > 0) { jQuery("div." + section + "-section").append("
الرجاء حفظ النموذج فتح
"); jQuery("#ajax-loader").hide(); return false; } if (resumeid == -1) { alert("Visitor can not edit resume"); return false; } jQuery.post("https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=deleteresumesection",{resumeid:resumeid,sectionid:sectionid,isadmin:isadmin,section:section},function(data){ if(data){ if(data == 1){ jQuery("#" + section + "_" + sectionid).remove(); jQuery("div." + section + "-section").append('
لقد تم حذف سجل
'); }else if(data == 2){ jQuery("div." + section + "-section").append('
This is not your resume
'); }else{ jQuery("div." + section + "-section").append('
خطأ سجل الحذف
'); } }else{ jQuery("div." + section + "-section").append('
خطأ سجل الحذف
'); } }); setTimeout(function(){ jQuery("div." + section + "-section").find('div.section-error').remove(); }, 3000); jQuery("#ajax-loader").hide(); } } function getResumeForm(resumeid, sectionid, formfor) { jQuery("#ajax-loader").show(); if (jQuery("#js_main_wrapper").find("form").length > 0 || jQuery("#resumeFormContainer").find("form").length > 0) { jQuery("div." + formfor + "-section").append("
الرجاء حفظ النموذج فتح
"); jQuery("#ajax-loader").hide(); return false; } if (resumeid == -1) { alert('Visitor can not edit resume'); return false; } if (formfor == 'personal') { jQuery("#js-resume-section-view").remove(); getResume(resumeid, -1, "resumeFormContainer", "form", "personal"); jQuery("#resumeAddressForm").hide("slow"); jQuery("#resumeInstituteForm").hide("slow"); jQuery("#resumeEmployerForm").hide("slow"); jQuery("#resumeLanguageForm").hide("slow"); } else { if (sectionid == -1) { jQuery("#ajax-loader").show(); jQuery("#add-resume-" + formfor).remove(); var formforCopy = formfor; var capitalizedForm = formforCopy.slice(0, 1).toUpperCase() + formfor.slice(1); getResume(resumeid, -1, "js-resume-" + formfor + "-section-view", "form", formfor); jQuery("#resume" + capitalizedForm + "Form").css('display', 'block'); jQuery("#ajax-loader").hide(); } else { if (formfor == "skills" || formfor == "editor") { getResume(resumeid, -1, "" + formfor + "FormContainer", "form", formfor); if (formfor == "editor") { jQuery("#" + formfor + "View").remove(); } else { jQuery("#" + formfor).remove(); } } else { jQuery("#" + formfor + "_" + sectionid).html(""); getResume(resumeid, sectionid, formfor + "_" + sectionid, "form", formfor + ""); } } } } function getResume(resumeid, sectionid, src, sectiontype, sectionName) { jQuery("#ajax-loader").show(); if (typeof (resumeid) == 'string' || typeof (sectionid) == 'string') { resumeid = parseInt(resumeid); sectionid = parseInt(sectionid); } if (sectiontype == "form" && sectionName == "editor") { function isBrowserIE() { return navigator.appName == "Microsoft Internet Explorer"; } function jInsertEditorText(text, editor) { if (isBrowserIE()) { if (window.parent.tinyMCE) { window.parent.tinyMCE.selectedInstance.selection.moveToBookmark(window.parent.global_ie_bookmark); } } tinyMCE.execCommand('mceInsertContent', false, text); } var global_ie_bookmark = false; function IeCursorFix() { if (isBrowserIE()) { tinyMCE.execCommand('mceInsertContent', false, ''); global_ie_bookmark = tinyMCE.activeEditor.selection.getBookmark(false); } return true; } } jQuery.post('https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=getresume', {resumeid: resumeid, sectionid: sectionid, sectionName: sectionName, sectiontype: sectiontype, isadmin : 0}, function (data) { if (data) { if (sectionName == 'personal') { jQuery("#" + src).html(""); jQuery("#" + src).append(data); if (sectiontype == 'form') { getResumeFiles(resumeid, "existingFiles", "form"); jQuery("#resumeForm").append("
استئناف الملفات
استئناف الملفات
Ok
"); jQuery("div#black_wrapper_resumefiles").click(function () { jQuery("div#resumeFilesPopup").css("visibility", "hidden"); jQuery("#black_wrapper_resumefiles").fadeOut(); }); jQuery("#closepopup").click(function () { jQuery("div#resumeFilesPopup").css("visibility", "hidden"); jQuery("#black_wrapper_resumefiles").fadeOut(); }); } if (sectiontype == "view") { getResumeFiles(resumeid, "resumeFilesList", "view") } } else { if (sectiontype == 'form') { if (sectionName == "address" || sectionName == "institute" || sectionName == "employer" || sectionName == "reference") { data = jQuery.parseJSON(data); inputfor = sectionName; cityid = data.city_id; cityname = data.city_name; jQuery("#" + src).append(data.data); getTokenInput(inputfor, cityid, cityname); } else { // for skills, editor and language forms jQuery("#" + src).append(data); } } else { jQuery("#" + src).append(data); } if (sectiontype == "form" && sectionName == 'editor') { if(typeof(tinyMCE) !== 'undefined'){ tinymce.each(tinyMCE.editors, function(e) { if(typeof(e) !== 'undefined'){ try { tinymce.remove(e); } catch (ex) { console.log(ex) } } }); } tinyMCE.init({mode : "specific_textareas",editor_selection:'mce_editable'}); } if (sectionName == 'employer' && sectiontype == 'form') { Calendar.setup({inputField: "employer_to_date", ifFormat: "%Y-%m-%d", button: "employer_to_date_img", align: "Tl", singleClick: true, firstDay: 0}); Calendar.setup({inputField: "employer_from_date", ifFormat: "%Y-%m-%d", button: "employer_from_date_img", align: "Tl", singleClick: true, firstDay: 0}); } } jQuery("#ajax-loader").hide(); return true; } else { alert("حدث خطأ أثناء الحصول على السيرة الذاتية"); jQuery("#ajax-loader").hide(); return false; } }); } function fj_getsubcategories(src, val) { jQuery("#" + src).html(""); jQuery.post("https://www.ta9assim.com/index.php?option=com_jsjobs&c=subcategory&task=listsubcategoriesforresume", {categoryid: val}, function (data) { if (data) { jQuery("#" + src).html(data); jQuery("#" + src + " select.jsjobs-cbo").chosen(); } else { alert("Error while getting subcategories"); } }); } function resumePhotoSelection() { var photoValidated = 1; var photo = document.getElementById("photo").files[0]; var maxPhotoSize = 50; var photoTypes = "gif,jpg,jpeg,png"; var photoTypesArray = photoTypes.split(","); var photoExt = photo.name.split(".").pop(); var photoSize = (photo.size / 1024); if (jQuery.inArray(photoExt, photoTypesArray) maxPhotoSize) { alert("حجم الملف تجاوز"); jQuery("#photo").val(""); photoValidated = 0; } if (photoValidated == 1) { document.getElementById("uploadPhotoFile").value = jQuery("#photo").val(); } } function resumeFilesSelection() { jQuery("#black_wrapper_resumefiles").fadeIn(300, function () { jQuery("div#resumeFilesPopup").css("visibility", "visible"); var resumeid = jQuery("#resume_temp").val(); if (resumeid != -1) { jQuery("#chosenFiles").remove(); jQuery("#filesInfo").prepend('
'); getResumeFiles(resumeid, "chosenFiles", "popup"); } var inputs = jQuery("#fileSelectionButton").children("input").length; if (inputs == 0) { var postMaxSize = 300; var memoryLimit = 640; var maxResumeFiles = '5'; var maxDocumentSize = '500'; var fileTypes = 'txt,doc,docx,Pdf,opt,rtf'; var clearFilesLang = 'Clear files'; var juriPath = "https://www.ta9assim.com/"; var fileRejLang = 'سوف يتم رفض هذا الملف'; var errorLang = 'خطأ'; var extMissLang = 'ملحق الملف غير متطابقة'; var sizeExceedLang = 'الحد الأقصى لحجم تجاوز'; var andSizeExceedLang = 'وتجاوز حجم الملف'; var filesLimitExceedLang = 'الملفات الذاتية الحد الأقصى حدث'; var noFileLang = 'لم يتم اختيار ملف'; addNewResumeInput(postMaxSize, memoryLimit, maxResumeFiles, maxDocumentSize, fileTypes, fileRejLang, clearFilesLang, errorLang, extMissLang, sizeExceedLang, andSizeExceedLang, filesLimitExceedLang, noFileLang, juriPath); } }); } function getResumeFiles(resumeid, src, filesfor) { jQuery.post('https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=getresumefiles', {resumeid: resumeid, filesfor: filesfor}, function (data) { if (data) { if (jQuery.trim(data).length == 0) { if (resumeid == -1) { jQuery('#' + src).remove(); } else { jQuery('#' + src).append("لا الملف الذي تم تحميله وجدت"); } } else { jQuery("#" + src).append(data); } } else { //alert("حدث خطأ أثناء الحصول على استئناف تحميل الملفات الذاتية"); } }); } function cancelForm(resumeid, cancelfor) { jQuery("#" + cancelfor + "FormContainer form").remove(); jQuery("#js-resume-" + cancelfor + "-section-view").remove(); jQuery("#" + cancelfor + "FormContainer").append('
'); getResume(resumeid, -1, "js-resume-" + cancelfor + "-section-view", "view", cancelfor); return false; } function deleteResumeFile(fileid, resumeid) { var confirmDelete = confirm("تأكيد لحذف ملف السيرة الذاتية؟"); if (confirmDelete == false) { return false; } jQuery("#ajax-loader").show(); jQuery.post('https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=deleteresumefiles', {fileid: fileid, resumeid: resumeid}, function (data) { if (data) { jQuery("#existingFiles span#" + fileid).remove(); jQuery("#chosenFiles div#" + fileid).remove(); } else { alert('حدث خطأ أثناء حذف ملف السيرة الذاتية'); } }); jQuery("#ajax-loader").hide(); } function showMoreBasics() { if (jQuery("span#show-more-basics").html() == 'إظهار المزيد') { jQuery("span#show-more-basics").html('عرض أقل'); } else { jQuery("span#show-more-basics").html('إظهار المزيد'); } jQuery("#js-resume-more-options-container").toggle('slow'); } function submitResumeForm() { jQuery("#ajax-loader").show(); var f = document.forms["resumeForm"]; var validation = myValidate(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } if (jQuery("#searchable:checkbox:checked").length == 0) { jQuery("#searchable").val(0); } else { jQuery("#searchable").val(1); } if (jQuery("#iamavailable:checkbox:checked").length == 0) { jQuery("#iamavailable").val(0); } else { jQuery("#iamavailable").val(1); } var formdata = new FormData(document.forms["resumeForm"]); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresume', type: "POST", data: new FormData(document.forms["resumeForm"]), contentType: false, cache: false, processData: false, success: function (data) { var dataArray = data.split(","); var msg = ''; switch (dataArray[1]) { case '1': msg = "استئناف المحفوظة"; break; case '2': msg = "حدث خطأ أثناء حفظ السيرة الذاتية"; break; case '8': msg = "Incorrect captcha"; break; } if(dataArray[1] == '8'){ jQuery('div#resumeCaptcha').html(dataArray[0]); alert(msg); return; } if (jQuery("#js_main_wrapper").find("div.ajax-response-msg").length > 0) { jQuery("div.ajax-response-msg").remove(); } jQuery("#js_main_wrapper").prepend('
' + msg + '
'); if (jQuery("#resumeFormContainer").children("input").length == 0) { jQuery("#resumeFormContainer").append("
"); } setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 2500); jQuery("#resumeForm").remove(); var view = getResume(dataArray[0], -1, "js-resume-section-view", "view", "personal"); jQuery("#resume_temp").val(dataArray[0]); jQuery("#js-resume-section-view").css("display", "block"); } }); jQuery("#ajax-loader").hide(); } function submitResumeAddressForm() { var f = document.forms["resumeAddressForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresumesection', type: "POST", data: new FormData(document.forms["resumeAddressForm"]), contentType: false, cache: false, processData: false, success: function (data) { if (data == "") { alert("You can not add new address, you have added maximum addresses"); jQuery("#ajax-loader").hide(); return false; } else { jQuery("#js_main_wrapper").prepend('
استئناف المحفوظة
'); setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); jQuery("#js-resume-address-section-view").remove(); jQuery("#addressFormContainer").append('
'); getResume(data, -1, "js-resume-address-section-view", "view", "address"); jQuery("div#resume_address").hide(); jQuery("#js-resume-address-section-view").css("display", "block"); jQuery("#resumeAddressForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function submitResumeInstituteForm() { var f = document.forms["resumeInstituteForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresumesection', type: "POST", data: new FormData(document.forms["resumeInstituteForm"]), contentType: false, cache: false, processData: false, success: function (data) { if (data == "") { alert("واضاف ماكس المعاهد"); jQuery("#ajax-loader").hide(); return false; } else { jQuery("#js_main_wrapper").prepend('
استئناف المحفوظة
'); setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); jQuery("#js-resume-institute-section-view").remove(); jQuery("#instituteFormContainer").append('
'); getResume(data, -1, "js-resume-institute-section-view", "view", "institute"); jQuery("div#resume_institute").hide(); jQuery("#js-resume-institute-section-view").css("display", "block"); jQuery("#resumeInstituteForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function submitResumeEmployerForm() { var f = document.forms["resumeEmployerForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresumesection', type: "POST", data: new FormData(document.forms["resumeEmployerForm"]), contentType: false, cache: false, processData: false, success: function (data) { if (data == "") { alert("You can not add new employer, you have added maximum employers"); jQuery("#ajax-loader").hide(); return false; } else { jQuery("#js_main_wrapper").prepend('
استئناف المحفوظة
'); setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); jQuery("#js-resume-employer-section-view").remove(); jQuery("#employerFormContainer").append('
'); getResume(data, -1, "js-resume-employer-section-view", "view", "employer"); jQuery("div#resume_employer").hide(); jQuery("#js-resume-employer-section-view").css("display", "block"); jQuery("#resumeEmployerForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function submitResumeSkillsForm() { var f = document.forms["resumeSkillsForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresume', type: "POST", data: new FormData(document.forms["resumeSkillsForm"]), contentType: false, cache: false, processData: false, success: function (data) { var dataArray = data.split(","); if (jQuery("#js_main_wrapper").find("div.ajax-response-msg").length > 0) { jQuery("div.ajax-response-msg").remove(); } jQuery("#js_main_wrapper").prepend('
' + dataArray[1] + '
'); if (jQuery("#skillsFormContainer").children("input").length == 0) { jQuery("#skillsFormContainer").append("
"); } setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); if (dataArray[0] == 0) { alert(dataArray[1]); } else { var view = getResume(dataArray[0], -1, "js-resume-skills-section-view", "view", "skills"); jQuery("#resume_temp").val(dataArray[0]); jQuery("#js-resume-skills-section-view").css("display", "block"); jQuery("#resumeSkillsForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function submitResumeEditorForm() { var f = document.forms["resumeEditorForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); var editorValue = tinyMCE.get('resume').getContent(); jQuery("textarea#resume").val(editorValue); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresume', type: "POST", data: new FormData(document.forms["resumeEditorForm"]), contentType: false, cache: false, processData: false, success: function (data) { var dataArray = data.split(","); if (jQuery("#js_main_wrapper").find("div.ajax-response-msg").length > 0) { jQuery("div.ajax-response-msg").remove(); } jQuery("#js_main_wrapper").prepend('
' + dataArray[1] + '
'); if (jQuery("#editorFormContainer").children("input").length == 0) { } setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); if (dataArray[0] == 0) { alert(dataArray[1]); } else { jQuery("#editorFormContainer").html(""); jQuery("#editorFormContainer").append('
'); getResume(dataArray[0], -1, "editorView", "view", "editor"); jQuery("#resume_temp").val(dataArray[0]); jQuery("#editorView").css("display", "block"); } } }); jQuery("#ajax-loader").hide(); } function resumeEditorToggler() { /* jQuery("div.toggle-editor a").on("click", function () { if (jQuery("div.editor").find("div.mce-container").length == 0) { tinyMCE.execCommand("mceRemoveEditor", false, "resume"); return false; } }); */ } function submitResumeReferenceForm() { var f = document.forms["resumeReferenceForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresumesection', type: "POST", data: new FormData(document.forms["resumeReferenceForm"]), contentType: false, cache: false, processData: false, success: function (data) { if (data == "") { alert("You can not add new reference, you have added maximum references"); jQuery("#ajax-loader").hide(); return false; } else { jQuery("#js_main_wrapper").prepend('
استئناف المحفوظة
'); setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); jQuery("#js-resume-reference-section-view").remove(); jQuery("#referenceFormContainer").append('
'); getResume(data, -1, "js-resume-reference-section-view", "view", "reference"); jQuery("div#resume_reference").hide(); jQuery("#js-resume-reference-section-view").css("display", "block"); jQuery("#resumeReferenceForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function submitResumeLanguageForm() { var f = document.forms["resumeLanguageForm"]; var validation = myValidateForm(f); if (validation == false) { jQuery("#ajax-loader").hide(); return false; } jQuery("#ajax-loader").show(); jQuery.ajax({ url: 'https://www.ta9assim.com/index.php?option=com_jsjobs&c=resume&task=saveresumesection', type: "POST", data: new FormData(document.forms["resumeLanguageForm"]), contentType: false, cache: false, processData: false, success: function (data) { if (data == "") { alert("You can not add new language, you have added maximum languages"); jQuery("#ajax-loader").hide(); return false; } else { jQuery("#js_main_wrapper").prepend('
استئناف المحفوظة
'); setTimeout(function () { jQuery("div.ajax-response-msg").remove(); }, 1000); jQuery("#js-resume-language-section-view").remove(); jQuery("#languageFormContainer").append('
'); getResume(data, -1, "js-resume-language-section-view", "view", "language"); jQuery("div#resume_language").hide(); jQuery("#js-resume-language-section-view").css("display", "block"); jQuery("#resumeLanguageForm").remove(); } } }); jQuery("#ajax-loader").hide(); } function showSection(sectionFor) { if (sectionFor == "personal") { return; } else { if (sectionFor == 'skills') { if (jQuery("div#" + sectionFor).length > 0) { return false; } } else if (sectionFor == 'resume') { if (jQuery("div#" + sectionFor + "View").length > 0) { return false; } } else { if (jQuery("div.js-resume-" + sectionFor + "-section-view").length > 0) { return false; } } if (jQuery("#js_main_wrapper").find("form").length == 0 || jQuery("#resumeFormContainer").length == 0) { // Resume Addresses Form/View Section if (jQuery("#" + sectionFor + "FormContainer form").children().length > 0) { alert("الرجاء حفظ النموذج فتح"); return false; } var sectionForCopy = sectionFor; var capitalizedSection = sectionForCopy.slice(0, 1).toUpperCase() + sectionFor.slice(1); jQuery("#" + sectionFor + "FormContainer").html(""); var resumeid = document.getElementById("resume_temp").value; if (resumeid == null) { return; } else { getResume(resumeid, -1, sectionFor + "FormContainer", "form", sectionFor); jQuery("#resume" + capitalizedSection + "Form").toggle('slow'); } } else { jQuery("#" + sectionFor + "FormContainer").html(""); jQuery("div." + sectionFor + "-section").css('padding', '10px 0px'); jQuery("div." + sectionFor + "-section").append("
الرجاء حفظ النموذج فتح
"); setTimeout(function () { jQuery("div." + sectionFor + "-section div.section-error").remove(); jQuery("div." + sectionFor + "-section").css('padding', '0px'); }, 2500); return; } } } function getTokenInput(inputfor, cityid, cityname) { if (inputfor == "addresses") { inputfor = "address"; } if (inputfor == "institutes") { inputfor = "institute"; } if (inputfor == "employers") { inputfor = "employer"; } if (inputfor == "references") { inputfor = "reference"; } var city = jQuery("#" + inputfor + "cityforedit").val(); if (city != "") { jQuery("#" + inputfor + "_city").tokenInput('https://www.ta9assim.com/index.php?option=com_jsjobs&c=cities&task=getaddressdatabycityname', { theme: "jsjobs", preventDuplicates: true, hintText: "اكتب في البحث", noResultsText: "لا توجد نتائج", searchingText: "اكتمل ...", tokenLimit: 1, prePopulate: [{id: cityid, name: cityname}], onResult: function (item) { if (jQuery.isEmptyObject(item)) { return [{id: 0, name: jQuery("tester").text()}]; } else { //add the item at the top of the dropdown item.unshift({id: 0, name: jQuery("tester").text()}); return item; } }, onAdd: function (item) { if (item.id > 0) { return; } if (item.name.search(",") == -1) { var input = jQuery("tester").text(); msg = 'شكل موقع غير صحيح يرجى إدخال المدينة في هذا الشكل
اسم المدينة, اسم البلد
أو
اسم المدينة, State Name, اسم البلد'; jQuery("#" + inputfor + "_city").tokenInput("remove", item); jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); return false; } else { jQuery.post("https://www.ta9assim.com/index.php?option=com_jsjobs&task=cities.savecity", {citydata: jQuery("tester").text()}, function (data) { if (data) { try { var value = jQuery.parseJSON(data); jQuery('#' + inputfor + '_city').tokenInput('remove', item); jQuery('#' + inputfor + '_city').tokenInput('add', {id: value.id, name: value.name}); } catch (e) { // string is not the json its the message come from server msg = data; jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); jQuery('#' + inputfor + '_city').tokenInput('remove', item); } } }); } } }); } else { jQuery("#" + inputfor + "_city").tokenInput('https://www.ta9assim.com/index.php?option=com_jsjobs&c=cities&task=getaddressdatabycityname', { theme: "jsjobs", preventDuplicates: true, hintText: "اكتب في البحث", noResultsText: "لا توجد نتائج", searchingText: "", tokenLimit: 1, onResult: function (item) { if (jQuery.isEmptyObject(item)) { return [{id: 0, name: jQuery("tester").text()}]; } else { //add the item at the top of the dropdown item.unshift({id: 0, name: jQuery("tester").text()}); return item; } }, onAdd: function (item) { if (item.id > 0) { return; } if (item.name.search(",") == -1) { var input = jQuery("tester").text(); msg = 'شكل موقع غير صحيح يرجى إدخال المدينة في هذا الشكل
اسم المدينة, اسم البلد
أو
اسم المدينة, State Name, اسم البلد'; jQuery("#" + inputfor + "_city").tokenInput("remove", item); jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); return false; } else { jQuery.post("https://www.ta9assim.com/index.php?option=com_jsjobs&task=cities.savecity", {citydata: jQuery("tester").text()}, function (data) { if (data) { try { var value = jQuery.parseJSON(data); jQuery('#' + inputfor + '_city').tokenInput('remove', item); jQuery('#' + inputfor + '_city').tokenInput('add', {id: value.id, name: value.name}); } catch (e) { // string is not the json its the message come from server msg = data; jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); jQuery('#' + inputfor + '_city').tokenInput('remove', item); } } }); } } }); } } function toggleMap(id) { var containerWidth = jQuery("#address_" + id).width(); jQuery("div.map_view").css('width', containerWidth); if (jQuery("#map_container_" + id).is(':visible')) { jQuery("#map_container_" + id).hide('slow'); jQuery("#address_" + id).find("div.map-toggler").find("span img").attr("src", "https://www.ta9assim.com/components/com_jsjobs/images/show-map.png"); jQuery("#address_" + id).find("div.map-toggler").find("span.text").html("اعرض الخارطة"); } else { jQuery("#map_container_" + id).show('slow'); jQuery("#address_" + id).find("div.map-toggler").find("span img").attr("src", "https://www.ta9assim.com/components/com_jsjobs/images/hide-map.png"); jQuery("#address_" + id).find("div.map-toggler").find("span.text").html("Hide Map"); loadViewMap(id); } } function loadViewMap(addressid) { var default_latitude = document.getElementById('latitude_' + addressid).value; var default_longitude = document.getElementById('longitude_' + addressid).value; var latlng = new google.maps.LatLng(default_latitude, default_longitude); zoom = 10; var myOptions = { zoom: zoom, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_view_" + addressid), myOptions); var lastmarker = new google.maps.Marker({ postiion: latlng, map: map, }); var marker = new google.maps.Marker({ position: latlng, map: map, }); marker.setMap(map); lastmarker = marker; google.maps.event.addListener(map, "click", function (e) { return false; }); } function loadMap() { var default_latitude = document.getElementById('default_latitude').value; var default_longitude = document.getElementById('default_longitude').value; var latitude = document.getElementById('latitude').value; var longitude = document.getElementById('longitude').value; if ((latitude != '') && (longitude != '')) { default_latitude = latitude; default_longitude = longitude; } var latlng = new google.maps.LatLng(default_latitude, default_longitude); zoom = 10; var myOptions = { zoom: zoom, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_container"), myOptions); var lastmarker = new google.maps.Marker({ postiion: latlng, map: map, }); var marker = new google.maps.Marker({ position: latlng, map: map, }); marker.setMap(map); lastmarker = marker; document.getElementById('latitude').value = marker.position.lat(); document.getElementById('longitude').value = marker.position.lng(); google.maps.event.addListener(map, "click", function (e) { var latLng = new google.maps.LatLng(e.latLng.lat(), e.latLng.lng()); geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': latLng}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (lastmarker != '') lastmarker.setMap(null); var marker = new google.maps.Marker({ position: results[0].geometry.location, map: map, }); marker.setMap(map); lastmarker = marker; document.getElementById('latitude').value = marker.position.lat(); document.getElementById('longitude').value = marker.position.lng(); } else { alert("Geocode was not successful for the following reason: " + status); } }); }); } function showdiv() { document.getElementById('map').style.visibility = 'visible'; } function hidediv() { document.getElementById('map').style.visibility = 'hidden'; } function validate_dateofbirth() { var date_of_birth_make = new Array(); var split_date_of_birth_value = new Array(); f = document.adminForm; var returnvalue = true; var today = new Date(); today.setHours(0, 0, 0, 0); var date_of_birth_string = document.getElementById("date_of_birth").value; var format_type = document.getElementById("j_dateformat").value; if (format_type == "d-m-Y") { split_date_of_birth_value = date_of_birth_string.split("-"); date_of_birth_make["year"] = split_date_of_birth_value[2]; date_of_birth_make["month"] = split_date_of_birth_value[1]; date_of_birth_make["day"] = split_date_of_birth_value[0]; } else if (format_type == "m/d/Y") { split_date_of_birth_value = date_of_birth_string.split("/"); date_of_birth_make["year"] = split_date_of_birth_value[2]; date_of_birth_make["month"] = split_date_of_birth_value[0]; date_of_birth_make["day"] = split_date_of_birth_value[1]; } else if (format_type == "Y-m-d") { split_date_of_birth_value = date_of_birth_string.split("-"); date_of_birth_make["year"] = split_date_of_birth_value[0]; date_of_birth_make["month"] = split_date_of_birth_value[1]; date_of_birth_make["day"] = split_date_of_birth_value[2]; } var date_of_birth = new Date(date_of_birth_make["year"], date_of_birth_make["month"] - 1, date_of_birth_make["day"]); if (date_of_birth >= today) { jQuery("#date_of_birth").addClass("invalid"); alert("يجب أن يكون تاريخ ميلاد أقل ثم اليوم"); returnvalue = false; } return returnvalue; } function validate_startdate() { f = document.adminForm; var returnvalue = true; var date_start_make = new Array(); var split_start_value = new Array(); var isedit = document.getElementById("id"); if (isedit.value != "" && isedit.value != 0) { return true; } else { var today = new Date(); today.setHours(0, 0, 0, 0); var start_string = document.getElementById("date_start").value; var format_type = document.getElementById("j_dateformat").value; if (format_type == "d-m-Y") { split_start_value = start_string.split("-"); date_start_make["year"] = split_start_value[2]; date_start_make["month"] = split_start_value[1]; date_start_make["day"] = split_start_value[0]; } else if (format_type == "m/d/Y") { split_start_value = start_string.split("/"); date_start_make["year"] = split_start_value[2]; date_start_make["month"] = split_start_value[0]; date_start_make["day"] = split_start_value[1]; } else if (format_type == "Y-m-d") { split_start_value = start_string.split("-"); date_start_make["year"] = split_start_value[0]; date_start_make["month"] = split_start_value[1]; date_start_make["day"] = split_start_value[2]; } var date_can_start = new Date(date_start_make["year"], date_start_make["month"] - 1, date_start_make["day"]); if (date_can_start
You are not logged in
Please login to access private area