Changeset 46085

Show
Ignore:
Timestamp:
05/15/08 20:27:19 (2 months ago)
Author:
snumb130
Message:

Added Time Picker for time entries
Fixed some access level issues and clearing duplicate entries.
Took out COLLATE from database sql
Dates will not reset when plugin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • events-calendar/trunk/css/events-calendar-management.css

    r44574 r46085  
    3535#tooltip h3, #tooltip div { margin: 0; font-size:12px; font-weight:normal; color: #000;} 
    3636 
     37 
     38/* 
     39 * Time Picker 
     40 */ 
     41.time-picker { 
     42  position: absolute; 
     43  height: 200px; 
     44  width:6em; /* needed for IE */ 
     45  overflow: auto; 
     46  background: #fff; 
     47  border: 1px solid #000; 
     48  z-index: 99; 
     49} 
     50.time-picker-12hours { 
     51  width:6em; /* needed for IE */ 
     52} 
     53 
     54.time-picker ul { 
     55  list-style-type: none; 
     56  margin: 0; 
     57  padding: 0; 
     58} 
     59.time-picker li { 
     60  padding: 1px; 
     61  cursor: pointer; 
     62} 
     63.time-picker li.selected { 
     64  background: #316AC5; 
     65  color: #fff; 
     66} 
     67.time-picker { 
     68margin-top: 1.1em; 
     69} 
    3770 
    3871 
  • events-calendar/trunk/ec_db.class.php

    r44184 r46085  
    2222      $sql = "CREATE TABLE " . $this->mainTable . " ( 
    2323            id mediumint(9) NOT NULL AUTO_INCREMENT, 
    24             eventTitle varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 
    25             eventDescription text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 
    26             eventLocation varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci default NULL, 
     24            eventTitle varchar(255) CHARACTER SET utf8 NOT NULL, 
     25            eventDescription text CHARACTER SET utf8 NOT NULL, 
     26            eventLocation varchar(255) CHARACTER SET utf8 default NULL, 
    2727            eventStartDate date NOT NULL, 
    2828            eventStartTime time default NULL, 
    2929            eventEndDate date NOT NULL, 
    3030            eventEndTime time default NULL, 
    31             accessLevel varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default 'public', 
     31            accessLevel varchar(255) CHARACTER SET utf8 NOT NULL default 'public', 
    3232            postID mediumint(9) NULL DEFAULT NULL, 
    3333            PRIMARY KEY  id (id) 
     
    4545      $sql = "CREATE TABLE " . $this->mainTable . " ( 
    4646            id mediumint(9) NOT NULL AUTO_INCREMENT, 
    47             eventTitle varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 
    48             eventDescription text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 
    49             eventLocation varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci default NULL, 
     47            eventTitle varchar(255) CHARACTER SET utf8 NOT NULL, 
     48            eventDescription text CHARACTER SET utf8 NOT NULL, 
     49            eventLocation varchar(255) CHARACTER SET utf8 default NULL, 
    5050            eventStartDate date NOT NULL, 
    5151            eventStartTime time default NULL, 
    5252            eventEndDate date NOT NULL, 
    5353            eventEndTime time default NULL, 
    54             accessLevel varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default 'public', 
     54            accessLevel varchar(255) CHARACTER SET utf8 NOT NULL default 'public', 
    5555            postID mediumint(9) NULL DEFAULT NULL, 
    5656            PRIMARY KEY  id (id) 
  • events-calendar/trunk/ec_js.class.php

    r44265 r46085  
    22if(!class_exists('EC_JS')) : 
    33 
     4require_once(ABSPATH . 'wp-includes/capabilities.php'); 
     5require_once(ABSPATH . 'wp-includes/pluggable.php'); 
    46require_once(EVENTSCALENDARCLASSPATH.'/ec_db.class.php'); 
    57 
     
    2022    $output .= "<ul>"; 
    2123    foreach($this->db->getDaysEvents($sqldate) as $e) : 
    22     if($e->accessLevel == 'public' || $current_user->has_cap($e->accessLevel)) { 
     24    if(($e->accessLevel == 'public') || (current_user_can($e->accessLevel))) { 
    2325      $title = $e->eventTitle; 
    2426      $description = $e->eventDescription; 
     
    107109    $lastDay = date('t', mktime(0, 0, 0, $m, 1, $y)); 
    108110    for($d = 1; $d <= $lastDay; $d++): 
     111    $output = ""; 
    109112    $sqldate = date('Y-m-d', mktime(0, 0, 0, $m, $d, $y)); 
    110113    foreach($this->db->getDaysEvents($sqldate) as $e) : 
    111     if($e->accessLevel == 'public' || $current_user->has_cap($e->accessLevel)) { 
     114    if(($e->accessLevel == 'public') || (current_user_can($e->accessLevel))) { 
    112115      $output = ''; 
    113116      $id = "$d-$e->id"; 
  • events-calendar/trunk/ec_management.class.php

    r45655 r46085  
    124124        <tr> 
    125125          <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="startDate">Start Date (YYYY-MM-DD, if blank will be today)</label></th> 
    126           <td width="67%"><input type="text" name="EC_startDate" id="EC_startDate" /></td> 
    127         </tr> 
    128         <tr> 
    129           <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="startTime">Start Time (HH:MM:SS, can be blank)</label></th> 
    130           <td width="67%"><input type="text" name="EC_startTime" id="EC_startTime" /></td> 
     126          <td width="67%"><input autocomplete="OFF" type="text" name="EC_startDate" id="EC_startDate" /></td> 
     127        </tr> 
     128        <tr> 
     129          <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="startTime">Start Time (HH:MM, can be blank)</label></th> 
     130          <td width="67%"><input autocomplete="OFF" type="text" name="EC_startTime" id="EC_startTime" /></td> 
    131131        </tr> 
    132132        <tr> 
    133133          <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="endDate">End Date (YYYY-MM-DD, if blank will be same as start date)</label></th> 
    134           <td width="67%"><input type="text" name="EC_endDate" id="EC_endDate" /></td> 
    135         </tr> 
    136         <tr> 
    137           <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="endTime">End Time (HH:MM:SS, can be blank)</label></th> 
    138           <td width="67%"><input type="text" name="EC_endTime" id="EC_endTime" /></td> 
     134          <td width="67%"><input autocomplete="OFF" type="text" name="EC_endDate" id="EC_endDate" /></td> 
     135        </tr> 
     136        <tr> 
     137          <th width="33%" scope="row" valign="top" style="text-align:right;"><label for="endTime">End Time (HH:MM, can be blank)</label></th> 
     138          <td width="67%"><input autocomplete="OFF" type="text" name="EC_endTime" id="EC_endTime" /></td> 
    139139        </tr> 
    140140        <tr> 
     
    187187        <tr> 
    188188          <th width="33%" scope="row" valign="top"><label for="startDate">Start Date (YYYY-MM-DD, if blank will be today)</label></th> 
    189           <td width="67%"><input type="text" name="EC_startDate" id="EC_startDate" value="<?php echo $event->eventStartDate;?>" /></td> 
    190         </tr> 
    191         <tr> 
    192           <th width="33%" scope="row" valign="top"><label for="startTime">Start Time (HH:MM:SS, can be blank)</label></th> 
    193           <td width="67%"><input type="text" name="EC_startTime" id="EC_startTime" value="<?php echo $event->eventStartTime;?>" /></td> 
     189          <td width="67%"><input autocomplete="OFF" type="text" name="EC_startDate" id="EC_startDate" value="<?php echo $event->eventStartDate;?>" /></td> 
     190        </tr> 
     191        <tr> 
     192          <th width="33%" scope="row" valign="top"><label for="startTime">Start Time (HH:MM, can be blank)</label></th> 
     193          <td width="67%"><input autocomplete="OFF" type="text" name="EC_startTime" id="EC_startTime" value="<?php echo $event->eventStartTime;?>" /></td> 
    194194        </tr> 
    195195        <tr> 
    196196          <th width="33%" scope="row" valign="top"><label for="endDate">End Date (YYYY-MM-DD, if blank will be same as start date)</label></th> 
    197           <td width="67%"><input type="text" name="EC_endDate" id="EC_endDate" value="<?php echo $event->eventEndDate;?>" /></td> 
    198         </tr> 
    199         <tr> 
    200           <th width="33%" scope="row" valign="top"><label for="endTime">End Time (HH:MM:SS, can be blank)</label></th> 
    201           <td width="67%"><input type="text" name="EC_endTime" id="EC_endTime" value="<?php echo $event->eventEndTime;?>" /></td> 
     197          <td width="67%"><input autocomplete="OFF" type="text" name="EC_endDate" id="EC_endDate" value="<?php echo $event->eventEndDate;?>" /></td> 
     198        </tr> 
     199        <tr> 
     200          <th width="33%" scope="row" valign="top"><label for="endTime">End Time (HH:MM, can be blank)</label></th> 
     201          <td width="67%"><input autocomplete="OFF" type="text" name="EC_endTime" id="EC_endTime" value="<?php echo $event->eventEndTime;?>" /></td> 
    202202        </tr> 
    203203        <tr> 
  • events-calendar/trunk/ec_managementjs.class.php

    r44265 r46085  
    8282          $('#EC_startDate').datepicker({dateFormat: 'yy-mm-dd'}); 
    8383          $('#EC_endDate').datepicker({dateFormat: 'yy-mm-dd'}); 
     84          $("#EC_startTime").timePicker(); 
     85          $("#EC_endTime").timePicker(); 
    8486        }); 
    8587      }); 
  • events-calendar/trunk/events-calendar.php

    r45824 r46085  
    44Plugin URI: http://www.lukehowell.com/events-calendar/ 
    55Description: There are options under the widget options to specify the view of the calendar in the sidebar.  The widget can be a list for upcoming events or a calendar.  If you do not have a widget ready theme then you can place '&lt;?php sidebarEventsCalendar();?&gt;' in the sidebar file.  If you want to display a large calendar in a post or a page, simply place "[[EventsCalendarLarge]]" in the html of the post or page.  Make sure to leave off the quotes. 
    6 Version: Development 
     6Version: 6.1 
    77Author: Luke Howell 
    88Author URI: http://www.lukehowell.com/ 
     
    7777    wp_enqueue_script('jquerytooltip', '/wp-content/plugins/events-calendar/js/jquery.tooltip.min.js', array('jquery'), '1.2'); 
    7878    wp_enqueue_script('jquerydatepicker', '/wp-content/plugins/events-calendar/js/jquery.datepicker.min.js', array('jquery'), '3.4.3'); 
     79    wp_enqueue_script('jquerytimepicker', '/wp-content/plugins/events-calendar/js/jquery.timepicker.min.js', array('jquery'), '0.1'); 
    7980  } 
    8081  $options = get_option('optionsEventsCalendar'); 
  • events-calendar/trunk/readme.txt

    r45824 r46085  
    33Contributors: snumb130, bbodine1 
    44Donate link: http://www.lukehowell.com/donate 
    5 Version: Development 
     5Version: 6.1 
    66Tags: widget, admin, sidebar, plugin, javascript, date, time, calendar, thickbox, jquery, tooltip, ajax 
    77Requires at least: 2.5 
    88Tested up to: 2.5.1 
    9 Stable tag: 6.0.12 
     9Stable tag: 6.1 
    1010 
    1111== Description == 
     
    2828 
    2929<pre><code> 
    30 Version Development 
     30Version 6.1 
     31  Added Time Picker for time entries 
     32  Fixed some access level issues and clearing duplicate entries. 
     33  Took out COLLATE from database sql 
    3134  Dates will not reset when plugin 
    3235Version 6.0.12