1/** 2 * NOTICE OF LICENSE 3 * 4 * This file is licenced under the Software License Agreement. 5 * With the purchase or the installation of the software in your application 6 * you accept the licence agreement. 7 * 8 * You must not modify, adapt or create derivative works of this source code 9 * 10 * @author Musaffar Patel 11 * @copyright 2016-2019 Musaffar Patel 12 * @license LICENSE.txt 13 */ 14 15var MPTools = { 16 17 waitStart: function () { 18 $("body").append("<div class='mp-wait-wrapper'><svg class='circular'><circle class='path' cx='50' cy='50' r='20' fill='none' stroke-width='2' stroke-miterlimit='10'/></svg></div>"); 19 }, 20 21 waitEnd: function () { 22 $(".mp-wait-wrapper").remove(); 23 }, 24 25 handleAjaxResponse : function(json, $error_msg_wrapper) { 26 var result = true; 27 var error_msg = ''; 28 29 if (typeof json === 'undefined' || json == null || json == '') return true; 30 31 if (typeof json.meta !== 'undefined') { 32 if (typeof json.meta.error !== 'undefined') { 33 if (json.meta.error == true) { 34 result = false; 35 if (typeof json.content !== 'undefined') { 36 for (i=0; i<= json.content.length-1; i++) { 37 $(json.content[i].dom_element).addClass("error"); 38 $(json.content[i].dom_element).parent().closest("div").addClass('has-danger'); 39 error_msg += json.content[i].message + "<br>"; 40 } 41 } 42 if (error_msg != '') { 43 $error_msg_wrapper.html(error_msg); 44 $error_msg_wrapper.show(); 45 } 46 47 } 48 } 49 } 50 return result; 51 }, 52 53 /** 54 * Merge a url wioth extra param string 55 * @param url 56 * @param param_string 57 * @returns {string} 58 */ 59 joinUrl : function(url, param_string) { 60 var return_url = ''; 61 62 if (url.indexOf('?') > 0) { 63 return_url = url + '&' + param_string; 64 } else { 65 return_url = url + '?' + param_string; 66 } 67 return return_url; 68 } 69}; 70
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.