From 12142ddb77fac9712c2703f3e13f54a6e12ed6e5 Mon Sep 17 00:00:00 2001 From: bumpbot Date: Thu, 4 Apr 2013 08:58:49 +0000 Subject: [PATCH] Compress scripts/styles: 3.6-alpha-23900. git-svn-id: https://develop.svn.wordpress.org/trunk@23900 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/revisions.min.js | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/js/revisions.min.js b/wp-admin/js/revisions.min.js index 5007630ac5..4248e15cc7 100644 --- a/wp-admin/js/revisions.min.js +++ b/wp-admin/js/revisions.min.js @@ -1 +1 @@ -window.wp=window.wp||{};(function(a){wp.revisions={views:{},Model:Backbone.Model.extend({idAttribute:"ID",urlRoot:ajaxurl+"?action=revisions-data&show_autosaves=true&show_split_view=true&nonce="+wpRevisionsSettings.nonce,defaults:{ID:0,revision_date_author:"",revision_date_author_short:"",revisiondiff:'
',restoreaction:"",revision_from_date_author:"",revision_toload:false,lines_added:0,lines_deleted:0,scope_of_changes:"none",previous_revision_id:0},url:function(){if(1===REVAPP._compareOneOrTwo){return this.urlRoot+"&single_revision_id="+this.id+"&compare_to="+this.get("previous_revision_id")+"&post_id="+wpRevisionsSettings.post_id}else{return this.urlRoot+"&single_revision_id="+this.id}}}),app:_.extend({},Backbone.Events),App:Backbone.Router.extend({_revisions:null,_leftHandleRevisions:null,_rightHandleRevisions:null,_revisionsInteractions:null,_revisionsOptions:null,_leftDiff:1,_rightDiff:1,_autosaves:true,_showSplitView:true,_compareOneOrTwo:1,_leftModelLoading:false,_rightModelLoading:false,_tickmarkView:null,routes:{},reloadToLoadRevisions:function(d,e){var b=this,f=d.where({revision_toload:true}),c=0;_.each(f,function(g){if(g.get("ID")==wpRevisionsSettings.revision_id){b._rightDiff=b._revisions.indexOf(g)+1}});_.each(f,function(g){g.urlRoot=d.url;_.delay(function(){g.fetch({update:true,add:false,remove:false,success:function(i){i.set("revision_toload","false");if(0===d.where({revision_toload:true}).length){b.stopModelLoadingSpinner()}b._tickmarkView.render();var h=i.get("lines_added")+i.get("lines_deleted"),j="vsmall";if(h>1&&h<=3){j="small"}else{if(h>3&&h<=5){j="med"}else{if(h>5&&h<=10){j="large"}else{if(h>10){j="vlarge"}}}}i.set("scope_of_changes",j);if(0!==b._rightDiff&&i.get("ID")===b._revisions.at(b._rightDiff-1).get("ID")){b._revisionView.render()}}})},c);c=c+150})},startLeftModelLoading:function(){this._leftModelLoading=true;a(".revisiondiffcontainer").addClass("leftmodelloading")},stopLeftModelLoading:function(){this._leftModelLoading=false},startRightModelLoading:function(){this._rightModelLoading=true;a(".revisiondiffcontainer").addClass("rightmodelloading")},stopRightModelLoading:function(){this._rightModelLoading=false},stopModelLoadingSpinner:function(){a(".revisiondiffcontainer").removeClass("rightmodelloading");a(".revisiondiffcontainer").removeClass("leftmodelloading")},reloadModel:function(){if(2===this._compareOneOrTwo){this.reloadLeftRight()}else{this.reloadModelSingle()}},reloadModelSingle:function(){var b=this;b._revisions.url=ajaxurl+"?action=revisions-data&compare_to="+wpRevisionsSettings.post_id+"&show_autosaves="+b._autosaves+"&show_split_view="+b._showSplitView+"&nonce="+wpRevisionsSettings.nonce;b.startRightModelLoading();b._revisions.fetch({success:function(){console.log("loaded");var c=b._revisions.length;b._revisionView.model=b._revisions;b._revisionView.render();b.reloadToLoadRevisions(b._revisions);b._tickmarkView.model=b._revisions;b._tickmarkView.render();a("#slider").slider("option","max",c-1);a("#slider").slider("value",b._rightDiff-1).trigger("slide")},error:function(){b.stopRightModelLoading()}})},reloadLeft:function(){var b=this;b.startLeftModelLoading();b._leftHandleRevisions=new wp.revisions.Collection();b._leftHandleRevisions.url=ajaxurl+"?action=revisions-data&compare_to="+b._revisions.at(b._rightDiff-1).get("ID")+"&post_id="+wpRevisionsSettings.post_id+"&show_autosaves="+REVAPP._autosaves+"&show_split_view="+REVAPP._showSplitView+"&nonce="+wpRevisionsSettings.nonce+"&right_handle_at="+(b._rightDiff);b._leftHandleRevisions.fetch({success:function(){b.stopLeftModelLoading();b.reloadToLoadRevisions(b._leftHandleRevisions);b._tickmarkView.model=b._leftHandleRevisions;a("#slider").slider("option","max",b._revisions.length);if(b._rightDiff>b._revisions.length){b._rightDiff=b._revisions.length}},error:function(){b.stopLeftModelLoading()}})},reloadRight:function(){var b=this;b.startRightModelLoading();b._rightHandleRevisions=new wp.revisions.Collection();b._rightHandleRevisions.url=ajaxurl+"?action=revisions-data&compare_to="+(b._revisions.at(b._leftDiff).get("ID")-1)+"&post_id="+wpRevisionsSettings.post_id+"&show_autosaves="+REVAPP._autosaves+"&show_split_view="+REVAPP._showSplitView+"&nonce="+wpRevisionsSettings.nonce;b._rightHandleRevisions.fetch({success:function(){b.stopRightModelLoading();b.reloadToLoadRevisions(b._rightHandleRevisions);b._tickmarkView.model=b._rightHandleRevisions;a("#slider").slider("option","max",b._revisions.length);a("#slider").slider("values",[REVAPP._leftDiff,REVAPP._rightDiff]).trigger("slide")},error:function(c){b.stopRightModelLoading()}})},reloadLeftRight:function(){this.startRightModelLoading();this.startLeftModelLoading();this.reloadLeft();this.reloadRight()},initialize:function(c){var b=this;if(this._revisions===null){b._revisions=new wp.revisions.Collection();b.startRightModelLoading();b._revisions.fetch({success:function(){b.stopRightModelLoading();b.completeApplicationSetup()}})}return this},addTooltip:function(c,b){c.attr("title","").tooltip({track:false,position:{my:"left-30 top-66",at:"top left",using:function(d,e){a(this).css(d);a("
").addClass("arrow").addClass(e.vertical).addClass(e.horizontal).appendTo(a(this))}},show:false,hide:false,content:function(){return b}})},completeApplicationSetup:function(){this._revisionView=new wp.revisions.views.View({model:this._revisions});this._revisionView.render();a("#slider").slider("option","max",this._revisions.length-1);this.reloadToLoadRevisions(this._revisions);this._revisionsInteractions=new wp.revisions.views.Interact({model:this._revisions});this._revisionsInteractions.render();this._tickmarkView=new wp.revisions.views.Tickmarks({model:this._revisions});this._tickmarkView.render();this._tickmarkView.resetTicks()}})};wp.revisions.Collection=Backbone.Collection.extend({model:wp.revisions.Model,url:ajaxurl+"?action=revisions-data&compare_to="+wpRevisionsSettings.post_id+"&show_autosaves=true&show_split_view=true&nonce="+wpRevisionsSettings.nonce,initialize:function(){}});_.extend(wp.revisions.views,{Tickmarks:Backbone.View.extend({el:a("#diff-slider-ticks")[0],tagName:"diff-slider-ticks-view",className:"diff-slider-ticks-container",template:wp.template("revision-ticks"),model:wp.revisions.Model,resetTicks:function(){var f=a("#slider").slider("option","max");var e=a("#slider").width();var c=(2===REVAPP._compareOneOrTwo)?1:0;var b=Math.floor(e/(f-c));b=(b>50)?50:b;b=(b<10)?10:b;e=b*(f-c)+1;a("#slider").width(e);a(".diff-slider-ticks-wrapper").width(e);a("#diffslider").width(e);a("#diff-slider-ticks").width(e);var d=a(".revision-tick").width();if(b!==d){a(".revision-tick").each(function(){a(this).css("margin-right",b-1+"px")});if(2===REVAPP._compareOneOrTwo){a(".revision-tick").first().remove()}a(".revision-tick").last().css("margin-right","0")}},render:function(){var b=this;if(null!==b.model){var c="";_.each(b.model.models,function(d){c=c+b.template(d.toJSON())});b.$el.html(c)}b.resetTicks();return b}}),View:Backbone.View.extend({el:a("#backbonerevisionsdiff")[0],tagName:"revisionvview",className:"revisionview-container",template:wp.template("revision"),comparetwochecked:"",draggingLeft:false,render:function(){var c="";var b;if(2===REVAPP._compareOneOrTwo){this.comparetwochecked="checked";if(this.draggingLeft){b=REVAPP._leftDiff-1;if(this.model.at(b)){c=this.template(_.extend(this.model.at(b).toJSON(),{comparetwochecked:this.comparetwochecked}))}}else{b=REVAPP._rightDiff-1;if(this.model.at(b)){c=this.template(_.extend(this.model.at(b).toJSON(),{comparetwochecked:this.comparetwochecked}))}}}else{this.comparetwochecked="";if(this.model.at(REVAPP._rightDiff-1)){c=this.template(_.extend(this.model.at(REVAPP._rightDiff-1).toJSON(),{comparetwochecked:this.comparetwochecked}))}}this.$el.html(c);if(this.model.length<3){a("div#comparetworevisions").hide()}if(this.model.length<2){a("div#diffslider").hide();a("div.diff-slider-ticks-wrapper").hide()}if(2===REVAPP._compareOneOrTwo){REVAPP.addTooltip(a("a.ui-slider-handle.left-handle"),(REVAPP._leftDiff<0)?"":REVAPP._revisions.at(REVAPP._leftDiff-1).get("revision_date_author_short"));REVAPP.addTooltip(a("a.ui-slider-handle.right-handle"),(REVAPP._rightDiff>REVAPP._revisions.length)?"":REVAPP._revisions.at(REVAPP._rightDiff-1).get("revision_date_author_short"))}else{REVAPP.addTooltip(a("a.ui-slider-handle"),(REVAPP._rightDiff>REVAPP._revisions.length)?"":REVAPP._revisions.at(REVAPP._rightDiff-1).get("revision_date_author_short"))}if(REVAPP._rightDiff===REVAPP._revisions.length){a(".restore-button").hide()}else{a(".restore-button").show()}return this},events:{"click #comparetwo":"clickcomparetwo"},clickcomparetwo:function(){self=this;if(a("input#comparetwo").is(":checked")){REVAPP._compareOneOrTwo=2;if(1===REVAPP._rightDiff){REVAPP._rightDiff=2}REVAPP._revisionView.draggingLeft=false;wpRevisionsSettings.revision_id="";REVAPP.reloadLeftRight();REVAPP._revisionView.model=REVAPP._rightHandleRevisions}else{REVAPP._compareOneOrTwo=1;REVAPP._revisionView.draggingLeft=false;REVAPP.reloadModelSingle()}REVAPP._revisionsInteractions.render();REVAPP._tickmarkView.render()}}),Interact:Backbone.View.extend({el:a("#backbonerevisionsinteract")[0],tagName:"revisionvinteract",className:"revisionvinteract-container",template:wp.template("revisionvinteract"),initialize:function(){},render:function(){var b=this;var d=this.template;this.$el.html(d);var c=REVAPP._revisions.length;slider=a("#slider");if(1===REVAPP._compareOneOrTwo){slider.slider({value:REVAPP._rightDiff-1,min:0,max:c-1,step:1,slide:function(e,f){REVAPP._rightDiff=(f.value+1);REVAPP._revisionView.render()}});a(".revisiondiffcontainer").removeClass("comparetwo")}else{slider.slider({values:[REVAPP._leftDiff,REVAPP._rightDiff+1],min:1,max:c+1,step:1,range:true,start:function(f,g){var e=a(g.handle).index();switch(e){case 1:if(REVAPP._leftModelLoading){return false}REVAPP._revisionView.draggingLeft=true;if(REVAPP._revisionView.model!==REVAPP._leftHandleRevisions&&null!==REVAPP._leftHandleRevisions){REVAPP._revisionView.model=REVAPP._leftHandleRevisions;REVAPP._tickmarkView.model=REVAPP._leftHandleRevisions;REVAPP._tickmarkView.render()}REVAPP._leftDiffStart=g.values[0];break;case 2:if(REVAPP._rightModelLoading||0===REVAPP._rightHandleRevisions.length){return false}if(REVAPP._revisionView.model!==REVAPP._rightHandleRevisions&&null!==REVAPP._rightHandleRevisions){REVAPP._revisionView.model=REVAPP._rightHandleRevisions;REVAPP._tickmarkView.model=REVAPP._rightHandleRevisions;REVAPP._tickmarkView.render()}REVAPP._revisionView.draggingLeft=false;REVAPP._rightDiffStart=g.values[1];break}},slide:function(f,g){if(g.values[0]===g.values[1]){return false}var e=a(g.handle).index();switch(e){case 1:if(REVAPP._leftModelLoading){return false}REVAPP._leftDiff=g.values[0];break;case 2:if(REVAPP._rightModelLoading){return false}REVAPP._rightDiff=g.values[1];break}if(0===REVAPP._leftDiff){a(".revisiondiffcontainer").addClass("currentversion")}else{a(".revisiondiffcontainer").removeClass("currentversion")}REVAPP._revisionView.render()},stop:function(f,g){if(2===REVAPP._compareOneOrTwo){var e=a(g.handle).index();switch(e){case 1:if(REVAPP._leftDiffStart!==g.values[0]){REVAPP.reloadRight()}break;case 2:if(REVAPP._rightDiffStart!==g.values[1]){REVAPP.reloadLeft()}break}}}});a(".revisiondiffcontainer").addClass("comparetwo");a("#diffslider a.ui-slider-handle").first().addClass("left-handle").next().addClass("right-handle")}return this},events:{"click #next":"nextRevision","click #previous":"previousRevision"},nextRevision:function(){if(REVAPP._rightDiff1){REVAPP._rightDiff=REVAPP._rightDiff-1}REVAPP._revisionView.render();a("#slider").slider("value",REVAPP._rightDiff-1).trigger("slide")}})});REVAPP=new wp.revisions.App()}(jQuery)); \ No newline at end of file +window.wp=window.wp||{};(function(f){var b,e,c,a,d;d=wp.revisions=function(){c=d.Diff=new c()};_.extend(d,{model:{},view:{},controller:{}});a=d.model.l10n=typeof wpRevisionsL10n==="undefined"?{}:wpRevisionsL10n;d.model.settings=a.settings||{};delete a.settings;c=d.controller.Diff=Backbone.Model.extend({rightDiff:1,leftDiff:1,revisions:null,leftHandleRevisions:null,rightHandleRevisions:null,revisionsInteractions:null,autosaves:true,showSplitView:true,singleRevision:true,leftModelLoading:false,rightModelLoading:false,tickmarkView:null,slider:null,constructor:function(){this.slider=new d.view.Slider();if(null===this.revisions){this.revisions=new e();this.startRightModelLoading();var g=this;this.revisions.fetch({success:function(){g.stopRightModelLoading();g.completeApplicationSetup()}})}},reloadToLoadRevisions:function(k,i){var g=this,j=k.where({revision_toload:true}),h=0;_.each(j,function(l){if(l.get("ID")==d.model.settings.revision_id){g.rightDiff=g.revisions.indexOf(l)+1}});_.each(j,function(l){_.delay(function(){l.fetch({update:true,add:false,remove:false,success:function(n){n.set("revision_toload","false");if(0===k.where({revision_toload:true}).length){g.stopModelLoadingSpinner()}g.tickmarkView.render();var m=n.get("lines_added")+n.get("lines_deleted"),o="vsmall";if(m>1&&m<=3){o="small"}else{if(m>3&&m<=5){o="med"}else{if(m>5&&m<=10){o="large"}else{if(m>10){o="vlarge"}}}}n.set("scope_of_changes",o);if(0!==g.rightDiff&&n.get("ID")===g.revisions.at(g.rightDiff-1).get("ID")){g.revisionView.render()}}})},h);h=h+150})},startLeftModelLoading:function(){this.leftModelLoading=true;f(".revisiondiffcontainer").addClass("leftmodelloading")},stopLeftModelLoading:function(){this.leftModelLoading=false},startRightModelLoading:function(){this.rightModelLoading=true;f(".revisiondiffcontainer").addClass("rightmodelloading")},stopRightModelLoading:function(){this.rightModelLoading=false},stopModelLoadingSpinner:function(){f(".revisiondiffcontainer").removeClass("rightmodelloading");f(".revisiondiffcontainer").removeClass("leftmodelloading")},reloadModel:function(){if(this.singleRevision){this.reloadModelSingle()}else{this.reloadLeftRight()}},reloadModelSingle:function(){var g=this;g.revisions.reload({showAutosaves:g.autosaves,showSplitView:g.showSplitView});g.startRightModelLoading();g.revisions.fetch({success:function(){var h=g.revisions.length;g.revisionView.model=g.revisions;g.revisionView.render();g.reloadToLoadRevisions(g.revisions);g.tickmarkView.model=g.revisions;g.tickmarkView.render();g.slider.refresh({max:h-1,value:g.rightDiff-1},true)},error:function(){g.stopRightModelLoading()}})},reloadLeft:function(){var g=this;g.startLeftModelLoading();g.leftHandleRevisions=new e({},{compareTo:g.revisions.at(g.rightDiff-1).get("ID"),showAutosaves:g.autosaves,showSplitView:g.showSplitView,rightHandleAt:g.rightDiff});g.leftHandleRevisions.fetch({success:function(){g.stopLeftModelLoading();g.reloadToLoadRevisions(g.leftHandleRevisions);g.tickmarkView.model=g.leftHandleRevisions;g.slider.refresh({max:g.revisions.length});if(g.rightDiff>g.revisions.length){g.rightDiff=g.revisions.length}},error:function(){g.stopLeftModelLoading()}})},reloadRight:function(){var g=this;g.startRightModelLoading();g.rightHandleRevisions=new e({},{compareTo:g.revisions.at(g.leftDiff).get("ID")-1,showAutosaves:g.autosaves,showSplitView:g.showSplitView,leftHandleAt:g.leftDiff});g.rightHandleRevisions.fetch({success:function(){g.stopRightModelLoading();g.reloadToLoadRevisions(g.rightHandleRevisions);g.tickmarkView.model=g.rightHandleRevisions;g.slider.refresh({max:g.revisions.length,values:[g.leftDiff,g.rightDiff]},true)},error:function(h){g.stopRightModelLoading()}})},reloadLeftRight:function(){this.startRightModelLoading();this.startLeftModelLoading();this.reloadLeft();this.reloadRight()},completeApplicationSetup:function(){this.revisionView=new d.view.Diff({model:this.revisions});this.revisionView.render();this.reloadToLoadRevisions(this.revisions);this.revisionsInteractions=new d.view.Interact({model:this.revisions});this.revisionsInteractions.render();this.tickmarkView=new d.view.Tickmarks({model:this.revisions});this.tickmarkView.render();this.tickmarkView.resetTicks()}});d.view.Slider=Backbone.View.extend({el:f("#slider"),singleRevision:true,initialize:function(g){this.options=_.defaults(g||{},{value:0,min:0,max:1,step:1})},slide:function(g,h){if(this.singleRevision){c.rightDiff=(h.value+1);c.revisionView.render()}else{if(h.values[0]===h.values[1]){return false}if(f(h.handle).hasClass("left-handle")){if(c.leftModelLoading){return false}c.leftDiff=h.values[0]}else{if(c.rightModelLoading){return false}c.rightDiff=h.values[1]}if(0===c.leftDiff){f(".revisiondiffcontainer").addClass("currentversion")}else{f(".revisiondiffcontainer").removeClass("currentversion")}c.revisionView.render()}},start:function(g,h){if(this.singleRevision){return}if(f(h.handle).hasClass("left-handle")){if(c.leftModelLoading){return false}c.revisionView.draggingLeft=true;if(c.revisionView.model!==c.leftHandleRevisions&&null!==c.leftHandleRevisions){c.revisionView.model=c.leftHandleRevisions;c.tickmarkView.model=c.leftHandleRevisions;c.tickmarkView.render()}c.leftDiffStart=h.values[0]}else{if(c.rightModelLoading||0===c.rightHandleRevisions.length){return false}if(c.revisionView.model!==c.rightHandleRevisions&&null!==c.rightHandleRevisions){c.revisionView.model=c.rightHandleRevisions;c.tickmarkView.model=c.rightHandleRevisions;c.tickmarkView.render()}c.revisionView.draggingLeft=false;c.rightDiffStart=h.values[1]}},stop:function(g,h){if(this.singleRevision){return}if(f(h.handle).hasClass("left-handle")){if(c.leftDiffStart!==h.values[0]){c.reloadRight()}}else{if(c.rightDiffStart!==h.values[1]){c.reloadLeft()}}},addTooltip:function(h,g){h.attr("title","").tooltip({track:false,position:{my:"left-30 top-66",at:"top left",using:function(i,j){f(this).css(i);f("
").addClass("arrow").addClass(j.vertical).addClass(j.horizontal).appendTo(f(this))}},show:false,hide:false,content:function(){return g}})},width:function(){return f("#slider").width()},setWidth:function(g){return f("#slider").width(g)},refresh:function(h,g){f("#slider").slider("option",h);if(g){f("#slider").trigger("slide")}},option:function(g){return f("#slider").slider("option",g)},render:function(){var g=this;f("#slider").slider({slide:f.proxy(g.slide,g),start:f.proxy(g.start,g),stop:f.proxy(g.stop,g)});this.refresh(this.options)}});d.view.Tickmarks=Backbone.View.extend({el:f("#diff-slider-ticks"),template:wp.template("revision-ticks"),model:b,resetTicks:function(){var k=c.slider.option("max");var j=c.slider.width();var h=c.singleRevision?0:1;var g=Math.floor(j/(k-h));g=(g>50)?50:g;g=(g<10)?10:g;j=g*(k-h)+1;c.slider.setWidth(j);f(".diff-slider-ticks-wrapper").width(j);f("#diffslider").width(j);f("#diff-slider-ticks").width(j);var i=f(".revision-tick").width();if(g!==i){f(".revision-tick").each(function(){f(this).css("margin-right",g-1+"px")});if(!c.singleRevision){f(".revision-tick").first().remove()}f(".revision-tick").last().css("margin-right","0")}},render:function(){var g=this;if(null!==g.model){var h="";_.each(g.model.models,function(i){h=h+g.template(i.toJSON())});g.$el.html(h)}g.resetTicks();return g}});d.view.Interact=Backbone.View.extend({el:f("#backbonerevisionsinteract"),template:wp.template("revision-interact"),events:{"click #next":"nextRevision","click #previous":"previousRevision"},render:function(){var g=this;var i=this.template;this.$el.html(i);var h=c.revisions.length;c.slider.singleRevision=c.singleRevision;c.slider.render();if(c.singleRevision){c.slider.refresh({value:c.rightDiff-1,min:0,max:h-1});f(".revisiondiffcontainer").removeClass("comparetwo")}else{c.slider.refresh({values:[c.leftDiff,c.rightDiff+1],min:1,max:h+1,range:true});f(".revisiondiffcontainer").addClass("comparetwo");f("#diffslider a.ui-slider-handle").first().addClass("left-handle");f("#diffslider a.ui-slider-handle").last().addClass("right-handle")}return this},nextRevision:function(){if(c.rightDiff1){c.rightDiff=c.rightDiff-1}c.revisionView.render();c.slider.refresh({value:c.rightDiff-1},true)}});d.view.Diff=Backbone.View.extend({el:f("#backbonerevisionsdiff"),template:wp.template("revision"),draggingLeft:false,events:{"click #comparetwo":"compareTwo","click #restore":"restore"},render:function(){var h="";var g;if(!c.singleRevision){if(this.draggingLeft){g=c.leftDiff-1;if(this.model.at(g)){h=this.template(this.model.at(g).toJSON())}}else{g=c.rightDiff-1;if(this.model.at(g)){h=this.template(this.model.at(g).toJSON())}}}else{this.comparetwochecked="";if(this.model.at(c.rightDiff-1)){h=this.template(this.model.at(c.rightDiff-1).toJSON())}}this.$el.html(h);if(this.model.length<2){f("#diffslider").hide();f(".diff-slider-ticks-wrapper").hide()}if(!c.singleRevision){c.slider.addTooltip(f("a.ui-slider-handle.left-handle"),(c.leftDiff<0)?"":c.revisions.at(c.leftDiff-1).get("titleTooltip"));c.slider.addTooltip(f("a.ui-slider-handle.right-handle"),(c.rightDiff>c.revisions.length)?"":c.revisions.at(c.rightDiff-1).get("titleTooltip"))}else{c.slider.addTooltip(f("a.ui-slider-handle"),(c.rightDiff>c.revisions.length)?"":c.revisions.at(c.rightDiff-1).get("titleTooltip"))}this.toogleCompareTwoCheckbox();if(c.rightDiff===c.revisions.length){f("#restore").hide()}else{f("#restore").show()}return this},toogleCompareTwoCheckbox:function(){if(this.model.length<3){f("#comparetworevisions").hide()}f("#comparetwo").prop("checked",!c.singleRevision)},compareTwo:function(){if(f("input#comparetwo").is(":checked")){c.singleRevision=false;if(1===c.rightDiff){c.rightDiff=2}c.revisionView.draggingLeft=false;d.model.settings.revision_id="";c.reloadLeftRight();c.revisionView.model=c.rightHandleRevisions}else{c.singleRevision=true;c.revisionView.draggingLeft=false;c.reloadModelSingle()}c.revisionsInteractions.render();c.tickmarkView.render()},restore:function(){document.location=f("#restore").data("restoreLink")}});b=d.model.Revision=Backbone.Model.extend({idAttribute:"ID",urlRoot:ajaxurl+"?action=revisions-data&show_autosaves=true&show_split_view=true&nonce="+d.model.settings.nonce,defaults:{ID:0,titleTo:"",titleTooltip:"",titleFrom:"",diff:'
',restoreLink:"",revision_toload:false,lines_added:0,lines_deleted:0,scope_of_changes:"none",previous_revision_id:0},url:function(){if(c.singleRevision){return this.urlRoot+"&single_revision_id="+this.id+"&compare_to="+this.get("previous_revision_id")+"&post_id="+d.model.settings.post_id}else{return this.collection.url()+"&single_revision_id="+this.id}}});e=d.Revisions=Backbone.Collection.extend({model:b,urlRoot:ajaxurl+"?action=revisions-data",initialize:function(h,g){this.options=_.defaults(g||{},{compareTo:d.model.settings.post_id,post_id:d.model.settings.post_id,showAutosaves:true,showSplitView:true,rightHandleAt:0,leftHandleAt:0,nonce:d.model.settings.nonce})},url:function(){return this.urlRoot+"&compare_to="+this.options.compareTo+"&post_id="+this.options.post_id+"&show_autosaves="+this.options.showAutosaves+"&show_split_view="+this.options.showSplitView+"&right_handle_at="+this.options.rightHandleAt+"&left_handle_at="+this.options.leftHandleAt+"&nonce="+this.options.nonce},reload:function(g){this.options=_.defaults(g||{},this.options)}});f(wp.revisions)}(jQuery)); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 7b6d050df9..389ec61dcb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '3.6-alpha-23894'; +$wp_version = '3.6-alpha-23900'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.