Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

this now compiles with no errors and takes a picture

  • Loading branch information...
commit d3f8ae3f8d9ebf0024259a0e0f4301584f7e63c3 1 parent 5e2e455
@boazsender authored
View
2  builds/android/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.toura.app2_fake" android:versionName="1.0" android:versionCode="1327786960">
+ package="com.toura.app2_fake" android:versionName="1.0" android:versionCode="1327789620">
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
View
2  builds/android/assets/www/javascript/client/base.js
@@ -6,4 +6,4 @@
* LICENSE: https://github.com/Toura/mulberry/blob/master/LICENSE.txt
*
*******************************************************************************/
-dojo.provide("client.base");if(!dojo._hasResource["client.routes"]){dojo._hasResource["client.routes"]=true;dojo.provide("client.routes");mulberry.page("/takeapicture",{pageDef:"camera"},true);}if(!dojo._hasResource["client.components.Camera"]){dojo._hasResource["client.components.Camera"]=true;dojo.provide("client.components.Camera");mulberry.component("Camera",{componentTemplate:dojo.cache("client.components","Camera/Camera.haml",".component.camera\n %button{ dojoAttachPoint : 'pictureButton' } Take a picture\n %div{ dojoAttachPoint : 'gallery' }\n %div{ dojoAttachPoint : 'imageSrc' }\n %form{ action : 'http://api.imgur.com/2/upload.json', method : 'POST' }\n %input{ type : 'hidden', name : 'image' }\n %input{ type : 'hidden', name: 'key', value : '616994a9b83bdeb8ae77e4de9889bb96' }\n %input{ required: 'true', type : 'text', name : 'name', placeholder: 'name' }\n %input{ required: 'true', type : 'text', name : 'caption', placeholder: 'caption' }\n %input{ required: 'true', type : 'text', name : 'title', placeholder: 'title' }\n %input{ required: 'true', type : 'submit', name : 'submit', value: 'post it!' }\n"),init:function(){this.connect(this.pictureButton,"click","_takePicture");this.$domNode.append("<h1>I AM TOUCHING THE DOM FOR THE FIRST TIME</h1>");this.$domNode.find("form").submit(function(e){e.preventDefault();var _1=$(this).serializeObject();console.log(JSON.stringify(_1));$(this).ajaxSubmit({success:function(_2){console.log("success!",_2);},error:function(_3,_4){console.log("error",_3);}});});},_takePicture:function(e){e.preventDefault();navigator.camera.DestinationType.DATA_URL;toura.app.PhoneGap.camera.getPicture({destinationType:navigator.camera.DestinationType.FILE_URI}).then(dojo.hitch(this,"_handlePicture"));},_handlePicture:function(_5){var _6=this;_6.$domNode.append("<h1>I AM TOUCHING THE DOM AGAIN</h1> + <img width=\"100px\" src=\""+_5+"\">");console.log("BOAZ THE STRING IS HERE > "+_5);$("#image").val(_5);}});}if(!dojo._hasResource["client.vendor.jquery-form"]){dojo._hasResource["client.vendor.jquery-form"]=true;dojo.provide("client.vendor.jquery-form");(function($){$.fn.ajaxSubmit=function(_7){if(!this.length){_8("ajaxSubmit: skipping submit process - no element selected");return this;}var _9,_a,_b,_c=this;if(typeof _7=="function"){_7={success:_7};}_9=this.attr("method");_a=this.attr("action");_b=(typeof _a==="string")?$.trim(_a):"";_b=_b||window.location.href||"";if(_b){_b=(_b.match(/^([^#]+)/)||[])[1];}_7=$.extend(true,{url:_b,success:$.ajaxSettings.success,type:_9||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},_7);var _d={};this.trigger("form-pre-serialize",[this,_7,_d]);if(_d.veto){_8("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(_7.beforeSerialize&&_7.beforeSerialize(this,_7)===false){_8("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var _e=_7.traditional;if(_e===undefined){_e=$.ajaxSettings.traditional;}var qx,n,v,a=this.formToArray(_7.semantic);if(_7.data){_7.extraData=_7.data;qx=$.param(_7.data,_e);}if(_7.beforeSubmit&&_7.beforeSubmit(a,this,_7)===false){_8("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,_7,_d]);if(_d.veto){_8("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a,_e);if(qx){q=(q?(q+"&"+qx):qx);}if(_7.type.toUpperCase()=="GET"){_7.url+=(_7.url.indexOf("?")>=0?"&":"?")+q;_7.data=null;}else{_7.data=q;}var _f=[];if(_7.resetForm){_f.push(function(){_c.resetForm();});}if(_7.clearForm){_f.push(function(){_c.clearForm(_7.includeHidden);});}if(!_7.dataType&&_7.target){var _10=_7.success||function(){};_f.push(function(_11){var fn=_7.replaceTarget?"replaceWith":"html";$(_7.target)[fn](_11).each(_10,arguments);});}else{if(_7.success){_f.push(_7.success);}}_7.success=function(_12,_13,xhr){var _14=_7.context||_7;for(var i=0,max=_f.length;i<max;i++){_f[i].apply(_14,[_12,_13,xhr||_c,_c]);}};var _15=$("input:file:enabled[value]",this);var _16=_15.length>0;var mp="multipart/form-data";var _17=(_c.attr("enctype")==mp||_c.attr("encoding")==mp);var _18=!!(_16&&_15.get(0).files&&window.FormData);_8("fileAPI :"+_18);var _19=(_16||_17)&&!_18;if(_7.iframe!==false&&(_7.iframe||_19)){if(_7.closeKeepAlive){$.get(_7.closeKeepAlive,function(){_1a(a);});}else{_1a(a);}}else{if((_16||_17)&&_18){_7.progress=_7.progress||$.noop;_1b(a);}else{$.ajax(_7);}}this.trigger("form-submit-notify",[this,_7]);return this;function _1b(a){var _1c=new FormData();for(var i=0;i<a.length;i++){if(a[i].type=="file"){continue;}_1c.append(a[i].name,a[i].value);}_c.find("input:file:enabled").each(function(){var _1d=$(this).attr("name"),_1e=this.files;if(_1d){for(var i=0;i<_1e.length;i++){_1c.append(_1d,_1e[i]);}}});if(_7.extraData){for(var k in _7.extraData){_1c.append(k,_7.extraData[k]);}}_7.data=null;var s=$.extend(true,{},$.ajaxSettings,_7,{contentType:false,processData:false,cache:false,type:"POST"});s.context=s.context||s;s.data=null;var _1f=s.beforeSend;s.beforeSend=function(xhr,o){o.data=_1c;if(xhr.upload){xhr.upload.onprogress=function(_20){o.progress(_20.position,_20.total);};}if(_1f){_1f.call(o,xhr,_7);}};$.ajax(s);};function _1a(a){var _21=_c[0],el,i,s,g,id,$io,io,xhr,sub,n,_22,_23;var _24=!!$.fn.prop;if(a){if(_24){for(i=0;i<a.length;i++){el=$(_21[a[i].name]);el.prop("disabled",false);}}else{for(i=0;i<a.length;i++){el=$(_21[a[i].name]);el.removeAttr("disabled");}}}if($(":input[name=submit],:input[id=submit]",_21).length){alert("Error: Form elements must not have name or id of \"submit\".");return;}s=$.extend(true,{},$.ajaxSettings,_7);s.context=s.context||s;id="jqFormIO"+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr("name");if(n==null){$io.attr("name",id);}else{id=n;}}else{$io=$("<iframe name=\""+id+"\" src=\""+s.iframeSrc+"\" />");$io.css({position:"absolute",top:"-1000px",left:"-1000px"});}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(_25){var e=(_25==="timeout"?"timeout":"aborted");_8("aborting upload... "+e);this.aborted=1;$io.attr("src",s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,_25);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,s]);}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}return;}if(xhr.aborted){return;}sub=_21.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=_21.clk_x;s.extraData[n+".y"]=_21.clk_y;}}}var _26=1;var _27=2;function _28(_29){var doc=_29.contentWindow?_29.contentWindow.document:_29.contentDocument?_29.contentDocument:_29.document;return doc;};var _2a=$("meta[name=csrf-token]").attr("content");var _2b=$("meta[name=csrf-param]").attr("content");if(_2b&&_2a){s.extraData=s.extraData||{};s.extraData[_2b]=_2a;}function _2c(){var t=_c.attr("target"),a=_c.attr("action");_21.setAttribute("target",id);if(!_9){_21.setAttribute("method","POST");}if(a!=s.url){_21.setAttribute("action",s.url);}if(!s.skipEncodingOverride&&(!_9||/post/i.test(_9))){_c.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(s.timeout){_23=setTimeout(function(){_22=true;cb(_26);},s.timeout);}function _2d(){try{var _2e=_28(io).readyState;_8("state = "+_2e);if(_2e.toLowerCase()=="uninitialized"){setTimeout(_2d,50);}}catch(e){_8("Server abort: ",e," (",e.name,")");cb(_27);_23&&clearTimeout(_23);_23=undefined;}};var _2f=[];try{if(s.extraData){for(var n in s.extraData){_2f.push($("<input type=\"hidden\" name=\""+n+"\">").attr("value",s.extraData[n]).appendTo(_21)[0]);}}if(!s.iframeTarget){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);}setTimeout(_2d,15);_21.submit();}finally{_21.setAttribute("action",a);if(t){_21.setAttribute("target",t);}else{_c.removeAttr("target");}$(_2f).remove();}};if(s.forceSync){_2c();}else{setTimeout(_2c,10);}var _30,doc,_31=50,_32;function cb(e){if(xhr.aborted||_32){return;}try{doc=_28(io);}catch(ex){_8("cannot access response document: ",ex);e=_27;}if(e===_26&&xhr){xhr.abort("timeout");return;}else{if(e==_27&&xhr){xhr.abort("server abort");return;}}if(!doc||doc.location.href==s.iframeSrc){if(!_22){return;}}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var _33="success",_34;try{if(_22){throw "timeout";}var _35=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);_8("isXml="+_35);if(!_35&&window.opera&&(doc.body==null||doc.body.innerHTML=="")){if(--_31){_8("requeing onLoad callback, DOM not available");setTimeout(cb,250);return;}}var _36=doc.body?doc.body:doc.documentElement;xhr.responseText=_36?_36.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(_35){s.dataType="xml";}xhr.getResponseHeader=function(_37){var _38={"content-type":s.dataType};return _38[_37];};if(_36){xhr.status=Number(_36.getAttribute("status"))||xhr.status;xhr.statusText=_36.getAttribute("statusText")||xhr.statusText;}var dt=(s.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText;}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}else{if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}}}else{if(dt=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=_39(xhr.responseText);}}try{_30=_3b(xhr,dt,s);}catch(e){_33="parsererror";xhr.error=_34=(e||_33);}}catch(e){_8("error caught: ",e);_33="error";xhr.error=_34=(e||_33);}if(xhr.aborted){_8("upload aborted");_33=null;}if(xhr.status){_33=(xhr.status>=200&&xhr.status<300||xhr.status===304)?"success":"error";}if(_33==="success"){s.success&&s.success.call(s.context,_30,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}else{if(_33){if(_34==undefined){_34=xhr.statusText;}s.error&&s.error.call(s.context,xhr,_33,_34);g&&$.event.trigger("ajaxError",[xhr,s,_34]);}}g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}s.complete&&s.complete.call(s.context,xhr,_33);_32=true;if(s.timeout){clearTimeout(_23);}setTimeout(function(){if(!s.iframeTarget){$io.remove();}xhr.responseXML=null;},100);};var _39=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null;};var _3a=$.parseJSON||function(s){return window["eval"]("("+s+")");};var _3b=function(xhr,_3c,s){var ct=xhr.getResponseHeader("content-type")||"",xml=_3c==="xml"||!_3c&&ct.indexOf("xml")>=0,_30=xml?xhr.responseXML:xhr.responseText;if(xml&&_30.documentElement.nodeName==="parsererror"){$.error&&$.error("parsererror");}if(s&&s.dataFilter){_30=s.dataFilter(_30,_3c);}if(typeof _30==="string"){if(_3c==="json"||!_3c&&ct.indexOf("json")>=0){_30=_3a(_30);}else{if(_3c==="script"||!_3c&&ct.indexOf("javascript")>=0){$.globalEval(_30);}}}return _30;};};};$.fn.ajaxForm=function(_3d){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){_8("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(_3d);});return this;}_8("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(_3d);}}).bind("click.form-plugin",function(e){var _3e=e.target;var $el=$(_3e);if(!($el.is(":submit,input:image"))){var t=$el.closest(":submit");if(t.length==0){return;}_3e=t[0];}var _3f=this;_3f.clk=_3e;if(_3e.type=="image"){if(e.offsetX!=undefined){_3f.clk_x=e.offsetX;_3f.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _40=$el.offset();_3f.clk_x=e.pageX-_40.left;_3f.clk_y=e.pageY-_40.top;}else{_3f.clk_x=e.pageX-_3e.offsetLeft;_3f.clk_y=e.pageY-_3e.offsetTop;}}}setTimeout(function(){_3f.clk=_3f.clk_x=_3f.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin");};$.fn.formToArray=function(_41){var a=[];if(this.length===0){return a;}var _42=this[0];var els=_41?_42.getElementsByTagName("*"):_42.elements;if(!els){return a;}var i,j,n,v,el,max,_43;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}if(_41&&_42.clk&&el.type=="image"){if(!el.disabled&&_42.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+".x",value:_42.clk_x},{name:n+".y",value:_42.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,_43=v.length;j<_43;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v,type:el.type});}}}if(!_41&&_42.clk){var _44=$(_42.clk),_45=_44[0];n=_45.name;if(n&&!_45.disabled&&_45.type=="image"){a.push({name:n,value:_44.val()});a.push({name:n+".x",value:_42.clk_x},{name:n+".y",value:_42.clk_y});}}return a;};$.fn.formSerialize=function(_46){return $.param(this.formToArray(_46));};$.fn.fieldSerialize=function(_47){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_47);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_48){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_48);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_49){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(_49===undefined){_49=true;}if(_49&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _4a=el.selectedIndex;if(_4a<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_4a+1:ops.length);for(var i=(one?_4a:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return $(el).val();};$.fn.clearForm=function(_4b){return this.each(function(){$("input,select,textarea",this).clearFields(_4b);});};$.fn.clearFields=$.fn.clearInputs=function(_4c){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=="textarea"||(_4c&&/hidden/.test(t))){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(_4d){if(_4d===undefined){_4d=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=_4d;}else{if(this.tagName.toLowerCase()=="option"){var _4e=$(this).parent("select");if(_4d&&_4e[0]&&_4e[0].type=="select-one"){_4e.find("option").selected(false);}this.selected=_4d;}}});};$.fn.ajaxSubmit.debug=false;function _8(){if(!$.fn.ajaxSubmit.debug){return;}var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg);}else{if(window.opera&&window.opera.postError){window.opera.postError(msg);}}};})(jQuery);}if(!dojo._hasResource["client.vendor.jquery-ba-serializeobject"]){dojo._hasResource["client.vendor.jquery-ba-serializeobject"]=true;dojo.provide("client.vendor.jquery-ba-serializeobject");(function($,_4f){"$:nomunge";$.fn.serializeObject=function(){var obj={};$.each(this.serializeArray(),function(i,o){var n=o.name,v=o.value;obj[n]=obj[n]===_4f?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v];});return obj;};})(jQuery);}
+dojo.provide("client.base");if(!dojo._hasResource["client.routes"]){dojo._hasResource["client.routes"]=true;dojo.provide("client.routes");mulberry.page("/takeapicture",{pageDef:"camera"},true);}if(!dojo._hasResource["client.components.Camera"]){dojo._hasResource["client.components.Camera"]=true;dojo.provide("client.components.Camera");mulberry.component("Camera",{componentTemplate:dojo.cache("client.components","Camera/Camera.haml",".component.camera\n %button{ dojoAttachPoint : 'pictureButton' } Take a picture\n %div{ dojoAttachPoint : 'gallery' }\n %div{ dojoAttachPoint : 'imageSrc' }\n %form{ action : 'http://api.imgur.com/2/upload.json', method : 'POST' }\n %input{ type : 'hidden', name : 'image' }\n %input{ type : 'hidden', name: 'key', value : '616994a9b83bdeb8ae77e4de9889bb96' }\n %input{ required: 'true', type : 'text', name : 'name', placeholder: 'name' }\n %input{ required: 'true', type : 'text', name : 'caption', placeholder: 'caption' }\n %input{ required: 'true', type : 'text', name : 'title', placeholder: 'title' }\n %input{ required: 'true', type : 'submit', name : 'submit', value: 'post it!' }\n"),init:function(){this.connect(this.pictureButton,"click","_takePicture");this.$domNode.append("<h1>I AM TOUCHING THE DOM FOR THE FIRST TIME</h1>");this.$domNode.find("form").submit(function(e){e.preventDefault();var _1=$(this).serializeObject();console.log(JSON.stringify(_1));$(this).ajaxSubmit({dataType:"text",success:function(_2){console.log("success!",_2);},error:function(_3,_4){console.log("error",_3);}});});},_takePicture:function(e){e.preventDefault();navigator.camera.DestinationType.DATA_URL;toura.app.PhoneGap.camera.getPicture({destinationType:navigator.camera.DestinationType.FILE_URI}).then(dojo.hitch(this,"_handlePicture"));},_handlePicture:function(_5){var _6=this;_6.$domNode.append("<h1>I AM TOUCHING THE DOM AGAIN</h1> + <img width=\"100px\" src=\""+_5+"\">");console.log("BOAZ THE STRING IS HERE > "+_5);$("[name=image]").val(_5);}});}if(!dojo._hasResource["client.vendor.jquery-form"]){dojo._hasResource["client.vendor.jquery-form"]=true;dojo.provide("client.vendor.jquery-form");(function($){$.fn.ajaxSubmit=function(_7){if(!this.length){_8("ajaxSubmit: skipping submit process - no element selected");return this;}var _9,_a,_b,_c=this;if(typeof _7=="function"){_7={success:_7};}_9=this.attr("method");_a=this.attr("action");_b=(typeof _a==="string")?$.trim(_a):"";_b=_b||window.location.href||"";if(_b){_b=(_b.match(/^([^#]+)/)||[])[1];}_7=$.extend(true,{url:_b,success:$.ajaxSettings.success,type:_9||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},_7);var _d={};this.trigger("form-pre-serialize",[this,_7,_d]);if(_d.veto){_8("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(_7.beforeSerialize&&_7.beforeSerialize(this,_7)===false){_8("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var _e=_7.traditional;if(_e===undefined){_e=$.ajaxSettings.traditional;}var qx,n,v,a=this.formToArray(_7.semantic);if(_7.data){_7.extraData=_7.data;qx=$.param(_7.data,_e);}if(_7.beforeSubmit&&_7.beforeSubmit(a,this,_7)===false){_8("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,_7,_d]);if(_d.veto){_8("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a,_e);if(qx){q=(q?(q+"&"+qx):qx);}if(_7.type.toUpperCase()=="GET"){_7.url+=(_7.url.indexOf("?")>=0?"&":"?")+q;_7.data=null;}else{_7.data=q;}var _f=[];if(_7.resetForm){_f.push(function(){_c.resetForm();});}if(_7.clearForm){_f.push(function(){_c.clearForm(_7.includeHidden);});}if(!_7.dataType&&_7.target){var _10=_7.success||function(){};_f.push(function(_11){var fn=_7.replaceTarget?"replaceWith":"html";$(_7.target)[fn](_11).each(_10,arguments);});}else{if(_7.success){_f.push(_7.success);}}_7.success=function(_12,_13,xhr){var _14=_7.context||_7;for(var i=0,max=_f.length;i<max;i++){_f[i].apply(_14,[_12,_13,xhr||_c,_c]);}};var _15=$("input:file:enabled[value]",this);var _16=_15.length>0;var mp="multipart/form-data";var _17=(_c.attr("enctype")==mp||_c.attr("encoding")==mp);var _18=!!(_16&&_15.get(0).files&&window.FormData);_8("fileAPI :"+_18);var _19=(_16||_17)&&!_18;if(_7.iframe!==false&&(_7.iframe||_19)){if(_7.closeKeepAlive){$.get(_7.closeKeepAlive,function(){_1a(a);});}else{_1a(a);}}else{if((_16||_17)&&_18){_7.progress=_7.progress||$.noop;_1b(a);}else{$.ajax(_7);}}this.trigger("form-submit-notify",[this,_7]);return this;function _1b(a){var _1c=new FormData();for(var i=0;i<a.length;i++){if(a[i].type=="file"){continue;}_1c.append(a[i].name,a[i].value);}_c.find("input:file:enabled").each(function(){var _1d=$(this).attr("name"),_1e=this.files;if(_1d){for(var i=0;i<_1e.length;i++){_1c.append(_1d,_1e[i]);}}});if(_7.extraData){for(var k in _7.extraData){_1c.append(k,_7.extraData[k]);}}_7.data=null;var s=$.extend(true,{},$.ajaxSettings,_7,{contentType:false,processData:false,cache:false,type:"POST"});s.context=s.context||s;s.data=null;var _1f=s.beforeSend;s.beforeSend=function(xhr,o){o.data=_1c;if(xhr.upload){xhr.upload.onprogress=function(_20){o.progress(_20.position,_20.total);};}if(_1f){_1f.call(o,xhr,_7);}};$.ajax(s);};function _1a(a){var _21=_c[0],el,i,s,g,id,$io,io,xhr,sub,n,_22,_23;var _24=!!$.fn.prop;if(a){if(_24){for(i=0;i<a.length;i++){el=$(_21[a[i].name]);el.prop("disabled",false);}}else{for(i=0;i<a.length;i++){el=$(_21[a[i].name]);el.removeAttr("disabled");}}}if($(":input[name=submit],:input[id=submit]",_21).length){alert("Error: Form elements must not have name or id of \"submit\".");return;}s=$.extend(true,{},$.ajaxSettings,_7);s.context=s.context||s;id="jqFormIO"+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr("name");if(n==null){$io.attr("name",id);}else{id=n;}}else{$io=$("<iframe name=\""+id+"\" src=\""+s.iframeSrc+"\" />");$io.css({position:"absolute",top:"-1000px",left:"-1000px"});}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(_25){var e=(_25==="timeout"?"timeout":"aborted");_8("aborting upload... "+e);this.aborted=1;$io.attr("src",s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,_25);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,s]);}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}return;}if(xhr.aborted){return;}sub=_21.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=_21.clk_x;s.extraData[n+".y"]=_21.clk_y;}}}var _26=1;var _27=2;function _28(_29){var doc=_29.contentWindow?_29.contentWindow.document:_29.contentDocument?_29.contentDocument:_29.document;return doc;};var _2a=$("meta[name=csrf-token]").attr("content");var _2b=$("meta[name=csrf-param]").attr("content");if(_2b&&_2a){s.extraData=s.extraData||{};s.extraData[_2b]=_2a;}function _2c(){var t=_c.attr("target"),a=_c.attr("action");_21.setAttribute("target",id);if(!_9){_21.setAttribute("method","POST");}if(a!=s.url){_21.setAttribute("action",s.url);}if(!s.skipEncodingOverride&&(!_9||/post/i.test(_9))){_c.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(s.timeout){_23=setTimeout(function(){_22=true;cb(_26);},s.timeout);}function _2d(){try{var _2e=_28(io).readyState;_8("state = "+_2e);if(_2e.toLowerCase()=="uninitialized"){setTimeout(_2d,50);}}catch(e){_8("Server abort: ",e," (",e.name,")");cb(_27);_23&&clearTimeout(_23);_23=undefined;}};var _2f=[];try{if(s.extraData){for(var n in s.extraData){_2f.push($("<input type=\"hidden\" name=\""+n+"\">").attr("value",s.extraData[n]).appendTo(_21)[0]);}}if(!s.iframeTarget){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);}setTimeout(_2d,15);_21.submit();}finally{_21.setAttribute("action",a);if(t){_21.setAttribute("target",t);}else{_c.removeAttr("target");}$(_2f).remove();}};if(s.forceSync){_2c();}else{setTimeout(_2c,10);}var _30,doc,_31=50,_32;function cb(e){if(xhr.aborted||_32){return;}try{doc=_28(io);}catch(ex){_8("cannot access response document: ",ex);e=_27;}if(e===_26&&xhr){xhr.abort("timeout");return;}else{if(e==_27&&xhr){xhr.abort("server abort");return;}}if(!doc||doc.location.href==s.iframeSrc){if(!_22){return;}}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var _33="success",_34;try{if(_22){throw "timeout";}var _35=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);_8("isXml="+_35);if(!_35&&window.opera&&(doc.body==null||doc.body.innerHTML=="")){if(--_31){_8("requeing onLoad callback, DOM not available");setTimeout(cb,250);return;}}var _36=doc.body?doc.body:doc.documentElement;xhr.responseText=_36?_36.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(_35){s.dataType="xml";}xhr.getResponseHeader=function(_37){var _38={"content-type":s.dataType};return _38[_37];};if(_36){xhr.status=Number(_36.getAttribute("status"))||xhr.status;xhr.statusText=_36.getAttribute("statusText")||xhr.statusText;}var dt=(s.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText;}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}else{if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}}}else{if(dt=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=_39(xhr.responseText);}}try{_30=_3b(xhr,dt,s);}catch(e){_33="parsererror";xhr.error=_34=(e||_33);}}catch(e){_8("error caught: ",e);_33="error";xhr.error=_34=(e||_33);}if(xhr.aborted){_8("upload aborted");_33=null;}if(xhr.status){_33=(xhr.status>=200&&xhr.status<300||xhr.status===304)?"success":"error";}if(_33==="success"){s.success&&s.success.call(s.context,_30,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}else{if(_33){if(_34==undefined){_34=xhr.statusText;}s.error&&s.error.call(s.context,xhr,_33,_34);g&&$.event.trigger("ajaxError",[xhr,s,_34]);}}g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}s.complete&&s.complete.call(s.context,xhr,_33);_32=true;if(s.timeout){clearTimeout(_23);}setTimeout(function(){if(!s.iframeTarget){$io.remove();}xhr.responseXML=null;},100);};var _39=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null;};var _3a=$.parseJSON||function(s){return window["eval"]("("+s+")");};var _3b=function(xhr,_3c,s){var ct=xhr.getResponseHeader("content-type")||"",xml=_3c==="xml"||!_3c&&ct.indexOf("xml")>=0,_30=xml?xhr.responseXML:xhr.responseText;if(xml&&_30.documentElement.nodeName==="parsererror"){$.error&&$.error("parsererror");}if(s&&s.dataFilter){_30=s.dataFilter(_30,_3c);}if(typeof _30==="string"){if(_3c==="json"||!_3c&&ct.indexOf("json")>=0){_30=_3a(_30);}else{if(_3c==="script"||!_3c&&ct.indexOf("javascript")>=0){$.globalEval(_30);}}}return _30;};};};$.fn.ajaxForm=function(_3d){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){_8("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(_3d);});return this;}_8("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(_3d);}}).bind("click.form-plugin",function(e){var _3e=e.target;var $el=$(_3e);if(!($el.is(":submit,input:image"))){var t=$el.closest(":submit");if(t.length==0){return;}_3e=t[0];}var _3f=this;_3f.clk=_3e;if(_3e.type=="image"){if(e.offsetX!=undefined){_3f.clk_x=e.offsetX;_3f.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _40=$el.offset();_3f.clk_x=e.pageX-_40.left;_3f.clk_y=e.pageY-_40.top;}else{_3f.clk_x=e.pageX-_3e.offsetLeft;_3f.clk_y=e.pageY-_3e.offsetTop;}}}setTimeout(function(){_3f.clk=_3f.clk_x=_3f.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin");};$.fn.formToArray=function(_41){var a=[];if(this.length===0){return a;}var _42=this[0];var els=_41?_42.getElementsByTagName("*"):_42.elements;if(!els){return a;}var i,j,n,v,el,max,_43;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}if(_41&&_42.clk&&el.type=="image"){if(!el.disabled&&_42.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+".x",value:_42.clk_x},{name:n+".y",value:_42.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,_43=v.length;j<_43;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v,type:el.type});}}}if(!_41&&_42.clk){var _44=$(_42.clk),_45=_44[0];n=_45.name;if(n&&!_45.disabled&&_45.type=="image"){a.push({name:n,value:_44.val()});a.push({name:n+".x",value:_42.clk_x},{name:n+".y",value:_42.clk_y});}}return a;};$.fn.formSerialize=function(_46){return $.param(this.formToArray(_46));};$.fn.fieldSerialize=function(_47){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_47);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_48){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_48);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_49){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(_49===undefined){_49=true;}if(_49&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _4a=el.selectedIndex;if(_4a<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_4a+1:ops.length);for(var i=(one?_4a:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return $(el).val();};$.fn.clearForm=function(_4b){return this.each(function(){$("input,select,textarea",this).clearFields(_4b);});};$.fn.clearFields=$.fn.clearInputs=function(_4c){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=="textarea"||(_4c&&/hidden/.test(t))){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(_4d){if(_4d===undefined){_4d=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=_4d;}else{if(this.tagName.toLowerCase()=="option"){var _4e=$(this).parent("select");if(_4d&&_4e[0]&&_4e[0].type=="select-one"){_4e.find("option").selected(false);}this.selected=_4d;}}});};$.fn.ajaxSubmit.debug=false;function _8(){if(!$.fn.ajaxSubmit.debug){return;}var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg);}else{if(window.opera&&window.opera.postError){window.opera.postError(msg);}}};})(jQuery);}if(!dojo._hasResource["client.vendor.jquery-ba-serializeobject"]){dojo._hasResource["client.vendor.jquery-ba-serializeobject"]=true;dojo.provide("client.vendor.jquery-ba-serializeobject");(function($,_4f){"$:nomunge";$.fn.serializeObject=function(){var obj={};$.each(this.serializeArray(),function(i,o){var n=o.name,v=o.value;obj[n]=obj[n]===_4f?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v];});return obj;};})(jQuery);}
View
3  builds/android/assets/www/javascript/client/base.js.uncompressed.js
@@ -47,6 +47,7 @@ mulberry.component('Camera', {
console.log(JSON.stringify(obj));
$(this).ajaxSubmit({
+ dataType: 'text',
success: function(data) {
console.log("success!", data);
@@ -79,7 +80,7 @@ mulberry.component('Camera', {
console.log('BOAZ THE STRING IS HERE > ' + src)
- $('#image').val(src);
+ $('[name=image]').val(src);
}
View
2  builds/android/assets/www/javascript/toura/app/TouraConfig.js
@@ -6,7 +6,7 @@ toura.app = toura.app || {};
toura.app._Config = {
id : 'bober',
locale : 'en-US',
- buildDate : 1327786959,
+ buildDate : 1327789619,
appVersion : '4.1.0',
updateUrl : '',
View
BIN  builds/android/bin/bober-debug-unaligned.apk
Binary file not shown
View
BIN  builds/android/bin/bober-debug.apk
Binary file not shown
View
BIN  builds/android/bin/bober.ap_
Binary file not shown
View
2  builds/android/bin/build.prop
@@ -1,5 +1,5 @@
#Last build type
-#Sat, 28 Jan 2012 16:43:21 -0500
+#Sat, 28 Jan 2012 17:27:45 -0500
build.last.target=debug
View
1  javascript/components/Camera.js
@@ -15,6 +15,7 @@ mulberry.component('Camera', {
console.log(JSON.stringify(obj));
$(this).ajaxSubmit({
+ dataType: 'text',
success: function(data) {
console.log("success!", data);
Please sign in to comment.
Something went wrong with that request. Please try again.