Compress scripts/styles: 3.4-alpha-20180.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
bumpbot 2012-03-15 04:15:22 +00:00
parent c06576d410
commit 88fbf34f8f
3 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
(function(a,c){var b=wp.customize;b.Control=b.Value.extend({initialize:function(g,f,e){var d='[name="'+b.settings.prefix+g+'"]';b.Value.prototype.initialize.call(this,f,e);this.id=g;this.container=c("#customize-control-"+g);this.element=this.element||new b.Element(this.container.find(d));this.method=this.method||"refresh";this.element.link(this);this.link(this.element);this.bind(this.sync)},sync:function(){switch(this.method){case"refresh":return this.previewer.refresh();case"postMessage":return this.previewer.send("setting",[this.id,this()])}}});b.ColorControl=b.Control.extend({initialize:function(d,i,l){var k=this,g,h,j,f,e;b.Control.prototype.initialize.call(this,d,i,l);g=this.container.find(".color-picker");h=g.find(".color-picker-controls");f=g.find("a");e=function(m){m="#"+m;f.css("background",m);k.farbtastic.setColor(m)};this.input=new b.Element(h.find("input"));this.link(this.input);this.input.link(this);g.on("click","a",function(){h.toggle()});this.farbtastic=c.farbtastic(g.find(".farbtastic-placeholder"),function(m){k.set(m.replace("#",""))});this.bind(e);e(this())},validate:function(d){return/^[a-fA-F0-9]{3}([a-fA-F0-9]{3})?$/.test(d)?d:null}});b.defaultConstructor=b.Setting;b.Previewer=b.Messenger.extend({refreshBuffer:250,initialize:function(e,d){c.extend(this,d||{});this.loaded=c.proxy(this.loaded,this);this.loaderUuid=0;this.refresh=(function(f){var g=f.refresh,i=function(){h=null;g.call(f)},h;return function(){if(typeof h!=="number"){if(f.loading){f.loading.remove();delete f.loading;f.loader()}else{return i()}}clearTimeout(h);h=setTimeout(i,f.refreshBuffer)}})(this);this.iframe=b.ensure(e.iframe);this.form=b.ensure(e.form);this.name=this.iframe.prop("name");this.container=this.iframe.parent();b.Messenger.prototype.initialize.call(this,e.url,this.iframe[0].contentWindow);this._formOriginalProps={target:this.form.prop("target"),action:this.form.prop("action")};this.bind("url",function(f){if(this.url()==f||0!==f.indexOf(this.origin()+"/")||-1!==f.indexOf("wp-admin")){return}this.url(f);this.refresh()});this.refresh();this.form.on("keydown",function(f){if(13===f.which){f.preventDefault()}})},loader:function(){if(this.loading){return this.loading}this.loading=c("<iframe />",{name:this.name+"-loading-"+this.loaderUuid++}).appendTo(this.container);return this.loading},loaded:function(){this.iframe.remove();this.iframe=this.loading;delete this.loading;this.iframe.prop("name",this.name);this.targetWindow(this.iframe[0].contentWindow)},refresh:function(){this.loader().one("load",this.loaded);this.submit({target:this.loader().prop("name"),action:this.url()})},submit:function(d){if(d){this.form.prop(d)}this.form.submit();if(d){this.form.prop(this._formOriginalProps)}}});b.controls={color:b.ColorControl};c(function(){if(!b.settings){return}var d=new b.Previewer({iframe:"#customize-preview iframe",form:"#customize-controls",url:b.settings.preview});c.each(b.settings.controls,function(g,f){var e=b.controls[f.control]||b.Control;b.add(g,new e(g,f.value,{previewer:d}))});c(".customize-section-title").click(function(){c(this).parents(".customize-section").toggleClass("open");return false});c("#save").click(function(){d.submit();return false});b("background_color").method="postMessage"})})(wp,jQuery);
(function(a,c){var b=wp.customize;b.Control=b.Value.extend({initialize:function(g,f,e){var d='[name="'+b.settings.prefix+g+'"]';b.Value.prototype.initialize.call(this,f,e);this.id=g;this.container=c("#customize-control-"+g);this.element=this.element||new b.Element(this.container.find(d));this.method=this.method||"refresh";this.element.link(this);this.link(this.element);this.bind(this.sync)},sync:function(){switch(this.method){case"refresh":return this.previewer.refresh();case"postMessage":return this.previewer.send("setting",[this.id,this()])}}});b.ColorControl=b.Control.extend({initialize:function(d,i,l){var k=this,g,h,j,f,e;b.Control.prototype.initialize.call(this,d,i,l);g=this.container.find(".color-picker");h=g.find(".color-picker-controls");f=g.find("a");e=function(m){m="#"+m;f.css("background",m);k.farbtastic.setColor(m)};this.input=new b.Element(h.find("input"));this.link(this.input);this.input.link(this);g.on("click","a",function(){h.toggle()});this.farbtastic=c.farbtastic(g.find(".farbtastic-placeholder"),function(m){k.set(m.replace("#",""))});this.bind(e);e(this())},validate:function(d){return/^[a-fA-F0-9]{3}([a-fA-F0-9]{3})?$/.test(d)?d:null}});b.UploadControl=b.Control.extend({initialize:function(g,e,d){var f=this;b.Control.prototype.initialize.call(this,g,e,d);this.uploader=new wp.Uploader({browser:this.container.find(".upload"),success:function(h){f.set(h.url)}});this.container.on("click",".remove",function(h){f.set("");h.preventDefault()})}});b.defaultConstructor=b.Setting;b.Previewer=b.Messenger.extend({refreshBuffer:250,initialize:function(e,d){c.extend(this,d||{});this.loaded=c.proxy(this.loaded,this);this.loaderUuid=0;this.refresh=(function(f){var g=f.refresh,i=function(){h=null;g.call(f)},h;return function(){if(typeof h!=="number"){if(f.loading){f.loading.remove();delete f.loading;f.loader()}else{return i()}}clearTimeout(h);h=setTimeout(i,f.refreshBuffer)}})(this);this.iframe=b.ensure(e.iframe);this.form=b.ensure(e.form);this.name=this.iframe.prop("name");this.container=this.iframe.parent();b.Messenger.prototype.initialize.call(this,e.url,this.iframe[0].contentWindow);this._formOriginalProps={target:this.form.prop("target"),action:this.form.prop("action")};this.bind("url",function(f){if(this.url()==f||0!==f.indexOf(this.origin()+"/")||-1!==f.indexOf("wp-admin")){return}this.url(f);this.refresh()});this.refresh();this.form.on("keydown",function(f){if(13===f.which){f.preventDefault()}})},loader:function(){if(this.loading){return this.loading}this.loading=c("<iframe />",{name:this.name+"-loading-"+this.loaderUuid++}).appendTo(this.container);return this.loading},loaded:function(){this.iframe.remove();this.iframe=this.loading;delete this.loading;this.iframe.prop("name",this.name);this.targetWindow(this.iframe[0].contentWindow)},refresh:function(){this.loader().one("load",this.loaded);this.submit({target:this.loader().prop("name"),action:this.url()})},submit:function(d){if(d){this.form.prop(d)}this.form.submit();if(d){this.form.prop(this._formOriginalProps)}}});b.controls={color:b.ColorControl,upload:b.UploadControl};c(function(){if(!b.settings){return}var d=new b.Previewer({iframe:"#customize-preview iframe",form:"#customize-controls",url:b.settings.preview});c.each(b.settings.controls,function(g,f){var e=b.controls[f.control]||b.Control;b.add(g,new e(g,f.value,{previewer:d}))});c(".customize-section-title").click(function(){c(this).parents(".customize-section").toggleClass("open");return false});c("#save").click(function(){d.submit();return false});b("background_color").method="postMessage";b("background_image").uploader.param("post_data",{context:"custom-background"})})})(wp,jQuery);

