--- a/web/res/metadataplayer/AdaptivePlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/AdaptivePlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -8,7 +8,7 @@
mime_type: "video/mp4",
normal_player: "HtmlPlayer",
fallback_player: "JwpPlayer"
-}
+};
IriSP.Widgets.AdaptivePlayer.prototype.draw = function() {
@@ -30,4 +30,4 @@
this.insertSubwidget(this.$, _opts);
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Annotation.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Annotation.js Tue Oct 01 16:33:47 2013 +0200
@@ -15,6 +15,7 @@
on_site: " sur ",
tags_: "Mots-clés\u00a0:",
description_: "Description\u00a0:",
+ creator_: "Créé par\u00a0:",
excerpt_from: "Extrait de\u00a0:",
untitled: "Segment sans titre"
},
@@ -23,10 +24,11 @@
on_site: " on ",
tags_: "Keywords:",
description_: "Description:",
+ creator_: "Created by\u00a0:",
excerpt_from: "Excerpt from:",
untitled: "Untitled segment"
}
-}
+};
IriSP.Widgets.Annotation.prototype.template =
'{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}'
@@ -38,7 +40,9 @@
+ '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>'
+ '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
+ '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>'
- + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>'
+ + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Creator-Block"><div class="Ldt-Annotation-Label">{{l10n.creator_}}</div>'
+ + '{{#show_creator}}<p class="Ldt-Annotation-Labelled Ldt-Annotation-Creator"></p></div>'
+ + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>{{/show_creator}}'
+ '<p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>'
+ '<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Cleared">'
+ '<div class="Ldt-Annotation-Label">{{l10n.tags_}}</div><ul class="Ldt-Annotation-Labelled Ldt-Annotation-Tags"></ul>'
@@ -48,12 +52,13 @@
annotation_type : "chap",
start_minimized: false,
show_arrow : true,
+ show_creator: true,
arrow_position: .5,
site_name : "Lignes de Temps",
search_on_tag_click: true,
show_social: true,
show_annotation_type: false
-}
+};
IriSP.Widgets.Annotation.prototype.draw = function() {
@@ -116,8 +121,11 @@
_this.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock");
}
highlightTitleAndDescription();
+ if (_this.show_creator) {
+ _this.$.find(".Ldt-Annotation-Creator").text(_annotation.creator);
+ }
if (_this.show_annotation_type) {
- _this.$.find(".Ldt-Annotation-Type").text(_annotation.getAnnotationType().title)
+ _this.$.find(".Ldt-Annotation-Type").text(_annotation.getAnnotationType().title);
}
_this.$.find(".Ldt-Annotation-Begin").text(_annotation.begin.toString());
_this.$.find(".Ldt-Annotation-End").text(_annotation.end.toString());
@@ -171,7 +179,7 @@
this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize"));
this.getWidgetAnnotations().forEach(function(_a) {
_a.on("enter", function() {
- drawAnnotation(_a)
+ drawAnnotation(_a);
});
});
this.source.getAnnotations().on("found", highlightTitleAndDescription);
@@ -185,26 +193,26 @@
uri: (typeof currentAnnotation.url !== "undefined"
? currentAnnotation.url
: (document.location.href.replace(/#.*$/,'') + '#id=' + currentAnnotation.id))
- }
+ };
});
-}
+};
IriSP.Widgets.Annotation.prototype.sendBounds = function() {
this.player.trigger("Annotation.boundsChanged",this.bounds);
-}
+};
IriSP.Widgets.Annotation.prototype.drawAnnotation = function(_annotation) {
this.lastAnnotation = _annotation.id;
-}
+};
IriSP.Widgets.Annotation.prototype.hide = function() {
this.$.slideUp();
-}
+};
IriSP.Widgets.Annotation.prototype.show = function() {
this.$.slideDown();
-}
+};
IriSP.Widgets.Annotation.prototype.toggleSize = function() {
if (this.minimized) {
@@ -212,14 +220,14 @@
} else {
this.minimize();
}
-}
+};
IriSP.Widgets.Annotation.prototype.minimize = function() {
this.minimized = true;
this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-Minimized");
-}
+};
IriSP.Widgets.Annotation.prototype.maximize = function() {
this.minimized = false;
this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-Minimized");
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/AnnotationsList.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/AnnotationsList.js Tue Oct 01 16:33:47 2013 +0200
@@ -53,7 +53,7 @@
voice_annotation: "Annotation Vocale",
now_playing: "Lecture en cours..."
}
-}
+};
IriSP.Widgets.AnnotationsList.prototype.template =
'<div class="Ldt-AnnotationsListWidget">'
@@ -85,7 +85,7 @@
+ '{{/tags}}'
+ '</ul>'
+ '{{/tags.length}}'
- + '{{#audio}}<div class="Ldt-AnnotationsList-Play" data-audio={{audio}}>{{l10n.voice_annotation}}</div>{{/audio}}'
+ + '{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}'
+ '</li>';
//obj.url = this.project_url + "/" + media + "/" + annotations[i].meta.project + "/" + annotations[i].meta["id-ref"] + '#id=' + annotations[i].id;
@@ -102,7 +102,7 @@
this.currentSource = this.player.loadMetadata(IriSP._.defaults({
"url" : _url
}, this.metadata));
-}
+};
IriSP.Widgets.AnnotationsList.prototype.ajaxMashup = function() {
var _currentTime = this.media.getCurrentTime();
@@ -119,7 +119,7 @@
"url" : _url
}, this.metadata));
}
-}
+};
IriSP.Widgets.AnnotationsList.prototype.refresh = function(_forceRedraw) {
_forceRedraw = (typeof _forceRedraw !== "undefined" && _forceRedraw);
@@ -146,7 +146,7 @@
/* Get the n annotations closest to current timecode */
_list = _list.sortBy(function(_annotation) {
return Math.abs((_annotation.begin + _annotation.end) / 2 - _currentTime);
- }).slice(0, this.limit_count)
+ }).slice(0, this.limit_count);
}
if (this.newest_first) {
_list = _list.sortBy(function(_annotation) {
@@ -211,17 +211,45 @@
url : _url,
tags : _annotation.getTagTexts(),
specific_style : (typeof _bgcolor !== "undefined" ? "background-color: " + _bgcolor : ""),
- audio : (_this.show_audio && _annotation.audio && _annotation.audio.href && _annotation.audio.href != "null" ? _annotation.audio.href : undefined),
l10n: _this.l10n
};
+ if (_this.show_audio && _annotation.audio && _annotation.audio.href && _annotation.audio.href != "null") {
+ _data.audio = true;
+ if (!_this.jwplayers[_annotation.id]) {
+ var _audiofile = _annotation.audio.href;
+ if (_this.audio_url_transform) {
+ _audiofile = _this.audio_url_transform(_annotation.audio.href);
+ }
+ var _tmpId = "jwplayer-" + IriSP.Model.getUID();
+ _this.jwplayers[_annotation.id] = _tmpId;
+ _this.$.find(".Ldt-AnnotationsList-Audio").append(IriSP.jQuery("<div>").attr("id", _tmpId));
+ jwplayer(_tmpId).setup({
+ flashplayer: IriSP.getLib("jwPlayerSWF"),
+ file: _audiofile,
+ fallback: false,
+ primary: "flash",
+ controls: false,
+ width: 1,
+ height: 1,
+ events: {
+ onPause: function() {
+ _this.$.find(".Ldt-AnnotationsList-Play[data-annotation-id=" + _annotation.id + "]").text(_this.l10n.voice_annotation);
+ },
+ onPlay: function() {
+ _this.$.find(".Ldt-AnnotationsList-Play[data-annotation-id=" + _annotation.id + "]").text(_this.l10n.now_playing);
+ }
+ }
+ });
+ }
+ }
var _html = Mustache.to_html(_this.annotationTemplate, _data),
_el = IriSP.jQuery(_html),
_onselect = function() {
- _this.annotations_$.removeClass("selected");
+ _this.$.find('.Ldt-AnnotationsList-li').removeClass("selected");
_el.addClass("selected");
},
_onunselect = function() {
- _this.annotations_$.removeClass("selected");
+ _this.$.find('.Ldt-AnnotationsList-li').removeClass("selected");
};
_el.mouseover(function() {
_annotation.trigger("select");
@@ -244,8 +272,6 @@
_annotation.on("unselect", _onunselect);
});
- this.annotations_$ = this.$.find('.Ldt-AnnotationsList-li');
-
/* Correct the empty tag bug */
this.$.find('.Ldt-AnnotationsList-Tag-Li').each(function() {
var _el = IriSP.jQuery(this);
@@ -260,14 +286,11 @@
this.$.find(".Ldt-AnnotationsList-Play").click(function() {
var _el = IriSP.jQuery(this),
- _audiofile = _el.attr("data-audio").replace(_this.rtmp_streamer,"");
- _el.text(_this.l10n.now_playing);
- _this.jwplayer.load({
- file: _audiofile
- });
- _this.jwplayer.play(true);
+ _annid = _el.attr("data-annotation-id");
+ if (_this.jwplayers[_annid]) {
+ jwplayer(_this.jwplayers[_annid]).play();
+ }
_this.media.pause();
- _this.jw_paused_media = true;
});
if (this.source.getAnnotations().searching) {
@@ -289,38 +312,17 @@
}
}
return _list.length;
-}
+};
IriSP.Widgets.AnnotationsList.prototype.draw = function() {
+ this.jwplayers = {};
this.mashupMode = (this.media.elementType === "mashup");
this.renderTemplate();
var _this = this;
-
- if (this.show_audio) {
- var _tmpId = "jwplayer-" + IriSP.Model.getUID();
- this.$.find(".Ldt-AnnotationsList-Audio").attr("id", _tmpId);
- this.jwplayer = jwplayer(_tmpId);
- this.jwplayer.setup({
- flashplayer: IriSP.getLib("jwPlayerSWF"),
- fallback: false,
- width: 1,
- height: 1,
- events: {
- onIdle: function() {
- if (_this.jw_paused_media) {
- _this.jw_paused_media = false;
- _this.media.play();
- }
- _this.$.find(".Ldt-AnnotationsList-Play").text(_this.l10n.voice_annotation)
- }
- }
- });
- this.jw_paused_media = false;
- }
-
+
this.list_$ = this.$.find(".Ldt-AnnotationsList-ul");
@@ -370,7 +372,7 @@
if (this.refresh_interval) {
window.setInterval(function() {
- _this.currentSource.get()
+ _this.currentSource.get();
}, this.refresh_interval);
}
--- a/web/res/metadataplayer/Arrow.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Arrow.js Tue Oct 01 16:33:47 2013 +0200
@@ -15,7 +15,7 @@
stroke_color: "#b7b7b7",
stroke_width: 1.5,
animation_speed: 20
-}
+};
IriSP.Widgets.Arrow.prototype.draw = function() {
this.height = this.arrow_height + this.base_height;
@@ -33,7 +33,7 @@
fill: this.fill_url ? ( 'url(' + this.fill_url + ')' ) : this.fill_color
});
this.moveToX(0);
-}
+};
IriSP.Widgets.Arrow.prototype.drawAt = function(_x) {
_x = Math.max(0, Math.min(_x, this.width));
@@ -53,7 +53,7 @@
this.svgArrow.attr({
path: _d
});
-}
+};
IriSP.Widgets.Arrow.prototype.moveToX = function(_x) {
this.targetX = Math.max(0, Math.min(_x, this.width));
@@ -61,14 +61,14 @@
this.animInterval = window.setInterval(
this.functionWrapper("increment"),
40
- )
+ );
}
this.increment();
-}
+};
IriSP.Widgets.Arrow.prototype.moveToTime = function(_t) {
this.moveToX(this.width * _t / this.media.duration);
-}
+};
IriSP.Widgets.Arrow.prototype.increment = function() {
if (typeof this.currentX === "undefined") {
@@ -85,4 +85,4 @@
this.animInterval = undefined;
}
this.drawAt(this.currentX);
-}
+};
--- a/web/res/metadataplayer/AutoPlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/AutoPlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -6,7 +6,7 @@
IriSP.Widgets.AutoPlayer.prototype.defaults = {
default_type: "JwpPlayer"
-}
+};
IriSP.Widgets.AutoPlayer.prototype.draw = function() {
@@ -52,7 +52,7 @@
}
if (typeof _opts.type === "undefined") {
- _opts.type = this.default_type
+ _opts.type = this.default_type;
}
if (_opts.type === "AdaptivePlayer") {
@@ -73,4 +73,4 @@
this.insertSubwidget(this.$, _opts);
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Controller.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Controller.js Tue Oct 01 16:33:47 2013 +0200
@@ -11,7 +11,7 @@
disable_annotate_btn: false,
disable_search_btn: false,
disable_ctrl_f: false
-}
+};
IriSP.Widgets.Controller.prototype.template =
'<div class="Ldt-Ctrl">'
@@ -225,7 +225,7 @@
.addClass("Ldt-Ctrl-Sound-Mute");
} else {
_soundCtl.attr("title", this.l10n.mute)
- .addClass(_vol < .5 ? "Ldt-Ctrl-Sound-Half" : "Ldt-Ctrl-Sound-Full" )
+ .addClass(_vol < .5 ? "Ldt-Ctrl-Sound-Half" : "Ldt-Ctrl-Sound-Full" );
}
this.$volumeBar.slider("value", _muted ? 0 : 100 * _vol);
};
--- a/web/res/metadataplayer/DailymotionPlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/DailymotionPlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -6,7 +6,7 @@
IriSP.Widgets.DailymotionPlayer.prototype.defaults = {
aspect_ratio: 14/9
-}
+};
IriSP.Widgets.DailymotionPlayer.prototype.draw = function() {
@@ -30,35 +30,35 @@
_media.getCurrentTime = function() {
return new IriSP.Model.Time(1000*_player.getCurrentTime());
- }
+ };
_media.getVolume = function() {
return _player.getVolume() / 100;
- }
+ };
_media.getPaused = function() {
return _pauseState;
- }
+ };
_media.getMuted = function() {
return _player.isMuted();
- }
+ };
_media.setCurrentTime = function(_milliseconds) {
_seekPause = _pauseState;
return _player.seekTo(_milliseconds / 1000);
- }
+ };
_media.setVolume = function(_vol) {
return _player.setVolume(Math.floor(_vol*100));
- }
+ };
_media.mute = function() {
return _player.mute();
- }
+ };
_media.unmute = function() {
return _player.unMute();
- }
+ };
_media.play = function() {
return _player.playVideo();
- }
+ };
_media.pause = function() {
return _player.pauseVideo();
- }
+ };
_player.addEventListener("onStateChange", "onDailymotionStateChange");
_player.addEventListener("onVideoProgress", "onDailymotionVideoProgress");
@@ -66,7 +66,7 @@
_player.cueVideoByUrl(_this.video);
_media.trigger("loadedmetadata");
- }
+ };
window.onDailymotionStateChange = function(_state) {
switch(_state) {
@@ -84,11 +84,11 @@
_media.trigger("seeked");
break;
}
- }
+ };
window.onDailymotionVideoProgress = function(_progress) {
_media.trigger("timeupdate", new IriSP.Model.Time(_progress.mediaTime * 1000));
- }
+ };
var params = {
"allowScriptAccess" : "always",
@@ -101,4 +101,4 @@
swfobject.embedSWF("http://www.dailymotion.com/swf?chromeless=1&enableApi=1", this.container, this.width, this.height, "8", null, null, params, atts);
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/HtmlPlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/HtmlPlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -6,10 +6,10 @@
IriSP.Widgets.HtmlPlayer.prototype.defaults = {
-}
+};
IriSP.Widgets.HtmlPlayer.prototype.draw = function() {
IriSP.htmlPlayer(this.media, this.$, this);
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/JwpPlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/JwpPlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -5,7 +5,7 @@
IriSP.Widgets.JwpPlayer.prototype = new IriSP.Widgets.Widget();
IriSP.Widgets.JwpPlayer.prototype.defaults = {
-}
+};
IriSP.Widgets.JwpPlayer.prototype.draw = function() {
@@ -113,10 +113,10 @@
_media.volume = _event.volume / 100;
_media.trigger("volumechange");
}
- }
+ };
_player = _player.setup(_opts);
this.jwplayer = _player;
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/LdtPlayer-core.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/LdtPlayer-core.js Tue Oct 01 16:33:47 2013 +0200
@@ -59,7 +59,7 @@
if (typeof IriSP.libFiles.inDefaultDir[lib] == "string") {
return IriSP.libFiles.defaultDir + '/' + IriSP.libFiles.inDefaultDir[lib];
}
-}
+};
IriSP._cssCache = [];
@@ -103,10 +103,10 @@
}
addToList(/(https?:\/\/)?[\w\d\-]+\.[\w\d\-]+\S+/gm, function(matches) {
- return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">'
+ return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">';
}, '</a>');
addToList(/@([\d\w]{1,15})/gm, function(matches) {
- return '<a href="http://twitter.com/' + matches[1] + '" target="_blank">'
+ return '<a href="http://twitter.com/' + matches[1] + '" target="_blank">';
}, '</a>');
addToList(/\*[^*]+\*/gm, '<b>', '</b>');
addToList(/[\n\r]+/gm, '', '<br />');
@@ -118,7 +118,7 @@
positions = IriSP._(positions)
.chain()
.uniq()
- .sortBy(function(p) { return parseInt(p) })
+ .sortBy(function(p) { return parseInt(p); })
.value();
var res = "", lastIndex = 0;
@@ -172,9 +172,9 @@
var _this = this,
noop = (function() {});
IriSP._(properties).each(function(p) {
- _this[p] = noop
+ _this[p] = noop;
});
-}
+};
/* js is where data is stored in a standard form, whatever the serializer */
@@ -231,7 +231,7 @@
isLocalURL = Model.isLocalURL = function(url) {
var matches = url.match(/^(\w+:)\/\/([^/]+)/);
if (matches) {
- return(matches[1] === document.location.protocol && matches[2] === document.location.host)
+ return(matches[1] === document.location.protocol && matches[2] === document.location.host);
}
return true;
},
@@ -258,7 +258,7 @@
fullTextRegexps = Model.fullTextRegexps = function(_text) {
var remsrc = "[\\" + removeChars.join("\\") + "]",
remrx = new RegExp(remsrc,"gm"),
- txt = _text.toLowerCase().replace(remrx,"")
+ txt = _text.toLowerCase().replace(remrx,""),
res = [],
charsrx = ns._(charsub).map(function(c) {
return new RegExp(c);
@@ -308,7 +308,7 @@
+ pad(2, d.getUTCDate())+'T'
+ pad(2, d.getUTCHours())+':'
+ pad(2, d.getUTCMinutes())+':'
- + pad(2, d.getUTCSeconds())+'Z'
+ + pad(2, d.getUTCSeconds())+'Z' ;
};
/*
@@ -331,7 +331,7 @@
_element.found = undefined;
});
_this.trigger("search-cleared");
- })
+ });
};
List.prototype = new Array();
@@ -349,7 +349,7 @@
ns._(this).forEach(function(_value, _key) {
_callback(_value, _key, _this);
});
- }
+ };
};
if (typeof Array.prototype.map === "undefined") {
@@ -358,7 +358,7 @@
return ns._(this).map(function(_value, _key) {
return _callback(_value, _key, _this);
});
- }
+ };
};
List.prototype.pluck = function(_key) {
@@ -438,9 +438,9 @@
}
this.searching = true;
this.trigger("search", _text);
- var rxsource = fullTextRegexps(_text)
- rgxp = new RegExp(rxsource,"im"),
- this.regexp = new RegExp(rxsource,"gim");
+ var rxsource = fullTextRegexps(_text),
+ rgxp = new RegExp(rxsource,"im");
+ this.regexp = new RegExp(rxsource,"gim");
var res = this.filter(function(_element, _k) {
var titlematch = rgxp.test(_element.title),
descmatch = rgxp.test(_element.description),
@@ -460,7 +460,7 @@
};
List.prototype.addId = function(_id) {
- var _el = this.directory.getElement(_id)
+ var _el = this.directory.getElement(_id);
if (!this.hasId(_id) && typeof _el !== "undefined") {
this.idIndex.push(_id);
Array.prototype.push.call(this, _el);
@@ -593,7 +593,7 @@
minutes : (Math.floor(_totalSeconds / 60) % 60),
seconds : _totalSeconds % 60,
milliseconds: this.milliseconds % 1000
- }
+ };
};
Time.prototype.add = function(_milliseconds) {
@@ -608,11 +608,11 @@
var _hms = this.getHMS(),
_res = '';
if (_hms.hours) {
- _res += _hms.hours + ':'
+ _res += _hms.hours + ':';
}
_res += pad(2, _hms.minutes) + ':' + pad(2, _hms.seconds);
if (showCs) {
- _res += "." + Math.floor(_hms.milliseconds / 100)
+ _res += "." + Math.floor(_hms.milliseconds / 100);
}
return _res;
};
@@ -650,7 +650,7 @@
Reference.prototype.isOrHasId = function(_idRef) {
if (this.isList) {
- return (ns._(this.id).indexOf(_idRef) !== -1)
+ return (ns._(this.id).indexOf(_idRef) !== -1);
} else {
return (this.id == _idRef);
}
@@ -662,7 +662,7 @@
this.elementType = 'element';
this.title = "";
this.description = "";
- this.__events = {}
+ this.__events = {};
if (typeof _source === "undefined") {
return;
}
@@ -744,14 +744,14 @@
this.on("timeupdate", function(_time) {
_this.currentTime = _time;
_this.getAnnotations().filter(function(_a) {
- return (_a.end <= _time || _a.begin > _time) && _a.playing
+ return (_a.end <= _time || _a.begin > _time) && _a.playing;
}).forEach(function(_a) {
_a.playing = false;
_a.trigger("leave");
_this.trigger("leave-annotation",_a);
});
_this.getAnnotations().filter(function(_a) {
- return _a.begin <= _time && _a.end > _time && !_a.playing
+ return _a.begin <= _time && _a.end > _time && !_a.playing;
}).forEach(function(_a) {
_a.playing = true;
_a.trigger("enter");
@@ -834,7 +834,7 @@
return ns._(_annTypes).indexOf(_annotation.getAnnotationType().id) !== -1;
});
} else {
- return new List(this.source.directory)
+ return new List(this.source.directory);
}
};
@@ -930,7 +930,7 @@
};
Annotation.prototype.getDuration = function() {
- return new Time(this.end.milliseconds - this.begin.milliseconds)
+ return new Time(this.end.milliseconds - this.begin.milliseconds);
};
/* */
@@ -997,7 +997,7 @@
this._updateTimes = function() {
_this.updateTimes();
_this.trigger("change");
- }
+ };
this.on("add", this._updateTimes);
this.on("remove", this._updateTimes);
};
@@ -1086,19 +1086,19 @@
Mashup.prototype.hasAnnotation = function(_annotation) {
return !!ns._(this.segments).find(function(_s) {
- return _s.annotation === _annotation
+ return _s.annotation === _annotation;
});
};
Mashup.prototype.getAnnotation = function(_annotation) {
return ns._(this.segments).find(function(_s) {
- return _s.annotation === _annotation
+ return _s.annotation === _annotation;
});
};
Mashup.prototype.getAnnotationById = function(_id) {
return ns._(this.segments).find(function(_s) {
- return _s.annotation.id === _id
+ return _s.annotation.id === _id;
});
};
@@ -1117,8 +1117,8 @@
Mashup.prototype.getMedias = function() {
var medias = new List(this.source.directory);
this.segments.forEach(function(_annotation) {
- medias.push(_annotation.getMedia())
- })
+ medias.push(_annotation.getMedia());
+ });
return medias;
};
@@ -1129,7 +1129,7 @@
return ns._(_annTypes).indexOf(_annotation.getAnnotationType().id) !== -1;
});
} else {
- return new List(this.source.directory)
+ return new List(this.source.directory);
}
};
@@ -1163,7 +1163,7 @@
var _this = this;
ns._(_config).forEach(function(_v, _k) {
_this[_k] = _v;
- })
+ });
this.callbackQueue = [];
this.contents = {};
this.get();
@@ -1187,7 +1187,7 @@
});
} else {
if (typeof this.contents[_listId] === "undefined") {
- this.contents[_listId] = new IriSP.List(this.directory);
+ this.contents[_listId] = new List(this.directory);
}
return this.contents[_listId];
}
@@ -1197,7 +1197,7 @@
var _this = this;
ns._(this.contents).forEach(function(_value, _key) {
_callback.call(_this, _value, _key);
- })
+ });
};
Source.prototype.getElement = function(_elId) {
@@ -1270,7 +1270,7 @@
_annTypes = this.getAnnotationTypes(_global).searchByTitle(_title);
_annTypes.forEach(function(_annType) {
_res.addElements(_annType.getAnnotations(_global));
- })
+ });
return _res;
};
@@ -1466,7 +1466,7 @@
getVolume();
media.trigger("loadedmetadata");
media.trigger("volumechange");
- })
+ });
videoEl.on("timeupdate", function() {
media.trigger("timeupdate", new IriSP.Model.Time(1000*mediaEl.currentTime));
@@ -1475,7 +1475,7 @@
videoEl.on("volumechange", function() {
getVolume();
media.trigger("volumechange");
- })
+ });
videoEl.on("play", function() {
media.trigger("play");
@@ -1495,6 +1495,33 @@
};
+IriSP.serializers.content = {
+ deSerialize : function(_data, _source) {
+ var _medialist = new IriSP.Model.List(_source.directory);
+
+ function deserializeObject(_m, i) {
+ var _media = new IriSP.Model.Media(_m.iri_id, _source);
+ _media.video = _m.media_url;
+ _media.title = _m.title;
+ _media.description = _m.description;
+ _media.setDuration(_m.duration);
+ _media.thumbnail = _m.image;
+ _media.color = IriSP.vizcolors[i % IriSP.vizcolors.length];
+ _media.keywords = _m.tags;
+ _medialist.push(_media);
+ }
+
+ if (typeof _data.objects !== "undefined") {
+ IriSP._(_data.objects).each(deserializeObject);
+ } else {
+ deserializeObject(_data, 0);
+ }
+
+ _source.addList("media", _medialist);
+ }
+};
+
+/* END contentapi-serializer.js */
/* LDT Platform Serializer */
if (typeof IriSP.serializers === "undefined") {
@@ -1541,7 +1568,7 @@
"dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
"dc:duration" : _data.duration.milliseconds
}
- }
+ };
_dest.medias.push(_res);
var _list = {
id: IriSP.Model.getUID(),
@@ -1574,9 +1601,9 @@
}).map(function(_at) {
return {
"id-ref": _at.id
- }
+ };
})
- }
+ };
_dest.lists.push(_list);
_dest.views[0].contents.push(_data.id);
}
@@ -1602,7 +1629,7 @@
"dc:creator" : _data.creator || _source.creator,
"dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
}
- }
+ };
_dest.tags.push(_res);
}
},
@@ -1623,7 +1650,7 @@
"dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
"dc:creator" : _data.creator || _source.creator,
"dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
- }
+ };
_dest["annotation-types"].push(_res);
_dest.views[0].annotation_types.push(_data.id);
}
@@ -1694,18 +1721,18 @@
"dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
// project : _source.projectId
}
- }
+ };
if (_source.regenerateTags) {
_res.tags = IriSP._(_data.keywords).map(function(_kw) {
return {
"id-ref": _source.__keywords[_kw.toLowerCase()].id
- }
+ };
});
} else {
_res.tags = IriSP._(_data.tag.id).map(function(_id) {
return {
"id-ref" : _id
- }
+ };
});
}
_res.content.title = _data.title || _res.content.title || "";
@@ -1740,7 +1767,7 @@
return _annotation.annotation.id;
}),
id: _data.id
- }
+ };
_dest.lists.push(_res);
}
}
@@ -1780,13 +1807,13 @@
id: IriSP.Model.getUID(),
title: kw,
regenerated: true
- }
+ };
}
});
});
IriSP._(_source.__keywords).each(function(kw) {
_this.types.tag.serializer(kw, _source, _res);
- })
+ });
}
_source.forEach(function(_list, _typename) {
if (typeof _this.types[_typename] !== "undefined") {
@@ -1863,7 +1890,7 @@
created: _data.created,
creator: _data.creator
}
- }
+ };
},
deserializeAnnotation : function(_anndata, _source) {
var _ann = new IriSP.Model.Annotation(_anndata.id, _source);
@@ -1914,7 +1941,40 @@
}
};
-/* End ldt_annotate serializer *//* Start of defaults.js */
+/* End ldt_annotate serializer */IriSP.serializers.segmentapi = {
+ deSerialize : function(_data, _source) {
+ var _annotationlist = new IriSP.Model.List(_source.directory),
+ _medialist = new IriSP.Model.List(_source.directory);
+ _source.addList("media", _medialist);
+
+ function deserializeObject(_s) {
+ var _ann = new IriSP.Model.Annotation(_s.element_id, _source),
+ _media = _source.getElement(_s.iri_id);
+ if (!_media) {
+ _media = new IriSP.Model.Media(_s.iri_id, _source);
+ _source.getMedias().push(_media);
+ }
+ _ann.setMedia(_s.iri_id);
+ _ann.title = _s.title;
+ _ann.description = _s.abstract;
+ _ann.begin = new IriSP.Model.Time(_s.start_ts);
+ _ann.end = new IriSP.Model.Time(_s.start_ts + _s.duration);
+ _ann.keywords = (_s.tags ? _s.tags.split(",") : []);
+ _ann.project_id = _s.project_id;
+ _annotationlist.push(_ann);
+ }
+
+ if (typeof _data.objects !== "undefined") {
+ IriSP._(_data.objects).each(deserializeObject);
+ } else {
+ deserializeObject(_data);
+ }
+ _source.addList("annotation", _annotationlist);
+ }
+};
+
+/* END segmentapi-serializer.js */
+/* Start of defaults.js */
IriSP.language = 'en';
@@ -2156,7 +2216,7 @@
return;
}
var isloaded = !ns._(_this.widgets).any(function(w) {
- return !(w && w.isLoaded())
+ return !(w && w.isLoaded());
});
if (isloaded) {
_this.widgetsLoaded = true;
@@ -2316,7 +2376,7 @@
} else {
var _mediaopts = {
is_mashup: _this.is_mashup || false
- }
+ };
_this.media = _this.source.getCurrentMedia(_mediaopts);
}
@@ -2363,9 +2423,9 @@
if (typeof _function !== "undefined") {
return function() {
return _function.apply(_this, Array.prototype.slice.call(arguments, 0));
- }
+ };
} else {
- console.log("Error, Unknown function IriSP.Widgets." + this.type + "." + _name)
+ console.log("Error, Unknown function IriSP.Widgets." + this.type + "." + _name);
}
};
--- a/web/res/metadataplayer/Mediafragment.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Mediafragment.js Tue Oct 01 16:33:47 2013 +0200
@@ -9,11 +9,11 @@
if (/^#/.test(_msg.data)) {
_this.setWindowHash(_msg.data);
}
- })
+ });
};
this.onMdpEvent("Mediafragment.setHashToAnnotation","setHashToAnnotation");
this.blocked = false;
-}
+};
IriSP.Widgets.Mediafragment.prototype = new IriSP.Widgets.Widget();
@@ -23,14 +23,14 @@
this.getWidgetAnnotations().forEach(function(_annotation) {
_annotation.on("click", function() {
_this.setHashToAnnotation(_annotation.id);
- })
+ });
});
if (this.media.loadedMetadata) {
this.goToHash();
} else {
this.onMediaEvent("loadedmetadata","goToHash");
}
-}
+};
IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
if (typeof window.history !== "undefined" && typeof window.history.replaceState !== "undefined") {
@@ -38,7 +38,7 @@
} else {
document.location.hash = _hash;
}
-}
+};
IriSP.Widgets.Mediafragment.prototype.getLastHash = function() {
var _tab = document.location.hash.replace(/^#/,'').split('&');
@@ -49,7 +49,7 @@
_tab.push(this.last_hash_key + '=' + this.last_hash_value);
}
return '#' + _tab.join('&');
-}
+};
IriSP.Widgets.Mediafragment.prototype.goToHash = function() {
if (document.location.hash !== this.getLastHash()) {
@@ -72,15 +72,15 @@
}
}
}
-}
+};
IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotationId) {
this.setHash( 'id', _annotationId );
-}
+};
IriSP.Widgets.Mediafragment.prototype.setHashToTime = function() {
this.setHash( 't', this.media.getCurrentTime().getSeconds() );
-}
+};
IriSP.Widgets.Mediafragment.prototype.setHash = function(_key, _value) {
if (!this.blocked && (this.last_hash_key !== _key || this.last_hash_value !== _value)) {
@@ -89,11 +89,11 @@
var _hash = this.getLastHash();
this.setWindowHash(_hash);
if (window.parent !== window) {
- window.parent.postMessage(_hash,"*")
+ window.parent.postMessage(_hash,"*");
}
this.block();
}
-}
+};
IriSP.Widgets.Mediafragment.prototype.unblock = function() {
if (typeof this.blockTimeout !== "undefined") {
@@ -101,7 +101,7 @@
}
this.blockTimeout = undefined;
this.blocked = false;
-}
+};
IriSP.Widgets.Mediafragment.prototype.block = function() {
if (typeof this.blockTimeout !== "undefined") {
@@ -109,4 +109,4 @@
}
this.blocked = true;
this.blockTimeout = window.setTimeout(this.functionWrapper("unblock"), 1500);
-}
+};
--- a/web/res/metadataplayer/MultiSegments.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/MultiSegments.js Tue Oct 01 16:33:47 2013 +0200
@@ -9,7 +9,7 @@
annotation_start_minimized: true,
annotation_show_annotation_type: true,
show_all: false
-}
+};
IriSP.Widgets.MultiSegments.prototype.draw = function() {
var _this = this,
@@ -24,7 +24,7 @@
if (/^annotation_/.test(_k)) {
annotationopts[_k.replace(/^annotation_/,"")] = _v;
}
- })
+ });
this.source.getAnnotationTypes().forEach(function(_anntype) {
var segments = _anntype.getAnnotations().filter(function(_ann) {
return _ann.getDuration() > 0;
@@ -54,7 +54,7 @@
this.annotationWidget.slideDown();
}
}
- }
+ };
line.segmentWidget
@@ -96,7 +96,7 @@
lines.push(line);
}
});
- var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation")
+ var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation");
function checkVisibilities(_time) {
if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
@@ -119,4 +119,4 @@
}
this.onMediaEvent("timeupdate", checkVisibilities);
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Polemic.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Polemic.js Tue Oct 01 16:33:47 2013 +0200
@@ -15,7 +15,8 @@
_to_: " to ",
_annotations: " annotation(s)"
}
-}
+};
+
IriSP.Widgets.Polemic.prototype.defaults = {
element_width : 5,
element_height : 5,
@@ -70,7 +71,9 @@
_slice_count = Math.floor( this.width / this.element_width ),
_duration = this.source.getDuration(),
_max = 0,
- _list = this.getWidgetAnnotations(),
+ _list = this.getWidgetAnnotations().filter(function(_a) {
+ return !_a.getDuration().milliseconds;
+ }),
_this = this;
for (var _i = 0; _i < _slice_count; _i++) {
@@ -84,7 +87,7 @@
return _annotation.begin >= _begin && _annotation.begin < _end;
}),
polemicStacks : []
- }
+ };
for (var _j = 0; _j < this.polemics.length; _j++) {
var _polemic = _res.annotations.searchByDescription(this.polemics[_j].keywords);
@@ -252,7 +255,7 @@
IriSP._(_slices).forEach(function(_slice) {
var _y = _this.height,
_nums = _slice.annotations.length + "," + IriSP._(_slice.polemicStacks).map(function(_annotations) {
- return _annotations.length
+ return _annotations.length;
}).join(",");
if (_slice.annotations.length) {
var _h = Math.ceil(_scale * _slice.annotations.length);
@@ -282,7 +285,7 @@
_html = '<p>' + _this.l10n.from_ + _el.attr("begin-time") + _this.l10n._to_ + _el.attr("end-time") + '</p>';
for (var _i = 0; _i <= _this.polemics.length; _i++) {
var _color = _i ? _this.polemics[_i - 1].color : _this.defaultcolor;
- _html += '<div class="Ldt-Tooltip-AltColor" style="background: ' + _color + '"></div><p>' + _nums[_i] + _this.l10n._annotations + '</p>'
+ _html += '<div class="Ldt-Tooltip-AltColor" style="background: ' + _color + '"></div><p>' + _nums[_i] + _this.l10n._annotations + '</p>';
}
if (_this.tooltip) {
_this.tooltip.show(+ _el.attr("pos-x"), + _el.attr("pos-y"), _html);
@@ -292,9 +295,9 @@
if (_this.tooltip) {
_this.tooltip.hide();
}
- })
+ });
- }
+ };
this.$position = IriSP.jQuery('<div>').addClass("Ldt-Polemic-Position");
@@ -316,7 +319,7 @@
},
"tooltip"
);
-}
+};
IriSP.Widgets.Polemic.prototype.onTimeupdate = function(_time) {
var _x = Math.floor( this.width * _time / this.media.duration);
@@ -325,5 +328,5 @@
});
this.$position.css({
left: _x + "px"
- })
-}
+ });
+};
--- a/web/res/metadataplayer/PopcornPlayer.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/PopcornPlayer.js Tue Oct 01 16:33:47 2013 +0200
@@ -7,7 +7,7 @@
/* A Popcorn-based player for HTML5 Video, Youtube and Vimeo */
IriSP.Widgets.PopcornPlayer.prototype.defaults = {
-}
+};
IriSP.Widgets.PopcornPlayer.prototype.draw = function() {
@@ -112,7 +112,7 @@
getVolume();
_media.trigger("loadedmetadata");
_media.trigger("volumechange");
- })
+ });
_popcorn.on("timeupdate", function() {
_media.trigger("timeupdate", new IriSP.Model.Time(1000*_popcorn.currentTime()));
@@ -121,7 +121,7 @@
_popcorn.on("volumechange", function() {
getVolume();
_media.trigger("volumechange");
- })
+ });
_popcorn.on("play", function() {
_media.trigger("play");
@@ -135,4 +135,4 @@
_media.trigger("seeked");
});
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Renkan.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Renkan.js Tue Oct 01 16:33:47 2013 +0200
@@ -8,14 +8,14 @@
annotation_regexp: /player\/([a-zA-Z0-9_-]+)\/.*id=([a-zA-Z0-9_-]+)/,
tag_regexp: /search=([^&=]+)/,
min_duration: 5000
-}
+};
IriSP.Widgets.Renkan.prototype.messages = {
"fr": {
},
"en": {
}
-}
+};
IriSP.Widgets.Renkan.prototype.template =
'<div class="Ldt-Renkan-Container"><div class="Ldt-Renkan"></div></div>';
@@ -52,7 +52,7 @@
annotation: _ann,
begin: _ann.begin - _preroll,
end: _ann.end + _preroll
- }
+ };
_this.node_times.push(_nt);
var _annselected = false,
_nodeselected = false;
@@ -90,10 +90,10 @@
if (_tagmatch) {
_node.on("select", function() {
_this.source.getAnnotations().search(_tagmatch[1]);
- })
+ });
_node.on("unselect", function() {
_this.source.getAnnotations().search("");
- })
+ });
}
});
Rkns.jsonIO(this.renkan, {
@@ -114,7 +114,7 @@
return false;
}
});
-}
+};
IriSP.Widgets.Renkan.prototype.onTimeupdate = function(_time) {
IriSP._(this.node_times).each(function(_nt) {
@@ -129,4 +129,4 @@
}
}
});
-}
+};
--- a/web/res/metadataplayer/Segments.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Segments.js Tue Oct 01 16:33:47 2013 +0200
@@ -23,7 +23,7 @@
IriSP.Widgets.Segments.prototype.annotationTemplate =
'<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}, from:{{from}}, to:{{to}}" segment-text="{{text}}"'
- + 'style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>'
+ + 'style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>';
IriSP.Widgets.Segments.prototype.draw = function() {
@@ -58,7 +58,7 @@
_fulltext = _annotation.title + ( _annotation.description ? ( '<br/>' + _annotation.description ) : '' ),
line = IriSP._(lines).find(function(line) {
return !IriSP._(line.annotations).find(function(a) {
- return a.begin < _annotation.end && a.end > _annotation.begin
+ return a.begin < _annotation.end && a.end > _annotation.begin;
});
});
if (!line) {
@@ -165,11 +165,11 @@
_segment.css("background", _segment.attr("data-medium-color")).removeClass("found");
});
});
-}
+};
IriSP.Widgets.Segments.prototype.onTimeupdate = function(_time) {
var _x = Math.floor( this.width * _time / this.media.duration);
this.$.find('.Ldt-Segments-Position').css({
left: _x + "px"
- })
-}
\ No newline at end of file
+ });
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Slider.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Slider.js Tue Oct 01 16:33:47 2013 +0200
@@ -16,7 +16,7 @@
};
IriSP.Widgets.Slider.prototype.template =
- '<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>'
+ '<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>';
IriSP.Widgets.Slider.prototype.draw = function() {
@@ -69,7 +69,7 @@
IriSP.Widgets.Slider.prototype.onTimeupdate = function(_time) {
this.$slider.slider("value",_time);
this.player.trigger("Arrow.updatePosition",{widget: this.type, time: _time});
-}
+};
IriSP.Widgets.Slider.prototype.onMouseover = function() {
if (this.minimize_timeout) {
@@ -82,7 +82,7 @@
this.maximized = true;
}
}
-}
+};
IriSP.Widgets.Slider.prototype.onMouseout = function() {
this.$time.hide();
@@ -100,7 +100,7 @@
_this.timeoutId = false;
}, this.minimize_timeout);
}
-}
+};
IriSP.Widgets.Slider.prototype.animateToHeight = function(_height) {
this.$slider.stop().animate(
@@ -115,19 +115,19 @@
function() {
IriSP.jQuery(this).css("overflow","visible");
});
-}
+};
IriSP.Widgets.Slider.prototype.calculateSliderCss = function(_size) {
return {
height: _size + "px",
"margin-top": (this.minimized_height - _size) + "px"
};
-}
+};
IriSP.Widgets.Slider.prototype.calculateHandleCss = function(_size) {
return {
height: (2 + _size) + "px",
width: (2 + _size) + "px",
"margin-left": -Math.ceil(2 + _size / 2) + "px"
- }
-}
\ No newline at end of file
+ };
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Slideshare.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Slideshare.js Tue Oct 01 16:33:47 2013 +0200
@@ -2,14 +2,14 @@
IriSP.Widgets.Slideshare = function(player, config) {
IriSP.Widgets.Widget.call(this, player, config);
-}
+};
IriSP.Widgets.Slideshare.prototype = new IriSP.Widgets.Widget();
IriSP.Widgets.Slideshare.prototype.defaults = {
annotation_type: "slide",
sync: true,
-}
+};
IriSP.Widgets.Slideshare.prototype.messages = {
fr: {
@@ -18,7 +18,7 @@
en: {
slides_ : "Slides"
}
-}
+};
IriSP.Widgets.Slideshare.prototype.template =
'<div class="Ldt-SlideShare"><h2>{{l10n.slides_}}</h2><hr /><div class="Ldt-SlideShare-Container"></div></div>';
@@ -35,7 +35,7 @@
var _id = IriSP.Model.getUID(),
_params = {
allowScriptAccess: "always"
- }
+ },
_atts = {
id: _id
},
@@ -69,7 +69,7 @@
_embedObject = null,
_oembedCache = {},
_lastEmbedded = "",
- _this = this
+ _this = this,
$container = this.$.find(".Ldt-SlideShare-Container");
this.embed_width = this.embed_width || $container.innerWidth();
@@ -111,7 +111,7 @@
}
_lastPres = _presentation;
- })
- })
+ });
+ });
}
-}
+};
--- a/web/res/metadataplayer/Social.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Social.js Tue Oct 01 16:33:47 2013 +0200
@@ -3,7 +3,7 @@
IriSP.Widgets.Social = function(player, config) {
IriSP.Widgets.Widget.call(this, player, config);
ZeroClipboard.setMoviePath( IriSP.getLib('zeroClipboardSwf') );
-}
+};
IriSP.Widgets.Social.prototype = new IriSP.Widgets.Widget();
@@ -15,7 +15,7 @@
show_fb: true,
show_gplus: true,
show_mail: true
-}
+};
IriSP.Widgets.Social.prototype.template =
'<span class="Ldt-Social">{{#show_url}}<div class="Ldt-Social-Url-Container"><a href="#" draggable="true" target="_blank" class="Ldt-Social-Square Ldt-Social-Url Ldt-TraceMe" title="{{l10n.share_link}}">'
@@ -38,7 +38,7 @@
share_link: "Share hypertext link",
copy: "Copy"
}
-}
+};
IriSP.Widgets.Social.prototype.draw = function() {
this.renderTemplate();
@@ -63,7 +63,7 @@
return false;
});
this.updateUrls(this.url, this.text);
-}
+};
IriSP.Widgets.Social.prototype.toggleCopy = function() {
var _pop = this.$.find(".Ldt-Social-UrlPop");
@@ -85,7 +85,7 @@
} else {
this.clip.hide();
}
-}
+};
IriSP.Widgets.Social.prototype.updateUrls = function(_url, _text) {
this.url = _url;
@@ -94,4 +94,4 @@
this.$.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + IriSP.jQuery.param({ url: _url, text: _text }));
this.$.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + IriSP.jQuery.param({ url: _url, title: _text }));
this.$.find(".Ldt-Social-Mail").attr("href", "mailto:?" + IriSP.jQuery.param({ subject: _text, body: _text + ": " + _url }));
-}
+};
--- a/web/res/metadataplayer/Tagcloud.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Tagcloud.js Tue Oct 01 16:33:47 2013 +0200
@@ -1,7 +1,7 @@
IriSP.Widgets.Tagcloud = function(player, config) {
IriSP.Widgets.Widget.call(this, player, config);
this.stopwords = IriSP._.uniq([].concat(this.custom_stopwords).concat(this.stopword_lists[this.stopword_language]));
-}
+};
IriSP.Widgets.Tagcloud.prototype = new IriSP.Widgets.Widget();
@@ -22,7 +22,7 @@
segment_annotation_type: false,
min_font_size: 10,
max_font_size: 26
-}
+};
IriSP.Widgets.Tagcloud.prototype.stopword_lists = {
"fr" : [
@@ -36,7 +36,7 @@
'get', 'here', 'http', 'like', 'more', 'one', 'our', 'she', 'that', 'the', 'their', 'then', 'there',
'they', 'this', 'very', 'what', 'when', 'where', 'who', 'why', 'will', 'with', 'www', 'you', 'your'
]
-}
+};
IriSP.Widgets.Tagcloud.prototype.draw = function() {
@@ -45,12 +45,12 @@
this.source.getAnnotationsByTypeTitle(this.segment_annotation_type).forEach(function(_a) {
_a.on("enter", function() {
_this.redraw(_a.begin, _a.end);
- })
+ });
});
} else {
this.redraw();
}
-}
+};
IriSP.Widgets.Tagcloud.prototype.redraw = function(_from, _to) {
var _urlRegExp = /https?:\/\/[0-9a-zA-Z\.%\/-_]+/g,
@@ -62,7 +62,7 @@
if (typeof _from !== "undefined" && typeof _to !== "undefined") {
_annotations = _annotations.filter(function(_annotation) {
return _annotation.begin >= _from && _annotation.end <= _to;
- })
+ });
}
_annotations.forEach(function(_annotation) {
@@ -76,7 +76,7 @@
if (IriSP._(_this.stopwords).indexOf(_word) == -1 && (!_this.exclude_pattern || !_this.exclude_pattern.test(_word))) {
_words[_word] = 1 + (_words[_word] || 0);
}
- })
+ });
});
_words = IriSP._(_words)
.chain()
@@ -84,7 +84,7 @@
return {
"word" : _k,
"count" : _v
- }
+ };
})
.filter(function(_v) {
return _v.count > 2;
@@ -109,7 +109,7 @@
});
this.source.getAnnotations().on("search", this.functionWrapper("onSearch"));
this.source.getAnnotations().on("search-cleared", this.functionWrapper("onSearch"));
-}
+};
IriSP.Widgets.Tagcloud.prototype.onSearch = function(searchString) {
searchString = typeof searchString !== "undefined" ? searchString : '';
@@ -125,4 +125,4 @@
_el.html(_txt);
}
});
-}
+};
--- a/web/res/metadataplayer/Trace.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Trace.js Tue Oct 01 16:33:47 2013 +0200
@@ -1,7 +1,7 @@
IriSP.Widgets.Trace = function(player, config) {
IriSP.Widgets.Widget.call(this, player, config);
-}
+};
IriSP.Widgets.Trace.prototype = new IriSP.Widgets.Widget();
@@ -13,7 +13,7 @@
default_subject: "IRI",
tracer: null,
extend: false
-}
+};
IriSP.Widgets.Trace.prototype.draw = function() {
if (typeof window.tracemanager === "undefined") {
@@ -37,7 +37,7 @@
IriSP._(_medialisteners).each(function(_ms, _listener) {
var _f = function(_arg) {
_this.eventHandler(_listener, _arg);
- }
+ };
if (_ms) {
_f = IriSP._.throttle(_f, _ms);
}
@@ -47,7 +47,7 @@
IriSP._(_annlisteners).each(function(_ms, _listener) {
var _f = function(_arg) {
_this.eventHandler(_listener, _arg);
- }
+ };
if (_ms) {
_f = IriSP._.throttle(_f, _ms);
}
@@ -93,15 +93,15 @@
}
_this.eventHandler('UIEvent', _data);
});
-}
+};
IriSP.Widgets.Trace.prototype.eventHandler = function(_listener, _arg) {
var _traceName = 'Mdp_';
if (typeof _arg == "string" || typeof _arg == "number") {
- _arg = { "value" : _arg }
+ _arg = { "value" : _arg };
}
if (typeof _arg == "undefined") {
- _arg = {}
+ _arg = {};
}
switch(_listener) {
case 'UIEvent':
@@ -127,4 +127,4 @@
if (this.js_console && typeof window.console !== "undefined" && typeof console.log !== "undefined") {
console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");");
}
-}
\ No newline at end of file
+};
\ No newline at end of file
--- a/web/res/metadataplayer/Tweet.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Tweet.js Tue Oct 01 16:33:47 2013 +0200
@@ -27,7 +27,7 @@
],
annotation_type: "tweet",
pin_at_start: false
-}
+};
IriSP.Widgets.Tweet.prototype.messages = {
"fr": {
@@ -50,7 +50,7 @@
video_time: "Video time: ",
show_original: "Show original"
}
-}
+};
IriSP.Widgets.Tweet.prototype.template =
'<div class="Ldt-Tweet-Widget"><div class="Ldt-Tweet-Inner"><div class="Ldt-Tweet-PinClose-Buttons">'
@@ -71,7 +71,7 @@
var _this = this;
this.$.find(".Ldt-Tweet-Pin").click(function() {
_this.pinned = !_this.pinned;
- var _el = IriSP.jQuery(this)
+ var _el = IriSP.jQuery(this);
if (_this.pinned) {
_el.addClass("active").attr("title",_this.l10n.dont_keep_visible);
_this.cancelTimeout();
@@ -89,7 +89,7 @@
_this.show(_annotation);
});
});
-}
+};
IriSP.Widgets.Tweet.prototype.show = function(_tweet) {
if (typeof _tweet !== "undefined" && typeof _tweet.source !== "undefined") {
@@ -97,7 +97,7 @@
[
/#(\w+)/gm,
function(matches) {
- return '<a href="http://twitter.com/search?q=%23' + matches[1] + '" target="_blank">'
+ return '<a href="http://twitter.com/search?q=%23' + matches[1] + '" target="_blank">';
},
'</a>'
]
@@ -147,22 +147,22 @@
} else {
this.hide();
}
-}
+};
IriSP.Widgets.Tweet.prototype.hide = function() {
this.player.trigger("Annotation.maximize");
this.$.slideUp();
this.cancelTimeout();
-}
+};
IriSP.Widgets.Tweet.prototype.cancelTimeout = function() {
if (typeof this.hide_timer !== "undefined") {
window.clearTimeout(this.hide_timer);
this.hide_timer = undefined;
}
-}
+};
IriSP.Widgets.Tweet.prototype.hideTimeout = function() {
this.cancelTimeout();
this.hide_timer = window.setTimeout(this.functionWrapper("hide"), this.hide_timeout);
-}
+};