Guest User

Untitled

a guest
Oct 9th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.34 KB | None | 0 0
  1. {snippet miniCalendar} {$h}   <table id="mini-calendar-table" class="universal table-bordered table-condensed table-striped" style="width:250px;height:250px;">
  2.         <thead>
  3.             <tr><td style="cursor:pointer;"><i class="icon-arrow-left"></i></td><td colspan="5" align="center">{$months[$month]} {$year}</td><td style="cursor:pointer;"><i class="icon-arrow-right" style="float:right;"></i></td></tr>
  4.             <tr class="calendar-row" style="height:37,5px;">
  5.                 <th n:foreach="$headings as $value" style="width:37,5px;">
  6.                     {$value}
  7.                     </th>
  8.                 </tr>
  9.             </thead>
  10.             <tbody>
  11.                 <tr class="calendar-row" style="height:37,5px;">
  12.                     <td n:for="$x = 0; $x <  $running_day; $x++, $days_in_this_week++" class="calendar-day-np"style="width:37,5px;"></td>
  13.                     {for $list_day = 1; $list_day <= $days_in_month; $list_day++}
  14.                        {var $l = ($list_day < 10) ?  "0".$list_day : $list_day}
  15.                        {var $date = $year."-".(($month < 10)?"0".$month:$month)."-".$l}
  16.                        <td class="calendar-day" {ifset $pizza[$date]}rel="#d{$date}"{/ifset}style="width:37,5px;{if isset($pizza[$date]) and count($pizza[$date])}background:#C6DBFF;{/if}">
  17.                             <div {if isset($pizza[$date]) and count($pizza[$date])}style="cursor:pointer;" class="hover"{/if} data-date-formatted="{$list_day}.{$month}.{$year}" data-date="{$date}">
  18.                                 <div class="day-number">{$list_day}</div>
  19.                                 <div class="cleaner"></div>
  20.                             </div>
  21.                         </td>
  22.                         {if $running_day == 6}
  23.                         </tr>
  24.                         {if ($day_counter + 1) != $days_in_month}
  25.                             <tr class="calendar-row"style="height:37,5px;">
  26.                             {/if}
  27.                             {var $running_day = -1}
  28.                             {var $days_in_this_week = 0}
  29.                         {/if}
  30.  
  31.                         {?$running_day++}
  32.                         {?$day_counter++}
  33.                         {?$days_in_this_week++}
  34.                     {/for}
  35.                     {if $days_in_this_week < 8 and $days_in_this_week != 1}
  36.                        <td n:for="$x = 1; $x <=  (8 - $days_in_this_week); $x++" class="calendar-day-np"style="width:37,5px;"></td>
  37.                     {/if}
  38.                 </tr>
  39.             </tbody>
  40.         </table>
  41.                     <script>
  42.                          $('i.icon-arrow-left').click(function() {
  43.                 $.get({link back!});
  44.             });
  45.             $('i.icon-arrow-right').click(function() {
  46.                 $.get({link next!});
  47.             });
  48.                         </script>
  49. {/snippet}
  50.  
  51.  
  52.         <div id="actionsModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="actionsModalLabel" aria-hidden="true">
  53.             <div class="modal-header">
  54.                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  55.                 <h3 id="actionsModalLabel"></h3>
  56.             </div>
  57.             <div class="modal-body">
  58.                 {snippet dialog}
  59.                     <div class="dialog-inner">
  60.                         {foreach $showActions as $action}
  61.                             <div class="dialog-inner-action">
  62.                                 <h3>{$action->title}</h3>
  63.                                 <span>{$action->getFrom()|date:"%#d.%#m.%Y, %#H:%M"}</span> - <span>{$action->getTo()|date:"%#d.%#m.%Y, %#H:%M"}</span>
  64.                                 <div class="dialog-action-text">
  65.                                     {!$action->getText()}
  66.                                 </div>
  67.                             </div>
  68.                         {/foreach}
  69.                     </div>
  70.                 {/snippet}
  71.             </div>
  72.  
  73.             <div class="modal-footer">
  74.                 <button class="btn" data-dismiss="modal" aria-hidden="true">{$translatedText[0]}</button>
  75.             </div>
  76.         </div>
  77.  
  78.         <script>
  79.             $('document').ready(function() {
  80.  
  81.             $('#actionsModal').on('shown', function() {
  82.                 $('#actionsModal .modal-body').scrollTop(0);
  83.             });                                  
  84.                         $('div.hover').click(function() {
  85.                     var link = {link actions!} + '&dtt=' + $(this).data('date');
  86.                                 $.get(link, function(payload) {
  87.                                     jQuery.nette.success(payload);
  88.  
  89.                                                     $('#actionsModal').modal();
  90.                                                 });
  91.                                                 var el = $('h3#actionsModalLabel');
  92.                                                 el.text({$translatedText[1]} + $(this).data('date-formatted'));
  93.                                             });
  94.                                         });
  95.         </script>
  96.         <style>
  97.             .modal, .modal.fade.in {
  98.                 top: 50%;
  99.                 margin-top: -250px;
  100.             }
  101.             .modal {
  102.                 height: 500px;
  103.             }
  104.             .modal-body {
  105.                 height: 370px;
  106.             }
  107.         </style>
Advertisement
Add Comment
Please, Sign In to add comment