Changeset 30248


Ignore:
Timestamp:
Oct 21, 2014, 9:12:25 PM (9 years ago)
Author:
rvelices
Message:

bug 3131 : modus no icon for calendar by posted date
also some code cleanup

Location:
extensions/modus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/modus/css/iconfontello.css.tpl

    r28601 r30248  
    2626        display: inline-block;
    2727        vertical-align: top;
    28   cursor:pointer;
     28        cursor:pointer;
    2929}
    3030
    3131.pwg-icon-slideshow:before { content: '\25b6';}
    3232.pwg-icon-favorite-del:before { content: '\2661\2d'; letter-spacing: -2px}
     33
     34{if $conf.index_posted_date_icon}
     35{if $conf.index_created_date_icon}
     36.pwg-icon-calendar:before { content: '\f133'; }
     37.pwg-icon-camera-calendar:before { content: '\e70f'; }
     38{else}
     39.pwg-icon-calendar:before { content: '\f133'; }
     40{/if}
     41{/if}
    3342
    3443{if  isset($loaded_plugins['BatchDownloader'])}
  • extensions/modus/themeconf.inc.php

    r30053 r30248  
    1313);
    1414
    15 define('MODUS_POP',0);
    1615define('MODUS_STR_RECENT', "\xe2\x9c\xbd"); //HEAVY TEARDROP-SPOKED ASTERISK
    1716define('MODUS_STR_RECENT_CHILD', "\xe2\x9c\xbb"); //TEARDROP-SPOKED ASTERISK
     
    2625
    2726$this->assign('MODUS_CSS_VERSION', crc32(implode(',', array(
    28                 'd'.@$conf['modus_theme']['skin'],
     27                'a'.@$conf['modus_theme']['skin'],
    2928                @$conf['modus_theme']['album_thumb_size'],
    3029                ImageStdParams::get_by_type(IMG_SQUARE)->max_width(),
    31                 MODUS_POP
     30                $conf['index_created_date_icon'],
     31                $conf['index_posted_date_icon'],
    3232        ))));
    3333
     
    9595
    9696        $template->assign( array(
     97                'conf' => $conf,
    9798                'skin' => $skin,
    9899                'MODUS_ALBUM_THUMB_SIZE' => intval(@$conf['modus_theme']['album_thumb_size']),
     
    165166        }
    166167
    167         $do_pop = MODUS_POP && 'desktop' == $device;
    168         $do_over = !MODUS_POP && 'desktop' == $device;
    169 
    170         if ($do_pop && !isset($_GET['rvts'])) echo '<div id=pop style=display:none;z-index:2;border:0;position:absolute></div>
    171 ';
     168        $do_over = 'desktop' == $device;
    172169
    173170        $new_icon = " <span class=albSymbol title=\"".l10n('posted on %s')."\">".MODUS_STR_RECENT.'</span>';
     
    187184                while($csize[1]<$row_height-2 && $idx<count($candidates));
    188185
    189                 if ($do_pop && $idx<count($candidates))
    190                 {
    191                         $pop = new DerivativeImage($candidates[$idx], $src_image);
    192                         $popsize = $pop->get_size();
    193                 }
    194                 else
    195                 {
    196                         $pop = $c;
    197                         $popsize = $csize;
    198                 }
    199 
    200186                $a_style = '';
    201187                if ($csize[1] < $row_height)
     
    203189                elseif ($csize[1] > $row_height)
    204190                        $csize = $c->get_scaled_size(9999, $row_height);
    205                 if ($do_pop) {?>
    206 <li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>" data-pop='{"w":<?=$popsize[0]?>,"h":<?=$popsize[1]?>,"url":"<?=$pop->get_url()?>"}'></a><b class=popDesc><b><?=$item['NAME']?></b><?=$new?><br><?=$item['DESCRIPTION']?></b></li>
    207 <?php
    208                 } elseif ($do_over) {?>
     191                if ($do_over) {?>
    209192<li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>"></a><div class=overDesc><?=$item['NAME']?><?=$new?></div></li>
    210193<?php
     
    223206        // not async to avoid visible flickering reflow
    224207        $template->scriptLoader->add('modus.arange', 1, array('jquery'), 'themes/'.$my_base_name."/js/thumb.arrange.min.js", 0);
    225         if ($do_pop)
    226                 $template->scriptLoader->add('modus.pop', 2, array('jquery'), 'themes/'.$my_base_name."/js/thumb.pop.js", 0);
    227208}
    228209
     
    234215                $template->block_footer_script(null, 'try{document.cookie="caps="+(window.devicePixelRatio?window.devicePixelRatio:1)+"x"+document.documentElement.clientWidth+"x"+document.documentElement.clientHeight+";path='.cookie_path().'"}catch(er){document.cookie="caps=1x1x1x"+err.message;}');
    235216
    236         $req = null;
    237         $all = $template->scriptLoader->get_all();
    238         if (isset($all['modus.thumb.pop']) || !MODUS_POP || 'desktop' != get_device())
    239                 return;
    240         foreach($all as $script)
    241         {
    242                 if($script->load_mode==2 && !$script->is_remote() && count($script->precedents)==0)
    243                 {
    244                         $req = $script->id;
    245                         break;
    246                 }
    247         }
    248         if($req!=null)
    249                 $template->scriptLoader->add('modus.pop', 2, array($req), 'themes/'.basename(dirname(__FILE__))."/js/thumb.pop.js", 0);
    250217}
    251218
     
    401368                        }
    402369                }
    403 
    404                 /*$debug[]= "avsize ".implode(',', $available_size);
    405                 $debug[]= "selsize ".implode(',', $selected_derivative->get_size());*/
    406370
    407371                if ($available_size[2]>1 && $selected_derivative)
     
    419383                                $display_size = array( round($size[0]/$available_size[2]), round($size[1]/$available_size[2]) );
    420384
    421                         /*$debug[]= "dsize ".implode(',', $display_size);
    422                         $debug[]= "nsize ".implode(',', $size);*/
    423 
    424385                        $template->assign( array(
    425386                                        'rvas_display_size' => $display_size,
     
    427388                                ));
    428389                }
    429                 /*if (is_admin())
    430                 $template->append('footer_elements', implode("\n", $debug));*/
    431390
    432391                if (isset($picture['next'])
Note: See TracChangeset for help on using the changeset viewer.