WordPress.org

Plugin Directory

Changeset 781551


Ignore:
Timestamp:
10/02/13 23:27:26 (7 months ago)
Author:
joedolson
Message:

dev commit 2.2.10

Location:
my-calendar/trunk
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/js/calendrical.css

    r598242 r781551  
    11#event_begin, #event_time, #event_end, #event_endtime {position: relative} 
    2 .calendricalDatePopup {background: #fff;border: solid 1px #999;padding: 3px;text-align: center;width: 170px; z-index: 5;box-shadow: 1px 1px 2px #aaa} 
    3 .calendricalDatePopup table {border-collapse: collapse;width: 168px;margin: 0 auto} 
     2.calendricalDatePopup {background: #fff;border: 1px solid #bbb;padding: 3px;text-align: center; border-radius: 0 0 5px 5px; z-index: 5;box-shadow: 1px 1px 2px #aaa} 
     3.calendricalDatePopup table {border-collapse: collapse; margin: 0 auto} 
    44.calendricalDatePopup td { border: 1px solid #eee} 
    5 .calendricalDatePopup table .monthCell {padding: 2px 0} 
    6 .calendricalDatePopup table .monthCell a {display: block;float: left;line-height: 20px} 
    7 .calendricalDatePopup table .monthCell .prevMonth, .calendricalDatePopup table .monthCell .nextMonth {width: 24px} 
    8 .calendricalDatePopup table .monthCell .monthName {width: 110px} 
     5.calendricalDatePopup table .monthCell {padding: 0 0 6px; font-size: 1.2em; font-weight: 400; line-height: 1; } 
     6.calendricalDatePopup table .monthCell:nth-of-type(1) { text-align: right; } 
     7.calendricalDatePopup table .monthCell:nth-of-type(2) { text-align: center; } 
     8.calendricalDatePopup table .monthCell:nth-of-type(3) { text-align: left; } 
     9.calendricalDatePopup table .monthCell a {display: block;} 
     10.calendricalDatePopup table .monthCell .monthName { background: #eee; width: 100%; padding: 2px; } 
     11.calendricalDatePopup table .monthCell .prevMonth, .calendricalDatePopup table .monthCell .nextMonth { color: #fff; background: #777; display: block; line-height: 1; padding: 2px 8px; } 
     12.calendricalDatePopup table .monthCell .prevMonth { border-radius: 16px 0 0 16px; } 
     13.calendricalDatePopup table .monthCell .nextMonth { border-radius: 0 16px 16px 0; } 
    914.calendricalDatePopup table a {text-decoration: none} 
    10 .calendricalDatePopup table td {text-align: center;font-size: 12px;padding: 0} 
    11 .calendricalDatePopup table a {display: block;padding: 1px} 
    12 .calendricalDatePopup table a:hover {background: #ccf;border: none; text-decoration: underline} 
    13 .calendricalDatePopup table td.today a {background: #ffd} 
    14 .calendricalDatePopup table td.selected a {background: #ccf} 
    15 .calendricalDatePopup table td.today_selected a {background: #eeb;border: solid 1px #dd6;padding: 1px 2px} 
    16 .calendricalDatePopup table td.nonMonth a {color: #999} 
    17 .calendricalTimePopup {background: #fff;border: solid 1px #999;width: 110px;height: 150px;overflow: auto;z-index: 5;box-shadow: 1px 1px 2px #aaa} 
     15.calendricalDatePopup table td {text-align: center;padding: 0; } 
     16.calendricalDatePopup table a {display: block; padding: 6px 8px; line-height: 1; } 
     17.calendricalDatePopup table a:hover {background: #eee;border: none; text-decoration: underline} 
     18.calendricalDatePopup table td.today a {background: #ffc} 
     19.calendricalDatePopup table td.selected a {background: #eef} 
     20.calendricalDatePopup table td.today_selected a {background: #ffc;} 
     21.calendricalDatePopup table td.nonMonth a {color: #555; background: #f9f9f9; } 
     22.calendricalTimePopup {background: #fff;border: 1px solid #bbb;width: 110px;height: 170px;overflow: auto;z-index: 5;box-shadow: 1px 1px 2px #aaa} 
    1823.calendricalTimePopup ul {margin: 0;padding: 0} 
    1924.calendricalTimePopup ul li {list-style: none;margin: 0} 
  • my-calendar/trunk/js/jquery.calendrical.js

    r598242 r781551  
    33        'July', 'August', 'September', 'October', 'November', 'December']; 
    44         
    5     function getToday() 
    6     { 
     5    function getToday() { 
    76        var date = new Date(); 
    87        return new Date(date.getFullYear(), date.getMonth(), date.getDate()); 
    98    } 
    109     
    11     function areDatesEqual(date1, date2) 
    12     { 
     10    function areDatesEqual(date1, date2) { 
    1311        return String(date1) == String(date2); 
    1412    } 
    1513     
    16     function daysInMonth(year, month) 
    17     { 
     14    function daysInMonth(year, month) { 
    1815        if (year instanceof Date) return daysInMonth(year.getFullYear(), year.getMonth()); 
    1916        if (month == 1) { 
     
    2825    } 
    2926     
    30     function dayAfter(date) 
    31     { 
     27    function dayAfter(date) { 
    3228        var year = date.getFullYear(); 
    3329        var month = date.getMonth(); 
     
    4238    } 
    4339     
    44     function dayBefore(date) 
    45     { 
     40    function dayBefore(date) { 
    4641        var year = date.getFullYear(); 
    4742        var month = date.getMonth(); 
     
    5550    } 
    5651     
    57     function monthAfter(year, month) 
    58     { 
     52    function monthAfter(year, month) { 
    5953        return (month == 11) ? 
    6054            new Date(year + 1, 0, 1) : 
     
    6256    } 
    6357     
    64     function formatDate(date) 
    65     { 
     58    function formatDate(date) { 
    6659        var d = date.getDate(); 
    6760        var m = date.getMonth() + 1; 
     
    7366    } 
    7467     
    75     function parseDate(date) 
    76     { 
     68    function parseDate(date) { 
    7769        a = date.split(/[\.\-\/]/); 
    7870        var year = a.shift(); 
     
    8274    } 
    8375     
    84     function formatTime(hour, minute) 
    85     { 
    86         var printHour = hour % 12; 
    87         if (printHour == 0) printHour = 12; 
     76    function formatTime(hour, minute, i18n) { 
    8877        var printMinute = minute; 
    89         if (minute < 10) printMinute = '0' + minute; 
    90         var half = (hour < 12) ? 'am' : 'pm'; 
    91          
     78        if (minute < 10) printMinute = '0' + minute;     
     79        if ( i18n ) {  
     80            var printHour = hour % 12; 
     81            if (printHour == 0) printHour = 12; 
     82            var half = (hour < 12) ? 'am' : 'pm'; 
     83        } else { 
     84            var printHour = hour; 
     85            var half = ''; 
     86        } 
    9287        return printHour + ':' + printMinute + half; 
    9388    } 
    9489     
    95     function parseTime(text) 
    96     { 
     90    function parseTime(text) { 
    9791        var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text); 
    9892        if (match && match.length >= 3) { 
     
    114108     * initials for days of the week. 
    115109     */ 
    116     function renderCalendarHeader(element, year, month, options) 
    117     { 
     110    function renderCalendarHeader(element, year, month, options) { 
    118111        //Prepare thead element 
    119112        var thead = $('<thead />'); 
     
    124117          $('<a href="javascript:;">&laquo;</a>') 
    125118                  .addClass('prevMonth') 
    126                   .mousedown(function(e) { 
     119                  .on('click',function(e) { 
    127120                      renderCalendarPage(element, 
    128121                          month == 0 ? (year - 1) : year, 
     
    143136            $('<a href="javascript:;">&raquo;</a>') 
    144137                .addClass('nextMonth') 
    145                 .mousedown(function() { 
     138                .on('click',function() { 
    146139                    renderCalendarPage(element, 
    147140                        month == 11 ? (year + 1) : year, 
     
    160153    } 
    161154     
    162     function renderCalendarPage(element, year, month, options) 
    163     { 
     155    function renderCalendarPage(element, year, month, options) { 
    164156        options = options || {}; 
    165157         
     
    232224    } 
    233225     
    234     function renderTimeSelect(element, options) 
    235     { 
     226    function renderTimeSelect(element, options) { 
    236227        var selection = options.selection && parseTime(options.selection); 
    237228        if (selection) { 
     
    255246        for (var hour = 0; hour < 24; hour++) { 
    256247            for (var minute = 0; minute < 60; minute += 15) { 
    257                 //if (startTime && startTime > (hour * 60 + minute)) continue; 
    258248 
    259249                (function() { 
    260                     var timeText = formatTime(hour, minute); 
     250                    var timeText = formatTime(hour, minute, i18n); 
    261251                    var fullText = timeText; 
    262252                    if (startTime != null) { 
     
    325315    } 
    326316     
    327     $.fn.calendricalDate = function( options ) 
    328     { 
     317    $.fn.calendricalDate = function( options ) { 
    329318        options = options || {}; 
    330319        options.padding = options.padding || 4; 
     
    395384    }; 
    396385     
    397     $.fn.calendricalDateRange = function(options) 
    398     { 
     386    $.fn.calendricalDateRange = function(options) { 
    399387        if (this.length >= 2) { 
    400388            $(this[0]).calendricalDate($.extend({ 
     
    406394    }; 
    407395     
    408     $.fn.calendricalTime = function(options) 
    409     { 
     396    $.fn.calendricalTime = function(options) { 
    410397        options = options || {}; 
    411398        options.padding = options.padding || 4; 
     
    476463    }, 
    477464     
    478     $.fn.calendricalTimeRange = function(options) 
    479     { 
     465    $.fn.calendricalTimeRange = function(options) { 
    480466        if (this.length >= 2) { 
    481467            $(this[0]).calendricalTime(options); 
     
    487473    }; 
    488474 
    489     $.fn.calendricalDateTimeRange = function(options) 
    490     { 
     475    $.fn.calendricalDateTimeRange = function(options) { 
    491476        if (this.length >= 4) { 
    492477            $(this[0]).calendricalDate($.extend({ 
  • my-calendar/trunk/mc-styles.css

    r780638 r781551  
    3636#my-calendar .columns, .jd-my-calendar .columns {-moz-column-count: 3;-moz-column-gap: 20px;-webkit-column-count: 3;-webkit-column-gap: 20px;column-count: 3;column-gap: 20px} 
    3737#my-calendar .two-columns {-moz-column-count: 2;-moz-column-gap: 30px;-webkit-column-count: 2;-webkit-column-gap: 30px;column-count: 2;column-gap: 30px} 
    38 .jd-my-calendar .event_image img { max-width: 480px} 
    39 .event_image img {margin-top: 2px} 
     38.jd-my-calendar .event_image { float: right; margin-left: 10px; } 
     39.jd-my-calendar .event_image img { width: 150px; height: auto; margin: 2px 0; border-radius: 3px; } 
    4040.mc_support {font-family:'Courier New';background:#fff;padding:5px} 
    4141.template-editor, .style-editor { width: 98%} 
     
    5858strong.label { font-weight: 400; } 
    5959#my-calendar-text label { display: inline-block; width: 12em; } 
    60 .wp-picker-container { position: relative; top:3px;  } 
     60.wp-picker-container { position: relative; top:3px; } 
     61.jd-my-calendar .counter { padding-right: 6px; border-right: 16px solid green; border-radius: 20px; } 
     62.jd-my-calendar .counter.warning { border-color: orange; } 
     63.jd-my-calendar .counter.exceeded { border-color: red; } 
  • my-calendar/trunk/my-calendar-core.php

    r780638 r781551  
    258258    jQuery(document).ready(function($) { 
    259259        $('#event_begin, #event_time,' + '#event_end, #event_endtime').calendricalDateTimeRange(); 
     260        <?php if ( function_exists( 'jd_doTwitterAPIPost' ) ) { ?> 
     261        $('#mc_twitter').charCount( { allowed: 140, counterText: '<?php _e('Characters left: ','my-calendar') ?>' } ); 
     262        <?php } ?> 
    260263    }); 
    261264    //]]> 
     
    536539        if ( version_compare( $current_version, "2.1.0", "<" ) ) { $upgrade_path[] = "2.1.0"; }  
    537540        if ( version_compare( $current_version, "2.2.0", "<" ) ) { $upgrade_path[] = "2.2.0"; }  
    538         if ( version_compare( $current_version, "2.2.6", "<" ) ) { $upgrade_path[] = "2.2.6"; }          
     541        if ( version_compare( $current_version, "2.2.6", "<" ) ) { $upgrade_path[] = "2.2.6"; }  
     542        if ( version_compare( $current_version, "2.2.10", "<" ) ) { $upgrade_path[] = "2.2.10"; }            
    539543    } 
    540544    // having determined upgrade path, assign new version number 
     
    13301334    if ( $current_screen->id == 'toplevel_page_my-calendar' ) { 
    13311335        // later. 
    1332         //wp_enqueue_script(  'charCount', plugins_url( 'wp-to-twitter/js/jquery.charcount.js'), array('jquery') ); 
     1336        wp_enqueue_script(  'charCount', plugins_url( 'wp-to-twitter/js/jquery.charcount.js'), array('jquery') ); 
    13331337    } 
    13341338    if ( $current_screen->id == 'my-calendar_page_my-calendar-categories' ) { 
  • my-calendar/trunk/my-calendar-event-manager.php

    r780638 r781551  
    602602        </div> 
    603603        <?php } ?> 
     604        <?php if ( mc_show_edit_block( 'event_short' ) ) { ?> 
     605        <p> 
     606        <label for="event_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( $has_data ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
     607        </p> 
     608        <?php } ?> 
    604609        <?php 
    605610        // If the editor is enabled, shouldn't display the image uploader.  
     
    609614        <p> 
    610615        <?php if ( !empty($data->event_image) ) { ?> 
    611         <div class="event_image"><?php _e("This event's image:",'my-calendar'); ?><br /><img src="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" alt="" /></div> 
     616        <div class="event_image"><img src="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" alt="" /></div> 
    612617        <?php } ?> 
    613         <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?></label> <input type="text" name="event_image" id="event_image" size="60" value="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" />  
     618        <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?></label> <input type="text" name="event_image" id="event_image" size="60" value="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" placeholder="http://yourdomain.com/image.jpg" />  
    614619            <?php if ( mc_show_edit_block( 'event_use_editor' ) ) { ?> 
    615620                <?php echo " "; _e('(URL to Event image)','my-calendar'); ?> 
     
    622627            <input type="hidden" name="event_image" value="<?php if ( $has_data ) echo esc_attr($data->event_image); ?>" /> 
    623628            <?php if ( !empty($data->event_image) ) { ?> 
    624             <div class="event_image"><?php _e("This event's image:",'my-calendar'); ?><br /><img src="<?php echo esc_attr($data->event_image); ?>" alt="" /></div> 
     629            <div class="event_image"><img src="<?php echo esc_attr($data->event_image); ?>" alt="" /></div> 
    625630            <?php } ?> 
    626631        </div> 
    627         <?php } ?> 
    628         <?php if ( mc_show_edit_block( 'event_short' ) ) { ?> 
    629         <p> 
    630         <label for="event_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( $has_data ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
    631         </p> 
    632         <?php } ?> 
     632        <?php } ?>       
    633633    <p> 
    634634    <label for="event_host"><?php _e('Event Host','my-calendar'); ?></label> 
     
    662662        <?php if ( mc_show_edit_block( 'event_link' ) ) { ?> 
    663663        <p> 
    664         <label for="event_link"><?php _e('Event Link (Optional)','my-calendar'); ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( $has_data ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( $has_data && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( $has_data && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires"><?php _e('This link will expire when the event passes.','my-calendar'); ?></label> 
     664        <label for="event_link"><?php _e('Event Link (Optional)','my-calendar'); ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( $has_data ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( $has_data && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( $has_data && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires"><?php _e('Link will expire after event','my-calendar'); ?></label> 
    665665        </p> 
    666666    <?php } ?> 
     
    698698            ?> 
    699699            <p> 
    700             <label for="event_begin" id="eblabel"><?php _e('Start Date (YYYY-MM-DD)','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span></label> <input type="text" id="event_begin" name="event_begin[]" class="event_begin calendar_input" size="11" value="<?php echo $event_begin; ?>" /> <label for="event_time"><?php _e('Time (hh:mm am/pm)','my-calendar'); ?></label> <input type="text" id="event_time" name="event_time[]" class="input" size="10"  value="<?php  
    701                     $offset = (60*60*get_option('gmt_offset')); // need this for below 
     700            <label for="event_begin" id="eblabel"><?php _e('Start Date (YYYY-MM-DD)','my-calendar'); ?> <span><?php _e('(required)','my-calendar'); ?></span></label> <input type="text" id="event_begin" name="event_begin[]" class="event_begin calendar_input" size="11" value="<?php echo $event_begin; ?>" /> <label for="event_time"><?php _e('Time (hh:mm am/pm)','my-calendar'); ?></label> <input type="text" id="event_time" name="event_time[]" class="input" size="10" value="<?php  
    702701                    if ( $has_data ) { 
    703702                        echo ($data->event_time == "00:00:00" && $data->event_endtime == "00:00:00")?'':date("h:i a",strtotime($data->event_time)); 
    704703                    } else { 
    705704                        echo date_i18n("h:i a",current_time('timestamp') ); 
    706                     }?>" /> <input type="checkbox" value="1" id="event_allday" name="event_allday"<?php if ( $has_data && ( $data->event_time == '00:00:00' && $data->event_endtime == '00:00:00' ) ) { echo " checked=\"checked\""; } ?> /> <label for="event_allday"><?php _e('All day event','my-calendar'); ?></label> 
     705                    } ?>" /> <input type="checkbox" value="1" id="event_allday" name="event_allday"<?php if ( $has_data && ( $data->event_time == '00:00:00' && $data->event_endtime == '00:00:00' ) ) { echo " checked=\"checked\""; } ?> /> <label for="event_allday"><?php _e('All day event','my-calendar'); ?></label> 
    707706            </p> 
    708707            <p> 
     
    711710                        echo ($data->event_endtime == "00:00:00" && $data->event_time == "00:00:00")?'':date("h:i a",strtotime($data->event_endtime)); 
    712711                    } else { 
    713                         echo date("h:i a",strtotime( "+1 hour" )+$offset ); 
     712                        echo date_i18n( "h:i a",strtotime( "+1 hour" )+(60*60*get_option('gmt_offset') ) ); 
    714713                    }?>" /> <input type="checkbox" value="1" id="event_hide_end" name="event_hide_end"<?php if ( $has_data && $data->event_hide_end == '1' ) { echo " checked=\"checked\""; } ?> /> <label for="event_hide_end"><?php _e('Hide end time','my-calendar'); ?></label> 
    715714 
     
    16101609        foreach ( $results as $result ) { 
    16111610            if ( $result->occur_id == $occur ) {  
    1612                 $current = "<em>".__('Editing: ','my-calendar')."</em>";  $end = ''; 
     1611                $current = "<em>".__('Editing: ','my-calendar')."</em>"; $end = ''; 
    16131612            } else {  
    16141613                $current = "<a href='".admin_url('admin.php?page=my-calendar')."&amp;mode=edit&amp;event_id=$id&amp;date=$result->occur_id'>"; $end = "</a>"; 
    16151614            } 
    1616             $begin = date( get_option('mc_date_format'),strtotime($result->occur_begin) ) . ' ' . date( get_option('mc_time_format'),strtotime($result->occur_begin) ); 
     1615            $begin = date_i18n( get_option('mc_date_format'),strtotime($result->occur_begin) ) . ' ' . date( get_option('mc_time_format'),strtotime($result->occur_begin) ); 
    16171616            $output.= "<li>$current$begin$end</li>"; 
    16181617        } 
     
    16531652        foreach ( $results as $result ) { 
    16541653            $event = $result->occur_event_id; 
    1655             $title = mc_get_data('event_title',$result->occur_event_id ); 
    16561654            $current = "<a href='".admin_url('admin.php?page=my-calendar')."&amp;mode=edit&amp;event_id=$event'>"; $end = "</a>"; 
    1657             $begin = date( get_option('mc_date_format'),strtotime($result->occur_begin) ) . ' ' . date( get_option('mc_time_format'),strtotime($result->occur_begin) ); 
    1658             $output.= "<li>$title; $current$begin$end</li>"; 
     1655            $begin = date_i18n( get_option('mc_date_format'),strtotime($result->occur_begin) ) . ' ' . date( get_option('mc_time_format'),strtotime($result->occur_begin) ); 
     1656            $output.= "<li>$current$begin$end</li>"; 
    16591657        } 
    16601658    } else { 
  • my-calendar/trunk/my-calendar-group-manager.php

    r780638 r781551  
    328328        </div>       
    329329        <?php } ?> 
     330        <?php if ($mc_input['event_short'] == 'on' || $mc_input_administrator ) { ?> 
     331        <p> 
     332        <label for="event_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_short' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
     333        </p> 
     334        <?php } ?> 
    330335        <?php  
    331336        // If the editor is enabled, shouldn't display the image uploader.  
     
    336341        <p> 
    337342        <?php if ( !empty($data->event_image) ) { ?> 
    338         <div class="event_image"><?php _e("This event's image:",'my-calendar'); ?><br /><img src="<?php if ( !empty($data) ) echo esc_attr($data->event_image); ?>" alt="" /></div> 
     343        <div class="event_image"><img src="<?php if ( !empty($data) ) echo esc_attr($data->event_image); ?>" alt="" /></div> 
    339344        <?php } ?> 
    340         <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_image' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" name="event_image" id="event_image" size="60" value="<?php if ( !empty($data) ) echo esc_attr($data->event_image); ?>" /> <input id="upload_image_button" type="button" class="button" value="<?php _e('Upload Image','my-calendar'); ?>" /><br /><?php _e('Include your image URL or upload an image.','my-calendar'); ?> 
     345        <label for="event_image"><?php _e("Add an image:",'my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_image' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" name="event_image" id="event_image" size="60" value="<?php if ( !empty($data) ) echo esc_attr($data->event_image); ?>" placeholder="http://yourdomain.com/image.jpg" /> <input id="upload_image_button" type="button" class="button" value="<?php _e('Upload Image','my-calendar'); ?>" /><br /><?php _e('Include your image URL or upload an image.','my-calendar'); ?> 
    341346        </p> 
    342347        <?php } else { ?> 
     
    344349        <input type="hidden" name="event_image" value="<?php if ( !empty($data) ) echo esc_attr($data->event_image); ?>" /> 
    345350        <?php if ( !empty($data->event_image) ) { ?> 
    346         <div class="event_image"><?php _e("This event's image:",'my-calendar'); ?><br /><img src="<?php echo esc_attr($data->event_image); ?>" alt="" /></div> 
     351        <div class="event_image"><img src="<?php echo esc_attr($data->event_image); ?>" alt="" /></div> 
    347352        <?php } ?> 
    348353        </div> 
    349         <?php } ?>       
    350         <?php if ($mc_input['event_short'] == 'on' || $mc_input_administrator ) { ?> 
    351         <p> 
    352         <label for="event_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_short' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label><br /><textarea id="event_short" name="event_short" class="input" rows="2" cols="80"><?php if ( !empty($data) ) echo stripslashes(esc_attr($data->event_short)); ?></textarea> 
    353         </p> 
    354         <?php } ?> 
     354        <?php } ?>           
    355355    <p> 
    356356    <label for="event_host"><?php _e('Event Host','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_host' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> 
     
    386386            <?php if ($mc_input['event_link'] == 'on' || $mc_input_administrator ) { ?> 
    387387            <p> 
    388             <label for="event_link"><?php _e('Event Link (Optional)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_link' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( !empty($data) ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( !empty($data) && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires"><?php _e('This link will expire when the event passes.','my-calendar'); ?></label> 
     388            <label for="event_link"><?php _e('Event Link (Optional)','my-calendar'); ?><?php if ( !mc_compare_group_members( $group_id,'event_link' ) ) { echo " <span>".__('Fields do not match','my-calendar')."</span>"; } ?></label> <input type="text" id="event_link" name="event_link" class="input" size="40" value="<?php if ( !empty($data) ) { echo esc_url($data->event_link); } ?>" /> <input type="checkbox" value="1" id="event_link_expires" name="event_link_expires"<?php if ( !empty($data) && $data->event_link_expires == '1' ) { echo " checked=\"checked\""; } else if ( !empty($data) && $data->event_link_expires == '0' ) { echo ""; } else if ( get_option( 'mc_event_link_expires' ) == 'true' ) { echo " checked=\"checked\""; } ?> /> <label for="event_link_expires"><?php _e('Link will expire after event.','my-calendar'); ?></label> 
    389389            </p> 
    390390            <?php } ?> 
  • my-calendar/trunk/my-calendar-install.php

    r780544 r781551  
    539539    return @rmdir($dirname); 
    540540} 
    541 function my_calendar_backup() { 
    542     $to = dirname(__FILE__)."/../styles_backup/"; 
    543     $from = dirname(__FILE__)."/styles/"; 
    544     my_calendar_copyr($from, $to); 
    545      
    546     $to = dirname(__FILE__)."/../icons_backup/"; 
    547     $from = dirname(__FILE__)."/icons/"; 
    548     my_calendar_copyr($from, $to);   
    549 } 
    550 function my_calendar_recover() { 
    551     $from = dirname(__FILE__)."/../styles_backup/"; 
    552     $to = dirname(__FILE__)."/styles/"; 
    553     my_calendar_copyr($from, $to); 
    554     if (is_dir($from)) { 
    555         my_calendar_rmdirr($from); 
    556     } 
    557      
    558     $from = dirname(__FILE__)."/../icons_backup/"; 
    559     $to = dirname(__FILE__)."/icons/"; 
    560     my_calendar_copyr($from, $to); 
    561     if (is_dir($from)) { 
    562         my_calendar_rmdirr($from); 
    563     }    
     541function my_calendar_backup( $process, $plugin ) { 
     542    if ( isset( $plugin['plugin'] ) && $plugin['plugin'] == 'my-calendar/my-calendar.php' ) { 
     543        $to = dirname(__FILE__)."/../styles_backup/"; 
     544        $from = dirname(__FILE__)."/styles/"; 
     545        my_calendar_copyr($from, $to); 
     546         
     547        $to = dirname(__FILE__)."/../icons_backup/"; 
     548        $from = dirname(__FILE__)."/icons/"; 
     549        my_calendar_copyr($from, $to); 
     550    }    
     551} 
     552function my_calendar_recover( $process, $plugin ) { 
     553    if ( isset( $plugin['plugin'] ) && $plugin['plugin'] == 'my-calendar/my-calendar.php' ) { 
     554        $from = dirname(__FILE__)."/../styles_backup/"; 
     555        $to = dirname(__FILE__)."/styles/"; 
     556        my_calendar_copyr($from, $to); 
     557        if (is_dir($from)) { 
     558            my_calendar_rmdirr($from); 
     559        } 
     560        $from = dirname(__FILE__)."/../icons_backup/"; 
     561        $to = dirname(__FILE__)."/icons/"; 
     562        my_calendar_copyr($from, $to); 
     563        if (is_dir($from)) { 
     564            my_calendar_rmdirr($from); 
     565        } 
     566    } 
    564567} 
    565568add_filter('upgrader_pre_install', 'my_calendar_backup', 10, 2); 
  • my-calendar/trunk/my-calendar-styles.php

    r780544 r781551  
    223223            echo wp_text_diff( $left_string,$right_string, array( 'title' => __('Comparing Your Style with latest installed version of My Calendar','my-calendar'), 'title_right' => __('Latest (from plugin)','my-calendar'), 'title_left' => __('Current (in use)','my-calendar') ) ); 
    224224            echo '</div>'; 
    225         } else if ( trim($left_string)!=trim($right_string) ) { 
     225        } else if ( trim( $left_string )!=trim( $right_string ) ) { 
    226226            echo '<div class="wrap jd-my-calendar">'; 
    227227            echo '<div class="updated"><p>'.__('There have been updates to the stylesheet.','my-calendar').' <a href="'.admin_url("admin.php?page=my-calendar-styles&amp;diff#diff").'">'.__('Compare Your Stylesheet with latest installed version of My Calendar.','my-calendar').'</a></p></div>'; 
    228228            echo '</div>'; 
    229229        } else { 
    230             echo '<div class="wrap jd-my-calendar">'; 
    231             echo '<p>'.__('Your stylesheet matches that included with My Calendar.','my-calendar').'</p>'; 
    232             echo '</div>'; 
     230            echo ' 
     231            <div class="wrap jd-my-calendar"> 
     232                <p>'.__('Your stylesheet matches that included with My Calendar.','my-calendar').'</p> 
     233            </div>'; 
    233234        } 
    234235    } 
  • my-calendar/trunk/my-calendar.php

    r780544 r781551  
    151151                </p> 
    152152                <p class="mcbuy"><img src="<?php echo plugins_url('my-calendar/images/guide.png'); ?>" alt="My Calendar User's Guide" class="alignleft" /><?php _e('Help me help you:','my-calendar'); ?> <a href="http://www.joedolson.com/articles/my-calendar/users-guide/" rel="external"><?php _e("Buy the My Calendar User's Guide",'my-calendar'); ?></a></p> 
    153                 <p><?php _e('<strong>Or make a donation today!</strong> Every donation counts - donate $2, $10, or $100 and help me keep this plug-in running!','my-calendar'); ?></p> 
     153                <p><?php _e('<strong>Or make a donation today!</strong> Every donation counts - donate $5, $20, or $100 and help me keep this plug-in running!','my-calendar'); ?></p> 
    154154                <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
    155155                <p class="mcd"> 
  • my-calendar/trunk/readme.txt

    r780544 r781551  
    9191* Bug fix: date comparison in grouped event date output. 
    9292* Bug fix: editing a single occurrence of an event when location fields not displayed could result in duplicating the event. 
    93 * Bug fix: Duplicated <a> onevent title in events manager. 
     93* Bug fix: Duplicated <a> on event title in events manager. 
    9494* Bug fix: Generated WP to Twitter empty sentence error. 
    9595* Bug fix: Grouped events within a single day in upcoming events list. 
     96* Bug fix: Run My Calendar upgrade stylesheet archiving only when My Calendar is updated. 
     97* Bug fix:  
    9698* Changed: replaced mc_is_mobile() functionality with native wp_is_mobile(). Filterable for My Calendar using 'mc_is_mobile' filter. 
    9799* Changed: properly registered and enqueue most front-end styles. 
    98100* Changed: Removed classes 'prevMonth' and 'nextMonth' from navigation. 
     101* Misc. minor style changes to front and back end UI. 
    99102* Added: special value for 'author' and 'host' attributes of 'current' to only show events created by the logged-in user. Filter via 'mc_display_author' and 'mc_display_host' 
    100103* Added: date and time to title field for My Calendar RSS feed. 
Note: See TracChangeset for help on using the changeset viewer.