Changeset 4514


Ignore:
Timestamp:
Dec 19, 2009, 12:19:53 AM (14 years ago)
Author:
vdigital
Message:

[Update] For Juza - Juza Theme Configuration Menu is working at 80% at least

  • Exception management (png/JPG mixed extensions support) not tested

Pendings:

  • Menubar
Location:
extensions/Juza
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Juza/js/juzascript.js

    r4482 r4514  
    44  });
    55  $('div.illustration a img').each(function() {
    6     $(this).addClass('bigImg').attr('src', $(this).attr('src').replace('thumbnail/TN-', ''));
     6    $src = $(this).addClass('bigImg').attr('alt');
     7                $medium = $('#ix-cat .Cat-'+$src).eq(0).attr('title');
     8                $title = $('#ix-cat .Cat-'+$src).eq(0).attr('alt');
     9                $(this).attr('src', $medium).attr('title', $title);
    710  });
    811        $('.thumbnailCategories li').addClass('Juza-cat');
     
    1720        $('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
    1821  $('span.wrap2 a img').click(function() {
    19     $scr = $(this).attr('src').replace('thumbnail/TN-', '');
    2022    $href = $(this).parent('a').attr('href');
    2123    $alt = $(this).attr('alt');
     
    2426    $temp = $temp.substr(0,$temp.indexOf('/'));
    2527    $title = $('#ix-desc .Thumb-'+$temp).attr('title');
    26     $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$scr+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
     28    $src = $('#ix-desc .Medium-'+$temp).attr('title');
     29    $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$src+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
    2730          $(this).hover(function() { },function() {
    2831            $(this).parent('h3 a').eq(0).attr('href', $href);
  • extensions/Juza/script.tpl

    r4498 r4514  
    11{if isset($Juza_active)}
    2 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
    3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"}
    4 {assign var=JUZA value=$ROOT_URL|@cat:"template/"|@cat:$themeconf.template|@cat:"/theme/"|@cat:$themeconf.theme}
    5 {known_script id="juza" src=$JUZA|@cat:"/js/juzascript.js"}
    6 {/if}
    7 {html_head}
    8 <style type="text/css">
     2        {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
     3        {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"}
     4        {assign var=JUZA value=$ROOT_URL|@cat:"template/"|@cat:$themeconf.template|@cat:"/theme/"|@cat:$themeconf.theme}
     5        {known_script id="juza" src=$JUZA|@cat:"/js/juzascript.js"}
     6        {html_head}
     7        <script type="text/javascript">
     8          $('img.bigImg').each(function() {ldelim}
     9            $h = $(this).height()
     10                        if ($h < {$Juza_height}) {ldelim}
     11                                $(this).parent('.maxIllustration a').eq(0).css('height', $h+'px');
     12                                $(this).parent('li.Juza-cat').eq(0).css('height', (55+$h)+'px');
     13                                $(this).parent('li.Juza-cat').eq(0).css('min-height', (55+$h)+'px');
     14                                $(this).parent('li.Juza-cat').children('.description').eq(0).css('height', (325+$h)+'px');
     15                                $(this).parent('li.Juza-cat').children('.description').eq(0).css('top', (-(12+$h))+'px');
     16                        }
     17                });
     18        </script>
     19        {if isset($Juza_Auto_CS)} {* Auto Cropping and Shifting *}
     20                <style type="text/css">
    921.maxIllustration a {ldelim} max-height: {$Juza_height}px; height: {$Juza_height}px; width:{$Juza_width}px; }
    1022.bigImg {ldelim} top:{$Juza_shift}px; width:{$Juza_width}px !important; }
    1123#imageToolBar {ldelim} top:{$Juza_shift2}px; }
    1224.content ul.thumbnailCategories li.Juza-cat {ldelim} height:{$Juza_height2}px; min-height:{$Juza_height2}px; }
     25                </style>
     26        {else}
     27        <script type="text/javascript">
     28          $('img.bigImg').each(function() {ldelim}
     29            $h = $(this).height()
     30                        $(this).parent('.maxIllustration a').eq(0).css('height', $h+'px');
     31                        $(this).parent('li.Juza-cat').eq(0).css('height', (55+$h)+'px');
     32                        $(this).parent('li.Juza-cat').eq(0).css('min-height', (55+$h)+'px');
     33                        $(this).parent('li.Juza-cat').children('.description').eq(0).css('height', (325+$h)+'px');
     34                        $(this).parent('li.Juza-cat').children('.description').eq(0).css('top', (-(12+$h))+'px');
     35                        $(this).after('--'+$h+'px --');
     36                });
     37        </script>
     38        {/if}
     39        <style type="text/css">
    1340.content div.thumbnailCategory div.description {ldelim} height:{$Juza_height3}px !important; top:{$Juza_shift3}px; }
    1441#copyright {ldelim} margin-top: {$Juza_width}px; }
    1542table.juzabar td {ldelim} width: 155px; }
    16 </style>
    17 {/html_head}
     43        </style>
     44<noscript>
     45        <style type="text/css">
     46.maxIllustration a {ldelim} max-height: auto; height: auto; width:auto; }
     47.bigImg {ldelim} top:0px; width:auto !important; }
     48#imageToolBar {ldelim} top:0px; }
     49.content ul.thumbnailCategories li.Juza-cat {ldelim} height:auto; min-height:auto; }
     50.content div.thumbnailCategory div.description {ldelim} height:auto !important; top:0px; }
     51#copyright {ldelim} margin-top: 0px; }
     52.content ul.thumbnailCategories li {ldelim} width:49.7%; }
     53        </style>
     54</noscript>
     55
     56        {/html_head}
     57{else}
     58        {html_head}
     59        <style type="text/css">
     60.content ul.thumbnailCategories li {ldelim} width:49.7%; }
     61        </style>
     62        {/html_head}
     63{/if}
    1864<table cellspacing="0" class="juzabar">
    1965<tbody><tr>
     
    2874</tr>
    2975</tbody></table>
    30 {if isset($thumbnails) }
     76{if isset($thumbnails) and isset($Juza_active)}
    3177<div id="ix-desc" style="display:none">
    3278{foreach from=$thumbnails item=thumbnail}
    33   <div title="{$thumbnail.FILE_DESC|@htmlspecialchars}" class="Thumb-{$thumbnail.ID}" width="{$thumbnail.FILE_WIDTH}" height="{$thumbnail.FILE_HEIGHT}"></div>
     79  <div title="{$thumbnail.FILE_DESC|@htmlspecialchars}" class="Thumb-{$thumbnail.ID}" alt="{$thumbnail.FILE_WIDTH}"></div>
     80         <div title="{$thumbnail.FILE_PATH}" class="Medium-{$thumbnail.ID}" alt="{$thumbnail.FILE_HEIGHT}"></div>
     81{/foreach}
     82</div>
     83{/if}
     84{if isset($category_thumbnails) and isset($Juza_active)}
     85<div id="ix-cat" style="display:none">
     86{foreach from=$category_thumbnails item=cat}
     87  <div title="{$cat.TN_SRC|@Juza_file}" alt="{$cat.DESCRIPTION|@htmlspecialchars}" class="Cat-{$cat.NAME}"></div>
    3488{/foreach}
    3589</div>
     
    4498        <span class="property">{'Activate Juza handlers'|@translate}</span>
    4599        <input type="checkbox" name="Juza_handlers" {$Juza_handlers} />
    46         <span class="range">{'Not currently working'|@translate}</span>
     100        <span class="range">{'Unselected => like Javascript inactive'|@translate}</span>
    47101     </label>
    48102    </li>
     
    65119        <label for="Shift">{'Index picture top-shift'|@translate}</label>
    66120      </span>
    67       <input type="text" size="4" maxlength="4" name="Juza_shift" id="Juza_height" value="{$Juza_shift}" />
     121      <input type="text" size="4" maxlength="4" name="Juza_shift" id="Juza_shift" value="{$Juza_shift}" />
    68122      <span class="range">{'[-320:0]'|@translate}</span>
    69123    </li>
     
    72126        <span class="property">{'Auto cropping and shifting'|@translate}</span>
    73127        <input type="checkbox" name="Juza_Auto_CS" {$Juza_Auto_CS} />
    74         <span class="range">{'Not currently working (Always active)'|@translate}</span>
     128        <span class="range">{'Recommended medium width less 885px'|@translate}</span>
    75129      </label>
    76130    </li>
    77131  </ul>
    78132</fieldset>
    79   <p>
     133 
    80134    <input type="hidden" value="true" name="Juza_conf" />
    81     <input class="submit" type="submit" name="Juza_submit" value="{'Submit'|@translate}">
    82     <input class="submit" type="submit" name="Juza_reset" value="{'Reset'|@translate}">
    83     <input class="submit" type="submit" name="Juza_close" value="{'Close'|@translate}">
    84   </p>
     135    <input class="submit" type="submit" name="Juza_submit" value="{'Submit'|@translate}" />
     136    <input class="submit" type="submit" name="Juza_reset" value="{'Reset'|@translate}" />
     137    <input class="submit" type="submit" name="Juza_close" value="{'Close'|@translate}" />
     138 
    85139</form>
    86140{/if}
Note: See TracChangeset for help on using the changeset viewer.