The branch, master has been updated via 1fd7a96135243353171fb88db5ec2f562d3aea1b (commit) via f6d2da769b62f637a128b681d565ff4c6571748b (commit) via 93686fd47a72f4e82070648a765f5f99fe32480b (commit) from 999e85b505b57c58e397ea967e4333f6fa38b57a (commit)
- Log ----------------------------------------------------------------- commit 1fd7a96135243353171fb88db5ec2f562d3aea1b Merge: 999e85b f6d2da7 Author: Rouslan Placella rouslan@placella.com Date: Wed Oct 26 16:29:10 2011 +0100
Merge branch 'enum'
Conflicts: enum_editor.php
commit f6d2da769b62f637a128b681d565ff4c6571748b Author: Rouslan Placella rouslan@placella.com Date: Wed Oct 26 16:26:15 2011 +0100
Integrated the ENUM/SET editor with the Routines editor
commit 93686fd47a72f4e82070648a765f5f99fe32480b Author: Rouslan Placella rouslan@placella.com Date: Wed Oct 26 16:01:24 2011 +0100
Improved ENUM/SET editor
-----------------------------------------------------------------------
Summary of changes: enum_editor.php | 166 ++++++++++++++++++------- js/functions.js | 209 ++++++++++++++++++++---------- js/messages.php | 7 + js/rte/common.js | 2 +- js/rte/routines.js | 7 + libraries/rte/rte_routines.lib.php | 13 ++- libraries/tbl_properties.inc.php | 18 +-- themes/original/css/theme_right.css.php | 82 ++++++++----- themes/pmahomme/css/theme_right.css.php | 83 ++++++++----- 9 files changed, 395 insertions(+), 192 deletions(-)
diff --git a/enum_editor.php b/enum_editor.php index e7bba62..879023b 100644 --- a/enum_editor.php +++ b/enum_editor.php @@ -2,9 +2,11 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * Displays a form for editing ENUM and SET values with more space (as an alternative to doing it in tbl_alter.php) - * This form is only for users with JavaScript disabled -- users with JavaScript enabled will see a different form - * defined in tbl_properties.inc.php + * Displays a form for editing ENUM and SET values with more + * space (as an alternative to doing it in tbl_alter.php). + * This form is only for users with JavaScript disabled, + * users with JavaScript enabled will see a jQuery dialog. + * * @package PhpMyAdmin */
@@ -12,62 +14,134 @@ require_once './libraries/common.inc.php'; require_once './libraries/header_http.inc.php'; require_once './libraries/header_meta_style.inc.php'; ?> - </head> - <body> <form action="enum_editor.php" method="get"> - <div id="enum_editor_no_js"> - <h3><?php printf(__('Values for the column "%s"'), htmlspecialchars($_GET['field'])); ?></h3> - <p><?php echo __('Enter each value in a separate field.'); ?></p> - <div id="values"> + <?php echo PMA_generate_common_hidden_inputs(); ?> + <input type="hidden" name="field" value="<?php echo htmlspecialchars($_GET['field']); ?>" /> + <fieldset class="enum_editor_no_js"> + <legend><?php echo __('ENUM/SET editor'); ?></legend> + <div class="enum_editor_no_js"> + <h3> + <?php + if (empty($_GET['field'])) { + echo __('Values for a new column'); + } else { + printf(__('Values for column %s'), '"' . htmlspecialchars($_GET['field']) . '"'); + } + ?> + </h3> + <p><?php echo PMA_getImage('s_info.png') . __('Enter each value in a separate field'); ?></p> + <table id="values"> <?php + // Get the enum values $values = array(); - if (isset($_GET['values'])) { // This page was displayed when the "add a new value" link or the link in tbl_alter.php was clicked - $values = explode(',', urldecode($_GET['values'])); - } elseif (isset($_GET['num_fields'])) { // This page was displayed from submitting this form - for ($field_num = 1; $field_num <= $_GET['num_fields']; $field_num++) { - $values[] = "'" . str_replace(array("'", '\\'), array("''", '\\\\'), $_GET['field' . $field_num]) . "'"; + if (isset($_GET['values']) && is_array($_GET['values'])) { // If the values are in an array + // then this page was called from itself via the "Add a value", "Drop" or "Go" buttons + $values = $_GET['values']; + foreach ($values as $key => $value) { + $values[$key] = htmlentities($value); } - } - // Display the values in text fields, excluding empty strings - $field_counter = 0; - foreach ($values as $value) { - if (trim($value) != "") { - $field_counter++; - echo sprintf('<input type="text" size="30" value="%s" name="field' . $field_counter . '" />', htmlspecialchars(str_replace(array("''", '\\\\', "\\'"), array("'", '\\', "'"), substr($value, 1, -1)))); + } else if (isset($_GET['values']) && is_string($_GET['values'])){ // If the values are in a string + // then this page was called via a link from some external page + $values_string = htmlentities($_GET['values']); + // There is a JS port of the below parser in functions.js + // If you are fixing something here, + // you need to also update the JS port. + $values = array(); + $in_string = false; + $buffer = ''; + for ($i=0; $i<strlen($values_string); $i++) { + $curr = $values_string[$i]; + $next = $i == strlen($values_string)-1 ? '' : $values_string[$i+1]; + if (! $in_string && $curr == "'") { + $in_string = true; + } else if ($in_string && $curr == "\\" && $next == "\\") { + $buffer .= "\"; + $i++; + } else if ($in_string && $next == "'" && ($curr == "'" || $curr == "\\")) { + $buffer .= "'"; + $i++; + } else if ($in_string && $curr == "'") { + $in_string = false; + $values[] = $buffer; + $buffer = ''; + } else if ($in_string) { + $buffer .= $curr; + } + } + if (strlen($buffer) > 0) { + // The leftovers in the buffer are the last value (if any) + $values[] = $buffer; } } - - $total_fields = $field_counter; - // If extra empty fields are added, display them - if (isset($_GET['extra_fields'])) { - $total_fields += $_GET['extra_fields']; - for ($i = $field_counter+1; $i <= $total_fields; $i++) { - echo '<input type="text" size="30" name="field' . $i . '"/>'; + // Escape double quotes + foreach ($values as $key => $value) { + $values[$key] = str_replace('"', ""e;", $value); + } + // If there are no values, maybe the user is about to make a + // new list so we add a few for him/her to get started with. + if (! count($values) + || (count($values) == 1 && strlen($values[0]) == 0) + ) { + array_push($values, '', '', ''); + } + // Add an empty value, if there was a request to do so + if (! empty($_GET['add_field'])) { + $values[] = ''; + } + // Remove a value, given a valid index, from the list + // of values, if there was a request to do so. + if (isset($_GET['drop']) && is_array($_GET['drop'])) { + foreach ($_GET['drop'] as $index => $value){ + if ((int)$index == $index + && $index > 0 + && $index <= count($values) + ) { + unset($values[$index]); + } } - } else { - $_GET['extra_fields'] = 0; } - + // Display the values in text fields + $field_counter = 0; + foreach ($values as $value) { + $field_counter++; + echo sprintf( + '<tr><td><input class="text" type="text" size="30" value="%s" name="values[' . $field_counter . ']" />' . "\n", + $value + ); + echo '</td><td>'; + echo '<input class="drop" type="submit" value="' . __('Drop') . '" name="drop[' . $field_counter . ']" />' . "\n"; + echo '</td></tr>' . "\n"; + } ?> - </div> - <p> - <a href="enum_editor.php<?php echo PMA_generate_common_url(array('field' => $_GET['field'], 'extra_fields' => $_GET['extra_fields'] + 1, 'values' => join(',', $values))); ?>"> -<?php echo __('+ Restart insertion and add a new value'); ?> - </a> - </p> - <?php echo PMA_generate_common_hidden_inputs(); ?> - <input type="hidden" name="field" value="<?php echo htmlspecialchars($_GET['field']); ?>" /> - <input type="hidden" name="num_fields" value="<?php echo $total_fields; ?>" /> - <input type="submit" value="<?php echo __('Go'); ?>" /> - </form> - + <tr><td> + <input type="submit" class="submit" value="<?php echo __('Go'); ?>" /> + </td><td> + <input type="submit" class="submit" name="add_field" value="<?php echo __('Add a value'); ?>" /> + </td></tr> + </table> + </div> + <hr class='enum_editor_no_js' /> <div id="enum_editor_output"> <h3><?php echo __('Output'); ?></h3> - <p><?php echo __('Copy and paste the joined values into the "Length/Values" field'); ?></p> - <textarea id="joined_values" cols="95" rows="5"><?php echo htmlspecialchars(join(",", $values)); ?></textarea> + <p><?php echo PMA_getImage('s_info.png') . __('Copy and paste the joined values into the "Length/Values" field'); ?></p> + <?php + // Escape quotes and slashes for usage with MySQL + foreach ($values as $key => $value) { + $values[$key] = "'"; + $values[$key] .= str_replace( + array("'", "\\", "'", "\"), + array("''", '\\\\', "''", '\\\\'), + $value + ); + $values[$key] .= "'"; + } + // Print out the values as a string + ?> + <textarea id="joined_values" cols="95" rows="5"><?php echo join(",", $values); ?></textarea> </div> - </div> + </fieldset> + </form> </body> </html> diff --git a/js/functions.js b/js/functions.js index 8eb0d62..162c517 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2574,45 +2574,30 @@ function PMA_hideShowDefaultValue($default_type) }
/** - * Closes the ENUM/SET editor and removes the data in it + * @var $enum_editor_dialog An object that points to the jQuery + * dialog of the ENUM/SET editor */ -function disable_popup() -{ - $("#popup_background").fadeOut("fast"); - $("#enum_editor").fadeOut("fast"); - // clear the data from the text boxes - $("#enum_editor #values input").remove(); - $("#enum_editor input[type='hidden']").remove(); -} - +var $enum_editor_dialog = null; /** * Opens the ENUM/SET editor and controls its functions */ $(document).ready(function() { - // Needs live() to work also in the Create table dialog - $("a[class='open_enum_editor']").live('click', function() { - // Center the popup - var windowWidth = document.documentElement.clientWidth; - var windowHeight = document.documentElement.clientHeight; - var popupWidth = windowWidth/2; - var popupHeight = windowHeight*0.8; - var popupOffsetTop = windowHeight/2 - popupHeight/2; - var popupOffsetLeft = windowWidth/2 - popupWidth/2; - $("#enum_editor").css({"position":"absolute", "top": popupOffsetTop, "left": popupOffsetLeft, "width": popupWidth, "height": popupHeight}); - - // Make it appear - $("#popup_background").css({"opacity":"0.7"}); - $("#popup_background").fadeIn("fast"); - $("#enum_editor").fadeIn("fast"); - /**Replacing the column name in the enum editor header*/ - var column_name = $("#append_fields_form").find("input[id=field_0_1]").attr("value"); - var h3_text = $("#enum_editor h3").html(); - $("#enum_editor h3").html(h3_text.split('"')[0]+'"'+column_name+'"'); - + $("a.open_enum_editor").live('click', function() { + // Get the name of the column that is being edited + var colname = $(this).closest('tr').find('input:first').val(); + // And use it to make up a title for the page + if (colname.length < 1) { + var title = PMA_messages['enum_newColumnVals']; + } else { + var title = PMA_messages['enum_columnVals'].replace( + /%s/, + '"' + decodeURIComponent(colname) + '"' + ); + } // Get the values as a string var inputstring = $(this) - .parent() - .prev("input") + .closest('td') + .find("input") .val(); // Escape html entities inputstring = $('<div/>') @@ -2620,6 +2605,9 @@ $(document).ready(function() { .html(); // Parse the values, escaping quotes and // slashes on the fly, into an array + // + // There is a PHP port of the below parser in enum_editor.php + // If you are fixing something here, you need to also update the PHP port. var values = []; var in_string = false; var curr, next, buffer = ''; @@ -2643,57 +2631,138 @@ $(document).ready(function() { } } if (buffer.length > 0) { + // The leftovers in the buffer are the last value (if any) values.push(buffer); } + var fields = ''; + // If there are no values, maybe the user is about to make a + // new list so we add a few for him/her to get started with. + if (values.length == 0) { + values.push('','','',''); + } // Add the parsed values to the editor + var drop_icon = PMA_getImage('b_drop.png'); for (var i=0; i<values.length; i++) { - $("#enum_editor #values").append( - "<input type='text' value='" + values[i] + "' />" - ); + fields += "<tr><td>" + + "<input type='text' value='" + values[i] + "'/>" + + "</td><td class='drop'>" + + drop_icon + + "</td></tr>"; } - // So we know which column's data is being edited - $("#enum_editor").append("<input type='hidden' value='" + $(this).parent().prev("input").attr("id") + "' />"); + /** + * @var dialog HTML code for the ENUM/SET dialog + */ + var dialog = "<div id='enum_editor'>" + + "<fieldset>" + + "<legend>" + title + "</legend>" + + "<p>" + PMA_getImage('s_notice.png') + + PMA_messages['enum_hint'] + "</p>" + + "<table class='values'>" + fields + "</table>" + + "</fieldset><fieldset class='tblFooters'>" + + "<table class='add'><tr><td>" + + "<div class='slider'></div>" + + "</td><td>" + + "<form><div><input type='submit' class='add_value' value='" + + PMA_messages['enum_addValue'].replace(/%d/, 1) + + "'/></div></form>" + + "</td></tr></table>" + + "<input type='hidden' value='" // So we know which column's data is being edited + + $(this).closest('td').find("input").attr("id") + + "' />" + + "</fieldset>"; + + "</div>"; + /** + * @var Defines functions to be called when the buttons in + * the buttonOptions jQuery dialog bar are pressed + */ + var buttonOptions = {}; + buttonOptions[PMA_messages['strGo']] = function () { + // When the submit button is clicked, + // put the data back into the original form + var value_array = new Array(); + $(this).find(".values input").each(function(index, elm) { + var val = elm.value.replace(/\/g, '\\').replace(/'/g, "''"); + value_array.push("'" + val + "'"); + }); + // get the Length/Values text field where this value belongs + var values_id = $(this).find("input[type='hidden']").attr("value"); + $("input[id='" + values_id + "']").attr("value", value_array.join(",")); + $(this).dialog("close"); + }; + buttonOptions[PMA_messages['strClose']] = function () { + $(this).dialog("close"); + }; + // Show the dialog + var width = parseInt( + (parseInt($('html').css('font-size'), 10)/13)*340, + 10 + ); + if (! width) { + width = 340; + } + $enum_editor_dialog = $(dialog).dialog({ + minWidth: width, + modal: true, + title: PMA_messages['enum_editor'], + buttons: buttonOptions, + open: function() { + // Focus the "Go" button after opening the dialog + $(this).closest('.ui-dialog').find('.ui-dialog-buttonpane button:first').focus(); + }, + close: function() { + $(this).remove(); + } + }); + // slider for choosing how many fields to add + $enum_editor_dialog.find(".slider").slider({ + animate: true, + range: "min", + value: 1, + min: 1, + max: 9, + slide: function( event, ui ) { + $(this).closest('table').find('input[type=submit]').val( + PMA_messages['enum_addValue'].replace(/%d/, ui.value) + ); + } + }); + // Focus the slider, otherwise it looks nearly transparent + $('.ui-slider-handle').addClass('ui-state-focus'); return false; });
- // If the "close" link is clicked, close the enum editor - // Needs live() to work also in the Create table dialog - $("a[class='close_enum_editor']").live('click', function() { - disable_popup(); - }); - - // If the "cancel" link is clicked, close the enum editor - // Needs live() to work also in the Create table dialog - $("a[class='cancel_enum_editor']").live('click', function() { - disable_popup(); - }); - // When "add a new value" is clicked, append an empty text field - // Needs live() to work also in the Create table dialog - $("a[class='add_value']").live('click', function() { - $("#enum_editor #values").append("<input type='text' />"); + $("input.add_value").live('click', function(e) { + e.preventDefault(); + var num_new_rows = $enum_editor_dialog.find("div.slider").slider('value'); + while (num_new_rows--) { + $enum_editor_dialog.find('.values') + .append( + "<tr style='display: none;'><td>" + + "<input type='text' />" + + "</td><td class='drop'>" + + PMA_getImage('b_drop.png') + + "</td></tr>" + ) + .find('tr:last') + .show('fast'); + } });
- // When the submit button is clicked, put the data back into the original form - // Needs live() to work also in the Create table dialog - $("#enum_editor input[type='submit']").live('click', function() { - var value_array = new Array(); - $.each($("#enum_editor #values input"), function(index, input_element) { - val = jQuery.trim(input_element.value); - if(val != "") { - value_array.push("'" + val.replace(/\/g, '\\').replace(/'/g, "''") + "'"); - } + // Removes the specified row from the enum editor + $("#enum_editor td.drop").live('click', function() { + $(this).closest('tr').hide('fast', function () { + $(this).remove(); }); - // get the Length/Values text field where this value belongs - var values_id = $("#enum_editor input[type='hidden']").attr("value"); - $("input[id='" + values_id + "']").attr("value", value_array.join(",")); - disable_popup(); - }); + }); +});
- /** - * Hides certain table structure actions, replacing them with the word "More". They are displayed - * in a dropdown menu when the user hovers over the word "More." - */ +/** + * Hides certain table structure actions, replacing them + * with the word "More". They are displayed in a dropdown + * menu when the user hovers over the word "More." + */ +$(document).ready(function() { displayMoreTableOpts(); });
diff --git a/js/messages.php b/js/messages.php index e966f9b..5878d32 100644 --- a/js/messages.php +++ b/js/messages.php @@ -241,6 +241,13 @@ $js_messages['strDeleting'] = __('Deleting'); /* For db_routines.js */ $js_messages['MissingReturn'] = __('The definition of a stored function must contain a RETURN statement!');
+/* For ENUM/SET editor*/ +$js_messages['enum_editor'] = __('ENUM/SET editor'); +$js_messages['enum_columnVals'] =__('Values for column %s'); +$js_messages['enum_newColumnVals'] = __('Values for a new column'); +$js_messages['enum_hint'] =__('Enter each value in a separate field'); +$js_messages['enum_addValue'] =__('Add %d value(s)'); + /* For import.js */ $js_messages['strImportCSV'] = __('Note: If the file contains multiple tables, they will be combined into one');
diff --git a/js/rte/common.js b/js/rte/common.js index 842f325..781219d 100644 --- a/js/rte/common.js +++ b/js/rte/common.js @@ -211,7 +211,7 @@ $(document).ready(function () { */ RTE.$ajaxDialog = $('<div>' + data.message + '</div>').dialog({ width: 700, - height: 555, + minWidth: 500, buttons: RTE.buttonOptions, title: data.title, modal: true, diff --git a/js/rte/routines.js b/js/rte/routines.js index 087b9d6..b351e7b 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 f6f110a..80f04a4 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 .= " <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( diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php index c41146b..336545b 100644 --- a/libraries/tbl_properties.inc.php +++ b/libraries/tbl_properties.inc.php @@ -319,8 +319,13 @@ for ($i = 0; $i < $num_fields; $i++) { . ' class="textfield" />' . '<p class="enum_notice" id="enum_notice_' . $i . '_' . ($ci - $ci_offset) . '">'; $content_cells[$i][$ci] .= __('ENUM or SET data too long?') - . '<a onclick="return false;" href="enum_editor.php?' . PMA_generate_common_url() . '&values=' . urlencode($length_to_display) . '&field=' . (isset($row['Field']) ? urlencode($row['Field']) : "") . '" class="open_enum_editor" target="_blank"> ' - . __('Get more editing space') . '</a></p>'; + . '<a onclick="return false;" href="enum_editor.php?' + . PMA_generate_common_url() + . '&values=' . urlencode($length_to_display) + . '&field=' . (isset($row['Field']) ? urlencode($row['Field']) : "") + . '" class="open_enum_editor" target="_blank"> ' + . __('Get more editing space') . '</a>' + . '</p>'; $ci++;
// column default @@ -711,13 +716,4 @@ if ($action == 'tbl_create.php') { <div id="properties_message"></div> </form>
-<div id="enum_editor"> -<a class="close_enum_editor"><?php echo __('Close'); ?></a> -<h3><?php printf(__('Values for the column "%s"'), isset($row['Field']) ? htmlspecialchars($row['Field']) : ""); ?></h3> -<p><?php echo __('Enter each value in a separate field.'); ?></p> -<div id="values"></div> -<p><a class="add_value"><?php echo __('+ Add a value'); ?></a></p> -<input type="submit" value="<?php echo __('Go'); ?>" /> <a class="cancel_enum_editor"><?php echo __('Cancel'); ?></a> -</div> - <div id="popup_background"></div> diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 635e81b..31eec35 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1628,56 +1628,76 @@ p.enum_notice { font-size: 80%; }
-#enum_editor { - display: none; - position: fixed; - _position: absolute; /* hack for IE */ - z-index: 101; - overflow-y: auto; - overflow-x: hidden; +fieldset.enum_editor_no_js { + width: 40em; + padding: 1em; }
-#enum_editor_no_js { - margin: auto auto; +hr.enum_editor_no_js { + background-color: #aaa; }
-#enum_editor, #enum_editor_no_js { - background: #D0DCE0; - padding: 15px; +#enum_editor p { + font-style:italic; }
-#popup_background { - display: none; - position: fixed; - _position: absolute; /* hack for IE6 */ +#enum_editor .values, #enum_editor .add, .enum_editor_no_js #values { width: 100%; - height: 100%; - top: 0; - left: 0; - background: #000; - z-index: 100; - overflow: hidden; }
-a.close_enum_editor { - float: right; +#enum_editor .add td { + vertical-align: middle; + width: 50%; + padding: 0 1em; }
-#enum_editor #values, #enum_editor_no_js #values { - margin: 15px 0; - width: 100%; +#enum_editor .values td.drop { + width: 2em; + cursor: pointer; + vertical-align: middle; }
-#enum_editor #values input, #enum_editor_no_js #values input { +#enum_editor .values input { margin: 5px 0; - float: top; + padding-right: 2.5em; width: 100%; }
+#enum_editor .values img { + width: 2em; + vertical-align: middle; +} + +#enum_editor input.add_value { + margin: 1em 0; }
-#enum_editor_output { - margin-top: 50px; +#enum_editor_output textarea, +.enum_editor_no_js input { + width: 100%; + float: right; + margin: 1em 0 0 0; +} + +#enum_editor_no_js { + width: 100%; +} + +.enum_editor_no_js input.submit { + 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; }
/** diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index efc8fff..e79300b 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -2008,56 +2008,77 @@ p.enum_notice { font-size: 80%; }
-#enum_editor { - display: none; - position: fixed; - _position: absolute; /* hack for IE */ - z-index: 101; - overflow-y: auto; - overflow-x: hidden; +.enum_editor_no_js fieldset { + width: 40em; }
-#enum_editor_no_js { - margin: auto auto; +hr.enum_editor_no_js { + background-color: #aaa; }
-#enum_editor, #enum_editor_no_js { - background: #D0DCE0; - padding: 15px; +#enum_editor p { + margin-top: 0; + font-style:italic; }
-#popup_background { - display: none; - position: fixed; - _position: absolute; /* hack for IE6 */ +#enum_editor .values, #enum_editor .add, .enum_editor_no_js #values { width: 100%; - height: 100%; - top: 0; - left: 0; - background: #000; - z-index: 100; - overflow: hidden; }
-a.close_enum_editor { - float: right; +#enum_editor .add td { + vertical-align: middle; + width: 50%; + padding: 0 0 0 1em; }
-#enum_editor #values, #enum_editor_no_js #values { - margin: 15px 0; - width: 100%; +#enum_editor .values td.drop { + width: 1.8em; + cursor: pointer; + vertical-align: middle; }
-#enum_editor #values input, #enum_editor_no_js #values input { +#enum_editor .values input { margin: 5px 0; - float: top; + padding-right: 2em; + width: 100%; +} + +#enum_editor .values img { + width: 1.8em; + vertical-align: middle; +} + +#enum_editor input.add_value { + margin: 0 0.4em 0 0; +} + +#enum_editor_output textarea, +.enum_editor_no_js input { width: 100%; + float: right; + margin: 1em 0 0 0; +} + +.enum_editor_no_js { + width: 40em; +} + +.enum_editor_no_js input.submit { + float: left; + margin: 1em 0; }
+/** + * ENUM/SET editor integration for the routines editor + */ +.enum_hint { + position: relative; }
-#enum_editor_output { - margin-top: 50px; +.enum_hint a { + position: absolute; + left: 81%; + bottom: 0.35em; }
/**
hooks/post-receive