PHP Classes

File: apps/codiad/js/jsend.js

Recommend this page to a friend!
  Classes of Mark Richards   CliqonV4   apps/codiad/js/jsend.js   Download  
File: apps/codiad/js/jsend.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CliqonV4
Framework with modules to build Web applications
Author: By
Last change:
Date: 5 years ago
Size: 850 bytes
 

Contents

Class file image Download
(function(global, $){ var codiad = global.codiad; ////////////////////////////////////////////////////////////////////// // Parse JSEND Formatted Returns ////////////////////////////////////////////////////////////////////// codiad.jsend = { parse: function(d) { // (Data) var obj = $.parseJSON(d); if (obj.debug !== undefined && Array.isArray(obj.debug)) { var debug = obj.debug.join('\nDEBUG: '); if(debug !== '') { debug = 'DEBUG: ' + debug; } console.log(debug); } if (obj.status == 'error') { codiad.message.error(obj.message); return 'error'; } else { return obj.data; } } }; })(this, jQuery);