Merge pull request #1458 from madhuracj/displayDir
Remove display direction
This commit is contained in:
commit
d1c7ee21af
@ -115,12 +115,6 @@ $cfg['SaveDir'] = '';
|
||||
//$cfg['DefaultLang'] = 'en';
|
||||
//$cfg['DefaultLang'] = 'de';
|
||||
|
||||
/**
|
||||
* default display direction (horizontal|vertical|horizontalflipped)
|
||||
*/
|
||||
//$cfg['DefaultDisplay'] = 'vertical';
|
||||
|
||||
|
||||
/**
|
||||
* How many columns should be used for table display of a database?
|
||||
* (a value larger than 1 results in some information being hidden)
|
||||
|
||||
@ -2252,18 +2252,6 @@ Design customization
|
||||
the left side, right side, both sides or nowhere). "left" and "right"
|
||||
are parsed as "top" and "bottom" with vertical display mode.
|
||||
|
||||
.. config:option:: $cfg['DefaultDisplay']
|
||||
|
||||
:type: string
|
||||
:default: ``'horizontal'``
|
||||
|
||||
There are 3 display modes: horizontal, horizontalflipped and vertical.
|
||||
Define which one is displayed by default. The first mode displays each
|
||||
row on a horizontal line, the second rotates the headers by 90
|
||||
degrees, so you can use descriptive headers even though columns only
|
||||
contain small values and still print them out. The vertical mode sorts
|
||||
each row on a vertical lineup.
|
||||
|
||||
.. config:option:: $cfg['RememberSorting']
|
||||
|
||||
:type: boolean
|
||||
@ -2280,19 +2268,6 @@ Design customization
|
||||
when there is no sort order defines externally.
|
||||
Acceptable values : ['NONE', 'ASC', 'DESC']
|
||||
|
||||
.. config:option:: $cfg['HeaderFlipType']
|
||||
|
||||
:type: string
|
||||
:default: ``'auto'``
|
||||
|
||||
The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using
|
||||
'css' the rotation of the header for horizontalflipped is done via
|
||||
CSS. The CSS transformation currently works only in Internet
|
||||
Explorer.If set to 'fake' PHP does the transformation for you, but of
|
||||
course this does not look as good as CSS. The 'auto' option enables
|
||||
CSS transformation when browser supports it and use PHP based one
|
||||
otherwise.
|
||||
|
||||
.. config:option:: $cfg['ShowBrowseComments']
|
||||
|
||||
:type: boolean
|
||||
@ -2516,14 +2491,6 @@ Web server upload/save/import directories
|
||||
Various display setting
|
||||
-----------------------
|
||||
|
||||
.. config:option:: $cfg['ShowDisplayDirection']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Defines whether or not type display direction option is shown when
|
||||
browsing a table.
|
||||
|
||||
.. config:option:: $cfg['RepeatCells']
|
||||
|
||||
:type: integer
|
||||
|
||||
@ -3587,70 +3587,13 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$(document).off('mouseenter', '.vpointer');
|
||||
$(document).off('mouseleave', '.vpointer');
|
||||
$(document).off('click', '.vmarker');
|
||||
$(document).off('change', 'select.pageselector');
|
||||
$(document).off('click', 'a.formLinkSubmit');
|
||||
$('#update_recent_tables').unbind('ready');
|
||||
$('#sync_favorite_tables').unbind('ready');
|
||||
});
|
||||
/**
|
||||
* Vertical pointer
|
||||
*/
|
||||
|
||||
AJAX.registerOnload('functions.js', function () {
|
||||
$(document).on('mouseenter', '.vpointer',
|
||||
//handlerIn
|
||||
function (e) {
|
||||
var $this_td = $(this);
|
||||
var row_num = PMA_getRowNumber($this_td.attr('class'));
|
||||
// for all td of the same vertical row, add hover
|
||||
$('.vpointer').filter('.row_' + row_num).addClass('hover');
|
||||
}
|
||||
);
|
||||
$(document).on('mouseleave', '.vpointer',
|
||||
//handlerOut
|
||||
function (e) {
|
||||
var $this_td = $(this);
|
||||
var row_num = PMA_getRowNumber($this_td.attr('class'));
|
||||
// for all td of the same vertical row, remove hover
|
||||
$('.vpointer').filter('.row_' + row_num).removeClass('hover');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Vertical marker
|
||||
*/
|
||||
$(document).on('click', '.vmarker', function (e) {
|
||||
// do not trigger when clicked on anchor
|
||||
if ($(e.target).is('a, img, a *')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $this_td = $(this);
|
||||
var row_num = PMA_getRowNumber($this_td.attr('class'));
|
||||
|
||||
// XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
|
||||
var $checkbox = $('.vmarker').filter('.row_' + row_num + ':first').find(':checkbox');
|
||||
if ($checkbox.length) {
|
||||
// checkbox in a row, add or remove class depending on checkbox state
|
||||
var checked = $checkbox.prop('checked');
|
||||
if (!$(e.target).is(':checkbox, label')) {
|
||||
checked = !checked;
|
||||
$checkbox.prop('checked', checked);
|
||||
}
|
||||
// for all td of the same vertical row, toggle the marked class
|
||||
if (checked) {
|
||||
$('.vmarker').filter('.row_' + row_num).addClass('marked');
|
||||
} else {
|
||||
$('.vmarker').filter('.row_' + row_num).removeClass('marked');
|
||||
}
|
||||
} else {
|
||||
// normal data table, just toggle class
|
||||
$('.vmarker').filter('.row_' + row_num).toggleClass('marked');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Autosubmit page selector
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2589,13 +2589,6 @@ $cfg['RowActionLinks'] = 'left';
|
||||
*/
|
||||
$cfg['TablePrimaryKeyOrder'] = 'NONE';
|
||||
|
||||
/**
|
||||
* default display direction (horizontal|vertical|horizontalflipped)
|
||||
*
|
||||
* @global string $cfg['DefaultDisplay']
|
||||
*/
|
||||
$cfg['DefaultDisplay'] = 'horizontal';
|
||||
|
||||
/**
|
||||
* remember the last way a table sorted
|
||||
*
|
||||
@ -2603,14 +2596,6 @@ $cfg['DefaultDisplay'] = 'horizontal';
|
||||
*/
|
||||
$cfg['RememberSorting'] = true;
|
||||
|
||||
/**
|
||||
* table-header rotation via faking or CSS? (css|fake|auto)
|
||||
* NOTE: CSS only works in IE browsers!
|
||||
*
|
||||
* @global string $cfg['HeaderFlipType']
|
||||
*/
|
||||
$cfg['HeaderFlipType'] = 'auto';
|
||||
|
||||
/**
|
||||
* shows stored relation-comments in 'browse' mode.
|
||||
*
|
||||
@ -2625,11 +2610,6 @@ $cfg['ShowBrowseComments'] = true;
|
||||
*/
|
||||
$cfg['ShowPropertyComments']= true;
|
||||
|
||||
/**
|
||||
* shows table display direction.
|
||||
*/
|
||||
$cfg['ShowDisplayDirection'] = false;
|
||||
|
||||
/**
|
||||
* repeat header names every X cells? (0 = deactivate)
|
||||
*
|
||||
|
||||
@ -63,7 +63,6 @@ $cfg_db['TablePrimaryKeyOrder'] = array(
|
||||
'DESC' => __('Descending')
|
||||
);
|
||||
$cfg_db['ProtectBinary'] = array(false, 'blob', 'noblob', 'all');
|
||||
$cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped');
|
||||
$cfg_db['CharEditing'] = array('input', 'textarea');
|
||||
$cfg_db['TabsMode'] = array(
|
||||
'icons' => __('Icons'),
|
||||
|
||||
@ -78,7 +78,6 @@ $strConfigConfirm_desc = __(
|
||||
);
|
||||
$strConfigConfirm_name = __('Confirm DROP queries');
|
||||
$strConfigDBG_sql_name = __('Debug SQL');
|
||||
$strConfigDefaultDisplay_name = __('Default display direction');
|
||||
$strConfigDefaultTabDatabase_desc
|
||||
= __('Tab that is displayed when entering a database.');
|
||||
$strConfigDefaultTabDatabase_name = __('Default database tab');
|
||||
@ -725,8 +724,6 @@ $strConfigShowDbStructureLastUpdate_desc = __('Show or hide a column displaying
|
||||
$strConfigShowDbStructureLastUpdate_name = __('Show Last update timestamp');
|
||||
$strConfigShowDbStructureLastCheck_desc = __('Show or hide a column displaying the Last check timestamp for all tables.');
|
||||
$strConfigShowDbStructureLastCheck_name = __('Show Last check timestamp');
|
||||
$strConfigShowDisplayDirection_desc = __('Defines whether or not type display direction option is shown when browsing a table.');
|
||||
$strConfigShowDisplayDirection_name = __('Show display direction');
|
||||
$strConfigShowFieldTypesInDataEditView_desc = __('Defines whether or not type fields should be initially displayed in edit/insert mode.');
|
||||
$strConfigShowFieldTypesInDataEditView_name = __('Show field types');
|
||||
$strConfigShowFunctionFields_desc = __('Display the function fields in edit/insert mode.');
|
||||
|
||||
@ -206,12 +206,10 @@ $forms['Main_panel']['Browse'] = array(
|
||||
'BrowseMarkerEnable',
|
||||
'GridEditing',
|
||||
'SaveCellsAtOnce',
|
||||
'ShowDisplayDirection',
|
||||
'RepeatCells',
|
||||
'LimitChars',
|
||||
'RowActionLinks',
|
||||
'TablePrimaryKeyOrder',
|
||||
'DefaultDisplay',
|
||||
'RememberSorting');
|
||||
$forms['Main_panel']['Edit'] = array(
|
||||
'ProtectBinary',
|
||||
|
||||
@ -114,12 +114,10 @@ $forms['Main_panel']['Browse'] = array(
|
||||
'BrowseMarkerEnable',
|
||||
'GridEditing',
|
||||
'SaveCellsAtOnce',
|
||||
'ShowDisplayDirection',
|
||||
'RepeatCells',
|
||||
'LimitChars',
|
||||
'RowActionLinks',
|
||||
'TablePrimaryKeyOrder',
|
||||
'DefaultDisplay',
|
||||
'RememberSorting');
|
||||
$forms['Main_panel']['Edit'] = array(
|
||||
'ProtectBinary',
|
||||
|
||||
@ -186,9 +186,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['num_rows'] = '20';
|
||||
$GLOBALS['unlim_num_rows'] = '50';
|
||||
$GLOBALS['cfg']['ShowAll'] = true;
|
||||
$GLOBALS['cfg']['ShowDisplayDirection'] = true;
|
||||
$_SESSION['tmpval']['repeat_cells'] = '1';
|
||||
$_SESSION['tmpval']['disp_direction'] = '1';
|
||||
|
||||
/**
|
||||
* FIXME Counting words of a generated large HTML is not a good way
|
||||
@ -244,7 +242,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
'data grid_edit not_null row_0 vpointer vmarker'
|
||||
'data grid_edit not_null '
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -270,8 +268,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
) {
|
||||
$GLOBALS['cfg']['BrowsePointerEnable'] = true;
|
||||
$GLOBALS['cfg']['BrowseMarkerEnable'] = true;
|
||||
$_SESSION['tmpval']['disp_direction']
|
||||
= PMA_DisplayResults::DISP_DIR_VERTICAL;
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
@ -333,63 +329,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide data for testGetOperationLinksForVerticalTable
|
||||
*
|
||||
* @return array parameters and output
|
||||
*/
|
||||
public function dataProviderForTestGetOperationLinksForVerticalTable()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'edit',
|
||||
'<tr>
|
||||
</tr>
|
||||
'
|
||||
),
|
||||
array(
|
||||
'copy',
|
||||
"<tr>\nCOPY1COPY2</tr>\n"
|
||||
),
|
||||
array(
|
||||
'delete',
|
||||
"<tr>\nDELETE1DELETE2</tr>\n"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for _getOperationLinksForVerticalTable
|
||||
*
|
||||
* @param string $operation edit/copy/delete
|
||||
* @param string $output output of _getOperationLinksForVerticalTable
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider dataProviderForTestGetOperationLinksForVerticalTable
|
||||
*/
|
||||
public function testGetOperationLinksForVerticalTable(
|
||||
$operation, $output
|
||||
) {
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(),
|
||||
'textbtn' => '<th rowspan="4" class="vmiddle">\n \n </th>\n',
|
||||
'edit' => array(),
|
||||
'copy' => array('COPY1', 'COPY2'),
|
||||
'delete' => array('DELETE1', 'DELETE2'),
|
||||
);
|
||||
|
||||
$this->object->__set('vertical_display', $vertical_display);
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getOperationLinksForVerticalTable',
|
||||
array($operation)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testGetCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
@ -402,12 +341,12 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
'_left',
|
||||
array('edit_lnk' => null, 'del_lnk' => null),
|
||||
//array('edit_lnk' => 'nn', 'del_lnk' => 'nn'),
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input type='
|
||||
'<td class="odd" class="center"><input type='
|
||||
. '"checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" '
|
||||
. 'class="multi_checkbox" value="%60cars%60.%60id%60+%3D+3" />'
|
||||
. '<input type="hidden" class="condition_array" value="{"'
|
||||
. '`cars`.`id`":"= 3"}" /> </td><td class="even '
|
||||
. 'row_1 vpointer vmarker" class="center"><input type="checkbox" '
|
||||
. '`cars`.`id`":"= 3"}" /> </td><td class="even"'
|
||||
. ' class="center"><input type="checkbox" '
|
||||
. 'id="id_rows_to_delete1_left" name="rows_to_delete[1]" class='
|
||||
. '"multi_checkbox" value="%60cars%60.%60id%60+%3D+9" /><input '
|
||||
. 'type="hidden" class="condition_array" value="{"`cars`.'
|
||||
@ -420,7 +359,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
* Test for _getCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
* @param string $dir _left / _right
|
||||
* @param array $displayParts which parts to display
|
||||
* @param array $displayParts which parts to display
|
||||
* @param string $output output of _getCheckBoxesForMultipleRowOperations
|
||||
*
|
||||
* @return void
|
||||
@ -432,13 +371,13 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
) {
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input '
|
||||
'<td class="odd" class="center"><input '
|
||||
. 'type="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" '
|
||||
. 'name="rows_to_delete[0]" class="multi_checkbox" value="%60cars'
|
||||
. '%60.%60id%60+%3D+3" /><input type="hidden" class="condition_'
|
||||
. 'array" value="{"`cars`.`id`":"= 3"}" /> '
|
||||
. '</td>',
|
||||
'<td class="even row_1 vpointer vmarker" class="center"><input '
|
||||
'<td class="even" class="center"><input '
|
||||
. 'type="checkbox" id="id_rows_to_delete1[%_PMA_CHECKBOX_DIR_%]" '
|
||||
. 'name="rows_to_delete[1]" class="multi_checkbox" value="%60cars'
|
||||
. '%60.%60id%60+%3D+9" /><input type="hidden" class="condition_'
|
||||
@ -569,8 +508,8 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
'%60new%60.%60id%60+%3D+1',
|
||||
array('`new`.`id`' => '= 1'),
|
||||
'[%_PMA_CHECKBOX_DIR_%]',
|
||||
'odd row_0 vpointer vmarker',
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input type'
|
||||
'odd',
|
||||
'<td class="odd" class="center"><input type'
|
||||
. '="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" name='
|
||||
. '"rows_to_delete[0]" class="multi_checkbox checkall" value="%60'
|
||||
. 'new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_'
|
||||
@ -626,12 +565,12 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
. 'customer%60.%60id%60+%3D+1&clause_is_unique=1&sql_query='
|
||||
. 'SELECT+%2A+FROM+%60customer%60&goto=sql.php&default_'
|
||||
. 'action=update&token=bbd5003198a3bd856b21d9607d6c6a1e',
|
||||
'odd edit_row_anchor row_0 vpointer vmarker',
|
||||
'odd edit_row_anchor',
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Edit" alt='
|
||||
. '"Edit" class="icon ic_b_edit" /> Edit</span>',
|
||||
'`customer`.`id` = 1',
|
||||
'%60customer%60.%60id%60+%3D+1',
|
||||
'<td class="odd edit_row_anchor row_0 vpointer vmarker center" >'
|
||||
'<td class="odd edit_row_anchor center" >'
|
||||
. '<span class="nowrap">' . "\n"
|
||||
. '<a href="tbl_change.php?db=Data&table=customer&where_'
|
||||
. 'clause=%60customer%60.%60id%60+%3D+1&clause_is_unique=1&'
|
||||
@ -693,8 +632,8 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
. '="Copy" class="icon ic_b_insrow" /> Copy</span>',
|
||||
'`customer`.`id` = 1',
|
||||
'%60customer%60.%60id%60+%3D+1',
|
||||
'odd row_0 vpointer vmarker',
|
||||
'<td class="odd row_0 vpointer vmarker center" ><span class='
|
||||
'odd',
|
||||
'<td class="odd center" ><span class='
|
||||
. '"nowrap">' . "\n"
|
||||
. '<a href="tbl_change.php?db=Data&table=customer&where_'
|
||||
. 'clause=%60customer%60.%60id%60+%3D+1&clause_is_unique=1&'
|
||||
@ -758,8 +697,8 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" '
|
||||
. 'alt="Delete" class="icon ic_b_drop" /> Delete</span>',
|
||||
'DELETE FROM `Data`.`customer` WHERE `customer`.`id` = 1',
|
||||
'odd row_0 vpointer vmarker',
|
||||
'<td class="odd row_0 vpointer vmarker center" >' . "\n"
|
||||
'odd',
|
||||
'<td class="odd center" >' . "\n"
|
||||
. '<a href="sql.php?db=Data&table=customer&sql_query=DELETE'
|
||||
. '+FROM+%60Data%60.%60customer%60+WHERE+%60customer%60.%60id%60+%3D'
|
||||
. '+1&message_to_show=The+row+has+been+deleted&goto=sql.php'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user