Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube shared videos playwright tests #646

Merged
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ function attr($attr, $file) {
<div id="user-video-gallery-main-current">
<span id="user-video-gallery-spinner-current"></span>
</div>
<p class="js-no-movies" style="display: none;">No shared movies found.</p>
<p class="js-no-movies" style="display: none;">No movies found around the observation date.</p>
</div>
</div>
</div>
Expand All @@ -741,6 +741,7 @@ function attr($attr, $file) {
<div id="user-video-gallery-main">
<span id="user-video-gallery-spinner"></span>
</div>
<p class="js-no-movies" style="display: none;">No shared movies found.</p>
</div>
</div>
</div>
Expand Down
23 changes: 18 additions & 5 deletions resources/js/UI/UserVideoGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ var UserVideoGallery = Class.extend(
init : function (url) {
this._container = $("#user-video-gallery-main");
this._containerCurrent = $("#user-video-gallery-main-current");
this._noSharedMoviesFound = $("#user-video-gallery-current .js-no-movies");
this._noSharedMoviesFound = $("#user-video-gallery .js-no-movies");
this._noSharedMoviesFoundForObservationDate = $("#user-video-gallery-current .js-no-movies");
this._loader = $("#user-video-gallery-spinner");
this._loaderCurrent = $("#user-video-gallery-spinner-current");

Expand Down Expand Up @@ -262,9 +263,15 @@ var UserVideoGallery = Class.extend(
count++;
});

if($('.user-video-thumbnail-container-recent').length == 0){
if($('.user-video-thumbnail-container-current').length == 0){
this._noSharedMoviesFoundForObservationDate.show();
} else {
this._noSharedMoviesFoundForObservationDate.hide();
}

if($('.user-video-thumbnail-container-recent').length == 0){
this._noSharedMoviesFound.show();
} else {
} else {
this._noSharedMoviesFound.hide();
}

Expand Down Expand Up @@ -370,14 +377,20 @@ var UserVideoGallery = Class.extend(
}

if($('.user-video-thumbnail-container-current').length == 0){
this._noSharedMoviesFound.show();
this._noSharedMoviesFoundForObservationDate.show();
} else {
this._noSharedMoviesFound.hide();
this._noSharedMoviesFoundForObservationDate.hide();
if(count == this._numVideosCurrent){
this._containerCurrent.append('<span class="user-video-current-show-more">SHOW MORE</span>');
}
}

if($('.user-video-thumbnail-container-recent').length == 0){
this._noSharedMoviesFound.show();
} else {
this._noSharedMoviesFound.hide();
}

$('#user-video-gallery-main-current > div').off();
$('#user-video-gallery-main-current > div').hover(function(){
var id = $(this).data('id');
Expand Down
Loading
Loading