Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for phpMyEdit/extensions/Attic/phpMyEdit-calpopup.class.php between version 1.4 and 1.5

version 1.4, 2003/12/31 17:48:43 version 1.5, 2004/01/03 02:04:21
Line 17 
Line 17 
  * http://platon.sk/projects/phpMyEdit/   * http://platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/extensions/phpMyEdit-calpopup.class.php,v 1.3 2003/12/30 18:26:38 nepto Exp $ */  /* $Platon: phpMyEdit/extensions/phpMyEdit-calpopup.class.php,v 1.4 2003/12/31 17:48:43 nepto Exp $ */
   
 /*  /*
     OVERVIEW      OVERVIEW
Line 123 
Line 123 
        in the field. If you want a default value only if the field         in the field. If you want a default value only if the field
        is currently empty, use the phpMyEdit 'default' option.         is currently empty, use the phpMyEdit 'default' option.
   
     2. There are a number of Calendar.setup options that most not      2. Only the options listed above may be set by the user, any other
        be overriden as these are set by the class to link to fields.         options will be ignored.
        Especially avoid using 'inputField' and 'button'. It is best  
        to stick with the options listed in the advanced example.  
   
     SEARCH KEYWORD      SEARCH KEYWORD
     --------------      --------------
Line 141  class phpMyEdit_calpopup extends phpMyEd
Line 139  class phpMyEdit_calpopup extends phpMyEd
 {  {
         /* CalPopup mod start */          /* CalPopup mod start */
   
         var $calendars; /* Array for collecting list          /* Array for collecting list of fields with calendar popups */
                                            of fields with calendar popups */          var $calendars;
   
           /* Array of valid options for passing to Calendar.setup */
           var $valid_opts = array(
                           'button','ifFormat','singleClick','mondayFirst',
                           'weekNumbers','showsTime','timeFormat','date'
                           );
   
         /**          /**
          * Checks to see if the calendar parameter is set on the field           * Checks to see if the calendar parameter is set on the field
Line 159  class phpMyEdit_calpopup extends phpMyEd
Line 163  class phpMyEdit_calpopup extends phpMyEd
         function CalPopup_helper($k, $curval) /* {{{ */          function CalPopup_helper($k, $curval) /* {{{ */
         {          {
                 if (@$this->fdd[$k]['calendar']) {                  if (@$this->fdd[$k]['calendar']) {
                         $cal_ar['button']      = 'pme_calpopup_button_'.$this->fds[$k];  
                         $cal_ar['ifFormat']    = '%Y-%m-%d %H:%M';                          $cal_ar['ifFormat']    = '%Y-%m-%d %H:%M';
                         $cal_ar['showsTime']   = true;                          $cal_ar['showsTime']   = true;
                         $cal_ar['singleClick'] = false;                          $cal_ar['singleClick'] = false;
Line 175  class phpMyEdit_calpopup extends phpMyEd
Line 178  class phpMyEdit_calpopup extends phpMyEd
                                         $cal_ar[$ck] = $cv;                                          $cal_ar[$ck] = $cv;
                                 }                                  }
                         }                          }
                           $cal_ar['button'] = 'pme_calpopup_button_'.$this->fds[$k];
                         $this->calendars[$this->fds[$k]] = $cal_ar;                          $this->calendars[$this->fds[$k]] = $cal_ar;
                         $label = @$this->fdd[$k]['calendar']['label'];                          $label = @$this->fdd[$k]['calendar']['label'];
                         strlen($label) || $label = '...';                          strlen($label) || $label = '...';
Line 321  class phpMyEdit_calpopup extends phpMyEd
Line 325  class phpMyEdit_calpopup extends phpMyEd
                 echo '</td>',"\n";                  echo '</td>',"\n";
         } /* }}} */          } /* }}} */
   
         function display_record() /* {{{ */          function form_end() /* {{{ */
         {          {
                 $this->create_javascripts();  
                 if ($this->cgi['persist'] != '') {  
                         echo $this->get_origvars_html($this->cgi['persist']);  
                 }  
                 echo $this->get_origvars_html($this->get_sfn_cgi_vars());  
                 echo $this->get_origvars_html($this->qfn);  
                 echo '<input type="hidden" name="qfn" value="',htmlspecialchars($this->qfn),'">',"\n";  
                 echo '<input type="hidden" name="rec" value="',($this->copy_operation()?'':$this->rec),'">',"\n";  
                 echo '<input type="hidden" name="fm" value="',$this->fm,'">',"\n";  
                 echo '<input type="hidden" name="fl" value="',$this->fl,'">',"\n";  
                 if ($this->nav_up()) {  
                         $this->display_record_buttons();  
                         echo '<hr class="',$this->getCSSclass('hr', 'up'),'">',"\n";  
                         if ($this->tabs_enabled()) {  
                                 $this->display_tab_labels('up');  
                         }  
                 }  
                 if ($this->tabs_enabled()) {  
                         echo '<div id="phpMyEdit_tab0">',"\n";  
                 }  
                 echo '<table class="',$this->getCSSclass('main'),'" summary="',$this->tb,'">',"\n";  
                 if ($this->add_operation()) {  
                         $this->display_add_record();  
                 } else {  
                         $this->display_copy_change_delete_record();  
                 }  
                 echo '</table>',"\n";  
                 echo '</div>',"\n";  
                 if ($this->nav_down()) {  
                         if ($this->tabs_enabled()) {  
                                 $this->display_tab_labels('down');  
                         }  
                         echo '<hr class="',$this->getCSSclass('hr', 'down'),'">',"\n";  
                         $this->display_record_buttons();  
                 }  
                 if ($this->display['form']) {                  if ($this->display['form']) {
                         echo '</form>',"\n";                          echo '</form>',"\n";
   
Line 370  class phpMyEdit_calpopup extends phpMyEd
Line 339  class phpMyEdit_calpopup extends phpMyEd
                                 foreach($this->calendars as $ck => $cv) {                                  foreach($this->calendars as $ck => $cv) {
                                         echo 'Calendar.setup({',"\n";                                          echo 'Calendar.setup({',"\n";
                                         foreach ($cv as $ck1 => $cv1) {                                          foreach ($cv as $ck1 => $cv1) {
                                                 echo "\t",str_pad($ck1, 15),' : "',$cv1,'",',"\n";                                                  if (in_array($ck1, $this->valid_opts)) {
                                                           echo "\t",str_pad($ck1, 15),' : "',$cv1,'",',"\n";
                                                   }
                                         }                                          }
                                         echo "\t",str_pad('inputField', 15),' : "pme_calpopup_input_',$ck,'"',"\n";                                          echo "\t",str_pad('inputField', 15),' : "pme_calpopup_input_',$ck,'"',"\n";
                                         echo '});',"\n";                                          echo '});',"\n";

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top