summaryrefslogtreecommitdiffstats
path: root/js/yui3/model-sync-rest
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-09-03 05:46:38 +0200
committerDylan William Hardison <dylan@hardison.net>2014-09-03 05:48:52 +0200
commitbd23fbfeccd49a406f6a8d99a21371ad7ade07ba (patch)
tree4f7fe26cad167380d7d17ce4616173a90e684acf /js/yui3/model-sync-rest
parent14be79f77292305fbd5a9508ca6142e97498abb5 (diff)
downloadbugzilla-bd23fbfeccd49a406f6a8d99a21371ad7ade07ba.tar.gz
bugzilla-bd23fbfeccd49a406f6a8d99a21371ad7ade07ba.tar.xz
Bug 913647: Deploy YUI 3.17.2 for BMO
r=glob
Diffstat (limited to 'js/yui3/model-sync-rest')
-rw-r--r--js/yui3/model-sync-rest/model-sync-rest-min.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/yui3/model-sync-rest/model-sync-rest-min.js b/js/yui3/model-sync-rest/model-sync-rest-min.js
index a3da8b792..9f6c7c8f9 100644
--- a/js/yui3/model-sync-rest/model-sync-rest-min.js
+++ b/js/yui3/model-sync-rest/model-sync-rest-min.js
@@ -1,7 +1,8 @@
/*
-YUI 3.7.3 (build 5687)
-Copyright 2012 Yahoo! Inc. All rights reserved.
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("model-sync-rest",function(e,t){function r(){}var n=e.Lang;r.CSRF_TOKEN=YUI.Env.CSRF_TOKEN,r.EMULATE_HTTP=!1,r.HTTP_HEADERS={Accept:"application/json","Content-Type":"application/json"},r.HTTP_METHODS={create:"POST",read:"GET",update:"PUT","delete":"DELETE"},r.HTTP_TIMEOUT=3e4,r._NON_ATTRS_CFG=["root","url"],r.prototype={root:"",url:"",initializer:function(e){e||(e={}),"root"in e&&(this.root=e.root||""),"url"in e&&(this.url=e.url||"")},getURL:function(t,n){var r=this.root,i=this.url;return this._isYUIModelList?i?this._substituteURL(i,e.merge(this.getAttrs(),n)):this.model.prototype.root:r&&(t==="create"||this.isNew())?r:i?this._substituteURL(i,e.merge(this.getAttrs(),n)):this._joinURL(this.getAsURL("id")||"")},parseIOResponse:function(e){return e.responseText},serialize:function(t){return e.JSON.stringify(this)},sync:function(t,n,i){n||(n={});var s=this.getURL(t,n),o=r.HTTP_METHODS[t],u=e.merge(r.HTTP_HEADERS,n.headers),a=n.timeout||r.HTTP_TIMEOUT,f=n.csrfToken||r.CSRF_TOKEN,l;o==="POST"||o==="PUT"?l=this.serialize(t):delete u["Content-Type"],r.EMULATE_HTTP&&(o==="PUT"||o==="DELETE")&&(u["X-HTTP-Method-Override"]=o,o="POST"),f&&(o==="POST"||o==="PUT"||o==="DELETE")&&(u["X-CSRF-Token"]=f),this._sendSyncIORequest({action:t,callback:i,entity:l,headers:u,method:o,timeout:a,url:s})},_joinURL:function(e){var t=this.root;return!t&&!e?"":(e.charAt(0)==="/"&&(e=e.substring(1)),t&&t.charAt(t.length-1)==="/"?t+e+"/":t+"/"+e)},_parse:function(e){return typeof this.parseIOResponse=="function"&&(e=this.parseIOResponse(e)),this.parse(e)},_sendSyncIORequest:function(t){return e.io(t.url,{arguments:{action:t.action,callback:t.callback,url:t.url},context:this,data:t.entity,headers:t.headers,method:t.method,timeout:t.timeout,on:{start:this._onSyncIOStart,failure:this._onSyncIOFailure,success:this._onSyncIOSuccess,end:this._onSyncIOEnd}})},_substituteURL:function(t,r){if(!t)return"";var i={};return e.Object.each(r,function(e,t){if(n.isString(e)||n.isNumber(e))i[t]=encodeURIComponent(e)}),n.sub(t,i)},_onSyncIOEnd:function(e,t){},_onSyncIOFailure:function(e,t,n){var r=n.callback;r&&r({code:t.status,msg:t.statusText},t)},_onSyncIOSuccess:function(e,t,n){var r=n.callback;r&&r(null,t)},_onSyncIOStart:function(e,t){}},e.namespace("ModelSync").REST=r},"3.7.3",{requires:["model","io-base","json-stringify"]});
+
+YUI.add("model-sync-rest",function(e,t){function r(){}var n=e.Lang;r.CSRF_TOKEN=YUI.Env.CSRF_TOKEN,r.EMULATE_HTTP=!1,r.HTTP_HEADERS={Accept:"application/json","Content-Type":"application/json"},r.HTTP_METHODS={create:"POST",read:"GET",update:"PUT","delete":"DELETE"},r.HTTP_TIMEOUT=3e4,r._NON_ATTRS_CFG=["root","url"],r.prototype={root:"",url:"",initializer:function(e){e||(e={}),"root"in e&&(this.root=e.root||""),"url"in e&&(this.url=e.url||"")},getURL:function(t,n){var r=this.root,i=this.url;return this._isYUIModelList?i?this._substituteURL(i,e.merge(this.getAttrs(),n)):this.model.prototype.root:r&&(t==="create"||this.isNew())?r:i?this._substituteURL(i,e.merge(this.getAttrs(),n)):this._joinURL(this.getAsURL("id")||"")},parseIOResponse:function(e){return e.responseText},serialize:function(t){return e.JSON.stringify(this)},sync:function(t,n,i){n||(n={});var s=this.getURL(t,n),o=r.HTTP_METHODS[t],u=e.merge(r.HTTP_HEADERS,n.headers),a=n.timeout||r.HTTP_TIMEOUT,f=n.csrfToken||r.CSRF_TOKEN,l;o==="POST"||o==="PUT"?l=this.serialize(t):delete u["Content-Type"],r.EMULATE_HTTP&&(o==="PUT"||o==="DELETE")&&(u["X-HTTP-Method-Override"]=o,o="POST"),f&&(o==="POST"||o==="PUT"||o==="DELETE")&&(u["X-CSRF-Token"]=f),this._sendSyncIORequest({action:t,callback:i,entity:l,headers:u,method:o,timeout:a,url:s})},_joinURL:function(e){var t=this.root;return!t&&!e?"":(e.charAt(0)==="/"&&(e=e.substring(1)),t&&t.charAt(t.length-1)==="/"?t+e+"/":t+"/"+e)},_parse:function(e){return typeof this.parseIOResponse=="function"&&(e=this.parseIOResponse(e)),this.parse(e)},_sendSyncIORequest:function(t){return e.io(t.url,{arguments:{action:t.action,callback:t.callback,url:t.url},context:this,data:t.entity,headers:t.headers,method:t.method,timeout:t.timeout,on:{start:this._onSyncIOStart,failure:this._onSyncIOFailure,success:this._onSyncIOSuccess,end:this._onSyncIOEnd}})},_substituteURL:function(t,r){if(!t)return"";var i={};return e.Object.each(r,function(e,t){if(n.isString(e)||n.isNumber(e))i[t]=encodeURIComponent(e)}),n.sub(t,i)},_onSyncIOEnd:function(e,t){},_onSyncIOFailure:function(e,t,n){var r=n.callback;r&&r({code:t.status,msg:t.statusText},t)},_onSyncIOSuccess:function(e,t,n){var r=n.callback;r&&r(null,t)},_onSyncIOStart:function(e,t){}},e.namespace("ModelSync").REST=r},"3.17.2",{requires:["model","io-base","json-stringify"]});