Changeset 1866
- Timestamp:
- 07/30/2010 08:44:58 PM (6 weeks ago)
- Location:
- plugins/apostropheBlogPlugin/trunk
- Files:
-
- 2 added
- 4 modified
-
config/doctrine/schema.yml (modified) (1 diff)
-
lib/form/doctrine/PluginaEventForm.class.php (modified) (1 diff)
-
lib/widget/aWidgetFormJQueryTime.class.php (added)
-
modules/aEventAdmin/templates/_form.php (modified) (3 diffs)
-
web/css/aBlog.css (modified) (1 diff)
-
web/js/timepicker.js (added)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/config/doctrine/schema.yml
r1291 r1866 221 221 keyValue: 'event' 222 222 columns: 223 start_date: timestamp 224 end_date: timestamp 223 start_date: date 224 start_time: time 225 end_date: date 226 end_time: time 225 227 226 228 aEventSlot: -
plugins/apostropheBlogPlugin/trunk/lib/form/doctrine/PluginaEventForm.class.php
r1576 r1866 19 19 parent::setup(); 20 20 21 $this->setWidget('start_date', new sfWidgetFormJQueryDate Time(22 array(' date' => array('image' => '/apostrophePlugin/images/a-icon-datepicker.png'))23 ) );24 25 $this->setValidator('start_date', new sfValidatorDate Time(21 $this->setWidget('start_date', new sfWidgetFormJQueryDate( 22 array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 23 ); 24 25 $this->setValidator('start_date', new sfValidatorDate( 26 26 array( 27 27 'required' => true, 28 28 ))); 29 29 30 $this->setWidget('end_date', new sfWidgetFormJQueryDateTime( 31 array('date' => array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 32 )); 30 $this->setWidget('start_time', new aWidgetFormJQueryTime(array(), array('size' => 8))); 31 $this->setValidator('start_time', new sfValidatorTime(array('required' => false, 'time_output' => 'g:iA'))); 33 32 34 $this->setValidator('end_date', new sfValidatorDateTime( 33 $this->setWidget('end_date', new sfWidgetFormJQueryDate( 34 array('image' => '/apostrophePlugin/images/a-icon-datepicker.png')) 35 ); 36 37 $this->setValidator('end_date', new sfValidatorDate( 35 38 array( 36 39 'required' => true, 37 40 ))); 38 41 39 if($this->getObject()->getStartDate() == $this->getObject()->getEndDate()) 40 { 41 $this->getWidget('start_date')->addOption('with_time', false); 42 $this->getWidget('end_date')->addOption('with_time', false); 43 } 42 $this->setWidget('end_time', new aWidgetFormJQueryTime(array(), array('size' => 8))); 43 $this->setValidator('end_time', new sfValidatorTime(array('required' => false, 'time_output' => 'g:iA'))); 44 44 45 45 $this->getWidgetSchema()->setDefault('start_date', date('Y/m/d')); -
plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/_form.php
r1816 r1866 1 1 <?php use_helper('I18N','jQuery') ?> 2 <?php $sf_response->addJavascript('/apostropheBlogPlugin/js/timepicker.js', 'last') ?> 3 2 4 3 5 <?php echo jq_form_remote_tag(array('url' => url_for('a_event_admin_update',$a_event) , 'update' => 'a-admin-blog-post-form'), array('id'=>'a-admin-form', 'class' => 'blog')) ?> … … 47 49 <?php echo $form['start_date']->render(array('beforeShow' => 'aBlogSetDateRange', 'onClose' => 'aBlogUpdateMulti')) ?> 48 50 <?php echo $form['start_date']->renderError() ?> 51 <?php echo $form['start_time'] ?> 52 <?php echo $form['start_time']->renderError() ?> 49 53 </div> 50 54 <h4>End Date</h4> … … 52 56 <?php echo $form['end_date']->render(array('beforeShow' => 'aBlogSetDateRange', 'onClose' => 'aBlogUpdateMulti')) ?> 53 57 <?php echo $form['end_date']->renderError() ?> 58 <?php echo $form['end_time'] ?> 59 <?php echo $form['end_time']->renderError() ?> 54 60 </div> 55 61 </div> -
plugins/apostropheBlogPlugin/trunk/web/css/aBlog.css
r1816 r1866 870 870 color: #999; 871 871 } 872 873 #timepicker 874 { 875 position: absolute; 876 display: none; 877 padding: 0; 878 margin: 0; 879 float: left; 880 overflow: auto; 881 height: 100px; 882 background-color: #ffffff; 883 } 884 885 #timepicker .time-item 886 { 887 padding: 3px; 888 } 889 #timepicker .time-item:hover 890 { 891 background-color: #ddddff; 892 }
