# HG changeset patch # User veltr # Date 1333123226 -7200 # Node ID ac66e2240e1edea53ba92e658b94c3ed34e5b766 # Parent 4357aac4eb19c4bf3ce2884184c41c30a1085329 bugfixes diff -r 4357aac4eb19 -r ac66e2240e1e src/css/LdtPlayer.css --- a/src/css/LdtPlayer.css Wed Mar 28 17:37:49 2012 +0200 +++ b/src/css/LdtPlayer.css Fri Mar 30 18:00:26 2012 +0200 @@ -23,10 +23,9 @@ } #Ldt-loader { - background:url(imgs/loader.gif) no-repeat; - width:20px; - height:16px; - float:left; + background:url(imgs/loader.gif) center no-repeat; + text-indent: -9999px; + position: absolute; } /* general class for all buttons */ @@ -885,12 +884,12 @@ max-height: 480px; } -.Ldt-AnnotationsList-ul { +ul.Ldt-AnnotationsList-ul { list-style: none; padding: 0 3px; } -.Ldt-AnnotationsList-li { +li.Ldt-AnnotationsList-li { cursor: pointer; float: left; width: 100%; clear: both; margin: 2px 0; padding: 2px 0; @@ -915,7 +914,7 @@ background-image: url('imgs/video_sequence.png'); } -.Ldt-AnnotationList-Thumbnail { +.Ldt-AnnotationsList-Thumbnail { border: none; float: left; max-width: 64px; @@ -938,11 +937,11 @@ margin: 2px 0; } -.Ldt-AnnotationsList-Tags { +ul.Ldt-AnnotationsList-Tags { width: 100%; list-style: none; clear: both; padding: 0; margin: 2px 0; } -.Ldt-AnnotationsList-Tag-Li { +li.Ldt-AnnotationsList-Tag-Li { float: left; margin: 2px; background: #cc0066; color: #fff; padding: 4px; } diff -r 4357aac4eb19 -r ac66e2240e1e src/css/imgs/loader.gif Binary file src/css/imgs/loader.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e src/css/imgs/loader_fc.gif Binary file src/css/imgs/loader_fc.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e src/css/imgs/loader_fc2.gif Binary file src/css/imgs/loader_fc2.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e src/js/i18n.js --- a/src/js/i18n.js Wed Mar 28 17:37:49 2012 +0200 +++ b/src/js/i18n.js Fri Mar 30 18:00:26 2012 +0200 @@ -1,9 +1,9 @@ -IriSP.i18n_factory = function() { +IriSP.I18n = function() { this.messages = {}; this.base_lang = 'en'; } -IriSP.i18n_factory.prototype.getLanguage = function(lang) { +IriSP.I18n.prototype.getLanguage = function(lang) { var _lang = ( typeof lang != "undefined" ? lang @@ -24,7 +24,7 @@ ) } -IriSP.i18n_factory.prototype.getMessages = function(lang) { +IriSP.I18n.prototype.getMessages = function(lang) { var _lang = this.getLanguage(lang); return ( _lang != null @@ -33,7 +33,7 @@ ); } -IriSP.i18n_factory.prototype.getMessage = function(message, lang) { +IriSP.I18n.prototype.getMessage = function(message, lang) { var _msgs = this.getMessages(lang); return ( typeof _msgs[message] != "undefined" @@ -42,14 +42,14 @@ ) } -IriSP.i18n_factory.prototype.addMessage = function(lang, messagekey, messagevalue) { +IriSP.I18n.prototype.addMessage = function(lang, messagekey, messagevalue) { if (typeof this.messages[lang] == "undefined") { this.messages[lang] = {}; } this.messages[lang][messagekey] = messagevalue; } -IriSP.i18n_factory.prototype.addMessages = function(messagesObj) { +IriSP.I18n.prototype.addMessages = function(messagesObj) { var _this = this; IriSP.underscore(messagesObj).each(function(_messages, _lang) { IriSP.underscore(_messages).each(function(_value, _key) { @@ -58,4 +58,13 @@ }); } -IriSP.i18n = new IriSP.i18n_factory(); +IriSP.i18n = new IriSP.I18n(); + +IriSP.i18n.addMessages({ + "fr": { + "loading_wait": "Chargement en cours, veuillez patienter…" + }, + "en": { + "loading_wait": "Loading, please wait…" + } +}) diff -r 4357aac4eb19 -r ac66e2240e1e src/js/init.js --- a/src/js/init.js Wed Mar 28 17:37:49 2012 +0200 +++ b/src/js/init.js Fri Mar 30 18:00:26 2012 +0200 @@ -277,6 +277,7 @@ /** single point of entry for the metadataplayer */ IriSP.initPlayer = function(config, metadata_url, libdir, platform_url) { + document.getElementById(config.gui.container).innerHTML = IriSP.templToHTML(IriSP.loading_template, config.gui); IriSP.configureDefaults(libdir, platform_url); IriSP.loadLibs(IriSP.lib, config, metadata_url, function() { @@ -287,5 +288,6 @@ var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); var modules = IriSP.configureModules(pop, config.modules); + IriSP.jQuery('#Ldt-loader').detach(); }); }; \ No newline at end of file diff -r 4357aac4eb19 -r ac66e2240e1e src/js/layout.js --- a/src/js/layout.js Wed Mar 28 17:37:49 2012 +0200 +++ b/src/js/layout.js Fri Mar 30 18:00:26 2012 +0200 @@ -30,7 +30,10 @@ /* this is a shortcut */ this.selector = IriSP.jQuery("#" + this._div); - this.selector.css("width", this._width); + this.selector.css({ + "width": this._width, + "clear": "both" + }); if (this._height !== undefined) this.selector.css("height", this._height); @@ -60,7 +63,7 @@ var spacerDiv = IriSP.guid("LdtPlayer_spacer_"); this._widgets.push([widgetName, newDiv]); - var divTempl = "
{{l10n.loading_wait}}
diff -r 4357aac4eb19 -r ac66e2240e1e test/integration/allocine_dossier_independant/css/LdtPlayer.css --- a/test/integration/allocine_dossier_independant/css/LdtPlayer.css Wed Mar 28 17:37:49 2012 +0200 +++ b/test/integration/allocine_dossier_independant/css/LdtPlayer.css Fri Mar 30 18:00:26 2012 +0200 @@ -22,10 +22,9 @@ } #Ldt-loader { - background:url(imgs/loader.gif) no-repeat; - width:20px; - height:16px; - float:left; + background:url(imgs/loader.gif) center no-repeat; + text-indent: -9999px; + position: absolute; } /* general class for all buttons */ @@ -242,6 +241,7 @@ margin: 8px 5px; font-size: 12px; font-family: Arial, Verdana, sans-serif; + color: #ffffff; } .Ldt-ElapsedTime { @@ -516,7 +516,7 @@ } .Ldt-createAnnotation-btnblock label { - float: left; margin-top: 8px; width: 120px; font-size: 12px; height: 20px; + float: left; margin-top: 8px; width: 120px; font-size: 12px; height: 20px; color: #ffffff; } /* CINECAST SPECIFIC TAG BUTTONS */ @@ -692,20 +692,12 @@ } .Ldt-AnnotationsList-Tag-Div { - font-size: 14px; color: #ffffff; - height: 20px; padding: 3px 5px 0 0; border: none; margin: 0; + font-size: 13px; color: #ffffff; + height: 19px; padding: 4px 5px 0 0; border: none; margin: 0; background: url(img-cinecast/tag.png) right top no-repeat; cursor: pointer; } -.Ldt-AnnotationsList-Tag-Li:hover { - background-position: left -23px; -} - -.Ldt-AnnotationsList-Tag-Li:hover .Ldt-AnnotationsList-Tag-Div { - background-position: right -23px; -} - /* Tagcloud */ .Ldt-TagCloud { diff -r 4357aac4eb19 -r ac66e2240e1e test/integration/allocine_dossier_independant/css/imgs/loader.gif Binary file test/integration/allocine_dossier_independant/css/imgs/loader.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e test/integration/allocine_dossier_independant/css/imgs/loader_fc.gif Binary file test/integration/allocine_dossier_independant/css/imgs/loader_fc.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e test/integration/allocine_dossier_independant/css/imgs/loader_fc2.gif Binary file test/integration/allocine_dossier_independant/css/imgs/loader_fc2.gif has changed diff -r 4357aac4eb19 -r ac66e2240e1e test/integration/allocine_dossier_independant/polemic-allocine.htm --- a/test/integration/allocine_dossier_independant/polemic-allocine.htm Wed Mar 28 17:37:49 2012 +0200 +++ b/test/integration/allocine_dossier_independant/polemic-allocine.htm Fri Mar 30 18:00:26 2012 +0200 @@ -3,14 +3,14 @@ Metadataplayer - Polemic tweet integration test - +

MetaDataPlayer

Integration test - ALLOCINE PLAYER
- +