mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-05 16:04:24 +03:00
Fix photoset
This commit is contained in:
parent
dfd5258924
commit
46562a8492
|
@ -45,7 +45,7 @@ ls.photoset =( function ($) {
|
||||||
|
|
||||||
this.addPhotoEmpty = function() {
|
this.addPhotoEmpty = function() {
|
||||||
template = '<li id="photoset_photo_empty"><img src="'+DIR_STATIC_SKIN + '/images/loader.gif'+'" alt="image" style="margin-left: 35px;margin-top: 20px;" />'
|
template = '<li id="photoset_photo_empty"><img src="'+DIR_STATIC_SKIN + '/images/loader.gif'+'" alt="image" style="margin-left: 35px;margin-top: 20px;" />'
|
||||||
+'<div id="photoset_photo_empty_progress" style="height: 60px;width: 350px;padding: 3px;border: 1px solid #DDDDDD;"></div><br /></li>';
|
+'<div id="photoset_photo_empty_progress" style="height: 60px;padding: 3px;border: 1px solid #DDDDDD;" class="width: full"></div></li>';
|
||||||
$('#swfu_images').append(template);
|
$('#swfu_images').append(template);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ ls.photoset =( function ($) {
|
||||||
if (!response.bStateError) {
|
if (!response.bStateError) {
|
||||||
template = '<li id="photo_'+response.id+'"><img src="'+response.file+'" alt="image" />'
|
template = '<li id="photo_'+response.id+'"><img src="'+response.file+'" alt="image" />'
|
||||||
+'<textarea onBlur="ls.photoset.setPreviewDescription('+response.id+', this.value)" class="width-full"></textarea><br />'
|
+'<textarea onBlur="ls.photoset.setPreviewDescription('+response.id+', this.value)" class="width-full"></textarea><br />'
|
||||||
+'<a href="javascript:ls.photoset.deletePhoto('+response.id+')">'+ls.lang.get('topic_photoset_photo_delete')+'</a>'
|
+'<a href="javascript:ls.photoset.deletePhoto('+response.id+')" class="link-dotted">'+ls.lang.get('topic_photoset_photo_delete')+'</a>'
|
||||||
+'<span id="photo_preview_state_'+response.id+'" class="photo-preview-state"><a href="javascript:ls.photoset.setPreview('+response.id+')" class="mark-as-preview">'+ls.lang.get('topic_photoset_mark_as_preview')+'</a></span></li>';
|
+'<span id="photo_preview_state_'+response.id+'" class="photo-preview-state"><a href="javascript:ls.photoset.setPreview('+response.id+')" class="link-dotted mark-as-preview">'+ls.lang.get('topic_photoset_mark_as_preview')+'</a></span></li>';
|
||||||
$('#swfu_images').append(template);
|
$('#swfu_images').append(template);
|
||||||
ls.msg.notice(response.sMsgTitle,response.sMsg);
|
ls.msg.notice(response.sMsgTitle,response.sMsg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -124,11 +124,13 @@ jQuery(document).ready(function($){
|
||||||
/**
|
/**
|
||||||
* Preview image
|
* Preview image
|
||||||
*/
|
*/
|
||||||
$('.js-topic-preview-image').imagesLoaded(function () {
|
$('.js-topic-preview-image').each(function () {
|
||||||
var $this = $(this),
|
$(this).imagesLoaded(function () {
|
||||||
$preview = $this.closest('.js-topic-preview-loader').removeClass('loading');
|
var $this = $(this),
|
||||||
|
$preview = $this.closest('.js-topic-preview-loader').removeClass('loading');
|
||||||
$this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 );
|
|
||||||
|
$this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 );
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -176,11 +176,13 @@ jQuery(document).ready(function($){
|
||||||
/**
|
/**
|
||||||
* Preview image
|
* Preview image
|
||||||
*/
|
*/
|
||||||
$('.js-topic-preview-image').imagesLoaded(function () {
|
$('.js-topic-preview-image').each(function () {
|
||||||
var $this = $(this),
|
$(this).imagesLoaded(function () {
|
||||||
$preview = $this.closest('.js-topic-preview-loader').removeClass('loading');
|
var $this = $(this),
|
||||||
|
$preview = $this.closest('.js-topic-preview-loader').removeClass('loading');
|
||||||
$this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 );
|
|
||||||
|
$this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 );
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue