Plugin Directory

Changeset 479991


Ignore:
Timestamp:
12/23/2011 08:24:18 PM (14 years ago)
Author:
ciprian_vb
Message:

update to 3.0.1.0

Location:
live-countdown-timer/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • live-countdown-timer/trunk/live-countdown-timer.php

    r476875 r479991  
    77  Author: Turcu Ciprian
    88  License: GPL
    9   Version: 3.0.0.2
     9  Version: 3.0.1.0
    1010  Author URI: http://www.chipree.com/
    1111
     
    4141            ?>
    4242            <script type="text/javascript">
    43                            
     43                                                               
    4444                jQuery(".lct_dtp").live('hover',function(){
    4545                    jQuery(".lct_dtp").datetimepicker({
     
    6868            echo "selected"; ?> value="2">Medium (Single box)</option>
    6969            <option <?php if ($lct_vArr['lct_type'] == "3")
    70             echo "selected"; ?> value="3">Small (Single box-4 box)</option>
     70            echo "selected"; ?> value="3">Small (Single box)</option>
    7171            <option <?php if ($lct_vArr['lct_type'] == "4")
    72             echo "selected"; ?> value="4">Big (complete timer-4 box)</option>
     72            echo "selected"; ?> value="4">Big (complete timer-5 box)</option>
    7373            <option <?php if ($lct_vArr['lct_type'] == "5")
    74             echo "selected"; ?> value="5">Medium (complete timer-4 box)</option>
     74            echo "selected"; ?> value="5">Medium (complete timer-5 box)</option>
    7575            <option <?php if ($lct_vArr['lct_type'] == "6")
    76             echo "selected"; ?> value="6">Small (complete timer-4 box)</option>
     76            echo "selected"; ?> value="6">Small (complete timer-5 box)</option>
    7777        </select><br/> 
    7878        Pick Date and Time:<br/>   
     
    121121            case "4":
    122122                echo '<div class="LCT">';
     123                echo '<div class="big"><div class="type">YEARS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    123124                echo '<div class="big"><div class="type">DAYS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    124125                echo '<div class="big"><div class="type">HOURS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
     
    129130            case "5":
    130131                echo '<div class="LCT">';
     132                echo '<div class="medium"><div class="type">YEARS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    131133                echo '<div class="medium"><div class="type">DAYS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    132134                echo '<div class="medium"><div class="type">HOURS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
     
    137139            case "6":
    138140                echo '<div class="LCT">';
     141                echo '<div class="small"><div class="type">YEARS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    139142                echo '<div class="small"><div class="type">DAYS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
    140143                echo '<div class="small"><div class="type">HOURS</div><div class="bg"><p>--</p><div class="over"></div></div></div>';
  • live-countdown-timer/trunk/script.js

    r476219 r479991  
    1313    var hours=minutes*60;
    1414    var days=hours*24;
    15     //var years=days*365;
     15    var years=days*365;
    1616       
    17     var db_time = new Date(tempdate[1]+' '+tempdate[2]+', '+tempdate[0]+' '+temptime[0]+':'+temptime[1]+':00' );
     17    var db_time = new Date(tempdate[1]+' '+tempdate[2]+', '+tempdate[0]+' '+temptime[0]+':'+temptime[1]+':00');
    1818    var now_time = new Date();
    1919    db_time = db_time.getTime();
     
    2121    var lctresult = db_time-now_time;
    2222       
    23     lct_days = Math.floor(lctresult/days);
    24     lct_hours = Math.floor(lctresult/hours)-(lct_days*24);
    25     lct_minutes = Math.floor(lctresult/minutes)-(lct_hours*60)-(lct_days*24*60);
    26     lct_seconds = Math.floor(lctresult/seconds)-(lct_minutes*60)-(lct_hours*60*60)-(lct_days*60*24*60);
    27     if(lct_days>99)lct_days=99;
     23    lct_years = Math.floor(lctresult/years);
     24    lct_days = Math.floor(lctresult/days)-(lct_years*365);
     25    lct_hours = Math.floor(lctresult/hours)-(lct_days*24)-(lct_years*365*24);
     26    lct_minutes = Math.floor(lctresult/minutes)-(lct_hours*60)-(lct_days*24*60)-(lct_years*365*24*60);
     27    lct_seconds = Math.floor(lctresult/seconds)-(lct_minutes*60)-(lct_hours*60*60)-(lct_days*60*24*60)-(lct_years*365*24*60*60);
     28    singlebox=false;
     29    if(lct_years>99){
     30        lct_years=99;
     31    }
     32    if(lct_days>99){
     33
     34        singlebox=true;
     35    }
     36    if(lct_years<0)lct_years=0;
    2837    if(lct_days<0)lct_days=0;
    29     if(lct_hours>24)lct_hours=24;
    3038    if(lct_hours<0)lct_hours=0;
    3139    if(lct_minutes>60)lct_minutes=60;
    3240    if(lct_minutes<0)lct_minutes=0;
    33     if(lct_seconds>60)lct_seconds=60;
    3441    if(lct_seconds<0)lct_seconds=0;
     42       
    3543       
    36     if(jQuery('.LCT').find('div.type').siblings().length==4){
    37         jQuery('.LCT').find('div:nth-child(1) .bg p').html(lct_days);
    38         jQuery('.LCT').find('div:nth-child(2) .bg p').html(lct_hours);
    39         jQuery('.LCT').find('div:nth-child(3) .bg p').html(lct_minutes);
    40         jQuery('.LCT').find('div:nth-child(4) .bg p').html(lct_seconds);
     44    if(jQuery('.LCT').find('div.type').siblings().length==5){
     45        jQuery('.LCT').find('div:nth-child(1) .bg p').html(lct_years);
     46        jQuery('.LCT').find('div:nth-child(2) .bg p').html(lct_days);
     47        jQuery('.LCT').find('div:nth-child(3) .bg p').html(lct_hours);
     48        jQuery('.LCT').find('div:nth-child(4) .bg p').html(lct_minutes);
     49        jQuery('.LCT').find('div:nth-child(5) .bg p').html(lct_seconds);
     50       
     51        if(jQuery('.LCT div:nth-child(2)').hasClass('big')){
     52            if(singlebox==true)jQuery('.LCT  div:nth-child(2).big .bg p').addClass("evensmaller");
     53        }
     54        if(jQuery('.LCT div:nth-child(2).medium').hasClass('medium')){
     55            if(singlebox==true)jQuery('.LCT div:nth-child(2).medium .bg p').addClass("evensmaller");
     56        }
     57        if(jQuery('.LCT div:nth-child(2).small').hasClass('small')){
     58            if(singlebox==true)jQuery('.LCT div:nth-child(2).small .bg p').addClass("evensmaller");
     59        }
    4160    }else{
    42         if(lct_days!=0 && lct_days>0){
    43             jQuery('.LCT').find('div .bg p').html(lct_days);           
     61        if(lct_years!=0 && lct_years>0){
     62            jQuery('.LCT').find('div .bg p').html(lct_years);
     63            jQuery('.LCT div .type').html('YEARS');
     64        }else if(lct_days!=0 && lct_days>0){
     65            jQuery('.LCT').find('div .bg p').html(lct_days);
    4466            jQuery('.LCT div .type').html('DAYS');
    4567        }else if(lct_hours!=0 && lct_hours>0){
     
    5476        }
    5577       
     78        if(jQuery('.LCT div:nth-child(1).big').length!=0){
     79            if(singlebox==true)jQuery('.LCT  div:nth-child(1).big .bg p').addClass("evensmaller");
     80        }
     81        if(jQuery('.LCT div:nth-child(1).medium').length!=0){
     82            if(singlebox==true)jQuery('.LCT div:nth-child(1).medium .bg p').addClass("evensmaller");
     83        }
     84        if(jQuery('.LCT div:nth-child(1).small').length!=0){
     85            if(singlebox==true)jQuery('.LCT div:nth-child(1).small .bg p').addClass("evensmaller");
     86        }
    5687    }
    5788
  • live-countdown-timer/trunk/style.css

    r476219 r479991  
    66body .LCT .big .bg{width:124px;height:117px;background:url(images/big_bg.png);text-align:center;}
    77body .LCT .big .bg p{width:124px;height:117px;text-align: center; margin:0px;padding:0px;font-size:66px;padding-top:8px;line-height:80px;color:#000;}
     8body .LCT .big .bg p.evensmaller{font-size:48px;}
    89body .LCT .big .bg .over{margin-left:4px;width:115px;height:65px;background:url(images/big_over.png);margin-top:-124px;}
    910/*medium*/
     
    1213body .LCT .medium .bg{width:75px;height:71px;background:url(images/medium_bg.png);text-align:center;}
    1314body .LCT .medium .bg p{width:75px;height:71px;text-align: center; margin:0px;padding:0px;font-size:45px;padding-top:1px;line-height:55px;color:#000;}
     15body .LCT .medium .bg p.evensmaller{font-size:32px;}
    1416body .LCT .medium .bg .over{margin-left:4px;width:69px;height:65px;background:url(images/medium_over.png);left:0px;margin-top:-71px;}
    1517/*small*/
     
    1820body .LCT .small .bg{width:38px;height:36px;background:url(images/small_bg.png);text-align:center;}
    1921body .LCT .small .bg p{width:38px;height:36px;text-align: center; margin:0px;padding:0px;font-size:20px;padding-top:2px;line-height:23px;color:#000;}
     22body .LCT .small .bg p.evensmaller{font-size:14px;}
    2023body .LCT .small .bg .over{margin-left:2px;width:35px;height:21px;background:url(images/small_over.png);margin-top:-37px;}
    2124
Note: See TracChangeset for help on using the changeset viewer.