From: Michael J. Rubinsky Date: Sat, 1 Jan 2011 21:13:16 +0000 (-0500) Subject: build up the gallery mobile view X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4d5cfe9cc5b84db003dc80e24db22e1f73eaff95;p=horde.git build up the gallery mobile view Add initial mobile.css, and gallery template, load it with thumbnails. --- diff --git a/ansel/js/mobile.js b/ansel/js/mobile.js index 9268c404b..b1e5fc874 100644 --- a/ansel/js/mobile.js +++ b/ansel/js/mobile.js @@ -46,7 +46,13 @@ var AnselMobile = { */ galleryLoaded: function(r) { - console.log(r); + $('#galleryview h1').text(r.n); + // TODO: error checks, build any subgallery lists etc... + $.mobile.changePage('galleryview', 'slide', false, true); + $.each(r.imgs, function(k, i) { + var img = $('
  • ').append($('').attr({ src: i.url })); + $('#thumbs').append(img); + }); }, /** diff --git a/ansel/mobile.php b/ansel/mobile.php index 8ff8f6f53..2f9060971 100644 --- a/ansel/mobile.php +++ b/ansel/mobile.php @@ -26,6 +26,7 @@ require $registry->get('templates', 'horde') . '/common-header-mobile.inc'; echo $view->render('head'); echo $view->render('galleries'); +echo $view->render('gallery'); //echo $view->render('gallery'); //echo $view->render('photo'); echo $view->render('notice'); diff --git a/ansel/templates/mobile/gallery.html.php b/ansel/templates/mobile/gallery.html.php new file mode 100644 index 000000000..45f31a4c4 --- /dev/null +++ b/ansel/templates/mobile/gallery.html.php @@ -0,0 +1,8 @@ +
    +
    +

    +
    +
    +
      +
      +
      \ No newline at end of file diff --git a/ansel/themes/default/mobile.css b/ansel/themes/default/mobile.css new file mode 100644 index 000000000..480488c1e --- /dev/null +++ b/ansel/themes/default/mobile.css @@ -0,0 +1,32 @@ +ul.thumbView{ + list-style:none; + margin:0px; + border:none; +} +ul.thumbView li { + float:left; + position:relative; + width:80px; + height:80px; + border:none; + margin:0px; + padding:0px; + background:transparent; + line-height:80px; + overflow:visible; +} +ul.thumbView li a { + height:80px; + margin:0; + padding:0; + width:80px; + text-align:center; + vertical-align:middle; + display:table-cell; + overflow:visible; +} +ul.thumbView li a img{ + border:none; + vertical-align:middle; + -webkit-box-shadow:2px 2px 8px #000; +}