Skip to content

Commit

Permalink
Merge pull request #1458 from madhuracj/displayDir
Browse files Browse the repository at this point in the history
Remove display direction
  • Loading branch information
lem9 committed Jan 13, 2015
2 parents 0d601eb + ab15979 commit d1c7ee2
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 852 deletions.
6 changes: 0 additions & 6 deletions config.sample.inc.php
Expand Up @@ -115,12 +115,6 @@
//$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)
Expand Down
33 changes: 0 additions & 33 deletions doc/config.rst
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
59 changes: 1 addition & 58 deletions js/functions.js
Expand Up @@ -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');
}
});
AJAX.registerOnload('functions.js', function () {

/**
* Autosubmit page selector
Expand Down

0 comments on commit d1c7ee2

Please sign in to comment.