Compress scripts/styles: 3.5-alpha-21694.
git-svn-id: http://core.svn.wordpress.org/trunk@21694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
37a631387c
commit
a2d6299fb7
|
@ -1 +1 @@
|
||||||
if(typeof wp==="undefined"){var wp={}}(function(d){var e=wp.media={model:{},view:{},controller:{}},c,b,a;_.extend(e,{template:_.memoize(function(g){var f;return function(h){f=f||_.template(d("#tmpl-"+g).html());return f(h)}}),post:function(g,f){return e.ajax({data:_.isObject(g)?g:_.extend(f||{},{action:g})})},ajax:function(g,f){if(_.isObject(g)){f=g}else{f=f||{};f.data=_.extend(f.data||{},{action:g})}f=_.defaults(f||{},{type:"POST",url:ajaxurl,context:this});return d.Deferred(function(h){if(f.success){h.done(f.success)}if(f.error){h.fail(f.error)}delete f.success;delete f.error;d.ajax(f).done(function(i){if(_.isObject(i)&&!_.isUndefined(i.success)){h[i.success?"resolveWith":"rejectWith"](this,[i.data])}else{h.rejectWith(this,[i])}}).fail(function(){h.rejectWith(this,arguments)})}).promise()}});c=e.model.Attachment=Backbone.Model.extend({sync:function(h,g,f){if("read"===h){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:"get-attachment",id:this.id});return e.ajax(f)}else{return Backbone.sync.apply(this,arguments)}},parse:function(g,f){g.date=new Date(g.date);g.modified=new Date(g.modified);return g}},{create:function(f){return b.all.push(f)},get:_.memoize(function(g,f){return b.all.push(f||{id:g})})});b=e.model.Attachments=Backbone.Collection.extend({model:c,initialize:function(g,f){f=f||{};this.filters=f.filters||{};if(f.observe){this.observe(f.observe)}if(f.mirror){this.mirror(f.mirror)}},validator:function(f){return _.all(this.filters,function(g){return !!g.call(this,f)},this)},validate:function(g,f){return this[this.validator(g)?"add":"remove"](g,f)},observe:function(f){f.on("add change",this.validate,this)},unobserve:function(f){f.off("add change",this.validate,this)},mirror:function(f){if(this.mirroring&&this.mirroring===f){return}this.unmirror();this.mirroring=f;this.reset(f.models);f.on("add",this._mirrorAdd,this);f.on("remove",this._mirrorRemove,this);f.on("reset",this._mirrorReset,this)},unmirror:function(){if(!this.mirroring){return}this.mirroring.off("add",this._mirrorAdd,this);this.mirroring.off("remove",this._mirrorRemove,this);this.mirroring.off("reset",this._mirrorReset,this);delete this.mirroring},_mirrorAdd:function(h,f,g){this.add(h,{at:g.index})},_mirrorRemove:function(f){this.remove(f)},_mirrorReset:function(f){this.reset(f.models)},more:function(f){if(this.mirroring&&this.mirroring.more){return this.mirroring.more(f)}},parse:function(g,f){return _.map(g,function(h){var i=c.get(h.id);return i.set(i.parse(h,f))})}});b.all=new b();e.query=(function(){var f=[];return function(h,g){h=_.defaults(h||{},a.defaultArgs);var i=_.find(f,function(j){return _.isEqual(j.args,h)});if(!i){i=new a([],_.extend(g||{},{args:h}));f.push(i)}return i}}());a=e.model.Query=b.extend({initialize:function(i,f){var g,h=a.defaultArgs;f=f||{};b.prototype.initialize.apply(this,arguments);this.args=_.defaults(f.args||{},h);this.args.order=this.args.order.toUpperCase();if("DESC"!==this.args.order&&"ASC"!==this.args.order){this.args.order=h.order.toUpperCase()}g={allowed:["name","author","date","title","modified","parent","ID"],keymap:{ID:"id",parent:"uploadedTo"}};if(!_.contains(g.allowed,this.args.orderby)){this.args.orderby=h.orderby}this.orderkey=g.keymap[this.args.orderby]||this.args.orderby;this.hasMore=true;this.created=new Date();this.filters.order=function(j){if(this.length){return 1!==this.comparator(j,this.last())}else{if("DESC"===this.args.order&&("date"===this.orderkey||"modified"===this.orderkey)){return j.get(this.orderkey)>=this.created}}return false};if(this.args.s){this.filters.search=function(j){return _.any(["title","filename","description","caption","name"],function(k){var l=j.get(k);return l&&-1!==l.search(this.args.s)},this)}}this.observe(b.all)},more:function(f){var g=this;if(!this.hasMore){return}f=f||{};f.add=true;return this.fetch(f).done(function(h){if(_.isEmpty(h)||h.length<this.args.posts_per_page){g.hasMore=false}})},sync:function(i,g,f){var h;if("read"===i){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:"query-attachments"});args=_.clone(this.args);args.paged=Math.floor(this.length/args.posts_per_page)+1;f.data.query=args;return e.ajax(f)}else{h=b.prototype.sync?b.prototype:Backbone;return h.sync.apply(this,arguments)}},comparator:(function(){var f=function(h,g,i,j){if(_.isEqual(h,g)){return i===j?0:(i>j?-1:1)}else{return h>g?-1:1}};return function(i,h){var j=this.orderkey,g=this.args.order,k=i.cid,l=h.cid;i=i.get(j);h=h.get(j);if("date"===j||"modified"===j){i=i||new Date();h=h||new Date()}return("DESC"===g)?f(i,h,k,l):f(h,i,l,k)}}())},{defaultArgs:{posts_per_page:40,orderby:"date",order:"DESC"}})}(jQuery));
|
if(typeof wp==="undefined"){var wp={}}(function(d){var c,b,a;media=wp.media=function(e){if(media.controller.Workflow){return new media.controller.Workflow(e).render()}};_.extend(media,{model:{},view:{},controller:{}});_.extend(media,{template:_.memoize(function(f){var e;return function(g){e=e||_.template(d("#tmpl-"+f).html());return e(g)}}),post:function(f,e){return media.ajax({data:_.isObject(f)?f:_.extend(e||{},{action:f})})},ajax:function(f,e){if(_.isObject(f)){e=f}else{e=e||{};e.data=_.extend(e.data||{},{action:f})}e=_.defaults(e||{},{type:"POST",url:ajaxurl,context:this});return d.Deferred(function(g){if(e.success){g.done(e.success)}if(e.error){g.fail(e.error)}delete e.success;delete e.error;d.ajax(e).done(function(h){if(_.isObject(h)&&!_.isUndefined(h.success)){g[h.success?"resolveWith":"rejectWith"](this,[h.data])}else{g.rejectWith(this,[h])}}).fail(function(){g.rejectWith(this,arguments)})}).promise()}});c=media.model.Attachment=Backbone.Model.extend({sync:function(g,f,e){if("read"===g){e=e||{};e.context=this;e.data=_.extend(e.data||{},{action:"get-attachment",id:this.id});return media.ajax(e)}else{return Backbone.sync.apply(this,arguments)}},parse:function(f,e){f.date=new Date(f.date);f.modified=new Date(f.modified);return f}},{create:function(e){return b.all.push(e)},get:_.memoize(function(f,e){return b.all.push(e||{id:f})})});b=media.model.Attachments=Backbone.Collection.extend({model:c,initialize:function(f,e){e=e||{};this.filters=e.filters||{};if(e.observe){this.observe(e.observe)}if(e.mirror){this.mirror(e.mirror)}},validator:function(e){return _.all(this.filters,function(f){return !!f.call(this,e)},this)},validate:function(f,e){return this[this.validator(f)?"add":"remove"](f,e)},observe:function(e){e.on("add change",this.validate,this)},unobserve:function(e){e.off("add change",this.validate,this)},mirror:function(e){if(this.mirroring&&this.mirroring===e){return}this.unmirror();this.mirroring=e;this.reset(e.models);e.on("add",this._mirrorAdd,this);e.on("remove",this._mirrorRemove,this);e.on("reset",this._mirrorReset,this)},unmirror:function(){if(!this.mirroring){return}this.mirroring.off("add",this._mirrorAdd,this);this.mirroring.off("remove",this._mirrorRemove,this);this.mirroring.off("reset",this._mirrorReset,this);delete this.mirroring},_mirrorAdd:function(g,e,f){this.add(g,{at:f.index})},_mirrorRemove:function(e){this.remove(e)},_mirrorReset:function(e){this.reset(e.models)},more:function(e){if(this.mirroring&&this.mirroring.more){return this.mirroring.more(e)}},parse:function(f,e){return _.map(f,function(g){var h=c.get(g.id);return h.set(h.parse(g,e))})}});b.all=new b();media.query=(function(){var e=[];return function(g,f){g=_.defaults(g||{},a.defaultArgs);var h=_.find(e,function(i){return _.isEqual(i.args,g)});if(!h){h=new a([],_.extend(f||{},{args:g}));e.push(h)}return h}}());a=media.model.Query=b.extend({initialize:function(h,e){var f,g=a.defaultArgs;e=e||{};b.prototype.initialize.apply(this,arguments);this.args=_.defaults(e.args||{},g);this.args.order=this.args.order.toUpperCase();if("DESC"!==this.args.order&&"ASC"!==this.args.order){this.args.order=g.order.toUpperCase()}f={allowed:["name","author","date","title","modified","parent","ID"],keymap:{ID:"id",parent:"uploadedTo"}};if(!_.contains(f.allowed,this.args.orderby)){this.args.orderby=g.orderby}this.orderkey=f.keymap[this.args.orderby]||this.args.orderby;this.hasMore=true;this.created=new Date();this.filters.order=function(i){if(this.length){return 1!==this.comparator(i,this.last())}else{if("DESC"===this.args.order&&("date"===this.orderkey||"modified"===this.orderkey)){return i.get(this.orderkey)>=this.created}}return false};if(this.args.s){this.filters.search=function(i){return _.any(["title","filename","description","caption","name"],function(j){var k=i.get(j);return k&&-1!==k.search(this.args.s)},this)}}this.observe(b.all)},more:function(e){var f=this;if(!this.hasMore){return}e=e||{};e.add=true;return this.fetch(e).done(function(g){if(_.isEmpty(g)||g.length<this.args.posts_per_page){f.hasMore=false}})},sync:function(h,f,e){var g;if("read"===h){e=e||{};e.context=this;e.data=_.extend(e.data||{},{action:"query-attachments"});args=_.clone(this.args);args.paged=Math.floor(this.length/args.posts_per_page)+1;e.data.query=args;return media.ajax(e)}else{g=b.prototype.sync?b.prototype:Backbone;return g.sync.apply(this,arguments)}},comparator:(function(){var e=function(g,f,h,i){if(_.isEqual(g,f)){return h===i?0:(h>i?-1:1)}else{return g>f?-1:1}};return function(h,g){var i=this.orderkey,f=this.args.order,j=h.cid,k=g.cid;h=h.get(i);g=g.get(i);if("date"===i||"modified"===i){h=h||new Date();g=g||new Date()}return("DESC"===f)?e(h,g,j,k):e(g,h,k,j)}}())},{defaultArgs:{posts_per_page:40,orderby:"date",order:"DESC"}})}(jQuery));
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '3.5-alpha-21690';
|
$wp_version = '3.5-alpha-21694';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue