Skip to content

Commit

Permalink
fix code review += metadataseparator += inplacevideo boundedcontext n…
Browse files Browse the repository at this point in the history
…on-void check
  • Loading branch information
decheng-zhang committed Oct 2, 2018
1 parent 590fded commit 35ebb72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 4 additions & 0 deletions nunaliit2-js/src/main/js/nunaliit2/css/basic/n2.couchShow.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ div.n2Show_icon_speaker:hover {
background-position: -75px 0;
}

div.n2s_insertedMediaView br.n2MediaDisplay_metaDataSeparator {
line-height: 3;
}

.n2Show_docNotFound {
color: #ff0000;
}
Expand Down
16 changes: 7 additions & 9 deletions nunaliit2-js/src/main/js/nunaliit2/n2.mediaDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,11 @@ $n2.MediaDisplay = $n2.Class({
}

,_displayVideoMediaElementInplace: function(opts) {
var $inplaceDiv = opts.insertView || null;
// TODO: Must do something if the opts.insertView is not provided.
// Log an error or put something somewhere. Do not fail silently.
if($inplaceDiv != null){
if (typeof opts.insertView === "undefined"
|| opts.insertView == null) {
$n2.log('The context view must be provided when creating a inplace media player');
} else {
var $inplaceDiv=opts.insertView;
var thumbnailUrl = $inplaceDiv.find(".n2Show_thumb_wrapper img").attr("src");
$inplaceDiv.find(".n2Show_thumb_wrapper img").remove();

Expand Down Expand Up @@ -606,12 +607,9 @@ $n2.MediaDisplay = $n2.Class({
}

,_addMetaData: function(opts, $elem) {
// TODO: Spacing and alignment should be fixed by CSS,
// not adding more elements
$elem.append( $('<br/>') );
//$elem.append( $('<br/>') );
//$elem.append( $('<br/>') );

$elem.append( $('<br class="n2MediaDisplay_metaDataSeparator"/>') );

if( opts.metaDataHtml ) {
var $meta = $('<span></span>');
$meta.html(opts.metaDataHtml);
Expand Down
4 changes: 2 additions & 2 deletions nunaliit2-js/src/main/js/nunaliit2/n2.widgetTranscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ var SrtToJsonConvertor = $n2.Class('SrtToJsonConvertor',{
"fin": null,
"text": ""
};
$n2.log("The"+tmpIdx+"-th transcript");
$n2.log("The timecode: "+ tmpTimecode);
//$n2.log("The"+tmpIdx+"-th transcript");
//$n2.log("The timecode: "+ tmpTimecode);

curEntry.start = tmpTimecode.substring(0,2)*3600 + tmpTimecode.substring(3,5)*60
+ tmpTimecode.substring(6,8);
Expand Down

0 comments on commit 35ebb72

Please sign in to comment.