Merge pull request #4228 from bagnacan/release_17.05_backport_4062

[17.05] conditional postclick execution onNext
This commit is contained in:
Martin Cech
2017-07-10 10:42:17 -04:00
committed by GitHub
9 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ define(['libs/bootstrap-tour'],function(BootstrapTour) {
};
}
if (step.postclick){
step.onHide = function(){
step.onNext = function(){
_.each(step.postclick, function(postclick){
// TODO: click delay between clicks
$(postclick).click();
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"tours.js","sources":["../../src/mvc/tours.js"],"names":["define","gxy_root","Galaxy","root","tour_opts","storage","window","sessionStorage","onEnd","removeItem","delay","orphan","hooked_tour_from_data","data","_","each","steps","step","preclick","onShow","$","click","postclick","onHide","textinsert","onShown","element","val","trigger","TourItem","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","giveTour","tour_id","getJSON","tourdata","setItem","JSON","stringify","tour","Tour","init","goTo","restart","ToursView","View","initialize","self","this","setElement","fetch","success","render","error","console","tpl","template","join","$el","html","tours","models","on","e","preventDefault"],"mappings":"AAUAA,QAAQ,uBAAuB,WAE3B,GAAIC,GAA6B,mBAAXC,QAAyB,IAAMA,OAAOC,KAExDC,GAAcC,QAASC,OAAOC,eAChBC,MAAO,WACHD,eAAeE,WAAW,qBAE9BC,MAAO,IACPC,QAAO,GAGrBC,EAAwB,SAASC,GA2BjC,MA1BAC,GAAEC,KAAKF,EAAKG,MAAO,SAASC,GACpBA,EAAKC,WACLD,EAAKE,OAAQ,WACTL,EAAEC,KAAKE,EAAKC,SAAU,SAASA,GAE3BE,EAAEF,GAAUG,YAIpBJ,EAAKK,YACLL,EAAKM,OAAS,WACVT,EAAEC,KAAKE,EAAKK,UAAW,SAASA,GAE5BF,EAAEE,GAAWD,YAIrBJ,EAAKO,aAILP,EAAKQ,QAAS,WACVL,EAAEH,EAAKS,SAASC,IAAIV,EAAKO,YAAYI,QAAQ,cAIlDf,GAGPgB,EAAWC,SAASC,MAAMC,QAC5BC,QAAShC,EAAW,cAGlBiC,EAAQJ,SAASK,WAAWH,QAC9BI,IAAMnC,EAAW,YACjBoC,MAAOR,IAILS,EAAY,SAASC,GACrB,GAAIH,GAAMnC,EAAW,aAAesC,CACpCnB,GAAEoB,QAASJ,EAAK,SAAUvB,GAEtB,GAAI4B,GAAW7B,EAAsBC,EACrCN,gBAAemC,QAAQ,mBAAoBC,KAAKC,UAAU/B,GAE1D,IAAIgC,GAAO,GAAIC,MAAKhC,EAAEkB,QAClBhB,MAAOyB,EAASzB,OACjBZ,GAEHyC,GAAKE,OACLF,EAAKG,KAAK,GACVH,EAAKI,aAGTC,EAAYpB,SAASqB,KAAKnB,QAE1BoB,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKjB,MAAQ,GAAIH,GACjBoB,KAAKjB,MAAMmB,OACTC,QAAS,WACPJ,EAAKK,UAEPC,MAAO,WAELC,QAAQD,MAAM,8BAKtBD,OAAQ,WACJ,GAAIG,GAAM/C,EAAEgD,UACR,wBACA,uFACA,2FACA,OACA,uCACI,OACI,gFACI,yCACJ,OACA,mEACJ,QACJ,YACA,SAASC,KAAK,IAClBT,MAAKU,IAAIC,KAAKJ,GAAKK,MAAOZ,KAAKjB,MAAM8B,UAAUC,GAAG,QAAS,YAAa,SAASC,GAC7EA,EAAEC,iBACFhC,EAASlB,EAAEkC,MAAMzC,KAAK,gBAKlC,QAAQqC,UAAWA,EACXtC,sBAAuBA,EACvBR,UAAWA,EACXkC,SAAUA"}
{"version":3,"file":"tours.js","sources":["../../src/mvc/tours.js"],"names":["define","gxy_root","Galaxy","root","tour_opts","storage","window","sessionStorage","onEnd","removeItem","delay","orphan","hooked_tour_from_data","data","_","each","steps","step","preclick","onShow","$","click","postclick","onNext","textinsert","onShown","element","val","trigger","TourItem","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","giveTour","tour_id","getJSON","tourdata","setItem","JSON","stringify","tour","Tour","init","goTo","restart","ToursView","View","initialize","self","this","setElement","fetch","success","render","error","console","tpl","template","join","$el","html","tours","models","on","e","preventDefault"],"mappings":"AAUAA,QAAQ,uBAAuB,WAE3B,GAAIC,GAA6B,mBAAXC,QAAyB,IAAMA,OAAOC,KAExDC,GAAcC,QAASC,OAAOC,eAChBC,MAAO,WACHD,eAAeE,WAAW,qBAE9BC,MAAO,IACPC,QAAO,GAGrBC,EAAwB,SAASC,GA2BjC,MA1BAC,GAAEC,KAAKF,EAAKG,MAAO,SAASC,GACpBA,EAAKC,WACLD,EAAKE,OAAQ,WACTL,EAAEC,KAAKE,EAAKC,SAAU,SAASA,GAE3BE,EAAEF,GAAUG,YAIpBJ,EAAKK,YACLL,EAAKM,OAAS,WACVT,EAAEC,KAAKE,EAAKK,UAAW,SAASA,GAE5BF,EAAEE,GAAWD,YAIrBJ,EAAKO,aAILP,EAAKQ,QAAS,WACVL,EAAEH,EAAKS,SAASC,IAAIV,EAAKO,YAAYI,QAAQ,cAIlDf,GAGPgB,EAAWC,SAASC,MAAMC,QAC5BC,QAAShC,EAAW,cAGlBiC,EAAQJ,SAASK,WAAWH,QAC9BI,IAAMnC,EAAW,YACjBoC,MAAOR,IAILS,EAAY,SAASC,GACrB,GAAIH,GAAMnC,EAAW,aAAesC,CACpCnB,GAAEoB,QAASJ,EAAK,SAAUvB,GAEtB,GAAI4B,GAAW7B,EAAsBC,EACrCN,gBAAemC,QAAQ,mBAAoBC,KAAKC,UAAU/B,GAE1D,IAAIgC,GAAO,GAAIC,MAAKhC,EAAEkB,QAClBhB,MAAOyB,EAASzB,OACjBZ,GAEHyC,GAAKE,OACLF,EAAKG,KAAK,GACVH,EAAKI,aAGTC,EAAYpB,SAASqB,KAAKnB,QAE1BoB,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKjB,MAAQ,GAAIH,GACjBoB,KAAKjB,MAAMmB,OACTC,QAAS,WACPJ,EAAKK,UAEPC,MAAO,WAELC,QAAQD,MAAM,8BAKtBD,OAAQ,WACJ,GAAIG,GAAM/C,EAAEgD,UACR,wBACA,uFACA,2FACA,OACA,uCACI,OACI,gFACI,yCACJ,OACA,mEACJ,QACJ,YACA,SAASC,KAAK,IAClBT,MAAKU,IAAIC,KAAKJ,GAAKK,MAAOZ,KAAKjB,MAAM8B,UAAUC,GAAG,QAAS,YAAa,SAASC,GAC7EA,EAAEC,iBACFhC,EAASlB,EAAEkC,MAAMzC,KAAK,gBAKlC,QAAQqC,UAAWA,EACXtC,sBAAuBA,EACvBR,UAAWA,EACXkC,SAAUA"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define(["libs/bootstrap-tour"],function(){var a="undefined"==typeof Galaxy?"/":Galaxy.root,b={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},c=function(a){return _.each(a.steps,function(a){a.preclick&&(a.onShow=function(){_.each(a.preclick,function(a){$(a).click()})}),a.postclick&&(a.onHide=function(){_.each(a.postclick,function(a){$(a).click()})}),a.textinsert&&(a.onShown=function(){$(a.element).val(a.textinsert).trigger("change")})}),a},d=Backbone.Model.extend({urlRoot:a+"api/tours"}),e=Backbone.Collection.extend({url:a+"api/tours",model:d}),f=function(d){var e=a+"api/tours/"+d;$.getJSON(e,function(a){var d=c(a);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(a));var e=new Tour(_.extend({steps:d.steps},b));e.init(),e.goTo(0),e.restart()})},g=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new e,this.model.fetch({success:function(){a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models})).on("click",".tourItem",function(a){a.preventDefault(),f($(this).data("tour.id"))})}});return{ToursView:g,hooked_tour_from_data:c,tour_opts:b,giveTour:f}});
define(["libs/bootstrap-tour"],function(){var a="undefined"==typeof Galaxy?"/":Galaxy.root,b={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},c=function(a){return _.each(a.steps,function(a){a.preclick&&(a.onShow=function(){_.each(a.preclick,function(a){$(a).click()})}),a.postclick&&(a.onNext=function(){_.each(a.postclick,function(a){$(a).click()})}),a.textinsert&&(a.onShown=function(){$(a.element).val(a.textinsert).trigger("change")})}),a},d=Backbone.Model.extend({urlRoot:a+"api/tours"}),e=Backbone.Collection.extend({url:a+"api/tours",model:d}),f=function(d){var e=a+"api/tours/"+d;$.getJSON(e,function(a){var d=c(a);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(a));var e=new Tour(_.extend({steps:d.steps},b));e.init(),e.goTo(0),e.restart()})},g=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new e,this.model.fetch({success:function(){a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models})).on("click",".tourItem",function(a){a.preventDefault(),f($(this).data("tour.id"))})}});return{ToursView:g,hooked_tour_from_data:c,tour_opts:b,giveTour:f}});
//# sourceMappingURL=../../maps/mvc/tours.js.map