mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-10 08:25:34 +00:00
(master) Récupération d'un build pour GitHub Pages
This commit is contained in:
1
docs/js/app/app.256fc1b0.js
Normal file
1
docs/js/app/app.256fc1b0.js
Normal file
@@ -0,0 +1 @@
|
||||
define("app.256fc1b0",function(require){"use strict";var n,i=require("backbone"),o=require("marionette"),t=require("backbone.radio"),s=require("controllers/soundboard.b3824117");return n=o.Application.extend({initialize:function(){this.addRegions({mainRegion:"#main",modalRegion:"#modal"}),t.channel("App").reply("region:show",this.showRegion.bind(this)),t.channel("App").reply("modal:show",this.showModal.bind(this)),t.channel("Sounds").on("sound:play",this.changeUrl.bind(this)),t.channel("Sounds").on("sound:stop",this.resetUrl.bind(this)),this.router=new o.AppRouter,this.start()},start:function(){var n=new s;this.router.processAppRoutes(n,{"":"index","son/:slug":"index"}),i.history&&(i.history.start(),this.trigger("backbone:history:start"))},changeUrl:function(n){this.router.navigate("son/"+n)},resetUrl:function(){this.router.navigate("/")},showRegion:function(n){this.mainRegion.show(n.view)},showModal:function(n){this.modalRegion.show(n.view)}})});
|
||||
1
docs/js/app/collections/sounds.8bb5d10e.js
Normal file
1
docs/js/app/collections/sounds.8bb5d10e.js
Normal file
@@ -0,0 +1 @@
|
||||
define("collections/sounds.8bb5d10e",function(require){"use strict";var e,t=require("backbone"),i=require("models/sound.b6ee8c6b");return e=t.Collection.extend({model:i,url:"sounds/sounds.b2533e4b.json",comparator:function(e,t){var i=e.get("title"),r=t.get("title");return i.localeCompare(r)},filterByCid:function(t){return""==t?this:new e(this.filter(function(e){return e.cid==t}))},filterByTitle:function(t){var i,r=this;return""==t?this:(i=new RegExp(this.removeDiacritics(t),"gi"),new e(this.filter(function(e){return i.lastIndex=0,i.test(r.removeDiacritics(e.get("title")))||i.test(r.removeDiacritics(e.get("character")))||i.test(r.removeDiacritics(e.get("episode")))})))},removeDiacritics:function(e){return e=e.replace(/[àâ]/gi,"a"),e=e.replace(/[ç]/gi,"c"),e=e.replace(/[éèëê]/gi,"e"),e=e.replace(/[ïî]/gi,"i"),e=e.replace(/[ô]/gi,"o"),e=e.replace(/[ùüû]/gi,"u")}})});
|
||||
1
docs/js/app/controllers/soundboard.b3824117.js
Normal file
1
docs/js/app/controllers/soundboard.b3824117.js
Normal file
@@ -0,0 +1 @@
|
||||
define("controllers/soundboard.b3824117",function(require){"use strict";var e,n=require("marionette"),i=require("backbone.radio"),o=require("radios/sounds.8e99c404"),r=require("views/soundboard.a52b7194");return e=n.Object.extend({initialize:function(){new o},index:function(e){var n=new r({slug:e});i.channel("App").request("region:show",{view:n})}})});
|
||||
1
docs/js/app/main.5acd0649.js
Normal file
1
docs/js/app/main.5acd0649.js
Normal file
@@ -0,0 +1 @@
|
||||
require.config({baseUrl:"js/app",paths:{backbone:"../../bower_components/backbone/backbone-min","backbone.radio":"../../bower_components/backbone.radio/build/backbone.radio",css:"../../bower_components/require-css/css",handlebars:"../../bower_components/handlebars/handlebars.min",hbs:"../../bower_components/require-handlebars-plugin/hbs",jquery:"../../bower_components/jquery/dist/jquery.min",marionette:"../../bower_components/backbone.marionette/lib/backbone.marionette.min",text:"../../bower_components/requirejs-text/text",underscore:"../../bower_components/underscore/underscore-min"},shim:{backbone:{deps:["underscore","jquery"],exports:"Backbone"},hbs:{deps:["handlebars","underscore"],templateExtension:"hbs","hbs/handlebars":"handlebars","hbs/underscore":"underscore"},marionette:{deps:["backbone"]}}}),define(function(require){"use strict";var e=require("app.256fc1b0");new e});
|
||||
1
docs/js/app/models/sound.b6ee8c6b.js
Normal file
1
docs/js/app/models/sound.b6ee8c6b.js
Normal file
@@ -0,0 +1 @@
|
||||
define("models/sound.b6ee8c6b",function(require){"use strict";var t,i=require("backbone");return t=i.Model.extend({audio:null,defaults:{title:"",character:"",episode:"",file:"",playing:!1,selected:!1},play:function(){this.audio||(this.audio=new Audio("sounds/"+this.get("file")));var t=this,i=this.audio.play();void 0!==i?i.then(function(i){t.set("playing",!0)})["catch"](function(t){}):this.set("playing",!0),this.audio.onended=this.stop.bind(this),this.audio.onpause=this.stop.bind(this)},stop:function(){this.audio&&!this.audio.paused&&(this.audio.pause(),this.audio.load()),this.set("playing",!1)},getSoundDetail:function(){return this.get("character")+", "+this.get("episode")},getSlug:function(){return this.get("file").slice(0,this.get("file").lastIndexOf("."))},toJSON:function(){var t=i.Model.prototype.toJSON.apply(this,arguments);return t.slug=this.getSlug(),t}})});
|
||||
1
docs/js/app/radios/sounds.8e99c404.js
Normal file
1
docs/js/app/radios/sounds.8e99c404.js
Normal file
@@ -0,0 +1 @@
|
||||
define("radios/sounds.8e99c404",function(require){"use strict";var n,e=require("marionette"),t=require("backbone.radio"),i=require("collections/sounds.8bb5d10e");return n=e.Object.extend({initialize:function(){this.channel=t.channel("Sounds"),this.channel.reply("getSounds",this.getSounds.bind(this))},getSounds:function(){var n=new i;return n.fetch()}})});
|
||||
6
docs/js/app/templates/filter.75617493.hbs
Normal file
6
docs/js/app/templates/filter.75617493.hbs
Normal file
@@ -0,0 +1,6 @@
|
||||
<form action="index.3b670b17.html" method="post">
|
||||
<label for="filter">Filtrer les sons</label>
|
||||
<input type="text" name="s" value="" id="filter" placeholder="Ex. : Perceval">
|
||||
<input type="reset" value="Réinitialiser" class="btn-reset invisible">
|
||||
<input type="submit" name="submit" value="Filtrer" class="btn">
|
||||
</form>
|
||||
2
docs/js/app/templates/random.5734b621.hbs
Normal file
2
docs/js/app/templates/random.5734b621.hbs
Normal file
@@ -0,0 +1,2 @@
|
||||
<button id="random" class="btn">Aléatoire</button>
|
||||
<button id="reset" class="btn" disabled>Réinitialiser</button>
|
||||
7
docs/js/app/templates/share.21a4e5a3.hbs
Normal file
7
docs/js/app/templates/share.21a4e5a3.hbs
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="share-link">
|
||||
<form action="index.3b670b17.html" method="get">
|
||||
<label for="share">Lien à partager</label>
|
||||
<textarea name="share" rows="6" cols="40">#Kaamelott Soundboard - {{title}}
|
||||
{{url}}</textarea>
|
||||
</form>
|
||||
</div>
|
||||
4
docs/js/app/templates/sound.1033ba4f.hbs
Normal file
4
docs/js/app/templates/sound.1033ba4f.hbs
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<a href="#son/{{slug}}" role="button" class="btn btn-play">{{title}}</a>
|
||||
</div>
|
||||
<a href="#son/{{slug}}" role="button" class="btn btn-share"></a>
|
||||
3
docs/js/app/templates/soundDetail.d0c66e52.hbs
Normal file
3
docs/js/app/templates/soundDetail.d0c66e52.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="tooltip">
|
||||
<p>{{detail}}</p>
|
||||
</div>
|
||||
11
docs/js/app/templates/soundboard.4dd5a243.hbs
Normal file
11
docs/js/app/templates/soundboard.4dd5a243.hbs
Normal file
@@ -0,0 +1,11 @@
|
||||
<div id="filter">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="random">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="list">
|
||||
|
||||
</div>
|
||||
1
docs/js/app/views/filter.4bb05f38.js
Normal file
1
docs/js/app/views/filter.4bb05f38.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/filter.4bb05f38",function(require){"use strict";var e,i=require("marionette"),t=require("backbone.radio"),s=require("hbs!templates/filter.75617493");return e=i.LayoutView.extend({template:s,ui:{searchForm:"form",searchField:"form input[name='s']",btnReset:".btn-reset"},events:{"submit @ui.searchForm":"filterSounds","keyup @ui.searchField":"filterSounds","click @ui.btnReset":"resetFilter"},initialize:function(){this.channel=t.channel("Sounds"),this.channel.on("sounds:reset",this.resetFilter.bind(this))},filterSounds:function(e){var i=this.$el.find(this.ui.searchField).val();e.preventDefault(),""!==i?this.$el.find(this.ui.btnReset).removeClass("invisible"):this.$el.find(this.ui.btnReset).addClass("invisible"),this.channel.trigger("sounds:filter",i)},resetFilter:function(e){e&&e.preventDefault(),this.$el.find(this.ui.searchField).val(""),this.$el.find(this.ui.searchForm).submit()},onShow:function(){this.$el.find(this.ui.searchField).focus()}})});
|
||||
1
docs/js/app/views/random.8bf4698b.js
Normal file
1
docs/js/app/views/random.8bf4698b.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/random.8bf4698b",function(require){"use strict";var t,n=require("marionette"),e=require("backbone.radio"),i=require("hbs!templates/random.5734b621");return t=n.LayoutView.extend({template:i,ui:{randomButton:"#random",resetButton:"#reset"},events:{"click @ui.randomButton":"random","click @ui.resetButton":"reset"},initialize:function(){var t=this;this.channel=e.channel("Sounds"),this.channel.on("sounds:filter",function(n){""!=n&&t.enableButton()})},random:function(){this.enableButton(),this.channel.trigger("sounds:random")},reset:function(){this.$el.find(this.ui.resetButton).attr("disabled","disabled"),this.channel.trigger("sounds:reset")},enableButton:function(){this.$el.find(this.ui.resetButton).removeAttr("disabled")}})});
|
||||
1
docs/js/app/views/share.4adddf27.js
Normal file
1
docs/js/app/views/share.4adddf27.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/share.4adddf27",function(require){"use strict";var e,t=require("marionette"),i=require("hbs!templates/share.21a4e5a3");return e=t.LayoutView.extend({template:i,templateHelpers:function(){return{title:this.model.get("title"),url:this.getAbsoluteUrl("#son/"+this.model.getSlug())}},ui:{background:"#modal-back",body:".share-link",field:"textarea"},events:{"click @ui.background":"destroy"},initialize:function(e){this.model=e.model,$(window).on("resize",this.center.bind(this))},onDestroy:function(){$(this.ui.background).remove(),$(window).off("resize",this.center.bind(this))},onBeforeShow:function(){this.$el.append($("<div/>").attr("id","modal-back"))},onShow:function(){var e=this;this.center(),window.setTimeout(function(){e.$el.find(e.ui.field).focus(function(){$(this).select()}).focus()},1e3)},center:function(){var e=this.$el.find(this.ui.body);e.css({top:Math.max(0,($(window).height()-e.outerHeight())/2+$(window).scrollTop())+"px",left:Math.max(0,($(window).width()-e.outerWidth())/2+$(window).scrollLeft())+"px"})},getAbsoluteUrl:function(e){var t=document.createElement("a");return this.getAbsoluteUrl=function(e){return t.href=e,t.href},this.getAbsoluteUrl(e)}})});
|
||||
1
docs/js/app/views/sound.ca903070.js
Normal file
1
docs/js/app/views/sound.ca903070.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/sound.ca903070",function(require){"use strict";var e,t=require("marionette"),i=require("models/sound.b6ee8c6b"),n=require("hbs!templates/sound.1033ba4f"),l=require("hbs!templates/soundDetail.d0c66e52");return e=t.ItemView.extend({template:n,model:i,tagName:"li",ui:{btn:".btn",btnPlay:".btn-play",btnShare:".btn-share"},events:{"mouseenter @ui.btnPlay":"toggleSoundDetail","mouseleave @ui.btnPlay":"toggleSoundDetail","click @ui.btnPlay":"toggleSound"},triggers:{"click @ui.btnShare":{event:"sound:share",preventDefault:!0}},initialize:function(){this.listenTo(this.model,"change:playing",this.playingAttributeChanged)},onShow:function(){var e,t=this;this.model.get("selected")&&(e=$("header").outerHeight(),$("html, body").animate({scrollTop:this.$el.offset().top-e},750,"swing",function(){t.$el.find(t.ui.btn).addClass("flash")}),/iPhone|iPad|iPod/i.test(navigator.userAgent)||this.$el.find(this.ui.btnPlay).click(),this.model.set("selected",!1))},toggleSound:function(e){e.preventDefault(),this.model.get("playing")?(this.trigger("sound:stop"),this.model.stop()):(this.trigger("sound:play"),this.model.play())},playingAttributeChanged:function(){this.model.get("playing")?$(this.ui.btnPlay).addClass("playing"):$(this.ui.btnPlay).removeClass("playing")},toggleSoundDetail:function(e){var t,i;return"mouseleave"===e.type?void $(".tooltip").remove():(t=$(this.el).offset(),i=l({detail:this.model.getSoundDetail()}),void $(i).css({left:t.left+25+"px",top:t.top+30+"px"}).appendTo("body").delay(1e3).show(0))}})});
|
||||
1
docs/js/app/views/soundboard.a52b7194.js
Normal file
1
docs/js/app/views/soundboard.a52b7194.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/soundboard.a52b7194",function(require){"use strict";var e,i=require("marionette"),s=require("views/filter.4bb05f38"),t=require("views/random.8bf4698b"),n=require("views/sounds.e61b9c22"),o=require("hbs!templates/soundboard.4dd5a243");return e=i.LayoutView.extend({template:o,regions:{regFilter:"#filter",regRandom:"#random",regList:"#list"},initialize:function(e){this.slug="undefined"!=typeof e.slug?e.slug:""},onShow:function(){this.showChildView("regFilter",new s),this.showChildView("regRandom",new t),this.showChildView("regList",new n({slug:this.slug}))}})});
|
||||
1
docs/js/app/views/sounds.e61b9c22.js
Normal file
1
docs/js/app/views/sounds.e61b9c22.js
Normal file
@@ -0,0 +1 @@
|
||||
define("views/sounds.e61b9c22",function(require){"use strict";var n,i=require("marionette"),t=require("backbone.radio"),e=require("collections/sounds.8bb5d10e"),o=require("views/sound.ca903070"),l=require("views/share.4adddf27");return n=i.CollectionView.extend({childView:o,collection:new e,tagName:"ul",childEvents:{"sound:play":"manageSounds","sound:share":"shareSoundLink"},initialize:function(n){this.slug="undefined"!=typeof n.slug?n.slug:"",this.data={collection:this.collection},this.channel=t.channel("Sounds"),this.channel.request("getSounds").then(this.initCollection.bind(this)),this.channel.on("sounds:filter",this.filterCollection.bind(this)),this.channel.on("sounds:random",this.randomSound.bind(this)),this.channel.on("sounds:reset",this.resetCollection.bind(this))},onBeforeRender:function(){var n;this.slug&&(n=this.collection.findWhere({file:this.slug+".mp3"}),n&&(n.set("selected",!0),this.slug=""))},initCollection:function(n){this.data.collection=new e(n),this.collection=this.data.collection,this.render()},filterCollection:function(n){this.collection=this.data.collection.filterByTitle(n),this.render()},filterCollectionByCid:function(n){this.collection=this.data.collection.filterByCid(n),this.render()},manageSounds:function(n){this.stopPlayingSound(),t.channel("Sounds").trigger("sound:play",n.model.getSlug())},randomSound:function(){this.stopPlayingSound(),this.filterCollection("");var n=Math.floor(Math.random()*Math.floor(this.collection.length)),i=this.collection.models[n];this.filterCollectionByCid(i.cid),t.channel("Sounds").trigger("sound:play",i.getSlug()),i.play()},resetCollection:function(){this.filterCollection(""),t.channel("Sounds").trigger("sound:stop")},stopPlayingSound:function(){var n=this.collection.findWhere({playing:!0});n&&n.stop()},shareSoundLink:function(n){var i=new l({model:n.model});t.channel("App").request("modal:show",{view:i})}})});
|
||||
Reference in New Issue
Block a user