Server IP : 86.38.243.181 / Your IP : 216.73.216.86 Web Server : LiteSpeed System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64 User : u986601745 ( 986601745) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u986601745/domains/emrskalsi.com/public_html/admin/js/editable/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
(function ($) { "use strict"; //ajax mocks $.mockjaxSettings.responseTime = 500; $.mockjax({ url: '/post', response: function(settings) { log(settings, this); } }); $.mockjax({ url: '/error', status: 400, statusText: 'Bad Request', response: function(settings) { this.responseText = 'Please input correct value'; log(settings, this); } }); $.mockjax({ url: '/status', status: 500, response: function(settings) { this.responseText = 'Internal Server Error'; log(settings, this); } }); $.mockjax({ url: '/groups', response: function(settings) { this.responseText = [ {value: 0, text: 'Guest'}, {value: 1, text: 'Service'}, {value: 2, text: 'Customer'}, {value: 3, text: 'Operator'}, {value: 4, text: 'Support'}, {value: 5, text: 'Admin'} ]; log(settings, this); } }); function log(settings, response) { var s = [], str; s.push(settings.type.toUpperCase() + ' url = "' + settings.url + '"'); for(var a in settings.data) { if(settings.data[a] && typeof settings.data[a] === 'object') { str = []; for(var j in settings.data[a]) {str.push(j+': "'+settings.data[a][j]+'"');} str = '{ '+str.join(', ')+' }'; } else { str = '"'+settings.data[a]+'"'; } s.push(a + ' = ' + str); } s.push('RESPONSE: status = ' + response.status); if(response.responseText) { if($.isArray(response.responseText)) { s.push('['); $.each(response.responseText, function(i, v){ s.push('{value: ' + v.value+', text: "'+v.text+'"}'); }); s.push(']'); } else { s.push($.trim(response.responseText)); } } s.push('--------------------------------------\n'); $('#console').val(s.join('\n') + $('#console').val()); } })(jQuery);