diff --git a/js/rte/routines.js b/js/rte/routines.js index 087b9d61a5..b351e7bd83 100644 --- a/js/rte/routines.js +++ b/js/rte/routines.js @@ -192,10 +192,16 @@ RTE.setOptionsForParameter = function ($type, $len, $text, $num) { case 'MEDIUMTEXT': case 'LONGBLOB': case 'LONGTEXT': + $text.closest('tr').find('a:first').hide(); $len.parent().hide(); $no_len.show(); break; default: + if ($type.val() == 'ENUM' || $type.val() == 'SET') { + $text.closest('tr').find('a:first').show(); + } else { + $text.closest('tr').find('a:first').hide(); + } $len.parent().show(); $no_len.hide(); break; @@ -272,6 +278,7 @@ $(document).ready(function () { $(this).attr('name', inputname.substr(0, 15) + '[' + index + ']'); } else if (inputname.substr(0, 17) === 'item_param_length') { $(this).attr('name', inputname.substr(0, 17) + '[' + index + ']'); + $(this).attr('id', 'item_param_length_' + index); } else if (inputname.substr(0, 20) === 'item_param_opts_text') { $(this).attr('name', inputname.substr(0, 20) + '[' + index + ']'); } else if (inputname.substr(0, 19) === 'item_param_opts_num') { diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php index 60b163f19d..fa3de8b887 100644 --- a/libraries/rte/rte_routines.lib.php +++ b/libraries/rte/rte_routines.lib.php @@ -680,8 +680,17 @@ function PMA_RTN_getParameterRow($routine = array(), $index = null, $class = '') $retval .= " \n"; - $retval .= " \n"; + $retval .= " " . PMA_getImage('b_edit', '', array('title'=>__('ENUM/SET editor'))) . "\n"; + $retval .= " \n"; + $retval .= " \n"; + $retval .= " \n"; $retval .= " ---\n"; $retval .= " \n"; $retval .= PMA_generateCharsetDropdownBox( diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 02a5f56c69..1a2032b73d 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1687,6 +1687,19 @@ hr.enum_editor_no_js { margin: 1em 0; } +/** + * ENUM/SET editor integration for the routines editor + */ +.enum_hint { + position: relative; +} + +.enum_hint a { + position: absolute; + left: 81%; + bottom: 0.35em; +} + /** * Table structure styles */ diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 8a3e901e02..24b124420f 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -2068,6 +2068,19 @@ hr.enum_editor_no_js { margin: 1em 0; } +/** + * ENUM/SET editor integration for the routines editor + */ +.enum_hint { + position: relative; +} + +.enum_hint a { + position: absolute; + left: 81%; + bottom: 0.35em; +} + /** * Table structure styles */