From 46562a849258be532f5afc2815d6abca8ef481ee Mon Sep 17 00:00:00 2001 From: Denis Shakhov Date: Mon, 22 Apr 2013 18:04:08 +0700 Subject: [PATCH] Fix photoset --- templates/framework/js/livestreet/photoset.js | 6 +++--- templates/skin/developer/js/init.js | 12 +++++++----- templates/skin/synio/js/init.js | 12 +++++++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/templates/framework/js/livestreet/photoset.js b/templates/framework/js/livestreet/photoset.js index 21fc4121..87a0990c 100644 --- a/templates/framework/js/livestreet/photoset.js +++ b/templates/framework/js/livestreet/photoset.js @@ -45,7 +45,7 @@ ls.photoset =( function ($) { this.addPhotoEmpty = function() { template = '
  • image' - +'

  • '; + +'
    '; $('#swfu_images').append(template); } @@ -54,8 +54,8 @@ ls.photoset =( function ($) { if (!response.bStateError) { template = '
  • image' +'
    ' - +''+ls.lang.get('topic_photoset_photo_delete')+'' - +''+ls.lang.get('topic_photoset_mark_as_preview')+'
  • '; + +''+ls.lang.get('topic_photoset_photo_delete')+'' + +''+ls.lang.get('topic_photoset_mark_as_preview')+''; $('#swfu_images').append(template); ls.msg.notice(response.sMsgTitle,response.sMsg); } else { diff --git a/templates/skin/developer/js/init.js b/templates/skin/developer/js/init.js index f2df9e76..5666e360 100644 --- a/templates/skin/developer/js/init.js +++ b/templates/skin/developer/js/init.js @@ -124,11 +124,13 @@ jQuery(document).ready(function($){ /** * Preview image */ - $('.js-topic-preview-image').imagesLoaded(function () { - var $this = $(this), - $preview = $this.closest('.js-topic-preview-loader').removeClass('loading'); - - $this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 ); + $('.js-topic-preview-image').each(function () { + $(this).imagesLoaded(function () { + var $this = $(this), + $preview = $this.closest('.js-topic-preview-loader').removeClass('loading'); + + $this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 ); + }); }); diff --git a/templates/skin/synio/js/init.js b/templates/skin/synio/js/init.js index 129fa19d..706fc427 100644 --- a/templates/skin/synio/js/init.js +++ b/templates/skin/synio/js/init.js @@ -176,11 +176,13 @@ jQuery(document).ready(function($){ /** * Preview image */ - $('.js-topic-preview-image').imagesLoaded(function () { - var $this = $(this), - $preview = $this.closest('.js-topic-preview-loader').removeClass('loading'); - - $this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 ); + $('.js-topic-preview-image').each(function () { + $(this).imagesLoaded(function () { + var $this = $(this), + $preview = $this.closest('.js-topic-preview-loader').removeClass('loading'); + + $this.height() < $preview.height() && $this.css('top', ($preview.height() - $this.height()) / 2 ); + }); });