Make WordPress Core

Changeset 20296


Ignore:
Timestamp:
03/28/2012 04:58:24 AM (13 years ago)
Author:
bumpbot
Message:

Compress scripts/styles: 3.4-alpha-20296.

Location:
trunk/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/customize-base.js

    r20258 r20296  
    1 if(typeof wp==="undefined"){var wp={}}(function(a,e){var c,h,d,g,b,f=Array.prototype.slice;h=function(i,j){var k=g(this,i,j);k.extend=this.extend;return k};d=function(){};g=function(j,i,k){var l;if(i&&i.hasOwnProperty("constructor")){l=i.constructor}else{l=function(){var m=j.apply(this,arguments);return m}}e.extend(l,j);d.prototype=j.prototype;l.prototype=new d();if(i){e.extend(l.prototype,i)}if(k){e.extend(l,k)}l.prototype.constructor=l;l.__super__=j.prototype;return l};b=e.Callbacks("once memory");c={};c.Class=function(m,l,j){var k,i=arguments;if(m&&l&&c.Class.applicator===m){i=l;e.extend(this,j||{})}k=this;if(this.instance){k=function(){return k.instance.apply(k,arguments)};e.extend(k,this)}k.initialize.apply(k,i);return k};c.Class.applicator={};c.Class.prototype.initialize=function(){};c.Class.prototype.extended=function(i){var j=this;while(typeof j.constructor!=="undefined"){if(j.constructor===i){return true}if(typeof j.constructor.__super__==="undefined"){return false}j=j.constructor.__super__}return false};c.Class.extend=h;c.Value=c.Class.extend({initialize:function(j,i){this._value=j;this.callbacks=e.Callbacks();e.extend(this,i||{})},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(j){var i=this._value;j=this.validate(j);if(null===j||this._value===j){return this}this._value=j;this.callbacks.fireWith(this,[j,i]);return this},validate:function(i){return i},bind:function(i){this.callbacks.add.apply(this.callbacks,arguments);return this},unbind:function(i){this.callbacks.remove.apply(this.callbacks,arguments);return this},link:function(){var k=f.call(arguments),n=k.pop(),i=this,m,j,l;if(this.links){this.unlink()}this.links=[];if(!k.length){k=[n];n=function(o,p){return p}}while(j=k.shift()){if(this._parent&&e.type(j)=="string"){this.links.push(this._parent[j])}else{this.links.push(j)}}m=function(){var p,o;if(l){return i.set.original.apply(i,arguments)}l=true;p=i.links.concat(f.call(arguments));o=n.apply(i,p);l=false;if(typeof o!=="undefined"){i.set.original.call(i,o)}};m.original=this.set;this.set=m;e.each(this.links,function(o,p){p.bind(i.set)});this.set(this.get());return this},unlink:function(){var i=this.set;e.each(this.links,function(j,k){k.unbind(i)});delete this.links;this.set=this.set.original;return this}});c.ensure=function(i){return typeof i=="string"?e(i):i};c.Element=c.Value.extend({initialize:function(k,j){var i=this,n=c.Element.synchronizer.html,m,o,l;this.element=c.ensure(k);this.events="";if(this.element.is("input, select, textarea")){this.events+="change";n=c.Element.synchronizer.val;if(this.element.is("input")){m=this.element.prop("type");if(c.Element.synchronizer[m]){n=c.Element.synchronizer[m]}if("text"===m||"password"===m){this.events+=" keyup"}}}c.Value.prototype.initialize.call(this,null,e.extend(j||{},n));this._value=this.get();o=this.update;l=this.refresh;this.update=function(p){if(p!==l.call(i)){o.apply(this,arguments)}};this.refresh=function(){i.set(l.call(i))};this.bind(this.update);this.element.bind(this.events,this.refresh)},find:function(i){return e(i,this.element)},refresh:function(){},update:function(){}});c.Element.synchronizer={};e.each(["html","val"],function(j,k){c.Element.synchronizer[k]={update:function(i){this.element[k](i)},refresh:function(){return this.element[k]()}}});c.Element.synchronizer.checkbox={update:function(i){this.element.prop("checked",i)},refresh:function(){return this.element.prop("checked")}};c.Element.synchronizer.radio={update:function(i){this.element.filter(function(){return this.value===i}).prop("checked",true)},refresh:function(){return this.element.filter(":checked").val()}};c.ValueFactory=function(i){i=i||c.Value;return function(k){var j=f.call(arguments,1);this[k]=new i(c.Class.applicator,j);this[k]._parent=this;return this[k]}};c.Values=c.Value.extend({defaultConstructor:c.Value,initialize:function(i){c.Value.prototype.initialize.call(this,{},i||{});this._deferreds={}},instance:function(i){if(arguments.length===1){return this.value(i)}return this.when.apply(this,arguments)},value:function(i){return this._value[i]},has:function(i){return typeof this._value[i]!=="undefined"},add:function(j,i){if(this.has(j)){return}this._value[j]=i;this._value[j]._parent=this._value;if(this._deferreds[j]){this._deferreds[j].resolve()}return this._value[j]},set:function(i){if(this.has(i)){return this.pass("set",arguments)}return this.add(i,new this.defaultConstructor(c.Class.applicator,f.call(arguments,1)))},remove:function(i){delete this._value[i];delete this._deferreds[i]},pass:function(j,i){var l,k;i=f.call(i);l=i.shift();if(!this.has(l)){return}k=this.value(l);return k[j].apply(k,i)},when:function(){var i=this,j=f.call(arguments),k=j.pop();e.when.apply(e,e.map(j,function(l){if(i.has(l)){return}return i._deferreds[l]||(i._deferreds[l]=e.Deferred())})).done(function(){var l=e.map(j,function(m){return i(m)});if(l.length!==j.length){j.push(k);i.when.apply(i,j);return}k.apply(i,l)})}});e.each(["get","bind","unbind","link","unlink"],function(j,k){c.Values.prototype[k]=function(){return this.pass(k,arguments)}});c.Messenger=c.Class.extend({add:c.ValueFactory(),initialize:function(j,k,i){e.extend(this,i||{});this.add("url",j);this.add("targetWindow",k||null);this.add("origin").link("url",function(l){return l().replace(/([^:]+:\/\/[^\/]+).*/,"$1")});this.topics={};e.receiveMessage(e.proxy(this.receive,this),this.origin()||null)},receive:function(j){var i;i=JSON.parse(j.data);if(i&&i.id&&i.data&&this.topics[i.id]){this.topics[i.id].fireWith(this,[i.data])}},send:function(k,j){var i;if(!this.url()){return}i=JSON.stringify({id:k,data:j});e.postMessage(i,this.url(),this.targetWindow())},bind:function(k,j){var i=this.topics[k]||(this.topics[k]=e.Callbacks());i.add(j)},unbind:function(j,i){if(this.topics[j]){this.topics[j].remove(i)}}});c=e.extend(new c.Values(),c);a.customize=c})(wp,jQuery);
     1if(typeof wp==="undefined"){var wp={}}(function(a,e){var c,h,d,g,b,f=Array.prototype.slice;h=function(i,j){var k=g(this,i,j);k.extend=this.extend;return k};d=function(){};g=function(j,i,k){var l;if(i&&i.hasOwnProperty("constructor")){l=i.constructor}else{l=function(){var m=j.apply(this,arguments);return m}}e.extend(l,j);d.prototype=j.prototype;l.prototype=new d();if(i){e.extend(l.prototype,i)}if(k){e.extend(l,k)}l.prototype.constructor=l;l.__super__=j.prototype;return l};b=e.Callbacks("once memory");c={};c.Class=function(m,l,j){var k,i=arguments;if(m&&l&&c.Class.applicator===m){i=l;e.extend(this,j||{})}k=this;if(this.instance){k=function(){return k.instance.apply(k,arguments)};e.extend(k,this)}k.initialize.apply(k,i);return k};c.Class.applicator={};c.Class.prototype.initialize=function(){};c.Class.prototype.extended=function(i){var j=this;while(typeof j.constructor!=="undefined"){if(j.constructor===i){return true}if(typeof j.constructor.__super__==="undefined"){return false}j=j.constructor.__super__}return false};c.Class.extend=h;c.Value=c.Class.extend({initialize:function(j,i){this._value=j;this.callbacks=e.Callbacks();e.extend(this,i||{})},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(j){var i=this._value;j=this.validate(j);if(null===j||this._value===j){return this}this._value=j;this.callbacks.fireWith(this,[j,i]);return this},validate:function(i){return i},bind:function(i){this.callbacks.add.apply(this.callbacks,arguments);return this},unbind:function(i){this.callbacks.remove.apply(this.callbacks,arguments);return this},link:function(){var k=f.call(arguments),n=k.pop(),i=this,m,j,l;if(this.links){this.unlink()}this.links=[];if(!k.length){k=[n];n=function(o,p){return p}}while(j=k.shift()){if(this._parent&&e.type(j)=="string"){this.links.push(this._parent[j])}else{this.links.push(j)}}m=function(){var p,o;if(l){return i.set.original.apply(i,arguments)}l=true;p=i.links.concat(f.call(arguments));o=n.apply(i,p);l=false;if(typeof o!=="undefined"){i.set.original.call(i,o)}};m.original=this.set;this.set=m;e.each(this.links,function(o,p){p.bind(i.set)});this.set(this.get());return this},unlink:function(){var i=this.set;e.each(this.links,function(j,k){k.unbind(i)});delete this.links;this.set=this.set.original;return this}});c.ensure=function(i){return typeof i=="string"?e(i):i};c.Element=c.Value.extend({initialize:function(k,j){var i=this,n=c.Element.synchronizer.html,m,o,l;this.element=c.ensure(k);this.events="";if(this.element.is("input, select, textarea")){this.events+="change";n=c.Element.synchronizer.val;if(this.element.is("input")){m=this.element.prop("type");if(c.Element.synchronizer[m]){n=c.Element.synchronizer[m]}if("text"===m||"password"===m){this.events+=" keyup"}}}c.Value.prototype.initialize.call(this,null,e.extend(j||{},n));this._value=this.get();o=this.update;l=this.refresh;this.update=function(p){if(p!==l.call(i)){o.apply(this,arguments)}};this.refresh=function(){i.set(l.call(i))};this.bind(this.update);this.element.bind(this.events,this.refresh)},find:function(i){return e(i,this.element)},refresh:function(){},update:function(){}});c.Element.synchronizer={};e.each(["html","val"],function(j,k){c.Element.synchronizer[k]={update:function(i){this.element[k](i)},refresh:function(){return this.element[k]()}}});c.Element.synchronizer.checkbox={update:function(i){this.element.prop("checked",i)},refresh:function(){return this.element.prop("checked")}};c.Element.synchronizer.radio={update:function(i){this.element.filter(function(){return this.value===i}).prop("checked",true)},refresh:function(){return this.element.filter(":checked").val()}};c.ValueFactory=function(i){i=i||c.Value;return function(k){var j=f.call(arguments,1);this[k]=new i(c.Class.applicator,j);this[k]._parent=this;return this[k]}};c.Values=c.Value.extend({defaultConstructor:c.Value,initialize:function(i){c.Value.prototype.initialize.call(this,{},i||{});this._deferreds={}},instance:function(i){if(arguments.length===1){return this.value(i)}return this.when.apply(this,arguments)},value:function(i){return this._value[i]},has:function(i){return typeof this._value[i]!=="undefined"},add:function(j,i){if(this.has(j)){return this.value(j)}this._value[j]=i;this._value[j]._parent=this._value;if(this._deferreds[j]){this._deferreds[j].resolve()}return this._value[j]},set:function(i){if(this.has(i)){return this.pass("set",arguments)}return this.add(i,new this.defaultConstructor(c.Class.applicator,f.call(arguments,1)))},remove:function(i){delete this._value[i];delete this._deferreds[i]},pass:function(j,i){var l,k;i=f.call(i);l=i.shift();if(!this.has(l)){return}k=this.value(l);return k[j].apply(k,i)},when:function(){var i=this,j=f.call(arguments),k=j.pop();e.when.apply(e,e.map(j,function(l){if(i.has(l)){return}return i._deferreds[l]||(i._deferreds[l]=e.Deferred())})).done(function(){var l=e.map(j,function(m){return i(m)});if(l.length!==j.length){j.push(k);i.when.apply(i,j);return}k.apply(i,l)})}});e.each(["get","bind","unbind","link","unlink"],function(j,k){c.Values.prototype[k]=function(){return this.pass(k,arguments)}});c.Messenger=c.Class.extend({add:c.ValueFactory(),initialize:function(j,k,i){e.extend(this,i||{});this.add("url",j);this.add("targetWindow",k||null);this.add("origin").link("url",function(l){return l().replace(/([^:]+:\/\/[^\/]+).*/,"$1")});this.topics={};e.receiveMessage(e.proxy(this.receive,this),this.origin()||null)},receive:function(j){var i;i=JSON.parse(j.data);if(i&&i.id&&i.data&&this.topics[i.id]){this.topics[i.id].fireWith(this,[i.data])}},send:function(k,j){var i;if(!this.url()){return}i=JSON.stringify({id:k,data:j});e.postMessage(i,this.url(),this.targetWindow())},bind:function(k,j){var i=this.topics[k]||(this.topics[k]=e.Callbacks());i.add(j)},unbind:function(j,i){if(this.topics[j]){this.topics[j].remove(i)}}});c=e.extend(new c.Values(),c);a.customize=c})(wp,jQuery);
  • trunk/wp-includes/js/customize-controls.js

    r20291 r20296  
    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+'"]';this.params={};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.params.removed=this.params.removed||"";this.uploader=new wp.Uploader({browser:this.container.find(".upload"),success:function(h){f.set(h.url)}});this.remover=this.container.find(".remove");this.remover.click(function(h){f.set(f.params.removed);h.preventDefault()});this.bind(this.removerVisibility);this.removerVisibility(this.get());if(this.params.context){f.uploader.param("post_data[context]",this.params.context)}},removerVisibility:function(d){this.remover.toggle(d!=this.params.removed)}});b.ImageControl=b.UploadControl.extend({initialize:function(g,e,d){var f=this;b.UploadControl.prototype.initialize.call(this,g,e,d);this.thumbnail=this.container.find(".thumbnail img");this.bind(this.thumbnailSrc);this.library=this.container.find(".library");this.changer=this.container.find(".change");this.changer.click(function(h){f.library.toggle();h.preventDefault()});this.library.on("click","li",function(i){var h=c(this),j=h.data("customizeTab");i.preventDefault();if(h.hasClass("library-selected")){return}h.siblings(".library-selected").removeClass("library-selected");h.addClass("library-selected");f.library.find("div").hide().filter(function(){return c(this).data("customizeTab")===j}).show()});this.library.on("click","a",function(h){f.set(c(this).attr("href"));h.preventDefault()})},thumbnailSrc:function(d){if(/^(https?:)?\/\//.test(d)){this.thumbnail.prop("src",d).show()}else{this.thumbnail.hide()}}});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,image:b.ImageControl};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(h,f){var e=b.controls[f.control]||b.Control,g;g=b.add(h,new e(h,f.value,{params:f.params,previewer:d}));if(f.visibility){b(f.visibility.id,function(i){if("boolean"===typeof f.visibility.value){i.bind(function(j){g.container.toggle(!!j==f.visibility.value)})}else{i.bind(function(j){g.container.toggle(j==f.visibility.value)})}})}});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",function(e){e.method="postMessage"})})})(wp,jQuery);
     1(function(a,c){var b=wp.customize;b.Setting=b.Value.extend({initialize:function(g,f,d){var e;b.Value.prototype.initialize.call(this,f,d);this.id=g;this.method=this.method||"refresh";e=c("<input />",{type:"hidden",value:this.get(),name:b.settings.prefix+g});e.appendTo(this.previewer.form);this.element=new b.Element(e);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.Control=b.Class.extend({initialize:function(i,e){var g=this,d,h,f;this.params={};c.extend(this,e||{});this.id=i;this.container=c("#customize-control-"+i);f=c.map(this.params.settings,function(j){return j});b.apply(b,f.concat(function(){var j;g.settings={};for(j in g.params.settings){g.settings[j]=b(g.params.settings[j])}g.setting=g.settings["default"]||null;g.ready()}));g.elements=[];d=this.container.find("[data-customize-setting-link]");h={};d.each(function(){var k=c(this),j;if(k.is(":radio")){j=k.prop("name");if(h[j]){return}h[j]=true;k=d.filter('[name="'+j+'"]')}b(k.data("customizeSettingLink"),function(m){var l=new b.Element(k);g.elements.push(l);l.link(m).bind(function(n){m(n)})})})},ready:function(){}});b.ColorControl=b.Control.extend({ready:function(){var g=this,e,f,h,d,i;e=this.container.find(".color-picker");f=e.find(".color-picker-controls");d=e.find("a");i=function(j){j="#"+j;d.css("background",j);g.farbtastic.setColor(j)};e.on("click","a",function(){f.toggle()});this.farbtastic=c.farbtastic(e.find(".farbtastic-placeholder"),function(j){g.setting.set(j.replace("#",""))});this.setting.bind(i);i(this.setting())}});b.UploadControl=b.Control.extend({ready:function(){var d=this;this.params.removed=this.params.removed||"";this.uploader=new wp.Uploader({browser:this.container.find(".upload"),success:function(e){d.setting.set(e.url)}});this.remover=this.container.find(".remove");this.remover.click(function(e){d.setting.set(d.params.removed);e.preventDefault()});this.removerVisibility=c.proxy(this.removerVisibility,this);this.setting.bind(this.removerVisibility);this.removerVisibility(this.setting.get());if(this.params.context){d.uploader.param("post_data[context]",this.params.context)}},removerVisibility:function(d){this.remover.toggle(d!=this.params.removed)}});b.ImageControl=b.UploadControl.extend({ready:function(g,e,d){var f=this;this.thumbnail=this.container.find(".thumbnail img");this.thumbnailSrc=c.proxy(this.thumbnailSrc,this);this.setting.bind(this.thumbnailSrc);this.library=this.container.find(".library");this.changer=this.container.find(".change");this.changer.click(function(h){f.library.toggle();h.preventDefault()});this.library.on("click","li",function(i){var h=c(this),j=h.data("customizeTab");i.preventDefault();if(h.hasClass("library-selected")){return}h.siblings(".library-selected").removeClass("library-selected");h.addClass("library-selected");f.library.find("div").hide().filter(function(){return c(this).data("customizeTab")===j}).show()});this.library.on("click","a",function(h){f.setting.set(c(this).attr("href"));h.preventDefault()})},thumbnailSrc:function(d){if(/^(https?:)?\/\//.test(d)){this.thumbnail.prop("src",d).show()}else{this.thumbnail.hide()}}});b.defaultConstructor=b.Setting;b.control=new b.Values({defaultConstructor:b.Control});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.controlConstructor={color:b.ColorControl,upload:b.UploadControl,image:b.ImageControl};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.settings,function(f,e){b.set(f,f,e.value,{previewer:d})});c.each(b.settings.controls,function(h,f){var e=b.controlConstructor[f.type]||b.Control,g;g=b.control.add(h,new e(h,{params:f.params,previewer:d}));if(f.visibility){b(f.visibility.id,function(i){if("boolean"===typeof f.visibility.value){i.bind(function(j){g.container.toggle(!!j==f.visibility.value)})}else{i.bind(function(j){g.container.toggle(j==f.visibility.value)})}})}});c(".customize-section-title").click(function(){c(this).parents(".customize-section").toggleClass("open");return false});c("#save").click(function(){d.submit();return false});b.control("background_color",function(e){e.method="postMessage"});b.control("display_header_text",function(f){var e="";f.elements[0].unlink();f.element=new b.Element(f.container.find("input"));f.element.set("blank"!==f.setting());f.element.bind(function(g){if(!g){e=b.get("header_textcolor")}f.setting.set(g?e:"blank")});f.setting.bind(function(g){f.element.set("blank"!==g)})})})})(wp,jQuery);
  • trunk/wp-includes/js/plupload/wp-plupload.js

    r20180 r20296  
    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);
     1if(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){try{i=JSON.parse(i.response)}catch(k){return d.error(pluploadL10n.default_error,k)}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);
  • trunk/wp-includes/version.php

    r20294 r20296  
    55 * @global string $wp_version
    66 */
    7 $wp_version = '3.4-alpha-20294';
     7$wp_version = '3.4-alpha-20296';
    88
    99/**
Note: See TracChangeset for help on using the changeset viewer.