Advertisement
fruffl

cinematic DOM

Jul 3rd, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.21 KB | None | 0 0
  1. <?PHP
  2. $js = <<<EOF
  3. jQuery(document).ready(function()
  4. {
  5.     var app = false;
  6.     $('ul.showcase').tri4m().app().ui().cinematic({
  7.         loader : {color : '#3b75af'},
  8.         bioscoop : 'bio',
  9.         callback :
  10.         {
  11.             thumbs :
  12.             {
  13.                 ready : function(list)
  14.                 {
  15.                     if(app == true) return;
  16.                     app = true;
  17.                     var img = ['s5', 's6', 's7', 's8', 's9', 's10'], a = [];
  18.                     for(var i in img)
  19.                         a[i] = '/dev:localhost/lib/ddl:image:file/themes!localhost!'+ img[i] + '.jpg';
  20.                    
  21.                     list.trigger('tri4m.app.cinematic.container.appendItems', [a]);
  22.                 };
  23.             }
  24.         }
  25.     });
  26.    
  27.     $('li.ctrl a.prev').click(function()
  28.     {
  29.         $('ul.showcase').trigger('tri4m.app.cinematic.container.prevItem');
  30.     });
  31.     $('li.ctrl a.next').click(function()
  32.     {
  33.         $('ul.showcase').trigger('tri4m.app.cinematic.container.nextItem');
  34.     });
  35. });
  36. EOF;
  37.  
  38. $this->get_SubController('bridge')->resource()->js()->add($js);
  39. ?>
  40. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
  41. <html version="XHTML+RDFa 1.0" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  42. <head>
  43. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
  44. <?php echo $this->get_Factory()->get_Title(); ?>
  45. <meta name="robots" content="index, follow" />
  46. <?php echo $this->get_Factory()->get_Styles(); ?>
  47. <?php echo $this->get_Factory()->get_Scripts(); ?>
  48. <?php echo $this->get_Factory()->get_InlineStyles(); ?>
  49. <?php echo $this->get_Factory()->get_InlineScripts(); ?>
  50.     </head>
  51.     <body class="localhost">
  52.         <div class="display m">
  53.             <ul class="nav">
  54.                 <li class="ctrl">
  55.                     <a class="prev">prev</a>
  56.                     <a class="next">next</a>
  57.                 </li>
  58.             </ul>
  59.             <div class="bio i w_10" id="bio"></div>
  60.         </div>
  61.         <div class="bottom">
  62.             <ul class="showcase">
  63.                 <li><a href="/dev:localhost/lib/ddl:image:file/themes!localhost!i2.jpg"></a>foo</li>
  64.                 <li><a href="/dev:localhost/lib/ddl:image:file/themes!localhost!s1.jpg"></a></li>
  65.                 <li><a href="/dev:localhost/lib/ddl:image:file/themes!localhost!s2.jpg"></a></li>
  66.                 <li><a href="/dev:localhost/lib/ddl:image:file/themes!localhost!s3.jpg"></a></li>
  67.                 <li><a href="http://www.youtube-nocookie.com/embed/IDr3YyIq_dM"></a></li>
  68.             </ul>
  69.         </div>
  70.     </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement