o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1360350529.842371: @value"© {I" class:EFI"BundledAsset;FI"logical_path;FI"cytoplasm/cytoAjax.js;FI" pathname;FI"e/Applications/XAMPP/xamppfiles/htdocs/cytoplasm/app/assets/javascripts/cytoplasm/cytoAjax.js.erb;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-02-08T14:08:49-05:00;FI" length;Fi¾I" digest;F"%c5eb076b0eb95b077cde34f7e7f0ec29I" source;FI"¾// CytoAjax v0.5 // MacKinley Smith (function($){ $.cytoAjaxResponse = function(message,type,time){ if (message==null) message = "Success!"; if (type==null) type = "success"; if (time==null) time = 0; $('.cytoResponseMessage').hide(); $('html,body').animate({scrollTop:0},400); $('.cytoResponseMessage[data-type="'+type+'"]').html(message).show(400,function(){ var $this = $(this); if (time) setTimeout(function(){$this.hide(400);},time); }); }; $.cytoAjax = function(script,data_to_pass,success,error){ // Set default parameters if (typeof script != "string" || script == "") return console.warn("$.cytoAjax requires a string as the first parameter (script)."); if (data_to_pass==null || typeof data_to_pass != "object") { if (typeof data_to_pass == "function") { if (success!=null && typeof success == "function") error = success; success = data_to_pass; } data_to_pass = {}; } // Make request $.ajax({ url:script, type:'POST', data:data_to_pass, success:function(data,textStatus,jqXHR) { try { data = $.parseJSON(data); } catch (e) { data = $.parseJSON('{"status":"Error","message":"AJAX Return Error: '+e.replace(/"/g,"'")+'
'+data.replace(/"/g,"'")+'"}'); } if (data.status=="OK") { if (typeof success == "function") success.apply(this,[data]); else if (data.message!=null) $.cytoAjaxResponse(data.message); else $.cytoAjaxResponse(((typeof success == "string")?success:"Success!")); } else if (data.status=="Error") { if (data.message != null) $.cytoAjaxResponse(data.message,"error"); if (typeof error == "function") error.apply(this,[data]); } }, error:function(jqXHR,textStatus,errorThrown){ if (typeof error == "function") error.apply(this,[{status:"Error",message:errorThrown}]); } }); }; $.CytoAjax = $.cytoAjax; $.Cytoplasm("ready",function(){ // Setup callback messages $.each(["success","sending","error"],function(i,type){ var $this = $('.cytoResponseMessage[data-type="'+type+'"]'); if (!$this.is('*')) $this = $('

').addClass('cytoResponseMessage').attr("data-type",type).hide().appendTo($('header')); }); }); })(jQuery); ;FI"required_assets_digest;F"%55e92b6e00ce2a6b9c9a6be8833b35ccI" _version;F"%6776f581a4329e299531e1d52aa59832