From: Michael J. Rubinsky Date: Tue, 4 Jan 2011 01:26:43 +0000 (-0500) Subject: pass the img height and width to the mobile view X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9defed70d72ad3e218c8d63f31040a02cc3e3966;p=horde.git pass the img height and width to the mobile view --- diff --git a/ansel/js/mobile.js b/ansel/js/mobile.js index 79b86714e..804093388 100644 --- a/ansel/js/mobile.js +++ b/ansel/js/mobile.js @@ -99,7 +99,7 @@ var AnselMobile = { $('#thumbs').empty(); AnselMobile.currentImages = r.imgs; $.each(r.imgs, function(k, i) { - var img = $('
  • ').addClass('anselthumb').append($('').attr({ 'href': '#', 'image-key': k, }).append($('').attr({ src: i.url }))); + var img = $('
  • ').addClass('anselthumb').append($('').attr({ 'href': '#', 'image-key': k, }).append($('').attr({ 'width': Ansel.conf.thumbWidth, 'height': Ansel.conf.thumbHeight, src: i.url }))); $('#thumbs').append(img); }); if ($.mobile.activePage.attr('id') != 'galleryview') { diff --git a/ansel/templates/mobile/javascript_defs.php b/ansel/templates/mobile/javascript_defs.php index e4fbf8ade..9ef415cea 100644 --- a/ansel/templates/mobile/javascript_defs.php +++ b/ansel/templates/mobile/javascript_defs.php @@ -3,14 +3,14 @@ global $prefs, $registry; $ansel_webroot = $registry->get('webroot'); $horde_webroot = $registry->get('webroot', 'horde'); +$style = Ansel::getStyleDefinition('ansel_mobile'); /* Variables used in core javascript files. */ $code['conf'] = array( 'URI_AJAX' => (string)Horde::getServiceLink('ajax', 'ansel'), 'SESSION_ID' => defined('SID') ? SID : '', - 'images' => array( - 'error' => (string)Horde_Themes::img('error-thumb.png'), - ), + 'thumbWidth' => ($style->width) ? $style->width : 75, + 'thumbHeight' => ($style->height) ? $style->height : 75, 'user' => $GLOBALS['registry']->convertUsername($GLOBALS['registry']->getAuth(), false), 'name' => $registry->get('name'), );