Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 28, 2026
About Us
O nás
Magazine
Magazín
Open Source
Otvorený softvér
CVS
CVS
Services
Služby
Index  »  Projects  »  phpMyEdit  »  Forum  »  "Refresh" button

phpMyEdit Features     "Refresh" button
Post new topic   Reply to topic    
 
gimbus109     Joined: 31 Jul 2004   Posts: 6   Location: poland
Post Posted: 2004-09-03 16:02
Back to top  Reply with quote     

Hello!
I've made a little modification to phpMyEdit.class.php v1.147. Mayby it will be useful for somebody...
The goal was to have an opportunity to refresh the contents of a grid on a screen while using frames. Clicking "refresh" browser button drives an application to the initial state (or you have to use some session variables etc). With this patch I can refresh only the contents of the desired frame and some alements (links, buttons etc) manually added to the template are displayed correctly after refresh. It could be useful for example when some actions performed by the user in one frame makes changes to the contents displayed in the other frame

Here is a bit modified code of the htmlSubmit function:
Code:

   function htmlSubmit($name, $label, $css_class_name, $js_validation = true, $disabled = false, $js_submit = false) /* {{{ */
   {
      // Note that <input disabled> isn't valid HTML, but most browsers support it
      $markdisabled = $disabled ? ' disabled' : '';
      $ret = '<input'.$markdisabled.' type="submit" class="'.$css_class_name
         .'" name="'.ltrim($markdisabled).$name
         .'" value="'.(isset($this->labels[$label]) ? $this->labels[$label] : $label);
      if ($js_submit) {
         if ($js_validation) {
             $ret .= '" onClick="return phpMyEdit_form_control(this.form);';
         }
         else {
             $ret .= '" onClick="return this.form.submit();';
         }
      }
      $ret .= '">';
      return $ret;
   } /* }}} */


And one line added to the display_list_table_buttons function:
Code:


   function display_list_table_buttons($total_recs, $position) /* {{{ */
.......
      if ($this->add_enabled()) {
         echo $this->htmlSubmit('operation', 'Add', $this->getCSSclass('add', $position), false, false), '&nbsp;';
      }
// <!-- added
      echo $this->htmlSubmit('navop', 'Refresh', $this->getCSSclass('add', $position), false, false, true), '&nbsp;';
// added --!>
      if ($this->nav_buttons()) {
         if ($this->view_enabled()) {
            echo $this->htmlSubmit('operation', 'View', $this->getCSSclass('view', $position), false, !$total_recs), '&nbsp;';

It seems it works OK, but maybe I've missed something.
Pawel

 
jiliray916@     Joined: 01 Nov 2023   Posts: 563  
Post Posted: 2024-01-06 10:26
Back to top  Reply with quote     

I am incessantly thought about this, thanks for putting up. roof cleaning bristol

 
QADIRSEO     Joined: 29 Dec 2023   Posts: 1168  
Post Posted: 2024-01-08 11:55
Back to top  Reply with quote     

very good put up, i definitely love this web site, keep on it shillong teer result

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Odkazový formulár · Application form · Prihláška
Report bug on PLATON.SK website · Upozorniť na chybu na PLATON.SK webstránke · Terms of use · Podmienky použitia · Privacy policy · Ochrana osobných údajov