File manager - Edit - /home/autoph/public_html/connectv1/lms/resources/views/common/scripts/common.js
Back
function defaultFunctions() { initToolTip() } function initToolTip() { $('.tooltip-me').bstooltip(); $('.tooltip-me').on('click', function() { $(this).bstooltip('hide') }) } function show_hide_preloader(show) { if (show) { $(".preloader").css("height", ""); $(".animation__wobble").css("display", ""); } else { $(".preloader").css("height", "0px"); $(".animation__wobble").css("display", "none"); } } function get_user_login_info() { return $.ajax({ url: "app/models/user.php", data: { model: 'user_login_info' }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) { // console.log(result` ) }, error: function(result) { // console.log(result) toastr.remove(); // toastr.error("Error has occurred. Try again."); toastr.error(result.responseText); init_signin(); } }); } function get_user_notification_info() { return $.ajax({ url: "app/models/user.php", data: { model: 'user_notification_info' }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) { // console.log(result) }, error: function() { toastr.remove(); toastr.error("Error has occurred. Try again.") } }); } function delay(callback, ms) { var timer = 0; return function() { var context = this, args = arguments; clearTimeout(timer); timer = setTimeout(function() { callback.apply(context, args); }, ms || 0); }; } function get_user_notifications() {} function get_user_messages() {} function add_content_close_listener(elmnt_id) { var count = 0; $("#" + elmnt_id + " button[data-card-widget]").each(function() { if (this.getAttribute("data-card-widget") == "remove") { $(this).on('click', function() { $("#" + elmnt_id + " > .card").each(function() { if ($(this).css('display').toLowerCase() != 'none') { count++; } }); if (count == 1) { $("#" + elmnt_id).css("display", "none"); if (elmnt_id == 'center_content') { $("#right_content,#left_content").toggleClass('col-md-3') .toggleClass('col-md'); side_menu_loaded = false; } } count = 0; }); } }); } function generate_json(attribute, $element) { var /* Create an object. */ obj = {}, /* Create a variable that references the current object (default → obj). */ ref = obj; /* Iterate over every input. */ $element.each(function() { /* Cache the id of the input. */ var id = this.id; /* Check whether the nodetype attribute is set to 'parent'. */ if (this.getAttribute(attribute) == "parent") { /* Set a new object to the property and set ref to refer to it. */ ref = obj[id] = {}; } else { /* Set the value of the input to the referred object. */ if (this.getAttribute(attribute) == "true") { if (isEmpty($(this).val())) { ref[id] = ''; } else { ref[id] = $(this).val().trim(); } } } }); /* Stringify the object and return it. */ return JSON.stringify(obj); } function isValidEmailAddress(emailAddress) { var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i; return pattern.test(emailAddress); } function isEmpty(string) { var flag = false; try { if (string.trim() == '') { flag = true; } else if (string == null) { flag = true; } else if (typeof string === 'undefined') { flag = true; } } catch (err) { console.log(err); flag = true; } return flag; } function check_if_empty_field($element, msg) { if (isEmpty($element.val())) { $element.focus(); toastr.remove(); toastr.error(msg); return true; } else { return false; } } function customSelectOption($el,id,text){ if(!isEmpty(id)){ var newOption = new Option(text, id, true, true); $el.append(newOption).trigger('change'); } } function init_function(type){ switch(type){ case 0: break; case 'lead_profile': init_leadprofile_page(); break; case 'refresh_lead_table': refreshLeadfileTable(); break; } } function upper_first_letter(data){ return data.toLowerCase() .replace(/\b[a-z]/g, function( letter) { return letter.toUpperCase(); }); } function init_destroy_session() { return $.ajax({ url: "app/models/user.php", data: { model: 'signout', api: 1 }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) {}, error: function() { // toastr.remove(); // toastr.error("Error has occurred. Try again.") } }); } function addSearchTransition($searchEl,$searchElDiv){ //groupfile member tab $searchEl.focusin(function() { $searchElDiv.removeClass( 'default-search-size'); $searchElDiv.addClass( 'expand-search-size'); }); $searchEl.focusout(function() { if (isEmpty($(this).val())) { $searchElDiv.removeClass( 'expand-search-size'); $searchElDiv.addClass( 'default-search-size'); } }); } function resetGroupOwners(){ selected_group = []; selected_group_owner = []; selected_group_owner.push({ owner_id: 0, owner_name: 'My', }); } function accessManagement(code){ if(!global_menu_access.includes(code)){ return false; } switch(parseInt(code)){ case 1 : //settings $('#nav_config').show(); $('#nav_config_divider').show(); break; case 2: //mastefile $('#master_add_company').show(); $('.masterfile_action_remove').show(); break; case 3: //user groups $('#nav_groups').show(); $('#nav_groups_divider').show(); break; } }
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings