diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c091839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc + +# Numerous always-ignore extensions +################### +*.diff +*.err +*.orig +*.log +*.rej +*.swo +*.swp +*.vi +*~ + +*.sass-cache +# Folders to ignore +################### +.hg +.svn +.CVS +# OS or Editor folders +################### +.DS_Store +Icon? +Thumbs.db +ehthumbs.db +nbproject +.cache +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +# Dreamweaver added files +################### +_notes +dwsync.xml +# Komodo +################### +*.komodoproject +.komodotools diff --git a/Assets/Framasoft-WhatsNewInFirefox35717.srt b/Assets/Framasoft-WhatsNewInFirefox35717.srt index 7efb997..69bcff2 100644 --- a/Assets/Framasoft-WhatsNewInFirefox35717.srt +++ b/Assets/Framasoft-WhatsNewInFirefox35717.srt @@ -12,7 +12,7 @@ la dernière version du navigateur de Mozilla. 4 00:00:05,980 --> 00:00:07,560 -C'est le Firefox le plus rapide +C'est le Firefox le plus rapide que vous ayez jamais utilisé. 5 @@ -49,7 +49,7 @@ rien de ce que vous rencontrez sur le Web ne sera enregistré. 13 00:00:24,780 --> 00:00:28,240 -Ni les sites visités, ni les cookies +Ni les sites visités, ni les cookies ne seront enregistrés sur votre disque dur. 14 @@ -58,12 +58,12 @@ Dès que vous quittez ce mode, 15 00:00:29,750 --> 00:00:32,500 -toutes les données sont supprimées +toutes les données sont supprimées et rien n'est conservé sur votre ordinateur. 16 00:00:32,760 --> 00:00:35,690 -Si vous avez parcouru un site +Si vous avez parcouru un site dont vous ne voulez pas garder de traces 17 @@ -88,17 +88,17 @@ puis "Oublier ce site". 23 00:00:45,810 --> 00:00:49,070 -le navigateur supprimera de votre historique +le navigateur supprimera de votre historique toute trace de votre passage sur ce site. 24 00:00:49,160 --> 00:00:51,530 -Si vous voulez effacer l'historique +Si vous voulez effacer l'historique de navigation des dernières heures 25 00:00:51,560 --> 00:00:54,450 -vous trouverez une entrée +vous trouverez une entrée "Supprimer l'historique récent" dans le menu Outils. 26 @@ -151,7 +151,7 @@ c'est aussi une mise à jour du Web. 38 00:01:16,170 --> 00:01:19,110 -Une des fonctionnalités que je trouve +Une des fonctionnalités que je trouve les plus excitantes est la prise en charge de la vidéo. 39 @@ -164,7 +164,7 @@ la lire, monter et descendre le volume 41 00:01:24,300 --> 00:01:27,040 -vous pouvez aussi faire un clic droit +vous pouvez aussi faire un clic droit et enregistrer la vidéo sur votre ordinateur 42 @@ -214,7 +214,7 @@ plus adaptés à votre situation géographique 53 00:01:52,860 --> 00:01:54,700 -ou encore faire des choses sympas +ou encore faire des choses sympas qu'on ne peut même pas encore imaginer. 54 @@ -231,7 +231,7 @@ on trouve les polices téléchargeables. 57 00:02:00,620 --> 00:02:03,500 -Les gens pourront maintenant écrire des pages +Les gens pourront maintenant écrire des pages en utilisant des polices créatives, 58 @@ -240,7 +240,7 @@ comme ils ont toujours pu le faire dans les journaux et les livres. 59 00:02:05,810 --> 00:02:08,510 -Les améliorations au niveau CSS +Les améliorations au niveau CSS leur permettront d'appliquer des styles aux pages 60 @@ -249,17 +249,17 @@ pour qu'elles soient exactement telles qu'ils les ont conçues. 61 00:02:10,870 --> 00:02:14,730 -Des améliorations d'éléments comme +Des améliorations d'éléments comme Web Workers Thread, SVG et JSON 62 00:02:14,730 --> 00:02:17,200 -signifient que vous pourrez faire +signifient que vous pourrez faire de plus en plus de choses en ligne. 63 00:02:17,260 --> 00:02:20,220 -Il est très important pour nous +Il est très important pour nous de nous assurer que Firefox vous va comme un gant. 64 @@ -276,7 +276,7 @@ Avec des extensions comme Personas 67 00:02:27,740 --> 00:02:30,230 -vous pouvez changer l'aspect de votre navigateur, +vous pouvez changer l'aspect de votre navigateur, rapidement et facilement. 68 @@ -305,7 +305,7 @@ C'était un rapide tour d'horizon de Firefox 3.5. 74 00:02:42,910 --> 00:02:46,950 -Si vous voulez en savoir plus, +Si vous voulez en savoir plus, veuillez rejoindre www.firefox.com 75 diff --git a/Assets/ProgressBar.js b/Assets/ProgressBar.js index 6cc489f..2b5fb7f 100755 --- a/Assets/ProgressBar.js +++ b/Assets/ProgressBar.js @@ -48,18 +48,18 @@ var ProgressBar = new Class({ //creates the box and percentage elements createElements: function() { - var box = new Element('div', { - id:this.options.boxID + var box = new Element('div', { + id:this.options.boxID }); - var perc = new Element('div', { - id:this.options.percentageID, - 'style':'width:0px;' + var perc = new Element('div', { + id:this.options.percentageID, + 'style':'width:0px;' }); perc.inject(box); box.inject(this.options.container); - if(this.options.displayText) { - var text = new Element('div', { - id:this.options.displayID + if(this.options.displayText) { + var text = new Element('div', { + id:this.options.displayID }); text.inject(this.options.container); } @@ -75,11 +75,11 @@ var ProgressBar = new Class({ animate: function(go) { var run = false; var self = this; - if(!self.options.allowMore && go > 100) { - go = 100; + if(!self.options.allowMore && go > 100) { + go = 100; } self.to = go.toInt(); - document.id(self.options.percentageID).set('morph', { + document.id(self.options.percentageID).set('morph', { duration: this.options.speed, link:'cancel', onComplete: function() { @@ -91,8 +91,8 @@ var ProgressBar = new Class({ }).morph({ width:self.calculate(go) }); - if(self.options.displayText) { - document.id(self.options.displayID).set('text', self.to + '%'); + if(self.options.displayText) { + document.id(self.options.displayID).set('text', self.to + '%'); } }, diff --git a/Assets/class.MavSelectBox.js b/Assets/class.MavSelectBox.js index d490b02..5714e22 100644 --- a/Assets/class.MavSelectBox.js +++ b/Assets/class.MavSelectBox.js @@ -4,7 +4,7 @@ * @version 0.5.5 * @url http://fuzecore.com, http://maveno.us * @license MIT Style License - * + * * @contributions * : Container additions for using selectbox in animations and ie scrolling bug fixes * : fixed multiselect bug, yayyy! ^_^ @@ -64,7 +64,7 @@ var MavSelectBox = new Class({ this.boundShow = this.show.bind(this); this.boundKey_option = this.key_option.bind(this); this.boundHide = this.hide.bind(this); - + var opts = ($type(_options) != 'object' ? {'elem':_options} : _options); if (!$defined(opts.elem)) return; @@ -88,7 +88,7 @@ var MavSelectBox = new Class({ this.create_select(); if (this.options.attachResize) { window.addEvent('resize', function() { if (this.showing) { this.show(); } }.bind(this)); } - + }, destroy: function(_revert) { @@ -116,10 +116,10 @@ var MavSelectBox = new Class({ // create the select element this.elementSelect = new Element('div', { - 'class': this.options.selectboxClass, + 'class': this.options.selectboxClass, 'styles': { 'width': wh.x, 'height': wh.y } }).inject(this.element, 'after'); - + // create display element for selectbox this.elementDisplay = new Element('a', {'href':'#'}).inject(this.elementSelect, 'top'); if (this.elementCopy.get('tabindex') != 0) { @@ -143,7 +143,7 @@ var MavSelectBox = new Class({ // create the fx object if useFx is set this.fx = this.options.useFx ? new Fx.Tween(this.elementOptions, $merge({ - 'duration': 150, + 'duration': 150, 'link': 'cancel' }, this.options.fxOptions)) : null; @@ -200,7 +200,7 @@ var MavSelectBox = new Class({ }).inject(($(_group) || this.elementOptions)); new_option.store('coords', new_option.getCoordinates()); - + if (_opt.get('tag') == 'optgroup') { var optgroup = new Element('ul', {'class': this.options.groupClass}).inject(new_option); $each(_opt.getChildren(), function(_sopt, _sidx) { @@ -215,17 +215,17 @@ var MavSelectBox = new Class({ this.elementOptions.lastChild.set('html', '' + text[0].trim() + '' + text[1].trim() + '
'); } }, - + filter: function(_str, _regx, _tmplt) { return _tmplt.replace(/\%s/i, _str); }, inject: function(_option, _where) { - + }, - + dispose: function(_elem) { - + }, add_events: function() { @@ -259,12 +259,12 @@ var MavSelectBox = new Class({ case 'tab': this.hide(); break; - + case 'up': case 'down': if (e.alt) { this.show(); } this.select(e.key); break; - + case 'shift': case 'control': case 'alt': break; @@ -306,7 +306,7 @@ var MavSelectBox = new Class({ var fromIdx = ((this.focused && this.focused != this.selected) ? this.focused : this.selected).retrieve('idx'); elem = elem.filter(function(_el) { - return (!$(_el).hasClass(this.options.disableClass) && + return (!$(_el).hasClass(this.options.disableClass) && ((_elem == 'up' && $(_el).retrieve('idx') < fromIdx ) || (_elem == 'down' && $(_el).retrieve('idx') > fromIdx))); }, this); @@ -331,7 +331,7 @@ var MavSelectBox = new Class({ select: function(_elem) { var elem = ($type(_elem) == 'event' ? new Event(_elem).target : _elem); elem = this.determine(elem); - + if (elem && !elem.hasClass(this.options.disableClass) && !elem.hasClass('unselectable')) { if (this.focused) { this.focused.removeClass(this.options.selectClass); } if (this.showing === true) { @@ -353,7 +353,7 @@ var MavSelectBox = new Class({ if (Browser.Engine.trident) { this.isCrolling = false; - this.hide(); + this.hide(); } } }, @@ -373,11 +373,11 @@ var MavSelectBox = new Class({ show: function(e) { e.preventDefault(); - + if(this.showing) { return this.hide(); } - + var coords = this.elementOptions.retrieve('coords'); var sElem = this.elementSelect.getCoordinates(), sElem_top = (sElem.top + sElem.height); @@ -402,7 +402,7 @@ var MavSelectBox = new Class({ } this.elementOptions.setStyles({ - 'display': '' + 'display': '' }); this.scroll(); @@ -412,7 +412,7 @@ var MavSelectBox = new Class({ this.fireEvent('show'); if (this.options.useFx) { this.fx.start(this.options.fxProperty, this.options.fxFrom, this.options.fxTo); } - + // fixes chrome/safari focus bug this.elementDisplay.focus(); }, diff --git a/Assets/init.js b/Assets/init.js index 3d4b1db..5a06fff 100644 --- a/Assets/init.js +++ b/Assets/init.js @@ -1,5 +1,5 @@ document.addEvent('domready', function() { - + // init the play / pause button new MooPlay.Control.PlayPause($('video'), $('playpause')); @@ -15,15 +15,15 @@ document.addEvent('domready', function() { $('full_volume').setStyle('width', String(volume * 100) + '%'); }); new MooPlay.Control.Mute($('video'), $('mute')); - + // use a Mootools slider to manage the play progress status var slider_progress = new Slider($('play_slider'), $('knob_slider'), {steps: 400}); new MooPlay.Control.PlayProgress($('video'), slider_progress); - + var time_tooltip = new MooPlay.Control.TimeDisplay($('video'), $('time_tooltip'), { pattern: '{h}:{m}', auto_update: false}); - + new MooPlay.Control.FullScreen($('player'), $('fullscreen')); - + $('play_slider').addEvents({ 'mousemove': function(event) { // make tooltip to appear @@ -39,14 +39,14 @@ document.addEvent('domready', function() { $('time_tooltip').setStyle('display', 'none'); } }); - + var progressbar = new ProgressBar({ container: $('load'), startPercentage: 0, step: 0, }); new MooPlay.Control.LoadProgress($('video'), progressbar); - + $('playpause').addEvent('mousemove', function() { if(!$('playpause').hasClass('paused') && !$('controls').hasClass('displayed')) { $('controls').addClass('displayed'); @@ -58,7 +58,7 @@ document.addEvent('domready', function() { $('controls').removeClass('displayed'); } }); - + var reader = new MooPlay.Subtitle.Player($('video'), $('subtitle'), { onDisplay: function(element, container, overlapping) { element.addClass('overlapping' + String(overlapping)); @@ -94,7 +94,7 @@ document.addEvent('domready', function() { }); } }); - + var mySelect = new MavSelectBox({ elem: $('subtitles_select'), selectboxClass: 'subtitles_select', @@ -117,7 +117,7 @@ document.addEvent('domready', function() { } else { reader.unLoad(); } - + }); var controls_fx = new Fx.Tween($('controls'), {property: 'opacity', link: 'ignore', duration: 300}); @@ -132,7 +132,7 @@ document.addEvent('domready', function() { $('player').setStyle('cursor', 'default'); controls_fx.start(1); } - + } function pannel_hide() { if(visible) { @@ -147,6 +147,6 @@ document.addEvent('domready', function() { 'click': pannel_show, 'mouseleave': pannel_hide }); - - + + }); \ No newline at end of file diff --git a/Assets/mooplay.0.6.js b/Assets/mooplay.0.6.js index 85f7987..3063916 100644 --- a/Assets/mooplay.0.6.js +++ b/Assets/mooplay.0.6.js @@ -11,7 +11,7 @@ authors: requires: - core/1.2.4: [Core, Element, Element.Event, Element.Style, Class, Class.Extra.Events, Class.Extra.Options] -provides: +provides: - MooPlay - MooPlay.Subtitle - MooPlay.Subtitle.Parser @@ -66,7 +66,7 @@ authors: requires: - MooPlay -provides: +provides: - MooPlay.Utils ... @@ -100,18 +100,18 @@ MooPlay.Utils = { }; }, - + readable: function(srt_time) { - + srt_time.m = String(srt_time.m).pad(2,'0'); srt_time.s = String(srt_time.s).pad(2,'0'); srt_time.ms = String(srt_time.ms).pad(3,'0'); - + return srt_time; - + } - - + + } //+ Jonas Raoni Soares Silva @@ -134,7 +134,7 @@ requires: - MooPlay - more/1.2.4: [Slider] -provides: +provides: - MooPlay.Control.PlayProgress ... @@ -143,41 +143,41 @@ provides: MooPlay.Control.PlayProgress = new Class({ Implements: [Options], - + initialize: function(video, slider, options) { - + this.setOptions(options); - + this.slider = slider; this.video = $(video); - + this.suspended = false; - + this.video.addEvents({ 'timeupdate': this.tick.bind(this), 'seeked': this.resume.bind(this) }); - + this.slider.knob.addEvents({ 'mousedown': this.suspend.bind(this), 'mouseup': this.resume.bind(this), 'click': function(event) { event.stop(); } }); - + this.slider.addEvent('change', this.change.bind(this)); }, - + suspend: function(event) { event.preventDefault(); this.suspended = true; }, - + resume: function(event) { event.preventDefault(); this.suspended = false; }, - + tick: function(event) { if(!this.suspended) { position = this.slider.toPosition( event.target.currentTime / event.target.duration * this.slider.range ); @@ -205,27 +205,27 @@ requires: - progressbar: * - more/1.2.4: [Slider] -provides: +provides: - MooPlay.Control.LoadProgress ... */ MooPlay.Control.LoadProgress = new Class({ - + options: { preload_class: 'preloading' }, - + Implements: [Options], - + initialize: function(video, progressbar, options) { - + this.setOptions(options); - + this.progressbar = progressbar; this.video = $(video); - + this.video.addEvents({ 'progress': function(e, video, data) { if(e.event.lengthComputable) { @@ -239,10 +239,10 @@ MooPlay.Control.LoadProgress = new Class({ 'loadedmetadata': this.preload.pass(false, this), 'seeked': this.preload.pass(false, this) }); - - + + }, - + preload: function(state) { if(state) { this.progressbar.options.container.addClass(this.options.preload_class); @@ -250,7 +250,7 @@ MooPlay.Control.LoadProgress = new Class({ this.progressbar.options.container.removeClass(this.options.preload_class); } }, - + tick: function(loaded, total) { this.progressbar.set(loaded / total * 100); }, @@ -278,48 +278,48 @@ provides: MooPlay.Control.BaseButton = new Class({ Implements: Options, - + options: { over_state_class: 'over', click_state_class: 'clicked' }, - - + + initialize: function(video, element, options) { - + this.setOptions(options); - + this.element = $(element); this.video = $(video); this.element.addEvents({ - + 'mouseenter': function(event) { event.preventDefault(); this.element.addClass(this.options.over_state_class); }.bind(this), - + 'mouseleave': function(event) { event.preventDefault(); this.element.removeClass(this.options.over_state_class); }.bind(this), - + 'mousedown': function(event) { event.preventDefault(); this.element.addClass(this.options.click_state_class); }.bind(this), - + 'mouseup': function(event) { event.preventDefault(); this.element.removeClass(this.options.click_state_class); }.bind(this) - + }); - + this.specificInitialize(); - + } - + }); /* @@ -334,7 +334,7 @@ authors: requires: - MooPlay.Control.BaseButton -provides: +provides: - MooPlay.Control.PlayPause ... @@ -343,41 +343,41 @@ provides: MooPlay.Control.PlayPause = new Class({ Implements: [MooPlay.Control.BaseButton], - + options: { paused_state_class: 'paused' }, - + specificInitialize: function() { - + if(this.video.paused) { this.element.addClass(this.options.paused_state_class); } this.video.addEvents({ - + 'play': function() { this.element.removeClass(this.options.paused_state_class); }.bind(this), - + 'pause': function() { this.element.addClass(this.options.paused_state_class); }.bind(this) - + }); this.element.addEvents({ - + 'click': function(event) { event.preventDefault(); this.toggleState(); }.bind(this) - + }); - + }, - + toggleState: function() { if(this.video.paused) { this.video.play(); @@ -406,28 +406,28 @@ provides: */ MooPlay.Control.FastMove = new Class({ - + Implements: MooPlay.Control.BaseButton, - + options: { speed_factor: 1 }, - + specificInitialize: function() { - + this.element.addEvents({ 'mousedown': this.beginMove.bind(this), 'mouseup': this.stopMove.bind(this), 'mouseleave': this.stopMove.bind(this) }); - + this.start_time = null; this.timer = null; this.start_pos = null; - + }, - + beginMove: function() { if(this.timer == null) { this.start_time = $time(); @@ -435,7 +435,7 @@ MooPlay.Control.FastMove = new Class({ this.timer = this.tick.bind(this).periodical(50); } }, - + stopMove: function() { if(this.timer != null) { this.start_time = null; @@ -444,17 +444,17 @@ MooPlay.Control.FastMove = new Class({ this.timer = null; } }, - + tick: function() { - + if(this.timer == null) { return; } - + var time_to_move = ($time() - this.start_time) * this.options.speed_factor; - + this.video.currentTime = this.start_pos + (time_to_move / 1000); - + } }); @@ -471,7 +471,7 @@ requires: - MooPlay -provides: +provides: - MooPlay.Control.FullScreen ... @@ -480,24 +480,24 @@ provides: MooPlay.Control.FullScreen = new Class({ Implements: [MooPlay.Control.BaseButton, Events], - + options: { active_state_class: 'active' }, - + full_screened: false, - + specificInitialize: function() { - + this.initialStyle = this.video.getStyles('position', 'top', 'left'); - + this.element.addEvents({ 'click': function(event) { event.preventDefault(); this.fireEvent(this.full_screened ? 'foldStart' : 'expandStart'); }.bind(this) }); - + this.fx = new Fx.Morph(this.video, { link: 'cancel', onComplete: function() { @@ -505,22 +505,22 @@ MooPlay.Control.FullScreen = new Class({ this.full_screened = !this.full_screened; }.bind(this) }); - + this.addEvents({ 'expandStart': this.onExpandStart.bind(this), 'expandComplete': this.onExpandComplete.bind(this), 'foldStart': this.onFoldStart.bind(this), 'foldComplete': this.onFoldComplete.bind(this) }); - + }, - + onExpandStart: function() { document.body.setStyle('overflow', 'hidden'); - + var abs_coordinates = this.video.getCoordinates(document.body); var body_scroll = document.body.getScroll(); - + this.initialCoordinates = { top: abs_coordinates.top - body_scroll.y, left: abs_coordinates.left - body_scroll.x, @@ -531,7 +531,7 @@ MooPlay.Control.FullScreen = new Class({ this.video.setStyles({ position: 'fixed', top: String(this.initialCoordinates.top) + 'px', - left: String(this.initialCoordinates.left) + 'px' + left: String(this.initialCoordinates.left) + 'px' }); var body_dimension = document.body.getCoordinates(); this.fx.start({ @@ -541,7 +541,7 @@ MooPlay.Control.FullScreen = new Class({ left: 0 }); }, - + onExpandComplete: function() { this.video.setStyles({ width: '100%', @@ -563,7 +563,7 @@ MooPlay.Control.FullScreen = new Class({ left: this.initialCoordinates.left }); }, - + onFoldComplete: function() { document.body.setStyle('overflow', 'visible'); this.video.setStyles(this.initialStyle); @@ -588,7 +588,7 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.Volume ... @@ -599,12 +599,12 @@ MooPlay.Control.Volume = new Class({ options: { auto_unmute: true }, - + Implements: [Options], - + initialize: function(video, slider, options) { this.setOptions(options); - + this.slider = slider; this.video = $(video); @@ -640,7 +640,7 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.Mute ... @@ -649,13 +649,13 @@ provides: MooPlay.Control.Mute = new Class({ Implements: [MooPlay.Control.BaseButton], - + options: { muted_state_class: 'muted' }, - + specificInitialize: function() { - + this.video.addEvents({ 'volumechange': this.update.bind(this) }); @@ -666,7 +666,7 @@ MooPlay.Control.Mute = new Class({ this.toggleState(); }.bind(this) }); - + }, update: function(event) { @@ -676,7 +676,7 @@ MooPlay.Control.Mute = new Class({ this.element.removeClass(this.options.muted_state_class); } }, - + toggleState: function() { this.video.muted = !this.video.muted; } @@ -696,29 +696,29 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.TimeDisplay ... */ MooPlay.Control.TimeDisplay = new Class({ - + Implements: [Options], - + options: { pattern: '{h}:{m}:{s},{ms}', current: true, // vs 'remaining' auto_update: true }, - + initialize: function(video, container, options) { - + this.setOptions(options); - + this.container = $(container); this.video = $(video); - + if(this.options.auto_update) { this.video.addEvent('timeupdate', function(event) { if(this.options.current) { @@ -728,15 +728,15 @@ MooPlay.Control.TimeDisplay = new Class({ } }.bind(this)); } - + }, - + update: function(abs_movie_time) { - + var new_text = this.options.pattern.substitute( MooPlay.Utils.readable(MooPlay.Utils.timestampToSexagesimal(abs_movie_time)) ); - + if(new_text != this.container.get('text')) { this.container.empty().appendText(new_text); } @@ -755,7 +755,7 @@ authors: requires: - MooPlay -provides: +provides: - MooPlay.Subtitle.Item ... @@ -763,9 +763,9 @@ provides: MooPlay.Subtitle.Item = new Class({ - + initialize: function(start, end, texts) { - + this.start = start; this.end = end; this.element = new Element('div'); @@ -774,9 +774,9 @@ MooPlay.Subtitle.Item = new Class({ new Element('p').appendText(text) ); }.bind(this)); - + }, - + }); /* --- @@ -791,7 +791,7 @@ requires: - MooPlay - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Tree ... @@ -799,20 +799,20 @@ provides: MooPlay.Subtitle.Tree = new Class({ - + nb_childs: 2, - + children: [], subs: [], - + initialize : function(start, end) { this.start = start; this.end = end; }, - + buildChildren: function() { - var child_period = Math.ceil((this.end - this.start) / this.nb_childs); + var child_period = Math.ceil((this.end - this.start) / this.nb_childs); for (var i = 0; i < this.nb_childs; i++) { this.children.push(new MooPlay.Subtitle.Tree( @@ -821,20 +821,20 @@ MooPlay.Subtitle.Tree = new Class({ )); } }, - + getChildren: function(even_empty) { if(this.children.length == 0 && even_empty) { this.buildChildren(); } return this.children; }, - + doesSubtitleFit: function(sub) { return sub.start >= this.start && sub.end <= this.end; }, - + addSub: function(sub) { - + var fit_in_one_child = false; this.getChildren(true).each(function(child) { if(child.doesSubtitleFit(sub)) { @@ -842,32 +842,32 @@ MooPlay.Subtitle.Tree = new Class({ child.addSub(sub); } }.bind(this)); - + if(this.doesSubtitleFit(sub) && !fit_in_one_child) { this.subs.push(sub); } }, - + getSubs: function(timestamp) { - + if(timestamp < this.start && timestamp >= this.end) { return []; } var subs = []; - + this.subs.each(function(sub) { if(timestamp >= sub.start && timestamp < sub.end) { subs.push(sub); } }); - + this.getChildren(false).each(function(child) { if(timestamp >= child.start && timestamp <= child.end) { subs.extend(child.getSubs(timestamp)); } }); - + return subs; } @@ -886,16 +886,16 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Loader ... */ MooPlay.Subtitle.Loader = new Class({ - + Implements: [Options], - + initialize: function(url, options) { this.url = url; this.setOptions(options); @@ -910,12 +910,12 @@ MooPlay.Subtitle.Loader = new Class({ }); request.send({}); }, - + run: function (data) { var parser = this.selectParser(); return new parser(data, {onComplete: this.options.onComplete}); }, - + selectParser: function() { var ext = this.url.split('.').pop(); switch(ext) { @@ -930,7 +930,7 @@ MooPlay.Subtitle.Loader = new Class({ break; } } - + }); /* --- @@ -946,7 +946,7 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Player ... @@ -974,10 +974,10 @@ MooPlay.Subtitle.Player = new Class({ initialize: function( video, container, options) { this.setOptions(options); - + this.video = $(video); this.container = $(container); - + if(this.options.subs_hash != null) { this.loadSubtitles(this.options.subs_hash); } @@ -990,22 +990,22 @@ MooPlay.Subtitle.Player = new Class({ this.tick(event.target.currentTime * 1000); } }.bind(this)); - + }, - + loadSubtitles: function(subs_hash) { this.unLoad(); this.subs_hash = subs_hash; }, - + unLoad: function() { this.subs_hash = null; }, - + tick: function(abs_movie_time) { var next_displayed = this.subs_hash != null ? this.subs_hash.getSubs(abs_movie_time - this.options.time_shift) : []; - + // remove subs which are not here anymore this.displayed.each(function(sub) { var displayed = []; @@ -1016,22 +1016,22 @@ MooPlay.Subtitle.Player = new Class({ } this.displayed = displayed; }.bind(this)); - + // display subs which should to next_displayed.each(function(sub) { if(!this.displayed.contains(sub)) { - + this.displayed.push(sub); this.options.onDisplay(sub.element, this.container, this.overlapping_level++); } }.bind(this)); }, - + setTimeShift: function(shift) { this.options.time_shift = parseInt(shift); } - + }); /* @@ -1048,45 +1048,45 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Parser.Base ... */ MooPlay.Subtitle.Parser.Base = new Class({ - + Implements: [Options], - + options: { onComplete: $empty }, - + initialize: function(data, options) { this.setOptions(options); this.hash( this.parse(data) ); - + this.options.onComplete(this.hash_root); - + }, - + hash: function(subs) { - + var abs_start = Infinity; var abs_end = 0; subs.each(function(sub) { abs_start = Math.min(abs_start, sub.start); abs_end = Math.max(abs_end, sub.end); }); - + this.hash_root = new MooPlay.Subtitle.Tree(abs_start, abs_end); subs.each(function(sub) { this.hash_root.addSub(sub); }.bind(this)); - + } }); @@ -1105,7 +1105,7 @@ requires: - MooPlay.Subtitle.Parser.Base - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Parser.SubRip ... @@ -1115,20 +1115,20 @@ provides: MooPlay.Subtitle.Parser.SubRip = new Class({ Implements: MooPlay.Subtitle.Parser.Base, - + regexps: { new_sub: /^(\d+)$/, time: /^(\d{2}):(\d{2}):(\d{2}),(\d{3}) --> (\d{2}):(\d{2}):(\d{2}),(\d{3})$/, text: /^(.+)$/ }, - + options: { srt_end_of_line: '\n', onComplete: $empty }, parse: function(data) { - + var subs = []; var current_sub = null; var current_text = null; @@ -1180,7 +1180,7 @@ requires: - MooPlay.Subtitle.Parser.Base - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Parser.SubViewer ... @@ -1190,19 +1190,19 @@ provides: MooPlay.Subtitle.Parser.SubViewer = new Class({ Implements: MooPlay.Subtitle.Parser.Base, - + regexps: { time: /^(\d{2}):(\d{2}):(\d{2}).(\d{3}),(\d{2}):(\d{2}):(\d{2}).(\d{3})$/, text: /^(.+)$/ }, - + options: { srt_end_of_line: '\n', onComplete: $empty }, parse: function(data) { - + var subs = []; var current_sub = null; var current_text = null; diff --git a/Assets/mootools-1.2.4-core-nc.js b/Assets/mootools-1.2.4-core-nc.js index 3161066..8720432 100644 --- a/Assets/mootools-1.2.4-core-nc.js +++ b/Assets/mootools-1.2.4-core-nc.js @@ -300,7 +300,7 @@ description: The Browser Core. Contains Browser initialize, Window and Document, license: MIT-style license. -requires: +requires: - /Native - /$util @@ -549,7 +549,7 @@ Array.implement({ for (var i = 0, j = array.length; i < j; i++) this.push(array[i]); return this; }, - + getLast: function(){ return (this.length) ? this[this.length - 1] : null; }, @@ -1137,9 +1137,9 @@ provides: [Class] */ function Class(params){ - + if (params instanceof Function) params = {initialize: params}; - + var newClass = function(){ Object.reset(this); if (newClass._prototyping) return this; @@ -1148,9 +1148,9 @@ function Class(params){ delete this._current; delete this.caller; return value; }.extend(this); - + newClass.implement(params); - + newClass.constructor = Class; newClass.prototype.constructor = newClass; @@ -1164,14 +1164,14 @@ Function.prototype.protect = function(){ }; Object.reset = function(object, key){ - + if (key == null){ for (var p in object) Object.reset(object, p); return object; } - + delete object[key]; - + switch ($type(object[key])){ case 'object': var F = function(){}; @@ -1181,9 +1181,9 @@ Object.reset = function(object, key){ break; case 'array': object[key] = $unlink(object[key]); break; } - + return object; - + }; new Native({name: 'Class', initialize: Class}).extend({ @@ -1194,10 +1194,10 @@ new Native({name: 'Class', initialize: Class}).extend({ delete F._prototyping; return proto; }, - + wrap: function(self, key, method){ if (method._origin) method = method._origin; - + return function(){ if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.'); var caller = this.caller, current = this._current; @@ -1208,56 +1208,56 @@ new Native({name: 'Class', initialize: Class}).extend({ }.extend({_owner: self, _origin: method, _name: key}); } - + }); Class.implement({ - + implement: function(key, value){ - + if ($type(key) == 'object'){ for (var p in key) this.implement(p, key[p]); return this; } - + var mutator = Class.Mutators[key]; - + if (mutator){ value = mutator.call(this, value); if (value == null) return this; } - + var proto = this.prototype; switch ($type(value)){ - + case 'function': if (value._hidden) return this; proto[key] = Class.wrap(this, key, value); break; - + case 'object': var previous = proto[key]; if ($type(previous) == 'object') $mixin(previous, value); else proto[key] = $unlink(value); break; - + case 'array': proto[key] = $unlink(value); break; - + default: proto[key] = value; } - + return this; } - + }); Class.Mutators = { - + Extends: function(parent){ this.parent = parent; @@ -1278,7 +1278,7 @@ Class.Mutators = { }, this); } - + }; @@ -1541,16 +1541,16 @@ Document.implement({ getWindow: function(){ return this.window; }, - + id: (function(){ - + var types = { string: function(id, nocash, doc){ id = doc.getElementById(id); return (id) ? types.element(id, nocash) : null; }, - + element: function(el, nocash){ $uid(el); if (!nocash && !el.$family && !(/^object|embed$/i).test(el.tagName)){ @@ -1559,16 +1559,16 @@ Document.implement({ }; return el; }, - + object: function(obj, nocash, doc){ if (obj.toElement) return types.element(obj.toElement(doc), nocash); return null; } - + }; types.textnode = types.whitespace = types.window = types.document = $arguments(0); - + return function(el, nocash, doc){ if (el && el.$family && el.uid) return el; var type = $type(el); @@ -1656,7 +1656,7 @@ var clean = function(item, retain){ } Element.dispose(item); } - } + } if (!uid) return; collected[uid] = storage[uid] = null; }; @@ -1879,7 +1879,7 @@ Element.implement({ getParents: function(match, nocash){ return walk(this, 'parentNode', null, match, true, nocash); }, - + getSiblings: function(match, nocash){ return this.getParent().getChildren(match, nocash).erase(this); }, @@ -2113,7 +2113,7 @@ description: Contains Element methods for dealing with events. This file also in license: MIT-style license. -requires: +requires: - /Element - /Event @@ -2964,7 +2964,7 @@ Selectors.Pseudo = new Hash({ checked: function(){ return this.checked; }, - + empty: function(){ return !(this.innerText || this.textContent || '').length; }, @@ -3041,11 +3041,11 @@ Selectors.Pseudo = new Hash({ odd: function(argument, local){ return Selectors.Pseudo['nth-child'].call(this, '2n', local); }, - + selected: function(){ return this.selected; }, - + enabled: function(){ return (this.disabled === false); } @@ -3086,7 +3086,7 @@ Element.Events.domready = { window.fireEvent('domready'); document.fireEvent('domready'); }; - + window.addEvent('load', domready); if (Browser.Engine.trident){ @@ -3135,7 +3135,7 @@ var JSON = new Hash(this.JSON && { stringify: JSON.stringify, parse: JSON.parse }).extend({ - + $specialChars: {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'}, $replaceChars: function(chr){ @@ -3263,7 +3263,7 @@ description: Wrapper for embedding SWF movies. Supports External Interface Commu license: MIT-style license. -credits: +credits: - Flash detection & Internet Explorer + Flash Player 9 fix inspired by SWFObject. requires: @@ -3663,7 +3663,7 @@ description: Formerly Fx.Style, effect to transition any CSS property for an ele license: MIT-style license. -requires: +requires: - /Fx.CSS provides: [Fx.Tween, Element.fade, Element.highlight] diff --git a/Assets/mootools-1.2.4.4-more.js b/Assets/mootools-1.2.4.4-more.js index 61b84dd..1246d44 100644 --- a/Assets/mootools-1.2.4.4-more.js +++ b/Assets/mootools-1.2.4.4-more.js @@ -57,7 +57,7 @@ provides: [MooTools.Lang] }, cascades: ['en-US'] }; - + var cascaded; MooTools.lang = new Events(); @@ -176,11 +176,11 @@ var disabled = function(){ }; this.Log = new Class({ - + logged: [], - + log: disabled, - + resetLog: function(){ this.logged.empty(); return this; @@ -198,7 +198,7 @@ this.Log = new Class({ this.log = disabled; return this; } - + }); Log.extend(new Log).enableLog(); @@ -236,12 +236,12 @@ provides: Depender var Depender = { options: { - /* + /* onRequire: $empty(options), onRequirementLoaded: $empty([scripts, options]), onScriptLoaded: $empty({ - script: script, - totalLoaded: percentOfTotalLoaded, + script: script, + totalLoaded: percentOfTotalLoaded, loaded: scriptsState }), serial: false, @@ -482,7 +482,7 @@ var Depender = { }, scriptsState: $H(), - + getLoadedScripts: function(){ return this.scriptsState.filter(function(state){ return state; @@ -627,7 +627,7 @@ license: MIT-style license. authors: - Aaron Newton -requires: +requires: - core/1.2.4/Class - core:1.2.4/Element - /MooTools.More @@ -664,8 +664,8 @@ license: MIT-style license. authors: - Aaron Newton -requires: -- core:1.2.4/Chain +requires: +- core:1.2.4/Chain - core:1.2.4/Element - core:1.2.4/Fx - /MooTools.More @@ -886,7 +886,7 @@ Date.implement({ diff: function(date, resolution){ if ($type(date) == 'string') date = Date.parse(date); - + return ((date - this) / Date.units[resolution || 'day'](3, 3)).toInt(); // non-leap year, 30-day month }, @@ -895,14 +895,14 @@ Date.implement({ }, getDayOfYear: function(){ - return (Date.UTC(this.get('year'), this.get('mo'), this.get('date') + 1) + return (Date.UTC(this.get('year'), this.get('mo'), this.get('date') + 1) - Date.UTC(this.get('year'), 0, 1)) / Date.units.day(); }, getWeek: function(){ return (this.get('dayofyear') / 7).ceil(); }, - + getOrdinal: function(day){ return Date.getMsg('ordinal', day || this.get('date')); }, @@ -1102,15 +1102,15 @@ Date.extend({ }, parsePatterns: parsePatterns, // this is deprecated - + defineParser: function(pattern){ parsePatterns.push((pattern.re && pattern.handler) ? pattern : build(pattern)); }, - + defineParsers: function(){ Array.flatten(arguments).each(Date.defineParser); }, - + define2DigitYearStart: function(year){ startYear = year % 100; startCentury = year - startYear; @@ -1157,10 +1157,10 @@ var currentLanguage; var recompile = function(language){ currentLanguage = language; - + keys.a = keys.A = regexOf('days'); keys.b = keys.B = regexOf('months'); - + parsePatterns.each(function(pattern, i){ if (pattern.format) parsePatterns[i] = build(pattern.format); }); @@ -1168,7 +1168,7 @@ var recompile = function(language){ var build = function(format){ if (!currentLanguage) return {format: format}; - + var parsed = []; var re = (format.source || format) // allow format to be regex .replace(/%([a-z])/gi, @@ -1276,10 +1276,10 @@ Date.implement({ if (to == null) to = new Date; var delta = ((to - this) / 1000).toInt(); if (!delta) return '0s'; - + var durations = {s: 60, m: 60, h: 24, d: 365, y: 0}; var duration, vals = []; - + for (var step in durations){ if (!delta) break; if ((duration = durations[step])){ @@ -1289,7 +1289,7 @@ Date.implement({ vals.unshift(delta + step); } } - + return vals.join(joiner || ':'); } @@ -1306,7 +1306,7 @@ Date.extend({ getTimePhrase: function(delta){ var suffix = (delta < 0) ? 'Until' : 'Ago'; if (delta < 0) delta *= -1; - + var units = { minute: 60, hour: 60, @@ -1316,9 +1316,9 @@ Date.extend({ year: 12, eon: Infinity }; - + var msg = 'lessThanMinute'; - + for (var unit in units){ var interval = units[unit]; if (delta < 1.5 * interval){ @@ -1328,7 +1328,7 @@ Date.extend({ delta /= interval; msg = unit + 's'; } - + return Date.getMsg(msg + suffix).substitute({delta: delta.round()}); } @@ -1442,7 +1442,7 @@ provides: [String.Extras] */ (function(){ - + var special = ['√Ä','√†','√Å','√°','√Ç','√¢','√É','√£','√Ñ','√§','√Ö','√•','ƒÇ','ƒÉ','ƒÑ','ƒÖ','ƒÜ','ƒá','ƒå','ƒç','√á','√ß', 'ƒé','ƒè','ƒê','ƒë', '√à','√®','√â','√©','√ä','√™','√ã','√´','ƒö','ƒõ','ƒò','ƒô', 'ƒû','ƒü','√å','√¨','√ç','√≠','√é','√Æ','√è','√Ø', 'ƒπ','ƒ∫','ƒΩ','ƒæ','≈Å','≈Ç', '√ë','√±','≈á','≈à','≈É','≈Ñ','√í','√≤','√ì','√≥','√î','√¥','√ï','√µ','√ñ','√∂','√ò','√∏','≈ë','≈ò','≈ô','≈î','≈ï','≈†','≈°','≈û','≈ü','≈ö','≈õ', '≈§','≈•','≈§','≈•','≈¢','≈£','√ô','√π','√ö','√∫','√õ','√ª','√ú','√º','≈Æ','≈Ø', '≈∏','√ø','√Ω','√ù','≈Ω','≈æ','≈π','≈∫','≈ª','≈º', '√û','√æ','√ê','√∞','√ü','≈í','≈ì','√Ü','√¶','¬µ']; var standard = ['A','a','A','a','A','a','A','a','Ae','ae','A','a','A','a','A','a','C','c','C','c','C','c','D','d','D','d', 'E','e','E','e','E','e','E','e','E','e','E','e','G','g','I','i','I','i','I','i','I','i','L','l','L','l','L','l', 'N','n','N','n','N','n', 'O','o','O','o','O','o','O','o','Oe','oe','O','o','o', 'R','r','R','r', 'S','s','S','s','S','s','T','t','T','t','T','t', 'U','u','U','u','U','u','Ue','ue','U','u','Y','y','Y','y','Z','z','Z','z','Z','z','TH','th','DH','dh','ss','OE','oe','AE','ae','u']; @@ -1600,7 +1600,7 @@ var URI = new Class({ this.setOptions(options); var base = this.options.base || URI.base; if(!uri) uri = base; - + if (uri && uri.parsed) this.parsed = $unlink(uri.parsed); else this.set('value', uri.href || uri.toString(), base ? new URI(base) : false); }, @@ -1967,7 +1967,7 @@ provides: [Element.Delegation] */ (function(addEvent, removeEvent){ - + var match = /(.*?):relay\(([^)]+)\)$/, combinators = /[+>~\s]/, splitType = function(type){ @@ -2077,7 +2077,7 @@ Element.implement({ if (vis(this)) return fn.apply(this); var parent = this.getParent(), restorers = [], - toMeasure = []; + toMeasure = []; while (!vis(parent) && parent != document.body) { toMeasure.push(parent.expose()); parent = parent.getParent(); @@ -2232,7 +2232,7 @@ provides: [Element.Pin] pin: function(enable){ if (this.getStyle('display') == 'none') return null; - + var p, scroll = window.getScroll(); if (enable !== false){ @@ -2350,7 +2350,7 @@ Element.implement({ allowNegative: false }, options); //compute the offset of the parent positioned element if this element is in one - var parentOffset = {x: 0, y: 0}, + var parentOffset = {x: 0, y: 0}, parentPositioned = false; /* dollar around getOffsetParent should not be necessary, but as it does not return * a mootools extended element in IE, an error occurs on the call to expose. See: @@ -2470,13 +2470,13 @@ Element.implement({ } if (options.ignoreMargins) { pos.left += ( - options.edge.x == 'right' ? dim['margin-right'] : - options.edge.x == 'center' ? -dim['margin-left'] + ((dim['margin-right'] + dim['margin-left'])/2) : + options.edge.x == 'right' ? dim['margin-right'] : + options.edge.x == 'center' ? -dim['margin-left'] + ((dim['margin-right'] + dim['margin-left'])/2) : - dim['margin-left'] ); pos.top += ( - options.edge.y == 'bottom' ? dim['margin-bottom'] : - options.edge.y == 'center' ? -dim['margin-top'] + ((dim['margin-bottom'] + dim['margin-top'])/2) : + options.edge.y == 'bottom' ? dim['margin-bottom'] : + options.edge.y == 'center' ? -dim['margin-top'] + ((dim['margin-bottom'] + dim['margin-top'])/2) : - dim['margin-top'] ); } @@ -2643,7 +2643,7 @@ if (!window.Form) window.Form = {}; attach: function(attach){ attach = $pick(attach, true); method = attach ? 'addEvent' : 'removeEvent'; - + var fv = this.element.retrieve('validator'); if (fv) fv[method]('onFormValidate', this.onFormValidate); if (!fv || !attach) this.element[method]('submit', this.onSubmit); @@ -3886,7 +3886,7 @@ $extend(OverText, { return null; //the input or the text was destroyed }); }, - + update: function(){ return OverText.each(function(ot){ @@ -4248,7 +4248,7 @@ Fx.Reveal = new Class({ Extends: Fx.Morph, - options: {/* + options: {/* onShow: $empty(thisElement), onHide: $empty(thisElement), onComplete: $empty(thisElement), @@ -4531,7 +4531,7 @@ Fx.Scroll = new Class({ start: function(x, y){ if (!this.check(x, y)) return this; var scrollSize = this.element.getScrollSize(), - scroll = this.element.getScroll(), + scroll = this.element.getScroll(), values = {x: x, y: y}; for (var z in values){ var max = scrollSize[z]; @@ -4983,7 +4983,7 @@ Fx.Sort = new Class({ swap: function(one, two){ if ($type(one) == 'element') one = this.elements.indexOf(one); if ($type(two) == 'element') two = this.elements.indexOf(two); - + var newOrder = $A(this.currentOrder); newOrder[this.currentOrder.indexOf(one)] = two; newOrder[this.currentOrder.indexOf(two)] = one; @@ -5209,17 +5209,17 @@ Drag.Move = new Class({ initialize: function(element, options){ this.parent(element, options); element = this.element; - + this.droppables = $$(this.options.droppables); this.container = document.id(this.options.container); - + if (this.container && $type(this.container) != 'element') this.container = document.id(this.container.getDocument().body); - + var styles = element.getStyles('left', 'top', 'position'); if (styles.left == 'auto' || styles.top == 'auto') element.setPosition(element.getPosition(element.getOffsetParent())); - + if (styles.position == 'static') element.setStyle('position', 'absolute'); @@ -5230,16 +5230,16 @@ Drag.Move = new Class({ start: function(event){ if (this.container) this.options.limit = this.calculateLimit(); - + if (this.options.precalculate){ this.positions = this.droppables.map(function(el){ return el.getCoordinates(); }); } - + this.parent(event); }, - + calculateLimit: function(){ var offsetParent = this.element.getOffsetParent(), containerCoordinates = this.container.getCoordinates(offsetParent), @@ -5271,17 +5271,17 @@ Drag.Move = new Class({ right += elementMargin.right; bottom += elementMargin.bottom; } - + if (this.element.getStyle('position') == 'relative'){ var coords = this.element.getCoordinates(offsetParent); coords.left -= this.element.getStyle('left').toInt(); coords.top -= this.element.getStyle('top').toInt(); - + left += containerBorder.left - coords.left; top += containerBorder.top - coords.top; right += elementMargin.left - coords.left; bottom += elementMargin.top - coords.top; - + if (this.container != offsetParent){ left += containerMargin.left + offsetParentPadding.left; top += (Browser.Engine.trident4 ? 0 : containerMargin.top) + offsetParentPadding.top; @@ -5289,7 +5289,7 @@ Drag.Move = new Class({ } else { left -= elementMargin.left; top -= elementMargin.top; - + if (this.container == offsetParent){ right -= containerBorder.left; bottom -= containerBorder.top; @@ -5298,7 +5298,7 @@ Drag.Move = new Class({ top += containerCoordinates.top + containerBorder.top; } } - + return { x: [left, right], y: [top, bottom] @@ -5409,12 +5409,12 @@ var Slider = new Class({ this.property = 'left'; offset = 'offsetWidth'; } - - this.full = this.element.measure(function(){ - this.half = this.knob[offset] / 2; - return this.element[offset] - this.knob[offset] + (this.options.offset * 2); + + this.full = this.element.measure(function(){ + this.half = this.knob[offset] / 2; + return this.element[offset] - this.knob[offset] + (this.options.offset * 2); }.bind(this)); - + this.min = $chk(this.options.range[0]) ? this.options.range[0] : 0; this.max = $chk(this.options.range[1]) ? this.options.range[1] : this.options.steps; this.range = this.max - this.min; @@ -5489,7 +5489,7 @@ var Slider = new Class({ this.checkStep(); this.fireEvent('tick', position); this.end(); - + this.knob.fireEvent('mousedown', event); }, @@ -5611,7 +5611,7 @@ var Sortables = new Class({ this.elements.erase(element); var start = element.retrieve('sortables:start'); (this.options.handle ? element.getElement(this.options.handle) || element : element).removeEvent('mousedown', start); - + return element; }, this)); }, @@ -5620,7 +5620,7 @@ var Sortables = new Class({ return $$(Array.flatten(arguments).map(function(list){ this.lists.erase(list); this.removeItems(list.getChildren()); - + return list; }, this)); }, @@ -5640,7 +5640,7 @@ var Sortables = new Class({ input.set('name', 'clone_' + i); }); } - + return clone.inject(this.list).setPosition(element.getPosition(element.getOffsetParent())); }, @@ -5794,8 +5794,8 @@ Request.JSONP = new Class({ send: function(options){ if (!$chk(arguments[1]) && !this.check(options)) return this; - var type = $type(options), - old = this.options, + var type = $type(options), + old = this.options, index = $chk(arguments[1]) ? arguments[1] : this.requests++; if (type == 'string' || type == 'element') options = {data: options}; @@ -5843,10 +5843,10 @@ Request.JSONP = new Class({ case 'object': case 'hash': data = Hash.toQueryString(options.data); } - var src = options.url + - (options.url.test('\\?') ? '&' :'?') + - (options.callbackKey || this.options.callbackKey) + - '=Request.JSONP.request_map.request_'+ index + + var src = options.url + + (options.url.test('\\?') ? '&' :'?') + + (options.callbackKey || this.options.callbackKey) + + '=Request.JSONP.request_map.request_'+ index + (data ? '&' + data : ''); if (src.length > 2083) this.log('JSONP '+ src +' will fail in Internet Explorer, which enforces a 2083 bytes length limit on URIs'); @@ -5913,13 +5913,13 @@ Request.Queue = new Class({ initialize: function(options){ if(options){ var requests = options.requests; - delete options.requests; + delete options.requests; } this.setOptions(options); this.requests = new Hash; this.queue = []; this.reqBinders = {}; - + if(requests) this.addRequests(requests); }, @@ -6154,13 +6154,13 @@ var Asset = { document: document, check: $lambda(true) }, properties); - + if (properties.onLoad) properties.onload = properties.onLoad; - + var script = new Element('script', {src: source, type: 'text/javascript'}); - var load = properties.onload.bind(script), - check = properties.check, + var load = properties.onload.bind(script), + check = properties.check, doc = properties.document; delete properties.onload; delete properties.check; @@ -6610,8 +6610,8 @@ var IframeShim = new Class({ position: function(){ if (!IframeShim.ready || !this.shim) return this; - var size = this.element.measure(function(){ - return this.getSize(); + var size = this.element.measure(function(){ + return this.getSize(); }); if (this.options.margin != undefined){ size.x = size.x - (this.options.margin * 2); @@ -6888,10 +6888,10 @@ HtmlTable = Class.refactor(HtmlTable, { this.previous.apply(this, arguments); if (this.sortEnabled) this.detectParsers(); }, - + detectParsers: function(force){ if (!this.head) return; - var parsers = this.options.parsers, + var parsers = this.options.parsers, rows = this.body.rows; // auto-detect @@ -6903,10 +6903,10 @@ HtmlTable = Class.refactor(HtmlTable, { }); thDiv.inject(cell); var sortSpan = new Element('span', {'html': ' ', 'class': this.options.classSortSpan}).inject(thDiv, 'top'); - + this.sortSpans.push(sortSpan); - var parser = parsers[index], + var parser = parsers[index], cancel; switch ($type(parser)) { case 'function': parser = {convert: parser}; cancel = true; break; @@ -6943,7 +6943,7 @@ HtmlTable = Class.refactor(HtmlTable, { if (!this.head) return; pre = !!(pre); var classCellSort = this.options.classCellSort; - var classGroup = this.options.classGroup, + var classGroup = this.options.classGroup, classGroupHead = this.options.classGroupHead; if (!pre) { @@ -7330,7 +7330,7 @@ provides: [Keyboard] */ (function(){ - + var Keyboard = this.Keyboard = new Class({ Extends: Events, @@ -7351,7 +7351,7 @@ provides: [Keyboard] initialize: function(options){ this.setOptions(options); this.setup(); - }, + }, setup: function(){ this.addEvents(this.options.events); //if this is the root manager, nothing manages it @@ -7362,14 +7362,14 @@ provides: [Keyboard] handle: function(event, type){ //Keyboard.stop(event) prevents key propagation if (event.preventKeyboardPropagation) return; - + var bubbles = !!this.manager; if (bubbles && this.activeKB){ this.activeKB.handle(event, type); if (event.preventKeyboardPropagation) return; } this.fireEvent(type, event); - + if (!bubbles && this.activeKB) this.activeKB.handle(event, type); }, @@ -7446,14 +7446,14 @@ provides: [Keyboard] } }); - + var parsed = {}; var modifiers = ['shift', 'control', 'alt', 'meta']; var regex = /^(?:shift|control|ctrl|alt|meta)$/; - + Keyboard.parse = function(type, eventType, ignore){ if (ignore && ignore.contains(type.toLowerCase())) return type; - + type = type.toLowerCase().replace(/^(keyup|keydown):/, function($0, $1){ eventType = $1; return ''; @@ -7467,12 +7467,12 @@ provides: [Keyboard] }); mods.control = mods.control || mods.ctrl; // allow both control and ctrl - + var keys = []; modifiers.each(function(mod){ if (mods[mod]) keys.push(mod); }); - + if (key) keys.push(key); parsed[type] = keys.join('+'); } @@ -7495,7 +7495,7 @@ provides: [Keyboard] Keyboard.manager = new Keyboard({ active: true }); - + Keyboard.trace = function(keyboard){ keyboard = keyboard || Keyboard.manager; keyboard.enableLog(); @@ -7504,17 +7504,17 @@ provides: [Keyboard] keyboard.log(document.id(current.widget) || current.wiget || current); }); }; - + var handler = function(event){ var keys = []; modifiers.each(function(mod){ if (event[mod]) keys.push(mod); }); - + if (!regex.test(event.key)) keys.push(event.key); Keyboard.manager.handle(event, event.type + ':' + keys.join('+')); }; - + document.addEvents({ 'keyup': handler, 'keydown': handler @@ -7604,7 +7604,7 @@ var Mask = new Class({ this.render(); this.inject(); }, - + render: function() { this.element = new Element('div', { 'class': this.options['class'], @@ -7822,10 +7822,10 @@ var Scroller = new Class({ }, scroll: function(){ - var size = this.element.getSize(), - scroll = this.element.getScroll(), - pos = this.element != this.docBody ? this.element.getOffsets() : {x: 0, y:0}, - scrollSize = this.element.getScrollSize(), + var size = this.element.getSize(), + scroll = this.element.getScroll(), + pos = this.element != this.docBody ? this.element.getOffsets() : {x: 0, y:0}, + scrollSize = this.element.getScrollSize(), change = {x: 0, y: 0}; for (var z in this.page){ if (this.page[z] < (this.options.area + pos[z]) && scroll[z] != 0) { @@ -7926,22 +7926,22 @@ this.Tips = new Class({ $$(elements).each(function(element){ var title = read(this.options.title, element), text = read(this.options.text, element); - + element.erase('title').store('tip:native', title).retrieve('tip:title', title); element.retrieve('tip:text', text); this.fireEvent('attach', [element]); - + var events = ['enter', 'leave']; if (!this.options.fixed) events.push('move'); - + events.each(function(value){ var event = element.retrieve('tip:' + value); if (!event) event = this['element' + value.capitalize()].bindWithEvent(this, element); - + element.store('tip:' + value, event).addEvent('mouse' + value, event); }, this); }, this); - + return this; }, @@ -7950,26 +7950,26 @@ this.Tips = new Class({ ['enter', 'leave', 'move'].each(function(value){ element.removeEvent('mouse' + value, element.retrieve('tip:' + value)).eliminate('tip:' + value); }); - + this.fireEvent('detach', [element]); - + if (this.options.title == 'title'){ // This is necessary to check if we can revert the title var original = element.retrieve('tip:native'); if (original) element.set('title', original); } }, this); - + return this; }, elementEnter: function(event, element){ this.container.empty(); - + ['title', 'text'].each(function(value){ var content = element.retrieve('tip:' + value); if (content) this.fill(new Element('div', {'class': 'tip-' + value}).inject(this.container), content); }, this); - + $clear(this.timer); this.timer = (function(){ this.show(this, element); @@ -8001,12 +8001,12 @@ this.Tips = new Class({ tip = {x: this.tip.offsetWidth, y: this.tip.offsetHeight}, props = {x: 'left', y: 'top'}, obj = {}; - + for (var z in props){ obj[props[z]] = event.page[z] + this.options.offset[z]; if ((obj[props[z]] + tip[z] - scroll[z]) > size[z] - this.options.windowPadding[z]) obj[props[z]] = event.page[z] - this.options.offset[z] - tip[z]; } - + this.tip.setStyles(obj); }, @@ -8164,13 +8164,13 @@ Spinner.implement(new Chain); if (window.Request) { Request = Class.refactor(Request, { - + options: { useSpinner: false, spinnerOptions: {}, spinnerTarget: false }, - + initialize: function(options){ this._send = this.send; this.send = function(options){ @@ -8187,11 +8187,11 @@ if (window.Request) { }, this); } }, - + getSpinner: function(){ return this.spinner; } - + }); } @@ -8492,7 +8492,7 @@ provides: [Date.Danish] ... */ - + MooTools.lang.set('da-DK', 'Date', { months: ['Januar', 'Februa', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December'], @@ -8611,7 +8611,7 @@ MooTools.lang.set('nl-NL', 'Date', { monthUntil: 'over een maand', monthsUntil: 'over {delta} maanden', yearUntil: 'over een jaar', - yearsUntil: 'over {delta} jaar' + yearsUntil: 'over {delta} jaar' }); @@ -8639,7 +8639,7 @@ provides: [Date.English.GB] MooTools.lang.set('en-GB', 'Date', { dateOrder: ['date', 'month', 'year'], - + shortDate: '%d/%m/%Y', shortTime: '%H:%M' @@ -8732,7 +8732,7 @@ provides: [Date.French] ... */ - + MooTools.lang.set('fr-FR', 'Date', { months: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], @@ -8801,9 +8801,9 @@ provides: [Date.Italian] ... */ - + MooTools.lang.set('it-IT', 'Date', { - + months: ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'], days: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'], //culture's date order: DD/MM/YYYY @@ -9643,7 +9643,7 @@ description: Date messages for German. license: MIT-style license -authors: +authors: - Frank Rossi - Ulrich Petri - Fabian Beiner @@ -9700,9 +9700,9 @@ MooTools.lang.set('de-DE', 'Form.Validator', { script: Form.Validator.German.CH.js description: Date messages for German (Switzerland). - + license: MIT-style license - + authors: - Michael van der Weg @@ -9714,9 +9714,9 @@ provides: [Form.Validator.German.CH] ... */ - + MooTools.lang.set('de-CH', 'Form.Validator', { - + required:'Dieses Feld ist obligatorisch.', minLength:'Geben Sie bitte mindestens {minLength} Zeichen ein (Sie haben {length} Zeichen eingegeben).', maxLength:'Bitte geben Sie nicht mehr als {maxLength} Zeichen ein (Sie haben {length} Zeichen eingegeben).', @@ -9733,9 +9733,9 @@ MooTools.lang.set('de-CH', 'Form.Validator', { oneRequired:'Machen Sie für mindestens eines der Eingabefelder einen Eintrag.', errorPrefix: 'Fehler: ', warningPrefix: 'Warnung: ', - + //Form.Validator.Extras - + noSpace: 'In diesem Eingabefeld darf kein Leerzeichen sein.', reqChkByNode: 'Es wurden keine Elemente gewählt.', requiredChk: 'Dieses Feld ist obligatorisch.', @@ -9748,7 +9748,7 @@ MooTools.lang.set('de-CH', 'Form.Validator', { beforeDate: 'Das Datum sollte zur gleichen Zeit oder früher sein {label}.', startMonth: 'Wählen Sie bitte einen Anfangsmonat', sameMonth: 'Diese zwei Datumsangaben müssen im selben Monat sein - Sie müssen eine von beiden verändern.' - + }); /* @@ -9760,7 +9760,7 @@ description: Form.Validator messages in French. license: MIT-style license -authors: +authors: - Miquel Hudin - Nicolas Sorosac sorosac gmail com> @@ -9772,7 +9772,7 @@ provides: [Form.Validator.French] ... */ - + MooTools.lang.set('fr-FR', 'Form.Validator', { required:'Ce champ est obligatoire.', minLength:'Veuillez saisir un minimum de {minLength} caractère(s) (vous avez saisi {length} caractère(s)).', @@ -9790,9 +9790,9 @@ MooTools.lang.set('fr-FR', 'Form.Validator', { oneRequired:'Veuillez sélectionner au moins une de ces options.', errorPrefix: 'Erreur : ', warningPrefix: 'Attention : ', - + //Form.Validator.Extras - + noSpace: 'Ce champ n\'accepte pas les espaces.', reqChkByNode: 'Aucun élément n\'est sélectionné.', requiredChk: 'Ce champ est obligatoire.', @@ -9805,7 +9805,7 @@ MooTools.lang.set('fr-FR', 'Form.Validator', { beforeDate: 'La date doit être identique ou antérieure à {label}.', startMonth: 'Veuillez sélectionner un mois de début.', sameMonth: 'Ces deux dates doivent être dans le même mois - vous devez en modifier une.' - + }); /* @@ -9829,7 +9829,7 @@ provides: [Form.Validator.Italian] ... */ - + MooTools.lang.set('it-IT', 'Form.Validator', { required:'Il campo è obbligatorio.', diff --git a/Demo/demo.css b/Demo/demo.css index 5c792f4..5053564 100644 --- a/Demo/demo.css +++ b/Demo/demo.css @@ -26,7 +26,7 @@ div.subtitles_select {width: 105px; height:22px; margin: 18px 0 19px 0; float: left; } div.subtitles_select a { position:relative; z-index:8; display: block; background: url(img/fond_soustitres.png); width: 90px; height: 20px; padding: 2px 15px 0 0; text-align:center; text-decoration: none; color: #c3e1e6; font-size: 14px; outline:none } div.subtitles_select ul.options { position:relative;z-index:7;list-style: none; background: url(img/fond_soustitreDeplie.png) repeat-y; overflow-y: hidden; width:51px; margin: -8px -1px 0 0; padding: 6px 0 0 0 ; float:right; height:0px; } -div.subtitles_select ul.options li {background-repeat: no-repeat; background-position: 2px center ; width: 43px; margin: 1px 5px 1px 3px; padding: 2px 0 ; font-size: 13px; text-align:center; color: gray;} +div.subtitles_select ul.options li {background-repeat: no-repeat; background-position: 2px center ; width: 43px; margin: 1px 5px 1px 3px; padding: 2px 0 ; font-size: 13px; text-align:center; color: gray;} div.subtitles_select ul.options li.selected { background-color: #3d3d3d; color: #c3e1e6; } div.subtitles_select ul.options li.none { background-image:url(img/drapeau_no.png);} div.subtitles_select ul.options li.fr { background-image:url(img/drapeau_fr.png);} @@ -66,7 +66,7 @@ div.subtitles_select ul.options li span { margin: 0 0 0 18px; white-space: nowra #player #controls .pannel #line2 div#progresses_bar div#play_slider div#knob_slider { width:7px;height:16px;background: url(img/cursor.png);margin-top:-5px;} - + .clear {clear: both;} diff --git a/Demo/index.html b/Demo/index.html index b922713..a48bc7e 100644 --- a/Demo/index.html +++ b/Demo/index.html @@ -10,17 +10,17 @@ - + - + - + @@ -37,11 +37,11 @@
- +
- +
@@ -55,27 +55,27 @@ - + - +
- +
- + - +
0:00:00
- +
@@ -88,11 +88,11 @@ - 0:00:00
- +
- +
@@ -107,14 +107,14 @@
- +
- + - - + + - +

diff --git a/Source/Control/BaseButton.js b/Source/Control/BaseButton.js index 884071a..b1c8a36 100644 --- a/Source/Control/BaseButton.js +++ b/Source/Control/BaseButton.js @@ -19,47 +19,47 @@ provides: MooPlay.Control.BaseButton = new Class({ Implements: Options, - + options: { over_state_class: 'over', click_state_class: 'clicked' }, - - + + initialize: function(video, element, options) { - + this.setOptions(options); - + this.element = $(element); this.video = $(video); this.element.addEvents({ - + 'mouseenter': function(event) { event.preventDefault(); this.element.addClass(this.options.over_state_class); }.bind(this), - + 'mouseleave': function(event) { event.preventDefault(); this.element.removeClass(this.options.over_state_class); }.bind(this), - + 'mousedown': function(event) { event.preventDefault(); this.element.addClass(this.options.click_state_class); }.bind(this), - + 'mouseup': function(event) { event.preventDefault(); this.element.removeClass(this.options.click_state_class); }.bind(this) - + }); - + this.specificInitialize(); - + } - + }); diff --git a/Source/Control/FastMove.js b/Source/Control/FastMove.js index 2282211..45de62d 100644 --- a/Source/Control/FastMove.js +++ b/Source/Control/FastMove.js @@ -17,28 +17,28 @@ provides: */ MooPlay.Control.FastMove = new Class({ - + Implements: MooPlay.Control.BaseButton, - + options: { speed_factor: 1 }, - + specificInitialize: function() { - + this.element.addEvents({ 'mousedown': this.beginMove.bind(this), 'mouseup': this.stopMove.bind(this), 'mouseleave': this.stopMove.bind(this) }); - + this.start_time = null; this.timer = null; this.start_pos = null; - + }, - + beginMove: function() { if(this.timer == null) { this.start_time = $time(); @@ -46,7 +46,7 @@ MooPlay.Control.FastMove = new Class({ this.timer = this.tick.bind(this).periodical(50); } }, - + stopMove: function() { if(this.timer != null) { this.start_time = null; @@ -55,17 +55,17 @@ MooPlay.Control.FastMove = new Class({ this.timer = null; } }, - + tick: function() { - + if(this.timer == null) { return; } - + var time_to_move = ($time() - this.start_time) * this.options.speed_factor; - + this.video.currentTime = this.start_pos + (time_to_move / 1000); - + } }); diff --git a/Source/Control/FullScreen.js b/Source/Control/FullScreen.js index 17127fd..76bbbf8 100644 --- a/Source/Control/FullScreen.js +++ b/Source/Control/FullScreen.js @@ -11,7 +11,7 @@ requires: - MooPlay -provides: +provides: - MooPlay.Control.FullScreen ... @@ -20,24 +20,24 @@ provides: MooPlay.Control.FullScreen = new Class({ Implements: [MooPlay.Control.BaseButton, Events], - + options: { active_state_class: 'active' }, - + full_screened: false, - + specificInitialize: function() { - + this.initialStyle = this.video.getStyles('position', 'top', 'left'); - + this.element.addEvents({ 'click': function(event) { event.preventDefault(); this.fireEvent(this.full_screened ? 'foldStart' : 'expandStart'); }.bind(this) }); - + this.fx = new Fx.Morph(this.video, { link: 'cancel', onComplete: function() { @@ -45,22 +45,22 @@ MooPlay.Control.FullScreen = new Class({ this.full_screened = !this.full_screened; }.bind(this) }); - + this.addEvents({ 'expandStart': this.onExpandStart.bind(this), 'expandComplete': this.onExpandComplete.bind(this), 'foldStart': this.onFoldStart.bind(this), 'foldComplete': this.onFoldComplete.bind(this) }); - + }, - + onExpandStart: function() { document.body.setStyle('overflow', 'hidden'); - + var abs_coordinates = this.video.getCoordinates(document.body); var body_scroll = document.body.getScroll(); - + this.initialCoordinates = { top: abs_coordinates.top - body_scroll.y, left: abs_coordinates.left - body_scroll.x, @@ -71,7 +71,7 @@ MooPlay.Control.FullScreen = new Class({ this.video.setStyles({ position: 'fixed', top: String(this.initialCoordinates.top) + 'px', - left: String(this.initialCoordinates.left) + 'px' + left: String(this.initialCoordinates.left) + 'px' }); var body_dimension = document.body.getCoordinates(); this.fx.start({ @@ -81,7 +81,7 @@ MooPlay.Control.FullScreen = new Class({ left: 0 }); }, - + onExpandComplete: function() { this.video.setStyles({ width: '100%', @@ -103,7 +103,7 @@ MooPlay.Control.FullScreen = new Class({ left: this.initialCoordinates.left }); }, - + onFoldComplete: function() { document.body.setStyle('overflow', 'visible'); this.video.setStyles(this.initialStyle); diff --git a/Source/Control/LoadProgress.js b/Source/Control/LoadProgress.js index cf5a7d3..b8d2db9 100644 --- a/Source/Control/LoadProgress.js +++ b/Source/Control/LoadProgress.js @@ -12,27 +12,27 @@ requires: - progressbar: * - more/1.2.4: [Slider] -provides: +provides: - MooPlay.Control.LoadProgress ... */ MooPlay.Control.LoadProgress = new Class({ - + options: { preload_class: 'preloading' }, - + Implements: [Options], - + initialize: function(video, progressbar, options) { - + this.setOptions(options); - + this.progressbar = progressbar; this.video = $(video); - + this.video.addEvents({ 'progress': function(e, video, data) { if(e.event.lengthComputable) { @@ -46,10 +46,10 @@ MooPlay.Control.LoadProgress = new Class({ 'loadedmetadata': this.preload.pass(false, this), 'seeked': this.preload.pass(false, this) }); - - + + }, - + preload: function(state) { if(state) { this.progressbar.options.container.addClass(this.options.preload_class); @@ -57,7 +57,7 @@ MooPlay.Control.LoadProgress = new Class({ this.progressbar.options.container.removeClass(this.options.preload_class); } }, - + tick: function(loaded, total) { this.progressbar.set(loaded / total * 100); }, diff --git a/Source/Control/Mute.js b/Source/Control/Mute.js index 24787be..5501cd0 100644 --- a/Source/Control/Mute.js +++ b/Source/Control/Mute.js @@ -12,7 +12,7 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.Mute ... @@ -21,13 +21,13 @@ provides: MooPlay.Control.Mute = new Class({ Implements: [MooPlay.Control.BaseButton], - + options: { muted_state_class: 'muted' }, - + specificInitialize: function() { - + this.video.addEvents({ 'volumechange': this.update.bind(this) }); @@ -38,7 +38,7 @@ MooPlay.Control.Mute = new Class({ this.toggleState(); }.bind(this) }); - + }, update: function(event) { @@ -48,7 +48,7 @@ MooPlay.Control.Mute = new Class({ this.element.removeClass(this.options.muted_state_class); } }, - + toggleState: function() { this.video.muted = !this.video.muted; } diff --git a/Source/Control/PlayPause.js b/Source/Control/PlayPause.js index 1f35617..e974207 100644 --- a/Source/Control/PlayPause.js +++ b/Source/Control/PlayPause.js @@ -10,7 +10,7 @@ authors: requires: - MooPlay.Control.BaseButton -provides: +provides: - MooPlay.Control.PlayPause ... @@ -19,41 +19,41 @@ provides: MooPlay.Control.PlayPause = new Class({ Implements: [MooPlay.Control.BaseButton], - + options: { paused_state_class: 'paused' }, - + specificInitialize: function() { - + if(this.video.paused) { this.element.addClass(this.options.paused_state_class); } this.video.addEvents({ - + 'play': function() { this.element.removeClass(this.options.paused_state_class); }.bind(this), - + 'pause': function() { this.element.addClass(this.options.paused_state_class); }.bind(this) - + }); this.element.addEvents({ - + 'click': function(event) { event.preventDefault(); this.toggleState(); }.bind(this) - + }); - + }, - + toggleState: function() { if(this.video.paused) { this.video.play(); diff --git a/Source/Control/PlayProgress.js b/Source/Control/PlayProgress.js index dfe608e..266f3e9 100644 --- a/Source/Control/PlayProgress.js +++ b/Source/Control/PlayProgress.js @@ -11,7 +11,7 @@ requires: - MooPlay - more/1.2.4: [Slider] -provides: +provides: - MooPlay.Control.PlayProgress ... @@ -20,41 +20,41 @@ provides: MooPlay.Control.PlayProgress = new Class({ Implements: [Options], - + initialize: function(video, slider, options) { - + this.setOptions(options); - + this.slider = slider; this.video = $(video); - + this.suspended = false; - + this.video.addEvents({ 'timeupdate': this.tick.bind(this), 'seeked': this.resume.bind(this) }); - + this.slider.knob.addEvents({ 'mousedown': this.suspend.bind(this), 'mouseup': this.resume.bind(this), 'click': function(event) { event.stop(); } }); - + this.slider.addEvent('change', this.change.bind(this)); }, - + suspend: function(event) { event.preventDefault(); this.suspended = true; }, - + resume: function(event) { event.preventDefault(); this.suspended = false; }, - + tick: function(event) { if(!this.suspended) { position = this.slider.toPosition( event.target.currentTime / event.target.duration * this.slider.range ); diff --git a/Source/Control/TimeDisplay.js b/Source/Control/TimeDisplay.js index 3a76e69..723a1bd 100644 --- a/Source/Control/TimeDisplay.js +++ b/Source/Control/TimeDisplay.js @@ -12,29 +12,29 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.TimeDisplay ... */ MooPlay.Control.TimeDisplay = new Class({ - + Implements: [Options], - + options: { pattern: '{h}:{m}:{s},{ms}', current: true, // vs 'remaining' auto_update: true }, - + initialize: function(video, container, options) { - + this.setOptions(options); - + this.container = $(container); this.video = $(video); - + if(this.options.auto_update) { this.video.addEvent('timeupdate', function(event) { if(this.options.current) { @@ -44,15 +44,15 @@ MooPlay.Control.TimeDisplay = new Class({ } }.bind(this)); } - + }, - + update: function(abs_movie_time) { - + var new_text = this.options.pattern.substitute( MooPlay.Utils.readable(MooPlay.Utils.timestampToSexagesimal(abs_movie_time)) ); - + if(new_text != this.container.get('text')) { this.container.empty().appendText(new_text); } diff --git a/Source/Control/Volume.js b/Source/Control/Volume.js index 5362fd5..032832d 100644 --- a/Source/Control/Volume.js +++ b/Source/Control/Volume.js @@ -12,7 +12,7 @@ requires: - MooPlay.Utils -provides: +provides: - MooPlay.Control.Volume ... @@ -23,12 +23,12 @@ MooPlay.Control.Volume = new Class({ options: { auto_unmute: true }, - + Implements: [Options], - + initialize: function(video, slider, options) { this.setOptions(options); - + this.slider = slider; this.video = $(video); diff --git a/Source/MooPlay.js b/Source/MooPlay.js index a6d2dbe..b651483 100644 --- a/Source/MooPlay.js +++ b/Source/MooPlay.js @@ -10,7 +10,7 @@ authors: requires: - core/1.2.4: [Core, Element, Element.Event, Element.Style, Class, Class.Extra.Events, Class.Extra.Options] -provides: +provides: - MooPlay - MooPlay.Subtitle - MooPlay.Subtitle.Parser diff --git a/Source/Subtitle/Item.js b/Source/Subtitle/Item.js index 2f9887d..51ee445 100644 --- a/Source/Subtitle/Item.js +++ b/Source/Subtitle/Item.js @@ -10,7 +10,7 @@ authors: requires: - MooPlay -provides: +provides: - MooPlay.Subtitle.Item ... @@ -18,9 +18,9 @@ provides: MooPlay.Subtitle.Item = new Class({ - + initialize: function(start, end, texts) { - + this.start = start; this.end = end; this.element = new Element('div'); @@ -29,7 +29,7 @@ MooPlay.Subtitle.Item = new Class({ new Element('p').appendText(text) ); }.bind(this)); - + }, - + }); diff --git a/Source/Subtitle/Loader.js b/Source/Subtitle/Loader.js index 02cc800..60887ea 100644 --- a/Source/Subtitle/Loader.js +++ b/Source/Subtitle/Loader.js @@ -12,16 +12,16 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Loader ... */ MooPlay.Subtitle.Loader = new Class({ - + Implements: [Options], - + initialize: function(url, options) { this.url = url; this.setOptions(options); @@ -36,12 +36,12 @@ MooPlay.Subtitle.Loader = new Class({ }); request.send({}); }, - + run: function (data) { var parser = this.selectParser(); return new parser(data, {onComplete: this.options.onComplete}); }, - + selectParser: function() { var ext = this.url.split('.').pop(); switch(ext) { @@ -56,5 +56,5 @@ MooPlay.Subtitle.Loader = new Class({ break; } } - + }); diff --git a/Source/Subtitle/Parser/Base.js b/Source/Subtitle/Parser/Base.js index 7be19fe..0caf394 100644 --- a/Source/Subtitle/Parser/Base.js +++ b/Source/Subtitle/Parser/Base.js @@ -12,45 +12,45 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Parser.Base ... */ MooPlay.Subtitle.Parser.Base = new Class({ - + Implements: [Options], - + options: { onComplete: $empty }, - + initialize: function(data, options) { this.setOptions(options); this.hash( this.parse(data) ); - + this.options.onComplete(this.hash_root); - + }, - + hash: function(subs) { - + var abs_start = Infinity; var abs_end = 0; subs.each(function(sub) { abs_start = Math.min(abs_start, sub.start); abs_end = Math.max(abs_end, sub.end); }); - + this.hash_root = new MooPlay.Subtitle.Tree(abs_start, abs_end); subs.each(function(sub) { this.hash_root.addSub(sub); }.bind(this)); - + } }); diff --git a/Source/Subtitle/Parser/SubRip.js b/Source/Subtitle/Parser/SubRip.js index 0fd9c2d..1fb0094 100644 --- a/Source/Subtitle/Parser/SubRip.js +++ b/Source/Subtitle/Parser/SubRip.js @@ -13,7 +13,7 @@ requires: - MooPlay.Subtitle.Parser.Base - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Parser.SubRip ... @@ -23,20 +23,20 @@ provides: MooPlay.Subtitle.Parser.SubRip = new Class({ Implements: MooPlay.Subtitle.Parser.Base, - + regexps: { new_sub: /^(\d+)$/, time: /^(\d{2}):(\d{2}):(\d{2}),(\d{3}) --> (\d{2}):(\d{2}):(\d{2}),(\d{3})$/, text: /^(.+)$/ }, - + options: { srt_end_of_line: '\n', onComplete: $empty }, parse: function(data) { - + var subs = []; var current_sub = null; var current_text = null; diff --git a/Source/Subtitle/Parser/SubViewer.js b/Source/Subtitle/Parser/SubViewer.js index f1108f0..88f58a3 100644 --- a/Source/Subtitle/Parser/SubViewer.js +++ b/Source/Subtitle/Parser/SubViewer.js @@ -13,7 +13,7 @@ requires: - MooPlay.Subtitle.Parser.Base - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Parser.SubViewer ... @@ -23,19 +23,19 @@ provides: MooPlay.Subtitle.Parser.SubViewer = new Class({ Implements: MooPlay.Subtitle.Parser.Base, - + regexps: { time: /^(\d{2}):(\d{2}):(\d{2}).(\d{3}),(\d{2}):(\d{2}):(\d{2}).(\d{3})$/, text: /^(.+)$/ }, - + options: { srt_end_of_line: '\n', onComplete: $empty }, parse: function(data) { - + var subs = []; var current_sub = null; var current_text = null; diff --git a/Source/Subtitle/Player.js b/Source/Subtitle/Player.js index ee8785b..9c35f60 100644 --- a/Source/Subtitle/Player.js +++ b/Source/Subtitle/Player.js @@ -12,7 +12,7 @@ requires: - MooPlay.Subtitle.Item - MooPlay.Subtitle.Tree -provides: +provides: - MooPlay.Subtitle.Player ... @@ -40,10 +40,10 @@ MooPlay.Subtitle.Player = new Class({ initialize: function( video, container, options) { this.setOptions(options); - + this.video = $(video); this.container = $(container); - + if(this.options.subs_hash != null) { this.loadSubtitles(this.options.subs_hash); } @@ -56,22 +56,22 @@ MooPlay.Subtitle.Player = new Class({ this.tick(event.target.currentTime * 1000); } }.bind(this)); - + }, - + loadSubtitles: function(subs_hash) { this.unLoad(); this.subs_hash = subs_hash; }, - + unLoad: function() { this.subs_hash = null; }, - + tick: function(abs_movie_time) { var next_displayed = this.subs_hash != null ? this.subs_hash.getSubs(abs_movie_time - this.options.time_shift) : []; - + // remove subs which are not here anymore this.displayed.each(function(sub) { var displayed = []; @@ -82,21 +82,21 @@ MooPlay.Subtitle.Player = new Class({ } this.displayed = displayed; }.bind(this)); - + // display subs which should to next_displayed.each(function(sub) { if(!this.displayed.contains(sub)) { - + this.displayed.push(sub); this.options.onDisplay(sub.element, this.container, this.overlapping_level++); } }.bind(this)); }, - + setTimeShift: function(shift) { this.options.time_shift = parseInt(shift); } - + }); diff --git a/Source/Subtitle/Tree.js b/Source/Subtitle/Tree.js index f37adc5..a1c98e3 100644 --- a/Source/Subtitle/Tree.js +++ b/Source/Subtitle/Tree.js @@ -11,7 +11,7 @@ requires: - MooPlay - MooPlay.Subtitle.Item -provides: +provides: - MooPlay.Subtitle.Tree ... @@ -19,20 +19,20 @@ provides: MooPlay.Subtitle.Tree = new Class({ - + nb_childs: 2, - + children: [], subs: [], - + initialize : function(start, end) { this.start = start; this.end = end; }, - + buildChildren: function() { - var child_period = Math.ceil((this.end - this.start) / this.nb_childs); + var child_period = Math.ceil((this.end - this.start) / this.nb_childs); for (var i = 0; i < this.nb_childs; i++) { this.children.push(new MooPlay.Subtitle.Tree( @@ -41,20 +41,20 @@ MooPlay.Subtitle.Tree = new Class({ )); } }, - + getChildren: function(even_empty) { if(this.children.length == 0 && even_empty) { this.buildChildren(); } return this.children; }, - + doesSubtitleFit: function(sub) { return sub.start >= this.start && sub.end <= this.end; }, - + addSub: function(sub) { - + var fit_in_one_child = false; this.getChildren(true).each(function(child) { if(child.doesSubtitleFit(sub)) { @@ -62,32 +62,32 @@ MooPlay.Subtitle.Tree = new Class({ child.addSub(sub); } }.bind(this)); - + if(this.doesSubtitleFit(sub) && !fit_in_one_child) { this.subs.push(sub); } }, - + getSubs: function(timestamp) { - + if(timestamp < this.start && timestamp >= this.end) { return []; } var subs = []; - + this.subs.each(function(sub) { if(timestamp >= sub.start && timestamp < sub.end) { subs.push(sub); } }); - + this.getChildren(false).each(function(child) { if(timestamp >= child.start && timestamp <= child.end) { subs.extend(child.getSubs(timestamp)); } }); - + return subs; } diff --git a/Source/Utils.js b/Source/Utils.js index acf4543..18db129 100644 --- a/Source/Utils.js +++ b/Source/Utils.js @@ -10,7 +10,7 @@ authors: requires: - MooPlay -provides: +provides: - MooPlay.Utils ... @@ -44,18 +44,18 @@ MooPlay.Utils = { }; }, - + readable: function(srt_time) { - + srt_time.m = String(srt_time.m).pad(2,'0'); srt_time.s = String(srt_time.s).pad(2,'0'); srt_time.ms = String(srt_time.ms).pad(3,'0'); - + return srt_time; - + } - - + + } //+ Jonas Raoni Soares Silva diff --git a/Specs/Sets.js b/Specs/Sets.js index 5444724..9e7df00 100644 --- a/Specs/Sets.js +++ b/Specs/Sets.js @@ -1,16 +1,16 @@ (function(context){ - + context.Sets = { - + '/Specs/master': [ 'Control/BaseButton/initialize', - + 'Control/FastMove/initialize', 'Control/FastMove/beginMove', 'Control/FastMove/stopMove', 'Control/FastMove/tick', - + 'Control/FullScreen/specificInitialize', // todo 'Control/FullScreen/toggleState', // todo @@ -21,14 +21,14 @@ context.Sets = { 'Control/Mute/initialize', 'Control/Mute/update', 'Control/Mute/toggleState', - + 'Control/PlayPause/initialize', 'Control/PlayPause/toggleState', 'Control/PlayProgress/initialize', 'Control/PlayProgress/tick', // todo 'Control/PlayProgress/change', - + 'Control/TimeDisplay/initialize', 'Control/TimeDisplay/update', @@ -37,20 +37,20 @@ context.Sets = { 'Control/Volume/change', 'Subtitle/Item/initialize', - + 'Subtitle/Loader/initialize', // todo 'Subtitle/Loader/load', // todo 'Subtitle/Loader/run', 'Subtitle/Loader/selectParser', - + 'Subtitle/Parser/Base/initialize', 'Subtitle/Parser/Base/hash', 'Subtitle/Parser/SubRip/parse', 'Subtitle/Parser/SubViewer/parse', - + 'Subtitle/Player/initialize', 'Subtitle/Player/tick', - + 'Subtitle/Tree/initialize', 'Subtitle/Tree/buildChildren', 'Subtitle/Tree/getChildren', @@ -60,7 +60,7 @@ context.Sets = { ], - + }; - + })(this.exports || this); \ No newline at end of file diff --git a/Specs/SlickSpec/JSSpec.css b/Specs/SlickSpec/JSSpec.css index 0f43a51..8a9c03a 100644 --- a/Specs/SlickSpec/JSSpec.css +++ b/Specs/SlickSpec/JSSpec.css @@ -21,7 +21,7 @@ body, #jsspec_container { padding: 0; margin: 0; position: absolute; - top: 0px; + top: 0px; left: 0px; width: 100%; height: 40px; @@ -31,19 +31,19 @@ body, #jsspec_container { #list { padding: 0; margin: 0; - position: absolute; + position: absolute; top: 40px; left: 0px; bottom: 0px; - overflow: auto; - width: 250px; + overflow: auto; + width: 250px; _height:expression(document.body.clientHeight-40); } #log { padding: 0; margin: 0; - position: absolute; + position: absolute; top: 40px; left: 250px; right: 0px; @@ -58,7 +58,7 @@ body, #jsspec_container { #list { overflow: visible; } - + #log { overflow: visible; } diff --git a/Specs/SlickSpec/JSSpecHelpers.js b/Specs/SlickSpec/JSSpecHelpers.js index 9b17ede..4d24c8f 100644 --- a/Specs/SlickSpec/JSSpecHelpers.js +++ b/Specs/SlickSpec/JSSpecHelpers.js @@ -24,7 +24,7 @@ function Describe(description,specBuilder){ // Backup existing object so we don't override it var old_specs = specs; specs = spec = it = its = {}; - + // Inherit the before and afters of your forefathers if (old_specs) { if (old_specs.before ) specs.before = old_specs.before; @@ -34,15 +34,15 @@ function Describe(description,specBuilder){ if (old_specs.after_all ) specs.after_all = old_specs.after_all; if (old_specs.after_each ) specs.after_each = old_specs.after_each; } - + // Inherit the description of your forefathers description = descriptionParent + (descriptionParent ? ': ' : '') + String(description); var old_descriptionParent = descriptionParent; descriptionParent = description; - + // Build the spec object specBuilder(specs,global.context); - + // Create the tests and go! var spec_count = 0; var specnames = []; @@ -56,7 +56,7 @@ function Describe(description,specBuilder){ describe(description, specs); uniquespecs[specnames] = true; } - + // Reset descriptionParent = old_descriptionParent; specs = spec = it = its = old_specs; @@ -65,24 +65,24 @@ function Describe(description,specBuilder){ global.mocks = {}; var Mock = (function(){ - + function Mock(mockName, testBuilder){ if (mockName && !testBuilder) throw new Error("Invalid mockName, Mock syntax: `new Mock(/mockName/, function(specs, window){})`"); - + if (Object.prototype.toString.call(mockName) != '[object RegExp]') mockName = new RegExp(mockName); - + this.mockName = mockName; this.testBuilder = testBuilder; Mock.mocks.push(this); }; - + Mock.mocks = []; - + Mock.prototype.run = function(){ var globalContextOld = global.context; for (var mockName in global.mocks) if (this.mockName.test(mockName)) { - + global.context = global.mocks[mockName]; for (var i = 0, l = global.willDefineEverywhere.length; i < l; i++) { try { @@ -92,11 +92,11 @@ var Mock = (function(){ } } Describe(mockName,this.testBuilder); - + } global.context = globalContextOld; }; - + Mock.register = function(name, window){ clearTimeout(Mock.register.delay); global.mocks[name] = window; @@ -111,20 +111,20 @@ var Mock = (function(){ continue; } } - + global.runSpecs(); }; - - + + return Mock; })(); Mock.Request = function(mockName, url){ if (!this instanceof Mock.Request) throw new Error('Mock.Request is not callable directly. Must use `new Mock.Request`'); - + this.mockName = mockName; this.url = url; - + var self = this; this.callback = function(html, xml){ Mock.register(self.mockName +': '+ String(self.url).replace(/^.*\//,''), newFakeWinFromDoc(xml)); @@ -169,46 +169,46 @@ window.onload = function(){ * will contain that single root tag. If the root tag has a namespace * prefix, the second argument must specify the URL that identifies the * namespace. - */ + */ var newXMLDocument = (document.implementation && document.implementation.createDocument) ? function(rootTagName, namespaceURL){ - return document.implementation.createDocument(namespaceURL||'', rootTagName||'', null); + return document.implementation.createDocument(namespaceURL||'', rootTagName||'', null); } : function(rootTagName, namespaceURL){ - if (!rootTagName) rootTagName = ""; - if (!namespaceURL) namespaceURL = ""; - // This is the IE way to do it - // Create an empty document as an ActiveX object - // If there is no root element, this is all we have to do - var doc = new ActiveXObject("MSXML2.DOMDocument"); - // If there is a root tag, initialize the document - if (rootTagName) { - // Look for a namespace prefix - var prefix = ""; - var tagname = rootTagName; - var p = rootTagName.indexOf(':'); - if (p != -1) { - prefix = rootTagName.substring(0, p); - tagname = rootTagName.substring(p+1); - } - // If we have a namespace, we must have a namespace prefix - // If we don't have a namespace, we discard any prefix - if (namespaceURL) { - if (!prefix) prefix = "a0"; // What Firefox uses - } - else prefix = ""; - // Create the root element (with optional namespace) as a - // string of text - var text = "<" + (prefix?(prefix+":"):"") + tagname + - (namespaceURL - ?(" xmlns:" + prefix + '="' + namespaceURL +'"') - :"") + - "/>"; - // And parse that text into the empty document - doc.loadXML(text); - } - return doc; -}; + if (!rootTagName) rootTagName = ""; + if (!namespaceURL) namespaceURL = ""; + // This is the IE way to do it + // Create an empty document as an ActiveX object + // If there is no root element, this is all we have to do + var doc = new ActiveXObject("MSXML2.DOMDocument"); + // If there is a root tag, initialize the document + if (rootTagName) { + // Look for a namespace prefix + var prefix = ""; + var tagname = rootTagName; + var p = rootTagName.indexOf(':'); + if (p != -1) { + prefix = rootTagName.substring(0, p); + tagname = rootTagName.substring(p+1); + } + // If we have a namespace, we must have a namespace prefix + // If we don't have a namespace, we discard any prefix + if (namespaceURL) { + if (!prefix) prefix = "a0"; // What Firefox uses + } + else prefix = ""; + // Create the root element (with optional namespace) as a + // string of text + var text = "<" + (prefix?(prefix+":"):"") + tagname + + (namespaceURL + ?(" xmlns:" + prefix + '="' + namespaceURL +'"') + :"") + + "/>"; + // And parse that text into the empty document + doc.loadXML(text); + } + return doc; +}; /** * Synchronously load the XML document at the specified URL and @@ -227,23 +227,23 @@ var loadXML = function(url) { * a Document object that represents it. */ var parseXML = (function(){ - + // Mozilla, Firefox, and related browsers if (typeof DOMParser != "undefined") return function(rawXML){ return (new DOMParser()).parseFromString(rawXML, "application/xml"); }; - + // Internet Explorer. if (typeof ActiveXObject != "undefined") return function(rawXML){ var xmlDocument = new ActiveXObject("Microsoft.XMLDOM"); xmlDocument.async = false; xmlDocument.loadXML(rawXML); - + if (xmlDocument.parseError && xmlDocument.parseError.errorCode) xmlDocument.loadXML(rawXML.replace(/]*?>/i,'')); - + if (xmlDocument.parseError && xmlDocument.parseError.errorCode) throw new Error(['' ,("Error code: " + xmlDocument.parseError.errorCode) @@ -251,10 +251,10 @@ var parseXML = (function(){ ,("Error line: " + xmlDocument.parseError.line) ,rawXML ].join('\n')); - + return xmlDocument; }; - + // As a last resort, try loading the document from a data: URL // This is supposed to work in Safari. Thanks to Manos Batsis and // his Sarissa library (sarissa.sourceforge.net) for this technique. @@ -265,26 +265,26 @@ var parseXML = (function(){ request.send(null); return request.responseXML; }; - + })(); function getXML(url,mime){ if (!mime && url && /\.(svg|xml|xhtml)/i.test(url)) mime = 'text/xml'; - + var request; if (XMLHttpRequest != undefined) request = new XMLHttpRequest(); else request = new ActiveXObject("Microsoft.XMLHTTP"); - + request.open("GET", url, false); if (mime && request.overrideMimeType) request.overrideMimeType(mime); request.send(null); return request; return request.responseXML || parseXML(request.responseText); - + }; @@ -295,14 +295,14 @@ function newFakeWinFromDoc(document){ // fakeWin.document = loadXML('tools/MooTools_Logo.svg'); // fakeWin.document = document.getElementById('svg_logo_data_island').document; // fakeWin.document = parseXML(''); - + fakeWin.SELECT = function(context, expression){ return global.SELECT.call(fakeWin, context, expression); }; // if (fakeWin.document) fakeWin.document.search = function(expression){ // return SELECT(fakeWin.document, expression); // }; - + return fakeWin; }; diff --git a/Specs/SlickSpec/Loader.js b/Specs/SlickSpec/Loader.js index 896bfe5..196625d 100644 --- a/Specs/SlickSpec/Loader.js +++ b/Specs/SlickSpec/Loader.js @@ -30,21 +30,21 @@ var parseQueryString = function(string){ var getSpecs = function(queryString){ queryString = parseQueryString(queryString); - + var requestedSpecs = [], specs = queryString.specs; - + forEach(specs && specs._type == 'Array' ? specs : [specs], function(spec){ if (Sets[spec] && requestedSpecs.indexOf(spec) == -1) requestedSpecs.push(spec); }); - + return requestedSpecs; }; var loadSpecs = function(obj){ for (var i = 0; i < obj.length; i++){ SpecNames.push(obj[i]); - + var specs = Sets[obj[i]]; for (var j = 0; j < specs.length; j++){ document.write('<\/script>'); diff --git a/Specs/SlickSpec/moobugger/bookmarklet.html b/Specs/SlickSpec/moobugger/bookmarklet.html index 06b2aff..cb0c5c7 100644 --- a/Specs/SlickSpec/moobugger/bookmarklet.html +++ b/Specs/SlickSpec/moobugger/bookmarklet.html @@ -6,36 +6,36 @@ bugger - + - + - - + +

The MooBugger.

moobugger - bookmark it!

diff --git a/Specs/SlickSpec/moobugger/debugger-iframe.js b/Specs/SlickSpec/moobugger/debugger-iframe.js index a30d1d8..45abbbc 100644 --- a/Specs/SlickSpec/moobugger/debugger-iframe.js +++ b/Specs/SlickSpec/moobugger/debugger-iframe.js @@ -11,7 +11,7 @@ var FOR_IN_MAX = 20; var debug = { $nil: Function.empty, - + $init: function(){ debug.loaded = false; debug.$groups = {'keys': [], 'values': []}; @@ -51,7 +51,7 @@ var debug = { holder.adopt(new Element('span').setHTML('{')); var x = 0; var length = 0; - + for (var len in chunk.value) length++; for (var key in chunk.value){ x++; @@ -82,22 +82,22 @@ var debug = { $element: function(el){ var el_style = el.style; if (!el_style) el_style = {}; - + var oldbg = el_style.backgroundColor; var oldfg = el_style.color; - + var link = new Element('a', {'href': '#'}).addEvents({ mouseenter: function(){ el_style.backgroundColor = '#DBEAF0'; el_style.color = '#757E8A'; }, - + mouseleave: function(){ el_style.backgroundColor = oldbg; el_style.color = oldfg; }, - + click: function(){ return false; } @@ -109,7 +109,7 @@ var debug = { }); return link.setHTML(htm.join(' '), '>'); }, - + $pre: function(content, klass){ var pre = new Element('pre', {'class': klass || 'message'}); if ($type(content) == "string") pre.appendText(content); @@ -118,7 +118,7 @@ var debug = { if (debug.loaded) debug._scroll.toBottom(); return pre; }, - + $log: function(args, separator, klass){ separator = $pick(separator, ', '); var sRegExp = /%[sdifo]/gi; @@ -139,14 +139,14 @@ var debug = { debug.$parse(args, separator, false, klass); return debug.$nil; }, - + $special: function(obj, klass){ if (obj.length == 1){ var one = obj[0]; var type = $type(one); if ((type == 'object' && one.name && one.message) || (type == 'string')){ var name, message; - + if (type == 'object'){ name = one.name; message = one.message; @@ -154,7 +154,7 @@ var debug = { name = klass.capitalize(); message = one; } - + return debug.$pre(name + ': ' + message, klass); } } @@ -166,32 +166,32 @@ var debug = { debug.$messages = Cookie.get('mootools-debugger-history') || []; debug.$messages = debug.$messages.length ? debug.$messages.replace(/%%%/g, ';').split('|||') : []; debug.$midx = debug.$messages.length; - + debug._body = $('debug').setStyle('display', 'block'); debug._messages = $('debug-messages'); - + debug.$groups.keys.push('$main$'); debug.$groups.values.push(debug._messages); - + debug._input = $('debug-input'); - + debug._scroll = new Fx.Scroll(debug._messages, {duration: 300, wait: false}); - + debug._input.addEvent('keydown', debug.$key); debug._max = $('debug-button-max').addEvent('click', debug.$max); debug._min = $('debug-button-min').addEvent('click', debug.$min); - + debug._close = $('debug-button-close').addEvent('click', debug.$unload); - + debug._maxValue = 132; debug._minValue = 18; - + var state = Cookie.get('mootools-debugger-state'); if (state) debug[state](); else debug.$max(); - + for (var i = 0, l = parent.debug.queue.length; i < l; i++){ var kue = parent.debug.queue[i]; debug[kue.name].apply(debug, kue.arguments); @@ -210,7 +210,7 @@ var debug = { debug._min.setStyle('display', 'block'); debug.$pad(); }, - + $min: function(){ Cookie.set('mootools-debugger-state', '$min', {duration: 10}); debug._messages.setStyles({ @@ -221,19 +221,19 @@ var debug = { debug._min.setStyle('display', 'none'); debug.$pad(); }, - + $pad: function(){ parent.debug.iFrame.style.height = debug._body.offsetHeight + 'px'; debug._messages.scrollTop = debug._messages.scrollHeight - debug._messages.offsetHeight; parent.Moo.Debugger.reposition(); }, - + $unload: function(){ if (!debug.loaded) return; debug.$init(); parent.Moo.Debugger.unload(); }, - + $focus: function(){ debug._input.focus(); }, @@ -257,7 +257,7 @@ var debug = { if (value.indexOf('var ') == 0) value = value.substring(4, value.length); if (value.charAt(value.length - 1) == ';') value = value.substring(0, value.length - 1); if (value.indexOf('{') == 0) value = '(' + value + ')'; - + parent.Moo.Debugger.evaluate(value); break; @@ -281,7 +281,7 @@ var debug = { debug.$midx = debug.$messages.length; } } - + return debug.$focus.delay(50); }, @@ -334,7 +334,7 @@ var debug = { else debug.error("no such timer called " + name); return debug.$nil; }, - + group: function(name){ if (debug.$groups.keys.contains(name)){ debug.error('a group called ' + name + ' already exists'); @@ -352,7 +352,7 @@ var debug = { } return debug.$nil; }, - + groupEnd: function(name){ var idx = debug.$groups.keys.indexOf(name); if (idx >= 0){ @@ -363,17 +363,17 @@ var debug = { } return debug.$nil; }, - + error: function(){ debug.$special($A(arguments), 'error'); return debug.$nil; }, - + warn: function(warning){ debug.$special($A(arguments), 'warning'); return debug.$nil; }, - + info: function(){ debug.$special($A(arguments), 'info'); return debug.$nil; diff --git a/Specs/SlickSpec/moobugger/debugger.js b/Specs/SlickSpec/moobugger/debugger.js index 166b72d..bf8af26 100644 --- a/Specs/SlickSpec/moobugger/debugger.js +++ b/Specs/SlickSpec/moobugger/debugger.js @@ -1,9 +1,9 @@ var Moo = { - + defined: function(obj){ return (obj != undefined); }, - + type: function(obj){ if (obj == null) return false; if (!Moo.defined(obj)) return false; @@ -26,7 +26,7 @@ var Moo = { } return type; } - + }; Moo.Client = { @@ -84,7 +84,7 @@ Moo.ViewPort = { }; Moo.Element = { - + addEvent: function(element, type, fn){ if (element.addEventListener) element.addEventListener(type, fn, false); else element.attachEvent('on' + type, fn); @@ -94,7 +94,7 @@ Moo.Element = { if (item.removeEventListener) item.removeEventListener(type, fn, false); else item.detachEvent('on' + type, fn); }, - + remove: function(item){ if (!item || !item.parentNode) return; item.parentNode.removeChild(item); @@ -111,11 +111,11 @@ Moo.Array = { }; Moo.String = { - + contains: function(item, string, s){ return (s) ? (s + item + s).indexOf(s + string + s) > -1 : item.indexOf(string) > -1; } - + }; Moo.Object = { @@ -141,17 +141,17 @@ Moo.Array.forEach(debug.methods, function(name){ }); Moo.Debugger = { - + load: function(){ - + document.documentElement.className = document.documentElement.className + ' moobugger'; - + debug.spacer = document.createElement('div'); debug.spacer.className = 'debug-spacer'; document.body.appendChild(debug.spacer); debug.iFrame = document.createElement('iframe'); - + debug.iFrame.frameBorder = 0; Moo.Object.add(debug.iFrame.style, { @@ -164,18 +164,18 @@ Moo.Debugger = { 'left': 0, 'zIndex': 999999 }); - + if (Moo.Client.Engine.ie) debug.iFrame.style.position = 'absolute'; debug.iFrame.id = debug.iFrame.name = 'debugger'; debug.iFrame.src = (debug.local) ? debug.path + 'debugger.html' : 'javascript:parent.debug.htmlString'; - - + + document.body.appendChild(debug.iFrame); - + Moo.Element.addEvent(debug.iFrame, 'load', Moo.Debugger.onFrameLoaded); }, - + getPath: function(){ var path = ''; Moo.Array.forEach(document.getElementsByTagName('script'), function(script){ @@ -183,20 +183,20 @@ Moo.Debugger = { }); return path + '/'; }, - + onFrameLoaded: function(){ debug.frame = window.frames['debugger']; - + Moo.Array.forEach(debug.methods, function(name){ debug[name] = debug.frame.debug[name]; }); - + Moo.Element.addEvent(window, 'resize', Moo.Debugger.reposition); Moo.Element.addEvent(window, 'scroll', Moo.Debugger.reposition); - + Moo.Debugger.reposition(); }, - + reposition: function(){ debug.spacer.style.height = debug.iFrame.offsetHeight + 'px'; var top = Moo.ViewPort.getHeight() - debug.iFrame.offsetHeight; @@ -206,7 +206,7 @@ Moo.Debugger = { debug.iFrame.style.top = top + 'px'; } }, - + unload: function(){ debug.queue = []; document.documentElement.className = document.documentElement.className.replace(/ ?moobugger ?/,' '); @@ -214,7 +214,7 @@ Moo.Debugger = { Moo.Element.remove(debug.spacer); Moo.Element.remove(document.getElementById('debug-bookmarklet')); }, - + evaluate: function(value){ try { var evaluation = value; diff --git a/Specs/SlickSpec/moobugger/test.html b/Specs/SlickSpec/moobugger/test.html index 550f51e..9d4b8e7 100644 --- a/Specs/SlickSpec/moobugger/test.html +++ b/Specs/SlickSpec/moobugger/test.html @@ -8,47 +8,47 @@ the moobugger - + - + - - + +

The MooBugger.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@@ -57,29 +57,29 @@

The MooBugger.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- - diff --git a/Specs/SlickSpec/simple_request.js b/Specs/SlickSpec/simple_request.js index f6ed56d..adac670 100644 --- a/Specs/SlickSpec/simple_request.js +++ b/Specs/SlickSpec/simple_request.js @@ -1,39 +1,39 @@ var SimpleRequest = (function(){ - + function SimpleRequest(){ this.initialize(); }; SimpleRequest.prototype = { - + initialize: function(){ this.xhr = this.createXHR(); }, - + createXHR: function(){ // return ('XMLHttpRequest' in window)? new XMLHttpRequest(): new ActiveXObject('MSXML2.XMLHTTP'); return ('XMLHttpRequest' in window)? new XMLHttpRequest(): new ActiveXObject('Microsoft.XMLHTTP'); }, - + stateChange: function(fn){ if(this.xhr.readyState == 4 && this.xhr.status == 200){ fn.apply(this, [this.xhr.responseText, this.getXML()]); } }, - + getXML: function(){ if (this.xhr.responseXML && this.xhr.responseXML.documentElement) return this.xhr.responseXML; return parseXML(this.xhr.responseText); }, - + send: function(url, fn){ var self = this; this.xhr.onreadystatechange = function(){ self.stateChange(fn); }; this.xhr.open('get', url + '?n=' + (new Date()).getTime(), true); this.xhr.send(null); } - + }; - + return SimpleRequest; })(); diff --git a/Specs/SlickSpec/slickspec.css b/Specs/SlickSpec/slickspec.css index 9360765..dcf5707 100644 --- a/Specs/SlickSpec/slickspec.css +++ b/Specs/SlickSpec/slickspec.css @@ -12,10 +12,10 @@ z-index: 9999; padding:0.5em 0.75em; color: #fff; - + font-size: 20px; line-height: 20px; - + font-weight: normal; } #slickspec_logo a, @@ -36,10 +36,10 @@ z-index: 1; padding:0.5em 0.75em; color: #000; - + font-size: 20px; line-height: 20px; - + font-weight: normal; } #framework_name a, @@ -62,7 +62,7 @@ padding:0.5em 0.75em; background-color: #fff; background-color: rgba(255,255,255,0.9); - + -webkit-border-top-left-radius: 6px; } * html #copyright { @@ -119,16 +119,16 @@ body, #jsspec_container { margin: 0 !important; height: 40px !important; overflow: hidden !important; - + position: fixed; _position: absolute; - top: 0px; + top: 0px; _top: expression(eval(document.documentElement.scrollTop)); left: 0px; _left: expression(eval(document.documentElement.scrollLeft)); width: 100%; _width: expression(eval(document.documentElement.clientWidth)); - + z-index: 1000; } @@ -138,15 +138,15 @@ body, #jsspec_container { #list { overflow: auto; - + position: fixed; top: 0px; left: 0px; bottom: 0px; background: #eee; - + margin-top:42px; - + width: 250px; } * html #list{ @@ -166,7 +166,7 @@ html.moobugger #list{ #log { position:relative; overflow: hidden; - + padding: 0; margin: 0; margin-top: 42px; @@ -178,7 +178,7 @@ html.moobugger #list{ #list { overflow: visible; } - + #log { overflow: visible; } @@ -268,7 +268,7 @@ ul.specs li h3 a:hover { ul.examples li { background-color: #eee; color: #999; - + border-style: solid; border-width: 0px 0px 1px 5px; margin: 0.2em 0em 0.2em 1em; @@ -284,23 +284,23 @@ ul.examples li h4 { pre.examples-code { background: #FFFFFF; border: solid 1px #CCC; - + margin: 0.5em 2em; } pre.examples-code code { display:block; - + padding: 0.5em; _padding-right: 0; _padding-left: 0; - + white-space: pre; _width:100%; - + font-size: 10px; font-family: "Panic Sans", "Monaco", monospace !important; overflow-x: auto; - + scrollbar-base-color: #FFF; scrollbar-arrow-color: #FFF; scrollbar-track-color: #FFF; diff --git a/Specs/index.html b/Specs/index.html index 5f6eab7..3cc4818 100644 --- a/Specs/index.html +++ b/Specs/index.html @@ -2,7 +2,7 @@ - + @@ -10,7 +10,7 @@ - + @@ -19,18 +19,18 @@ - + - + SlickSpec for MooPlay

SlickSpec

@@ -38,6 +38,6 @@