diff --git a/ChangeLog b/ChangeLog index a0c868d17..87a168025 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ $Source$ #1005511), navigation is reloaded once in header (I'm not sure whether I choose correct version of reload code, we have several diferent, but it seems to work well). + * tbl_properties_structure.php, libraries/common.lib.php, + libraries/display_tbl.lib.php: New function PMA_buttonOrImage to display + button or image to submit form and not to duplicate code on all places. 2004-10-20 Marc Delisle * libraries/common.lib.php: there was already a tip icon in our collection, diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 82238594f..ed2793094 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2278,6 +2278,32 @@ if (typeof(document.getElementById) != 'undefined' return preg_replace('|\s?AND$|', '', $uva_condition); } // end function + /** + * Function to generate unique condition for specified row. + * + * @param string name of button element + * @param string class of button element + * @param string name of image element + * @param string text to display + * @param string image to display + * + * @access public + * @author Michal Cihar (michal@cihar.com) + */ + function PMA_buttonOrImage($button_name, $button_class, $image_name, $text, $image) { + global $pmaThemeImage, $propicon; + + /* Opera has trouble with */ + /* IE has trouble with ' . "\n"; + } else { + echo '' . (($propicon == 'both') ? ' ' . $text : '') . "\n"; + } + } // end function + } // end if: minimal common.lib needed? ?> diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index d9772a016..f194ad85d 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1867,28 +1867,10 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) echo '  ' . $GLOBALS['strWithChecked'] . ''. "\n"; if ($cfg['PropertiesIconic']) { - /* Opera has trouble with */ - /* IE has trouble with '; - - echo ' '; - if ($analyzed_sql[0]['querytype'] == 'SELECT') { - echo ' '; - } - - } else { - echo ' ' . (($propicon == 'both') ? ' ' . $GLOBALS['strEdit'] : ''); - echo ' ' . (($propicon == 'both') ? ' ' . $delete_text : ''); - if ($analyzed_sql[0]['querytype'] == 'SELECT') { - echo ' ' . (($propicon == 'both') ? ' ' . $GLOBALS['strExport'] : ''); - } + PMA_buttonOrImage('submit_mult', 'mult_submit', 'submin_mult_change', $GLOBALS['strChange'], 'b_edit.png'); + PMA_buttonOrImage('submit_mult', 'mult_submit', 'submin_mult_change', $delete_text, 'b_drop.png'); + if ($analyzed_sql[0]['querytype'] == 'SELECT') { + PMA_buttonOrImage('submit_mult', 'mult_submit', 'submin_mult_change', $GLOBALS['strExport'], 'b_tblexport.png'); } echo "\n"; } else { diff --git a/tbl_properties_structure.php b/tbl_properties_structure.php index b8d4838d9..968e41b27 100644 --- a/tbl_properties_structure.php +++ b/tbl_properties_structure.php @@ -411,25 +411,17 @@ $checkall_url = 'tbl_properties_structure.php?' . PMA_generate_common_url($db,$t '; + $titles['Index'] = $iconic_spacer . '' . $strIndex . ''; + $titles['Unique'] = $iconic_spacer . '' . $strUnique . ''; + $titles['IdxFulltext'] = $iconic_spacer . '' . $strIdxFulltext . ''; + */ if ($cfg['PropertiesIconic']) { - /* Opera has trouble with */ - /* IE has trouble with ' . "\n"; - } else { - echo ' ' . (($propicon == 'both') ? ' ' . $strChange : '') . "\n"; - } + PMA_buttonOrImage('submit_mult', 'mult_submit', 'submin_mult_change', $strChange, 'b_edit.png'); // Drop button if there is at least two fields if ($fields_cnt > 1) { - if (PMA_USR_BROWSER_AGENT != 'IE') { - echo ' ' . "\n"; - } else { - echo ' ' . (($propicon == 'both') ? ' ' . $strDrop : '') . "\n"; - } + PMA_buttonOrImage('submit_mult', 'mult_submit', 'submin_mult_drop', $strDrop, 'b_drop.png'); } } else { echo ' ' . "\n";