View File

@ -0,0 +1 @@
if(typeof wp==="undefined"){var wp={}}(function(a,b){var c=function(e){var d=this,g={container:"container",browser:"browse_button",dropzone:"drop_element"},f;this.plupload=b.extend({multipart_params:{}},wpPluploadDefaults);this.container=document.body;b.extend(true,this,e);for(f in this){if(b.isFunction(this[f])){this[f]=b.proxy(this[f],this)}}for(f in g){if(!this[f]){continue}this[f]=b(this[f]).first();if(!this[f].prop("id")){this[f].prop("id","__wp-uploader-id-"+c.uuid++)}this.plupload[g[f]]=this[f].prop("id")}this.uploader=new plupload.Uploader(this.plupload);delete this.plupload;this.param(this.params||{});delete this.params;this.uploader.bind("Init",this.init);this.uploader.init();this.uploader.bind("UploadProgress",this.progress);this.uploader.bind("FileUploaded",function(h,j,i){i=JSON.parse(i.response);if(!i||!i.type||!i.data){return d.error(pluploadL10n.default_error)}if("error"===i.type){return d.error(i.data.message,i.data)}if("success"===i.type){return d.success(i.data)}});this.uploader.bind("Error",function(h,i){var k=pluploadL10n.default_error,j;for(j in c.errorMap){if(i.code===plupload[j]){k=c.errorMap[j];break}}d.error(k,i);h.refresh()});this.uploader.bind("FilesAdded",function(h,i){b.each(i,function(){d.added(this)});h.refresh();h.start()})};c.uuid=0;c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error};b.extend(c.prototype,{param:function(d,e){if(arguments.length===1&&typeof d==="string"){return this.uploader.settings.multipart_params[d]}if(arguments.length>1){this.uploader.settings.multipart_params[d]=e}else{b.extend(this.uploader.settings.multipart_params,d)}},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){}});a.Uploader=c})(wp,jQuery);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '3.4-alpha-20178';
$wp_version = '3.4-alpha-20180';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.