Changeset 9717


Ignore:
Timestamp:
Mar 15, 2011, 9:59:08 PM (13 years ago)
Author:
Zaphod
Message:

[extension] stripped - version 1.2.1

Location:
extensions/stripped
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped/js/scripts-tpp.js

    r9134 r9717  
    149149                        var pos0 = jQuery(Image).offset();
    150150                        if (!pos0) return;
    151                         var img_top = parseInt(pos0.top);
     151                        var img_top = Math.round(parseFloat(pos0.top));
    152152                        var win_height = jQuery(window).height();
    153153                        var img_H = win_height - img_top - marge_inf;
    154 
     154                        var max_H = img_H;
     155                       
    155156                        if (img_W0==0){
    156157                                img_W0=Image.width();
     
    164165                        if (img_H <= Hmin) img_H=Hmin;
    165166
    166                         var img_W = parseInt(img_H * img_ratio);
     167                        var img_W = Math.round(parseFloat(img_H * img_ratio));
    167168                       
    168169                        var max_W = jQuery("#content").width() - Image.outerWidth() + Image.width();
    169170                        if (img_W > max_W) {
    170                                 var img_H = parseInt(max_W / img_ratio);
     171                                var img_H = Math.round(parseFloat(max_W / img_ratio));
    171172                                if (img_H <= Hmin) {
    172173                                        img_H = Hmin;
    173                                         img_W = parseInt(img_H * img_ratio);
     174                                        img_W = Math.round(parseFloat(img_H * img_ratio));
    174175                                } else {
    175176                                        img_W = max_W;
     
    179180                        Image.css("width", img_W + "px");
    180181                        Image.css("height", img_H+ "px");
     182                       
     183                        jQuery.cookie("stripped_max_width",max_W);
     184                        jQuery.cookie("stripped_max_height",max_H);
    181185
    182186                        // limit img title Container width
     
    511515    }
    512516}
    513 
    514 
    515 
    516 
     517/**
     518 * Cookie plugin
     519 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
     520 * Dual licensed under the MIT and GPL licenses:
     521 */
     522jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=jQuery.extend({},options);options.expires=-1;}
     523var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
     524expires='; expires='+date.toUTCString();}
     525var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
     526return cookieValue;}};
     527
     528
     529
     530
  • extensions/stripped/readme.txt

    r9134 r9717  
    2727Changelog
    2828---------
     29
     30*** version 1.2.1
     31
     32- modification of scripts-tpp.js for DynamicSize
    2933
    3034*** version 1.2.0
  • extensions/stripped/themeconf.inc.php

    r9134 r9717  
    22/*
    33Theme Name: stripped
    4 Version: 1.2.0
     4Version: 1.2.1
    55Description: stripped Theme
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=471
Note: See TracChangeset for help on using the changeset viewer.