diff --git a/js/functions.js b/js/functions.js index 8d0beff594..5be6d1c130 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2931,6 +2931,10 @@ AJAX.registerOnload('functions.js', function () { var db = PMA_commonParams.get('db'); var table = PMA_commonParams.get('table'); var maxRows = $(this).data('maxrows'); + var pick = $(this).data('pick'); + if(pick !== false) { + pick = true; + } var params = { 'ajax_request' : true, 'token' : PMA_commonParams.get('token'), @@ -2962,7 +2966,11 @@ AJAX.registerOnload('functions.js', function () { fields += '('+escapeHtml(central_column_list[db+'_'+table][i].col_length)+') '; } fields += escapeHtml(central_column_list[db+'_'+table][i].col_extra)+''+ - ''; + ''; + if (pick) { + fields += ''; + } + fields += ''; } var result_pointer = i; var search_in = ''; @@ -3012,7 +3020,11 @@ AJAX.registerOnload('functions.js', function () { fields += '('+central_column_list[db+'_'+table][i].col_length+') '; } fields += central_column_list[db+'_'+table][i].col_extra+''+ - ''; + ''; + if (pick) { + fields += ''; + } + fields += ''; } $("#col_list").append(fields); result_pointer = i; @@ -3032,6 +3044,9 @@ AJAX.registerOnload('functions.js', function () { return false; }); + // $('a.show_central_list').live('click',function(e) { + + // }); // When "add a new value" is clicked, append an empty text field $("input.add_value").live('click', function (e) { e.preventDefault(); diff --git a/js/messages.php b/js/messages.php index 96b566788c..794076ea26 100644 --- a/js/messages.php +++ b/js/messages.php @@ -293,6 +293,13 @@ $js_messages['confirmTitle'] = __('Are you sure?'); $js_messages['makeConsistentMessage'] = __('This action may change some of the columns definition.
Are you sure you want to continue?'); $js_messages['strContinue'] = __('Continue'); +/** For normalization */ +$js_messages['strAddUniqueIndex'] = __('Add unique/primary index'); +$js_messages['uniqueColAdded'] = __('Unique column(s) added.'); +$js_messages['toNextStep'] = __('Taking you to next step ...'); +$js_messages['strFinishMsg'] = __("The first step of normalization is complete for table '%s'."); +$js_messages['strEndStep'] = __("End of step"); + /* For server_variables.js */ $js_messages['strSave'] = __('Save'); diff --git a/js/normalization.js b/js/normalization.js new file mode 100644 index 0000000000..512576169c --- /dev/null +++ b/js/normalization.js @@ -0,0 +1,271 @@ +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * @fileoverview events handling from normalization page + * @name normalization + * + * @requires jQuery + */ + +/** + * AJAX scripts for normalization.php + * + */ + +function appendHtmlColumnsList() +{ + $.get( + "normalization.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "getColumns": true + }, + function(data) { + if (data.success === true) { + $('select[name=makeAtomic]').html(data.message); + } + } + ); +} + +function goToFinish() +{ + $("#mainContent legend").html(PMA_messages.strEndStep); + $("#mainContent h4").html( + "

"+$.sprintf(PMA_messages.strFinishMsg, PMA_commonParams.get('table'))+"

" + ); + $("#mainContent p").html(''); + $("#mainContent #extra").html(''); + $("#mainContent #newCols").html(''); + $('.tblFooters').html(''); +} + +function goToStep3() +{ + $.post( + "normalization.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "step3": true + }, function(data) { + $("#mainContent legend").html(data.legendText); + $("#mainContent h4").html(data.headText); + $("#mainContent p").html(data.subText); + $("#mainContent #extra").html(data.extra); + $("#mainContent #newCols").html(''); + $('.tblFooters').html(''); + } + ); +} + +function goToStep2(extra) +{ + $.post( + "normalization.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "step2": true + }, function(data) { + $("#mainContent legend").html(data.legendText); + $("#mainContent h4").html(data.headText); + $("#mainContent p").html(data.subText); + $("#mainContent #extra,#mainContent #newCols").html(''); + $('.tblFooters').html(''); + if (data.hasPrimaryKey === "1") { + if(extra === 'goToStep3') { + $("#mainContent h4").html(PMA_messages.uniqueColAdded); + $("#mainContent p").html(PMA_messages.toNextStep); + } + if(extra === 'gotoFinish') { + goToFinish(); + } else { + setTimeout(function() { + goToStep3(); + }, 3000); + } + } else { + //form to select columns to make primary + $("#mainContent #extra").html(data.extra); + } + } + ); +} + +AJAX.registerTeardown('normalization.js', function () { + $("#extra").off("click", "#selectNonAtomicCol"); + $("#splitGo").unbind('click'); + $('.tblFooters').off("click", "#saveSplit"); + $("#extra").off("click", "#addNewPrimary"); + $(".tblFooters").off("click", "#saveNewPrimary"); + $("#extra").off("click", "#removeRedundant"); + $("#mainContent p").off("click", "#createUniqueColumns"); +}); + +AJAX.registerOnload('normalization.js', function() { + var selectedCol; + $("#extra").on("click", "#selectNonAtomicCol", function() { + if ($(this).val() === 'no_such_col') { + goToStep2(); + } else { + selectedCol = $(this).val(); + } + }); + + $("#splitGo").click(function() { + if(!selectedCol || selectedCol === '') { + return false; + } + var numField = $("#numField").val(); + $.get( + "normalization.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "splitColumn": true, + "numFields": numField + }, + function(data) { + if (data.success === true) { + $('#newCols').html(data.message); + $('.default_value').hide(); + $('.enum_notice').hide(); + $('.tblFooters').html("" + + ""); + } + } + ); + return false; + }); + $('.tblFooters').on("click","#saveSplit", function() { + central_column_list = []; + if ($("#newCols #field_0_1").val() === '') { + $("#newCols #field_0_1").focus(); + return false; + } + datastring = $('#newCols :input').serialize(); + datastring += "&ajax_request=1&do_save_data=1&field_where=last"; + $.post("tbl_addfield.php", datastring, function(data) { + if (data.success) { + $.get( + "sql.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "dropped_column": selectedCol, + "sql_query": 'ALTER TABLE `' + PMA_commonParams.get('table') + '` DROP `' + selectedCol + '`;', + "is_js_confirmed": 1 + }, + function(data) { + if (data.success === true) { + appendHtmlColumnsList(); + $('#newCols').html(''); + $('.tblFooters').html(''); + } else { + PMA_ajaxShowMessage(data.error, false); + } + selectedCol = ''; + } + ); + } else { + PMA_ajaxShowMessage(data.error, false); + } + }); + }); + + $("#extra").on("click", "#addNewPrimary", function() { + $.get( + "normalization.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "addNewPrimary": true + }, + function(data) { + if (data.success === true) { + $('#newCols').html(data.message); + $('.default_value').hide(); + $('.enum_notice').hide(); + $('.tblFooters').html("" + + ""); + } else { + PMA_ajaxShowMessage(data.error, false); + } + } + ); + return false; + }); + $(".tblFooters").on("click", "#saveNewPrimary", function() { + datastring = $('#newCols :input').serialize(); + datastring += "&field_key[0]=primary_0&ajax_request=1&do_save_data=1&field_where=last"; + $.post("tbl_addfield.php", datastring, function(data) { + if (data.success === true) { + $("#mainContent h4").html(PMA_messages.uniqueColAdded); + $("#mainContent p").html(PMA_messages.toNextStep); + $("#mainContent #extra").html(''); + $("#mainContent #newCols").html(''); + $('.tblFooters').html(''); + setTimeout(function() { + goToStep3(); + }, 2000); + } else { + PMA_ajaxShowMessage(data.error, false); + } + }); + }); + $("#extra").on("click", "#removeRedundant", function() { + var dropQuery = 'ALTER TABLE `' + PMA_commonParams.get('table') + '` '; + $("#extra input[type=checkbox]:checked").each(function() { + dropQuery += 'DROP `' + $(this).val() + '`, '; + }); + dropQuery = dropQuery.slice(0, -2); + $.get( + "sql.php", + { + "token": PMA_commonParams.get('token'), + "ajax_request": true, + "db": PMA_commonParams.get('db'), + "table": PMA_commonParams.get('table'), + "sql_query": dropQuery, + "is_js_confirmed": 1 + }, + function(data) { + if (data.success === true) { + goToStep2('gotoFinish'); + } else { + PMA_ajaxShowMessage(data.error, false); + } + } + ); + }); + $("#mainContent p").on("click", "#createUniqueColumns", function(event) { + event.preventDefault(); + var url = 'create_index=1&server=' + PMA_commonParams.get('server') + + '&db='+PMA_commonParams.get('db')+'&table='+PMA_commonParams.get('table')+'&added_fields=1' + + '&token=' +PMA_commonParams.get('token')+'&ajax_request=true'; + var title = PMA_messages.strAddUniqueIndex; + indexEditorDialog(url, title, function(){ + //on success + $("#sqlqueryresults").remove(); + $('#result_query').remove(); + $('.tblFooters').html(''); + goToStep2('goToStep3'); + }); + return false; + }); +}); diff --git a/libraries/normalization.lib.php b/libraries/normalization.lib.php new file mode 100644 index 0000000000..bcff0ac914 --- /dev/null +++ b/libraries/normalization.lib.php @@ -0,0 +1,276 @@ +getColumns(); + $columnTypeList = $types[ucfirst($colTypeCategory)]; + } + $GLOBALS['dbi']->selectDb($db, $GLOBALS['userlink']); + $columns = (array) $GLOBALS['dbi']->getColumns( + $db, $table, null, + true, $GLOBALS['userlink'] + ); + $type = ""; + $selectColHtml = ""; + foreach ($columns as $column=>$def) { + if (isset($def['Type'])) { + $extracted_columnspec = PMA_Util::extractColumnSpec($def['Type']); + $type = $extracted_columnspec['type']; + } + if (empty($columnTypeList) || in_array(strtoupper($type), $columnTypeList)) { + if ($listType == 'checkbox') { + $selectColHtml .= '' + . htmlspecialchars($column) . ' [ ' . $def['Type'] . ' ]
'; + } else { + $selectColHtml .= ''; + } + } + } + return $selectColHtml; +} + +/** + * function to check if any unique column or group of columns exist or not + * + * @param string $db current database + * @param string $table current table + * + * @return "1" if the unique columns exist, otherwise "0" + */ +function PMA_checkUniqueColumn($db, $table) +{ + $query = "SELECT EXISTS( + SELECT 1 + FROM information_schema.columns + WHERE table_schema = '" . $db . "' + and table_name='" . $table . "' + and column_key = 'PRI' + ) As HasUniqueKey"; + $result = $GLOBALS['dbi']->fetchResult($query, null, null, $GLOBALS['userlink']); + return $result[0]; +} + +/** + * get the html of the form to add the new column to given table + * + * @param integer $num_fields number of columns to add + * @param string $db current database + * @param string $table current table + * @param array $columnMeta array containing default values for the fields + * + * @return HTML + */ +function PMA_getHtmlForCreateNewColumn( + $num_fields, $db, $table, $columnMeta=array() +) { + $cfgRelation = PMA_getRelationsParam(); + $content_cells = array(); + $available_mime = array(); + $mime_map = array(); + $header_cells = PMA_getHeaderCells( + true, null, + $cfgRelation['mimework'], $db, $table + ); + if ($cfgRelation['mimework'] && $GLOBALS['cfg']['BrowseMIME']) { + $mime_map = PMA_getMIME($db, $table); + $available_mime = PMA_getAvailableMIMEtypes(); + } + $comments_map = PMA_getComments($db, $table); + for ($columnNumber = 0; $columnNumber < $num_fields; $columnNumber++) { + $content_cells[$columnNumber] = PMA_getHtmlForColumnAttributes( + $columnNumber, $columnMeta, '', + 8, '', null, array(), null, null, null, + $comments_map, null, true, + array(), $cfgRelation, + $available_mime, $mime_map + ); + } + return PMA_getHtmlForTableFieldDefinitions($header_cells, $content_cells); +} +/** + * buld the html for step 1.1 of normalization + * + * @param string $db current database + * @param string $table current table + * + * @return HTML for step 1.1 + */ +function PMA_getHtmlFor1NFStep1($db, $table) +{ + $step = 1; + $stepTxt = __('Make all columns atomic'); + $html = "

" + . __('First step of normalization (1NF)') . "

"; + $html .= "
" . + "
" . + "" . __('Step 1.') . $step . " " . $stepTxt . "" . + "

" . __( + 'Do you have any column which can be split into more than' + . ' one column, ' + . 'For example: address can be split into street, city, country and zip.' + ) + . "
( " + . __('Show me the central list of columns that are not already in this table') . " )

" + . "

" . __( + 'Select a column which can be split into more ' + . 'than one. (on select of \'no such column\', it\'ll move to next step)' + ) + . "

" + . "
" + . "" + . "" . __('split into ') + . "" + . "
" + . "
" + . "
" + . "
" + . "
"; + return $html; +} + +/** + * build the html contents of various html elements in step 1.2 + * + * @param string $db current database + * @param string $table current table + * + * @return HTML contents for step 1.2 + */ +function PMA_getHtmlContentsFor1NFStep2($db, $table) +{ + $step = 2; + $stepTxt = __('Have unique columns'); + $hasPrimaryKey = PMA_checkUniqueColumn($db, $table); + $legendText = __('Step 1.') . $step . " " . $stepTxt; + $extra = ''; + if ($hasPrimaryKey) { + $headText = __("Unique column(s) already exist"); + $subText = __("Taking you to next step ..."); + } else { + $headText = __( + "There are no unique columns. Add an unique column " + . "(or combination of columns) that uniquely identify all rows. " + ); + $subText = '' + . PMA_Util::getIcon( + 'b_index_add.png', __( + 'Add unique/primary index on existing column(s)' + ) + ) + . ''; + $extra = __( + "If it's not possible to make existing " + . "column combinations as unique then" + ) . "
" + . '' + . __('+ Add a new unique column (primary key)') . ''; + } + $res = array('legendText'=>$legendText, 'headText'=>$headText, + 'subText'=>$subText, 'hasPrimaryKey'=>$hasPrimaryKey, 'extra'=>$extra); + return $res; +} + +/** + * build the html contents of various html elements in step 1.3 + * + * @param string $db current database + * @param string $table current table + * + * @return HTML contents for step 1.3 + */ +function PMA_getHtmlContentsFor1NFStep3($db, $table) +{ + $step = 3; + $stepTxt = __('Remove redundant columns'); + $legendText = __('Step 1.') . $step . " " . $stepTxt; + $headText = __( + "Do you have group of columns which on combining gives an existing + column. for ex. if have first_name, last_name and full_name then + combining first_name and last_name gives full_name which is redundant" + ); + $subText = __( + "Check the columns which are redundant and click on remove. " + . "If no redundant column, click on 'No redundant column'" + ); + $extra = PMA_getHtmlForColumnsList($db, $table, 'all', "checkbox") . "
" + . '' + . ''; + $res = array( + 'legendText'=>$legendText, 'headText'=>$headText, + 'subText'=>$subText, 'extra'=>$extra + ); + return $res; +} + +/** + * get html for options to normalize table + * + * @return HTML + */ +function PMA_getHtmlForNormalizetable() +{ + $html_output = '
' + . PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']) + . ''; + $html_output .= '
'; + $html_output .= '' + . __('Improve table structure (Normalization):') . ''; + $html_output .= '

' . __('Select up to what step you want to normalize') . '

'; + $choices = array( + '1nf' => __('First step of normalization (1NF)'), + '2nf' => __('Second step of normalization (1NF+2NF)'), + '3nf' => __('Third step of normalization (1NF+2NF+3NF)')); + + $html_output .= PMA_Util::getRadioFields( + 'normalizeTo', $choices, '1nf', true + ); + $html_output .= '
' + . "" . __( + 'Hint: Please follow the procedure carefully in order ' + . 'to obtain correct normalizarion' + ) . "" + . '' + . '
' + . '
' + . ''; + + return $html_output; +} \ No newline at end of file diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 70b152ab67..c4b8273418 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -1615,6 +1615,9 @@ function PMA_getHtmlForOptionalActionLinks($url_query, $tbl_is_view, $html_output .= '' . PMA_Util::getIcon('b_move.png', __('Move columns'), true) . ''; + $html_output .= '' + . PMA_Util::getIcon('normalize.png', __('Improve table structure'), true) + . ''; } return $html_output; diff --git a/normalization.php b/normalization.php new file mode 100644 index 0000000000..90be5950f4 --- /dev/null +++ b/normalization.php @@ -0,0 +1,72 @@ +' . __('Select one ...') . '' + . ''; + //get column whose datatype falls under string category + $html .= PMA_getHtmlForColumnsList($db, $table, 'string'); + echo $html; + exit; +} +if (isset($_REQUEST['splitColumn'])) { + $num_fields = $_REQUEST['numFields']; + $html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table); + $html .= PMA_URL_getHiddenInputs($db, $table); + echo $html; + exit; +} +if (isset($_REQUEST['addNewPrimary'])) { + $num_fields = 1; + $columnMeta = array('Field'=>$table . "_id", 'Extra'=>'auto_increment'); + $html = PMA_getHtmlForCreateNewColumn( + $num_fields, $db, $table, $columnMeta + ); + $html .= PMA_URL_getHiddenInputs($db, $table); + echo $html; + exit; +} +$response = PMA_Response::getInstance(); +$header = $response->getHeader(); +$scripts = $header->getScripts(); +$scripts->addFile('normalization.js'); +$scripts->addFile('jquery/jquery.uitablefilter.js'); +if (isset($_REQUEST['normalizeTo'])) { + $normalForm = $_REQUEST['normalizeTo']; + if ($normalForm != '1nf') { + $response->addHTML( + '

' + . __('Second/Third step of normalization') . '

' + . '
' + . 'Coming soon...' + . 'Wait is worth it :-)
' + ); + exit; + } +} + +if (isset($_REQUEST['step1'])) { + $html = PMA_getHtmlFor1NFStep1($db, $table); + $response->addHTML($html); +} else if (isset($_REQUEST['step2'])) { + $res = PMA_getHtmlContentsFor1NFStep2($db, $table); + $response->addJSON($res); +} else if (isset($_REQUEST['step3'])) { + $res = PMA_getHtmlContentsFor1NFStep3($db, $table); + $response->addJSON($res); +} else { + $response->addHTML(PMA_getHtmlForNormalizetable()); +} diff --git a/tbl_addfield.php b/tbl_addfield.php index e679bd5ca3..33871f96a2 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -93,6 +93,7 @@ if (isset($_REQUEST['do_save_data'])) { } else { $error_message_html = PMA_Util::mysqlDie('', '', false, $err_url, false); $response->addHTML($error_message_html); + $response->isSuccess(false); exit; } } // end do alter table diff --git a/tbl_operations.php b/tbl_operations.php index 87108620e5..ce7b77579d 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -18,7 +18,6 @@ require_once 'libraries/operations.lib.php'; $pma_table = new PMA_Table($GLOBALS['table'], $GLOBALS['db']); $response = PMA_Response::getInstance(); - /** * Runs common work */ diff --git a/themes/original/img/normalize.png b/themes/original/img/normalize.png new file mode 100644 index 0000000000..3b897cd0b6 Binary files /dev/null and b/themes/original/img/normalize.png differ diff --git a/themes/original/img/sprites.png b/themes/original/img/sprites.png index f1e4a9c12f..686cde0cd6 100644 Binary files a/themes/original/img/sprites.png and b/themes/original/img/sprites.png differ diff --git a/themes/original/sprites.lib.php b/themes/original/sprites.lib.php index e040d65f0b..3d4eccb0e7 100644 --- a/themes/original/sprites.lib.php +++ b/themes/original/sprites.lib.php @@ -535,158 +535,163 @@ function PMA_sprites() 'width' => '16', 'height' => '16' ), - 'pause' => array( + 'normalize' => array( 'position' => '105', 'width' => '16', 'height' => '16' ), - 'play' => array( + 'pause' => array( 'position' => '106', 'width' => '16', 'height' => '16' ), - 's_asc' => array( + 'play' => array( 'position' => '107', + 'width' => '16', + 'height' => '16' + ), + 's_asc' => array( + 'position' => '108', 'width' => '11', 'height' => '9' ), 's_asci' => array( - 'position' => '108', - 'width' => '16', - 'height' => '16' - ), - 's_cancel' => array( 'position' => '109', 'width' => '16', 'height' => '16' ), - 's_cog' => array( + 's_cancel' => array( 'position' => '110', 'width' => '16', 'height' => '16' ), - 's_db' => array( + 's_cog' => array( 'position' => '111', 'width' => '16', 'height' => '16' ), - 's_desc' => array( + 's_db' => array( 'position' => '112', + 'width' => '16', + 'height' => '16' + ), + 's_desc' => array( + 'position' => '113', 'width' => '11', 'height' => '9' ), 's_error' => array( - 'position' => '113', + 'position' => '114', 'width' => '16', 'height' => '16' ), 's_error2' => array( - 'position' => '114', + 'position' => '115', 'width' => '11', 'height' => '11' ), 's_host' => array( - 'position' => '115', + 'position' => '116', 'width' => '16', 'height' => '16' ), 's_info' => array( - 'position' => '116', + 'position' => '117', 'width' => '11', 'height' => '11' ), 's_lang' => array( - 'position' => '117', - 'width' => '16', - 'height' => '16' - ), - 's_lock' => array( 'position' => '118', 'width' => '16', 'height' => '16' ), - 's_loggoff' => array( + 's_lock' => array( 'position' => '119', 'width' => '16', 'height' => '16' ), - 's_notice' => array( + 's_loggoff' => array( 'position' => '120', 'width' => '16', 'height' => '16' ), - 's_passwd' => array( + 's_notice' => array( 'position' => '121', 'width' => '16', 'height' => '16' ), - 's_really' => array( + 's_passwd' => array( 'position' => '122', + 'width' => '16', + 'height' => '16' + ), + 's_really' => array( + 'position' => '123', 'width' => '11', 'height' => '11' ), 's_reload' => array( - 'position' => '123', - 'width' => '16', - 'height' => '16' - ), - 's_replication' => array( 'position' => '124', 'width' => '16', 'height' => '16' ), - 's_rights' => array( + 's_replication' => array( 'position' => '125', 'width' => '16', 'height' => '16' ), - 's_sortable' => array( + 's_rights' => array( 'position' => '126', + 'width' => '16', + 'height' => '16' + ), + 's_sortable' => array( + 'position' => '127', 'width' => '11', 'height' => '15' ), 's_status' => array( - 'position' => '127', - 'width' => '16', - 'height' => '16' - ), - 's_success' => array( 'position' => '128', 'width' => '16', 'height' => '16' ), - 's_sync' => array( + 's_success' => array( 'position' => '129', 'width' => '16', 'height' => '16' ), - 's_tbl' => array( + 's_sync' => array( 'position' => '130', 'width' => '16', 'height' => '16' ), - 's_theme' => array( + 's_tbl' => array( 'position' => '131', 'width' => '16', 'height' => '16' ), - 's_top' => array( + 's_theme' => array( 'position' => '132', 'width' => '16', 'height' => '16' ), - 's_vars' => array( + 's_top' => array( 'position' => '133', 'width' => '16', 'height' => '16' ), - 's_views' => array( + 's_vars' => array( 'position' => '134', + 'width' => '16', + 'height' => '16' + ), + 's_views' => array( + 'position' => '135', 'width' => '10', 'height' => '10' ), 'window-new' => array( - 'position' => '135', + 'position' => '136', 'width' => '16', 'height' => '16' ), diff --git a/themes/pmahomme/img/normalize.png b/themes/pmahomme/img/normalize.png new file mode 100644 index 0000000000..3b897cd0b6 Binary files /dev/null and b/themes/pmahomme/img/normalize.png differ diff --git a/themes/pmahomme/img/sprites.png b/themes/pmahomme/img/sprites.png index 7a6daebab5..f28b61a068 100644 Binary files a/themes/pmahomme/img/sprites.png and b/themes/pmahomme/img/sprites.png differ diff --git a/themes/pmahomme/sprites.lib.php b/themes/pmahomme/sprites.lib.php index 167af9df73..ff9687b56a 100644 --- a/themes/pmahomme/sprites.lib.php +++ b/themes/pmahomme/sprites.lib.php @@ -600,186 +600,191 @@ function PMA_sprites() 'width' => '16', 'height' => '16' ), - 'pause' => array( + 'normalize' => array( 'position' => '118', 'width' => '16', 'height' => '16' ), - 'php_sym' => array( + 'pause' => array( 'position' => '119', 'width' => '16', 'height' => '16' ), - 'play' => array( + 'php_sym' => array( 'position' => '120', 'width' => '16', 'height' => '16' ), - 's_asc' => array( + 'play' => array( 'position' => '121', 'width' => '16', 'height' => '16' ), - 's_asci' => array( + 's_asc' => array( 'position' => '122', 'width' => '16', 'height' => '16' ), - 's_attention' => array( + 's_asci' => array( 'position' => '123', 'width' => '16', 'height' => '16' ), - 's_cancel' => array( + 's_attention' => array( 'position' => '124', 'width' => '16', 'height' => '16' ), - 's_cancel2' => array( + 's_cancel' => array( 'position' => '125', 'width' => '16', 'height' => '16' ), - 's_cog' => array( + 's_cancel2' => array( 'position' => '126', 'width' => '16', 'height' => '16' ), - 's_db' => array( + 's_cog' => array( 'position' => '127', 'width' => '16', 'height' => '16' ), - 's_desc' => array( + 's_db' => array( 'position' => '128', 'width' => '16', 'height' => '16' ), - 's_error' => array( + 's_desc' => array( 'position' => '129', 'width' => '16', 'height' => '16' ), - 's_error2' => array( + 's_error' => array( 'position' => '130', + 'width' => '16', + 'height' => '16' + ), + 's_error2' => array( + 'position' => '131', 'width' => '11', 'height' => '11' ), 's_host' => array( - 'position' => '131', - 'width' => '16', - 'height' => '16' - ), - 's_info' => array( 'position' => '132', 'width' => '16', 'height' => '16' ), - 's_lang' => array( + 's_info' => array( 'position' => '133', 'width' => '16', 'height' => '16' ), - 's_lock' => array( + 's_lang' => array( 'position' => '134', 'width' => '16', 'height' => '16' ), - 's_loggoff' => array( + 's_lock' => array( 'position' => '135', 'width' => '16', 'height' => '16' ), - 's_notice' => array( + 's_loggoff' => array( 'position' => '136', 'width' => '16', 'height' => '16' ), - 's_okay' => array( + 's_notice' => array( 'position' => '137', 'width' => '16', 'height' => '16' ), - 's_passwd' => array( + 's_okay' => array( 'position' => '138', 'width' => '16', 'height' => '16' ), - 's_process' => array( + 's_passwd' => array( 'position' => '139', 'width' => '16', 'height' => '16' ), - 's_really' => array( + 's_process' => array( 'position' => '140', + 'width' => '16', + 'height' => '16' + ), + 's_really' => array( + 'position' => '141', 'width' => '11', 'height' => '11' ), 's_reload' => array( - 'position' => '141', - 'width' => '16', - 'height' => '16' - ), - 's_replication' => array( 'position' => '142', 'width' => '16', 'height' => '16' ), - 's_rights' => array( + 's_replication' => array( 'position' => '143', 'width' => '16', 'height' => '16' ), - 's_sortable' => array( + 's_rights' => array( 'position' => '144', 'width' => '16', 'height' => '16' ), - 's_status' => array( + 's_sortable' => array( 'position' => '145', 'width' => '16', 'height' => '16' ), - 's_success' => array( + 's_status' => array( 'position' => '146', 'width' => '16', 'height' => '16' ), - 's_sync' => array( + 's_success' => array( 'position' => '147', 'width' => '16', 'height' => '16' ), - 's_tbl' => array( + 's_sync' => array( 'position' => '148', 'width' => '16', 'height' => '16' ), - 's_theme' => array( + 's_tbl' => array( 'position' => '149', 'width' => '16', 'height' => '16' ), - 's_top' => array( + 's_theme' => array( 'position' => '150', 'width' => '16', 'height' => '16' ), - 's_vars' => array( + 's_top' => array( 'position' => '151', 'width' => '16', 'height' => '16' ), - 's_views' => array( + 's_vars' => array( 'position' => '152', 'width' => '16', 'height' => '16' ), - 'window-new' => array( + 's_views' => array( 'position' => '153', 'width' => '16', 'height' => '16' ), + 'window-new' => array( + 'position' => '154', + 'width' => '16', + 'height' => '16' + ), ); } ?>