Integrated the ENUM/SET editor with the Routines editor
This commit is contained in:
parent
93686fd47a
commit
f6d2da769b
@ -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') {
|
||||
|
||||
@ -680,8 +680,17 @@ function PMA_RTN_getParameterRow($routine = array(), $index = null, $class = '')
|
||||
$retval .= " <td><select name='item_param_type[$index]'>";
|
||||
$retval .= PMA_getSupportedDatatypes(true, $routine['item_param_type'][$i]) . "\n";
|
||||
$retval .= " </select></td>\n";
|
||||
$retval .= " <td><input name='item_param_length[$index]' type='text'\n";
|
||||
$retval .= " value='{$routine['item_param_length'][$i]}' /></td>\n";
|
||||
$retval .= " <td>\n";
|
||||
$retval .= " <input id='item_param_length_$index'\n";
|
||||
$retval .= " name='item_param_length[$index]' type='text'\n";
|
||||
$retval .= " value='{$routine['item_param_length'][$i]}' />\n";
|
||||
$retval .= " <div class='enum_hint'>\n";
|
||||
$retval .= " <a class='open_enum_editor' target='_blank'\n";
|
||||
$retval .= " href='enum_editor.php?" . PMA_generate_common_url() . "&values=" . $routine['item_param_length'][$i] . "&field=" . $routine['item_param_name'][$i] . "'>\n";
|
||||
$retval .= " " . PMA_getImage('b_edit', '', array('title'=>__('ENUM/SET editor'))) . "\n";
|
||||
$retval .= " </a>\n";
|
||||
$retval .= " </div>\n";
|
||||
$retval .= " </td>\n";
|
||||
$retval .= " <td class='hide no_len'>---</td>\n";
|
||||
$retval .= " <td class='routine_param_opts_text'>\n";
|
||||
$retval .= PMA_generateCharsetDropdownBox(
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user