Merge branch 'master' into rte
This commit is contained in:
commit
1bbb2ea37e
30
ChangeLog
30
ChangeLog
@ -25,11 +25,27 @@ phpMyAdmin - ChangeLog
|
||||
+ [display] More options for browsing GIS data
|
||||
+ [interface] Support for spatial indexes
|
||||
+ [display] GIS data visualization
|
||||
+ AJAX for table structure multiple-columns change
|
||||
+ AJAX for table structure multiple-column change
|
||||
+ AJAX for table structure index edit
|
||||
+ Show/hide indexes in table Structure
|
||||
+ More compact navigation bar
|
||||
+ Display direction (horizontal/vertical) no longer displayed by default
|
||||
+ Shift/click support in database Structure
|
||||
+ Show/hide column in table Browse
|
||||
|
||||
3.4.4.0 (not yet released)
|
||||
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
|
||||
- bug #3323101 [parser] Invalid escape sequence in SQL parser
|
||||
- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
|
||||
- bug #3340151 [export] Working SQL query exports error page
|
||||
- bug #3353649 [interface] "Create an index on X columns" form not validated
|
||||
- bug #3350790 [interface] JS error in Table->Structure->Index->Edit
|
||||
|
||||
3.4.3.1 (2011-07-02)
|
||||
- [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5
|
||||
- [security] Fixed possible code injection incase session variables are compromised, see PMASA-2011-6
|
||||
- [security] Fixed regexp quoting issue in Synchronize code, see PMASA-2011-7
|
||||
- [security] Fixed filtering of a file path, which allowed for directory traversal, see PMASA-2011-8
|
||||
|
||||
3.4.3.0 (2011-06-27)
|
||||
- bug #3311170 [sync] Missing helper icons in Synchronize
|
||||
@ -119,7 +135,7 @@ phpMyAdmin - ChangeLog
|
||||
+ patch #2974341 [structure] Clicking on table name in db Structure should
|
||||
Browse the table if possible, thanks to bhdouglass - dougboybhd
|
||||
+ patch #2975533 [search] New search operators, thanks to
|
||||
Martynas Mickevičius
|
||||
Martynas MickeviÄius
|
||||
+ patch #2967320 [designer] Colored relations based on the primary key,
|
||||
thanks to GreenRover - greenrover
|
||||
- [core] Provide way for vendors to easily change paths to config files.
|
||||
@ -273,7 +289,7 @@ phpMyAdmin - ChangeLog
|
||||
|
||||
3.3.7.0 (2010-09-07)
|
||||
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
|
||||
a page size increase, thanks to Martin Schönberger - mad05
|
||||
a page size increase, thanks to Martin Schönberger - mad05
|
||||
|
||||
3.3.6.0 (2010-08-28)
|
||||
- bug #3033063 [core] Navi gets wrong db name
|
||||
@ -294,7 +310,7 @@ phpMyAdmin - ChangeLog
|
||||
|
||||
3.3.5.0 (2010-07-26)
|
||||
- patch #2932113 [information_schema] Slow export when having lots of
|
||||
databases, thanks to Stéphane Pontier - shadow_walker
|
||||
databases, thanks to Stéphane Pontier - shadow_walker
|
||||
- bug #3022705 [import] Import button does not work in Catalan when there
|
||||
is no progress bar possible
|
||||
- bug [replication] Do not offer information_schema in the list of databases
|
||||
@ -334,9 +350,9 @@ phpMyAdmin - ChangeLog
|
||||
- patch #2984893 [engines] InnoDB storage page emits a warning,
|
||||
thanks to Madhura Jayaratne - madhuracj
|
||||
- bug #2974687, bug #2974692 [compatibility] PHPExcel : IBM AIX iconv() does not work,
|
||||
thanks to Björn Wiberg - bwiberg
|
||||
thanks to Björn Wiberg - bwiberg
|
||||
- bug #2983066 [interface] Flush table on table operations shows the query twice,
|
||||
thanks to Martynas Mickevičius - BlinK_
|
||||
thanks to Martynas MickeviÄius - BlinK_
|
||||
- bug #2983060, patch #2987900 [interface] Fix initial state of tables in
|
||||
designer, thanks to Sutharshan Balachandren.
|
||||
- bug #2983062, patch #2989408 [engines] Fix warnings when changing table
|
||||
@ -415,7 +431,7 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #2839504 [engines] Support InnoDB plugin's new row formats
|
||||
+ [core] Added ability for synchronizing databases among servers.
|
||||
+ [lang] #2843101 Dutch update, thanks to scavenger2008
|
||||
+ [lang] Galician update, thanks to Xosé Calvo - xosecalvo
|
||||
+ [lang] Galician update, thanks to Xosé Calvo - xosecalvo
|
||||
+ [export] Added MediaWiki export module,
|
||||
thanks to Derek Schaefer - drummingds1
|
||||
+ [lang] Turkish update, thanks to Burak Yavuz
|
||||
|
||||
@ -2143,6 +2143,12 @@ setfacl -d -m "g:www-data:rwx" tmp
|
||||
identify what they mean.
|
||||
</dd>
|
||||
|
||||
<dt id="cfg_ShowDisplayDir">$cfg['ShowDisplayDir'] boolean</dt>
|
||||
<dd>
|
||||
Defines whether or not type display direction option is shown
|
||||
when browsing a table.
|
||||
</dd>
|
||||
|
||||
<dt id="cfg_RepeatCells">$cfg['RepeatCells'] integer</dt>
|
||||
<dd>
|
||||
Repeat the headers every X cells, or 0 to deactivate.
|
||||
|
||||
25
js/export.js
25
js/export.js
@ -89,18 +89,23 @@ $(document).ready(function() {
|
||||
/**
|
||||
* Toggles the disabling of the "save to file" options
|
||||
*/
|
||||
function toggle_save_to_file() {
|
||||
if($("#radio_dump_asfile:checked").length == 0) {
|
||||
$("#ul_save_asfile > li").fadeTo('fast', 0.4);
|
||||
$("#ul_save_asfile > li > input").attr('disabled', 'disabled');
|
||||
$("#ul_save_asfile > li> select").attr('disabled', 'disabled');
|
||||
} else {
|
||||
$("#ul_save_asfile > li").fadeTo('fast', 1);
|
||||
$("#ul_save_asfile > li > input").removeAttr('disabled');
|
||||
$("#ul_save_asfile > li> select").removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
toggle_save_to_file();
|
||||
$("input[type='radio'][name='output_format']").change(function() {
|
||||
if($("#radio_dump_asfile:checked").length == 0) {
|
||||
$("#ul_save_asfile > li").fadeTo('fast', 0.4);
|
||||
$("#ul_save_asfile > li > input").attr('disabled', 'disabled');
|
||||
$("#ul_save_asfile > li> select").attr('disabled', 'disabled');
|
||||
} else {
|
||||
$("#ul_save_asfile > li").fadeTo('fast', 1);
|
||||
$("#ul_save_asfile > li > input").removeAttr('disabled');
|
||||
$("#ul_save_asfile > li> select").removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
toggle_save_to_file();
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
188
js/functions.js
188
js/functions.js
@ -623,24 +623,75 @@ $(document).ready(function() {
|
||||
if ($(e.target).is('a, img, a *')) {
|
||||
return;
|
||||
}
|
||||
// XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
|
||||
var $tr = $(this);
|
||||
var $checkbox = $tr.find(':checkbox');
|
||||
if ($checkbox.length) {
|
||||
// checkbox in a row, add or remove class depending on checkbox state
|
||||
var checked = $checkbox.attr('checked');
|
||||
if (!$(e.target).is(':checkbox, label')) {
|
||||
checked = !checked;
|
||||
$checkbox.attr('checked', checked);
|
||||
}
|
||||
if (checked) {
|
||||
$tr.addClass('marked');
|
||||
|
||||
// make the table unselectable (to prevent default highlighting when shift+click)
|
||||
$tr.parents('table').noSelect();
|
||||
|
||||
if (!e.shiftKey || last_clicked_row == -1) {
|
||||
// usual click
|
||||
|
||||
// XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
|
||||
var $checkbox = $tr.find(':checkbox');
|
||||
if ($checkbox.length) {
|
||||
// checkbox in a row, add or remove class depending on checkbox state
|
||||
var checked = $checkbox.attr('checked');
|
||||
if (!$(e.target).is(':checkbox, label')) {
|
||||
checked = !checked;
|
||||
$checkbox.attr('checked', checked);
|
||||
}
|
||||
if (checked) {
|
||||
$tr.addClass('marked');
|
||||
} else {
|
||||
$tr.removeClass('marked');
|
||||
}
|
||||
last_click_checked = checked;
|
||||
} else {
|
||||
$tr.removeClass('marked');
|
||||
// normaln data table, just toggle class
|
||||
$tr.toggleClass('marked');
|
||||
last_click_checked = false;
|
||||
}
|
||||
|
||||
// remember the last clicked row
|
||||
last_clicked_row = last_click_checked ? $('tr.odd:not(.noclick), tr.even:not(.noclick)').index(this) : -1;
|
||||
last_shift_clicked_row = -1;
|
||||
} else {
|
||||
// normaln data table, just toggle class
|
||||
$tr.toggleClass('marked');
|
||||
// handle the shift click
|
||||
var start, end;
|
||||
|
||||
// clear last shift click result
|
||||
if (last_shift_clicked_row >= 0) {
|
||||
if (last_shift_clicked_row >= last_clicked_row) {
|
||||
start = last_clicked_row;
|
||||
end = last_shift_clicked_row;
|
||||
} else {
|
||||
start = last_shift_clicked_row;
|
||||
end = last_clicked_row;
|
||||
}
|
||||
$tr.parent().find('tr.odd:not(.noclick), tr.even:not(.noclick)')
|
||||
.slice(start, end + 1)
|
||||
.removeClass('marked')
|
||||
.find(':checkbox')
|
||||
.attr('checked', false);
|
||||
}
|
||||
|
||||
// handle new shift click
|
||||
var curr_row = $('tr.odd:not(.noclick), tr.even:not(.noclick)').index(this);
|
||||
if (curr_row >= last_clicked_row) {
|
||||
start = last_clicked_row;
|
||||
end = curr_row;
|
||||
} else {
|
||||
start = curr_row;
|
||||
end = last_clicked_row;
|
||||
}
|
||||
$tr.parent().find('tr.odd:not(.noclick), tr.even:not(.noclick)')
|
||||
.slice(start, end + 1)
|
||||
.addClass('marked')
|
||||
.find(':checkbox')
|
||||
.attr('checked', true);
|
||||
|
||||
// remember the last shift clicked row
|
||||
last_shift_clicked_row = curr_row;
|
||||
}
|
||||
});
|
||||
|
||||
@ -652,6 +703,22 @@ $(document).ready(function() {
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* True if last click is to check a row.
|
||||
*/
|
||||
var last_click_checked = false;
|
||||
|
||||
/**
|
||||
* Zero-based index of last clicked row.
|
||||
* Used to handle the shift + click event in the code above.
|
||||
*/
|
||||
var last_clicked_row = -1;
|
||||
|
||||
/**
|
||||
* Zero-based index of last shift clicked row.
|
||||
*/
|
||||
var last_shift_clicked_row = -1;
|
||||
|
||||
/**
|
||||
* Row highlighting in horizontal mode (use "live"
|
||||
* so that it works also for pages reached via AJAX)
|
||||
@ -2037,9 +2104,9 @@ function displayMoreTableOpts() {
|
||||
// Optimize DOM querying
|
||||
var $this_dropdown = $(this);
|
||||
// The top offset must be set for IE even if it didn't change
|
||||
var cell_right_edge_offset = $this_dropdown.parent().offset().left + $this_dropdown.parent().innerWidth();
|
||||
var cell_right_edge_offset = $this_dropdown.parent().position().left + $this_dropdown.parent().innerWidth();
|
||||
var left_offset = cell_right_edge_offset - $this_dropdown.innerWidth();
|
||||
var top_offset = $this_dropdown.parent().offset().top + $this_dropdown.parent().innerHeight();
|
||||
var top_offset = $this_dropdown.parent().position().top + $this_dropdown.parent().innerHeight();
|
||||
$this_dropdown.offset({ top: top_offset, left: left_offset });
|
||||
});
|
||||
|
||||
@ -2212,62 +2279,6 @@ $(function() {
|
||||
menuResize();
|
||||
});
|
||||
|
||||
/**
|
||||
* For the checkboxes in browse mode, handles the shift/click (only works
|
||||
* in horizontal mode) and propagates the click to the "companion" checkbox
|
||||
* (in both horizontal and vertical). Works also for pages reached via AJAX.
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('.multi_checkbox').live('click',function(e) {
|
||||
var current_checkbox_id = this.id;
|
||||
var left_checkbox_id = current_checkbox_id.replace('_right', '_left');
|
||||
var right_checkbox_id = current_checkbox_id.replace('_left', '_right');
|
||||
var other_checkbox_id = '';
|
||||
if (current_checkbox_id == left_checkbox_id) {
|
||||
other_checkbox_id = right_checkbox_id;
|
||||
} else {
|
||||
other_checkbox_id = left_checkbox_id;
|
||||
}
|
||||
|
||||
var $current_checkbox = $('#' + current_checkbox_id);
|
||||
var $other_checkbox = $('#' + other_checkbox_id);
|
||||
|
||||
if (e.shiftKey) {
|
||||
var index_of_current_checkbox = $('.multi_checkbox').index($current_checkbox);
|
||||
var $last_checkbox = $('.multi_checkbox').filter('.last_clicked');
|
||||
var index_of_last_click = $('.multi_checkbox').index($last_checkbox);
|
||||
$('.multi_checkbox')
|
||||
.filter(function(index) {
|
||||
// the first clicked row can be on a row above or below the
|
||||
// shift-clicked row
|
||||
return (index_of_current_checkbox > index_of_last_click && index > index_of_last_click && index < index_of_current_checkbox)
|
||||
|| (index_of_last_click > index_of_current_checkbox && index < index_of_last_click && index > index_of_current_checkbox);
|
||||
})
|
||||
.each(function(index) {
|
||||
var $intermediate_checkbox = $(this);
|
||||
if ($current_checkbox.is(':checked')) {
|
||||
$intermediate_checkbox.attr('checked', true);
|
||||
} else {
|
||||
$intermediate_checkbox.attr('checked', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.multi_checkbox').removeClass('last_clicked');
|
||||
$current_checkbox.addClass('last_clicked');
|
||||
|
||||
// When there is a checkbox on both ends of the row, propagate the
|
||||
// click on one of them to the other one.
|
||||
// (the default action has not been prevented so if we have
|
||||
// just clicked, this "if" is true)
|
||||
if ($current_checkbox.is(':checked')) {
|
||||
$other_checkbox.attr('checked', true);
|
||||
} else {
|
||||
$other_checkbox.attr('checked', false);
|
||||
}
|
||||
});
|
||||
}) // end of $(document).ready() for multi checkbox
|
||||
|
||||
/**
|
||||
* Get the row number from the classlist (for example, row_1)
|
||||
*/
|
||||
@ -2789,4 +2800,35 @@ $(document).ready(function() {
|
||||
if (elm.length > 0) {
|
||||
codemirror_editor = CodeMirror.fromTextArea(elm[0], {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* jQuery plugin to cancel selection in HTML code.
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas
|
||||
var prevent = (p == null) ? true : p;
|
||||
if (prevent) {
|
||||
return this.each(function () {
|
||||
if ($.browser.msie || $.browser.safari) $(this).bind('selectstart', function () {
|
||||
return false;
|
||||
});
|
||||
else if ($.browser.mozilla) {
|
||||
$(this).css('MozUserSelect', 'none');
|
||||
$('body').trigger('focus');
|
||||
} else if ($.browser.opera) $(this).bind('mousedown', function () {
|
||||
return false;
|
||||
});
|
||||
else $(this).attr('unselectable', 'on');
|
||||
});
|
||||
} else {
|
||||
return this.each(function () {
|
||||
if ($.browser.msie || $.browser.safari) $(this).unbind('selectstart');
|
||||
else if ($.browser.mozilla) $(this).css('MozUserSelect', 'inherit');
|
||||
else if ($.browser.opera) $(this).unbind('mousedown');
|
||||
else $(this).removeAttr('unselectable', 'on');
|
||||
});
|
||||
}
|
||||
}; //end noSelect
|
||||
})(jQuery);
|
||||
|
||||
|
||||
@ -17,24 +17,24 @@ function checkIndexName()
|
||||
}
|
||||
|
||||
// Gets the elements pointers
|
||||
var the_idx_name = document.forms['index_frm'].elements['index'];
|
||||
var the_idx_type = document.forms['index_frm'].elements['index_type'];
|
||||
var the_idx_name = document.forms['index_frm'].elements['index[Key_name]'];
|
||||
var the_idx_type = document.forms['index_frm'].elements['index[Index_type]'];
|
||||
|
||||
// Index is a primary key
|
||||
if (the_idx_type.options[0].value == 'PRIMARY' && the_idx_type.options[0].selected) {
|
||||
document.forms['index_frm'].elements['index'].value = 'PRIMARY';
|
||||
document.forms['index_frm'].elements['index[Key_name]'].value = 'PRIMARY';
|
||||
if (typeof(the_idx_name.disabled) != 'undefined') {
|
||||
document.forms['index_frm'].elements['index'].disabled = true;
|
||||
document.forms['index_frm'].elements['index[Key_name]'].disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Other cases
|
||||
else {
|
||||
if (the_idx_name.value == 'PRIMARY') {
|
||||
document.forms['index_frm'].elements['index'].value = '';
|
||||
document.forms['index_frm'].elements['index[Key_name]'].value = '';
|
||||
}
|
||||
if (typeof(the_idx_name.disabled) != 'undefined') {
|
||||
document.forms['index_frm'].elements['index'].disabled = false;
|
||||
document.forms['index_frm'].elements['index[Key_name]'].disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
398
js/makegrid.js
398
js/makegrid.js
@ -3,21 +3,26 @@
|
||||
// prepare the grid
|
||||
var g = {
|
||||
// constant
|
||||
minColWidth: 5,
|
||||
minColWidth: 15,
|
||||
|
||||
// variables, assigned with default value, changed later
|
||||
alignment: 'horizontal', // 3 possibilities: vertical, horizontal, horizontalflipped
|
||||
actionSpan: 5,
|
||||
colOrder: new Array(), // array of column order
|
||||
colVisib: new Array(), // array of column visibility
|
||||
tableCreateTime: null, // table creation time, only available in "Browse tab"
|
||||
hintShown: false, // true if hint balloon is shown, used by updateHint() method
|
||||
reorderHint: '', // string, hint for column reordering
|
||||
sortHint: '', // string, hint for column sorting
|
||||
markHint: '', // string, hint for column marking
|
||||
showReorderHint: false, // boolean, used by showHint() method
|
||||
showSortHint: false, // boolean, used by showHint() method
|
||||
colVisibHint: '', // string, hint for column visibility drop-down
|
||||
showAllColText: '', // string, text for "show all" button under column visibility list
|
||||
showReorderHint: false,
|
||||
showSortHint: false,
|
||||
showMarkHint: false,
|
||||
hintIsHiding: false, // true when hint is still shown, but hide() already called
|
||||
showColVisibHint: false,
|
||||
hintIsHiding: false, // true when hint is still shown, but hideHint() already called
|
||||
visibleHeadersCount: 0, // number of visible data headers
|
||||
|
||||
// functions
|
||||
dragStartRsz: function(e, obj) { // start column resize
|
||||
@ -28,7 +33,7 @@
|
||||
obj: obj,
|
||||
objLeft: $(obj).position().left,
|
||||
objWidth: this.alignment != 'vertical' ?
|
||||
$(this.t).find('th.draggable:eq(' + n + ') span').outerWidth() :
|
||||
$(this.t).find('th.draggable:visible:eq(' + n + ') span').outerWidth() :
|
||||
$(this.t).find('tr:first td:eq(' + n + ') span').outerWidth()
|
||||
};
|
||||
$('body').css('cursor', 'col-resize');
|
||||
@ -141,20 +146,11 @@
|
||||
}
|
||||
var n = this.colRsz.n;
|
||||
// do the resizing
|
||||
if (this.alignment != 'vertical') {
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('th.draggable:eq(' + n + ') span,' +
|
||||
'td:eq(' + (g.actionSpan + n) + ') span')
|
||||
.css('width', nw);
|
||||
});
|
||||
} else { // vertical alignment
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('td:eq(' + n + ') span')
|
||||
.css('width', nw);
|
||||
});
|
||||
}
|
||||
this.resize(n, nw);
|
||||
|
||||
$('body').css('cursor', 'default');
|
||||
this.reposRsz();
|
||||
this.reposDrop();
|
||||
this.colRsz = false;
|
||||
} else if (this.colMov) {
|
||||
// shift columns
|
||||
@ -167,7 +163,7 @@
|
||||
this.colMov.n = this.colMov.newn;
|
||||
// send request to server to remember the column order
|
||||
if (this.tableCreateTime) {
|
||||
this.sendColOrder();
|
||||
this.sendColPrefs();
|
||||
}
|
||||
this.refreshRestoreButton();
|
||||
}
|
||||
@ -187,19 +183,36 @@
|
||||
$('body').noSelect(false);
|
||||
},
|
||||
|
||||
/**
|
||||
* Resize column n to new width "nw"
|
||||
*/
|
||||
resize: function(n, nw) {
|
||||
if (this.alignment != 'vertical') {
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('th.draggable:visible:eq(' + n + ') span,' +
|
||||
'td:visible:eq(' + (g.actionSpan + n) + ') span')
|
||||
.css('width', nw);
|
||||
});
|
||||
} else { // vertical alignment
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('td:eq(' + n + ') span')
|
||||
.css('width', nw);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Reposition column resize bars.
|
||||
*/
|
||||
reposRsz: function() {
|
||||
$(this.cRsz).find('div').hide();
|
||||
$firstRowCols = this.alignment != 'vertical' ?
|
||||
$(this.t).find('tr:first th.draggable') :
|
||||
$(this.t).find('tr:first th.draggable:visible') :
|
||||
$(this.t).find('tr:first td');
|
||||
for (var n = 0; n < $firstRowCols.length; n++) {
|
||||
$this = $($firstRowCols[n]);
|
||||
$cb = $(g.cRsz).find('div:eq(' + n + ')'); // column border
|
||||
var pad = parseInt($this.css('padding-right'));
|
||||
$cb.css('left', Math.floor($this.position().left + $this.width() + pad))
|
||||
$cb.css('left', $this.position().left + $this.outerWidth(true))
|
||||
.show();
|
||||
}
|
||||
},
|
||||
@ -229,16 +242,28 @@
|
||||
// shift rows
|
||||
if (newn < oldn) {
|
||||
$(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')')
|
||||
.before($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
|
||||
.before($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
|
||||
} else {
|
||||
$(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')')
|
||||
.after($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
|
||||
.after($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
|
||||
}
|
||||
}
|
||||
// adjust the column visibility list
|
||||
if (newn < oldn) {
|
||||
$(g.cList).find('tr:eq(' + newn + ')')
|
||||
.before($(g.cList).find('tr:eq(' + oldn + ')'));
|
||||
} else {
|
||||
$(g.cList).find('tr:eq(' + newn + ')')
|
||||
.after($(g.cList).find('tr:eq(' + oldn + ')'));
|
||||
}
|
||||
// adjust the colOrder
|
||||
var tmp = this.colOrder[oldn];
|
||||
this.colOrder.splice(oldn, 1);
|
||||
this.colOrder.splice(newn, 0, tmp);
|
||||
// adjust the colVisib
|
||||
var tmp = this.colVisib[oldn];
|
||||
this.colVisib.splice(oldn, 1);
|
||||
this.colVisib.splice(newn, 0, tmp);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -247,10 +272,10 @@
|
||||
*/
|
||||
getHoveredCol: function(e) {
|
||||
var hoveredCol;
|
||||
$headers = $(this.t).find('th.draggable');
|
||||
$headers = $(this.t).find('th.draggable:visible');
|
||||
if (this.alignment != 'vertical') {
|
||||
$headers.each(function() {
|
||||
var left = $(this).position().left;
|
||||
var left = $(this).offset().left;
|
||||
var right = left + $(this).outerWidth();
|
||||
if (left <= e.pageX && e.pageX <= right) {
|
||||
hoveredCol = this;
|
||||
@ -258,7 +283,7 @@
|
||||
});
|
||||
} else { // vertical alignment
|
||||
$headers.each(function() {
|
||||
var top = $(this).position().top;
|
||||
var top = $(this).offset().top;
|
||||
var bottom = top + $(this).height();
|
||||
if (top <= e.pageY && e.pageY <= bottom) {
|
||||
hoveredCol = this;
|
||||
@ -286,7 +311,7 @@
|
||||
/**
|
||||
* Reposition the table back to normal order.
|
||||
*/
|
||||
restore: function() {
|
||||
restoreColOrder: function() {
|
||||
// use insertion sort, since we already have shiftCol function
|
||||
for (var i = 1; i < this.colOrder.length; i++) {
|
||||
var x = this.colOrder[i];
|
||||
@ -300,23 +325,24 @@
|
||||
}
|
||||
if (this.tableCreateTime) {
|
||||
// send request to server to remember the column order
|
||||
this.sendColOrder();
|
||||
this.sendColPrefs();
|
||||
}
|
||||
this.refreshRestoreButton();
|
||||
},
|
||||
|
||||
/**
|
||||
* Send column order to the server.
|
||||
* Send column preferences (column order and visibility) to the server.
|
||||
*/
|
||||
sendColOrder: function() {
|
||||
sendColPrefs: function() {
|
||||
$.post('sql.php', {
|
||||
ajax_request: true,
|
||||
db: window.parent.db,
|
||||
table: window.parent.table,
|
||||
token: window.parent.token,
|
||||
server: window.parent.server,
|
||||
set_col_order: true,
|
||||
set_col_prefs: true,
|
||||
col_order: this.colOrder.toString(),
|
||||
col_visib: this.colVisib.toString(),
|
||||
table_create_time: this.tableCreateTime
|
||||
});
|
||||
},
|
||||
@ -334,8 +360,10 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if only one visible column left
|
||||
var isOneColumn = this.visibleHeadersCount == 1;
|
||||
// enable or disable restore button
|
||||
if (isInitial) {
|
||||
if (isInitial || isOneColumn) {
|
||||
$('.restore_column').hide();
|
||||
} else {
|
||||
$('.restore_column').show();
|
||||
@ -361,6 +389,10 @@
|
||||
text += text.length > 0 ? '<br />' : '';
|
||||
text += this.markHint;
|
||||
}
|
||||
if (this.showColVisibHint && this.colVisibHint) {
|
||||
text += text.length > 0 ? '<br />' : '';
|
||||
text += this.colVisibHint;
|
||||
}
|
||||
|
||||
// hide the hint if no text
|
||||
if (!text) {
|
||||
@ -373,8 +405,8 @@
|
||||
$(this.dHint)
|
||||
.stop(true, true)
|
||||
.css({
|
||||
top: e.pageY,
|
||||
left: e.pageX + 15
|
||||
top: e.clientY,
|
||||
left: e.clientX + 15
|
||||
})
|
||||
.show('fast');
|
||||
this.hintShown = true;
|
||||
@ -404,18 +436,142 @@
|
||||
updateHint: function(e) {
|
||||
if (this.hintShown) {
|
||||
$(this.dHint).css({
|
||||
top: e.pageY,
|
||||
left: e.pageX + 15
|
||||
top: e.clientY,
|
||||
left: e.clientX + 15
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle column's visibility.
|
||||
* After calling this function and it returns true, afterToggleCol() must be called.
|
||||
*
|
||||
* @return boolean True if the column is toggled successfully.
|
||||
*/
|
||||
toggleCol: function(n) {
|
||||
if (this.colVisib[n]) {
|
||||
// can hide if more than one column is visible
|
||||
if (this.visibleHeadersCount > 1) {
|
||||
if (this.alignment != 'vertical') {
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('th.draggable:eq(' + n + '),' +
|
||||
'td:eq(' + (g.actionSpan + n) + ')')
|
||||
.hide();
|
||||
});
|
||||
} else { // vertical alignment
|
||||
$(this.t).find('tr:eq(' + (g.actionSpan + n) + ')')
|
||||
.hide();
|
||||
}
|
||||
this.colVisib[n] = 0;
|
||||
$(this.cList).find('tr:eq(' + n + ') input').removeAttr('checked');
|
||||
} else {
|
||||
// cannot hide, force the checkbox to stay checked
|
||||
$(this.cList).find('tr:eq(' + n + ') input').attr('checked', 'checked');
|
||||
return false;
|
||||
}
|
||||
} else { // column n is not visible
|
||||
if (this.alignment != 'vertical') {
|
||||
$(this.t).find('tr').each(function() {
|
||||
$(this).find('th.draggable:eq(' + n + '),' +
|
||||
'td:eq(' + (g.actionSpan + n) + ')')
|
||||
.show();
|
||||
});
|
||||
} else { // vertical alignment
|
||||
$(this.t).find('tr:eq(' + (g.actionSpan + n) + ')')
|
||||
.show();
|
||||
}
|
||||
this.colVisib[n] = 1;
|
||||
$(this.cList).find('tr:eq(' + n + ') input').attr('checked', 'checked');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* This must be called after calling toggleCol() and the return value is true.
|
||||
*
|
||||
* This function is separated from toggleCol because, sometimes, we want to toggle
|
||||
* some columns together at one time and do one adjustment after it, e.g. in showAllColumns().
|
||||
*/
|
||||
afterToggleCol: function() {
|
||||
// some adjustments after hiding column
|
||||
this.reposRsz();
|
||||
this.reposDrop();
|
||||
this.sendColPrefs();
|
||||
|
||||
// check visible first row headers count
|
||||
this.visibleHeadersCount = this.alignment != 'vertical' ?
|
||||
$(this.t).find('tr:first th.draggable:visible').length :
|
||||
$(this.t).find('th.draggable:nth-child(1):visible').length;
|
||||
this.refreshRestoreButton();
|
||||
},
|
||||
|
||||
/**
|
||||
* Show columns' visibility list.
|
||||
*/
|
||||
showColList: function(obj) {
|
||||
// only show when not resizing or reordering
|
||||
if (!this.colRsz && !this.colMov) {
|
||||
var pos = $(obj).position();
|
||||
// check if the list position is too right
|
||||
if (pos.left + $(this.cList).outerWidth(true) > $(document).width()) {
|
||||
pos.left = $(document).width() - $(this.cList).outerWidth(true);
|
||||
}
|
||||
$(this.cList).css({
|
||||
left: pos.left,
|
||||
top: pos.top + $(obj).outerHeight(true)
|
||||
})
|
||||
.show();
|
||||
$(obj).addClass('coldrop-hover');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide columns' visibility list.
|
||||
*/
|
||||
hideColList: function() {
|
||||
$(this.cList).hide();
|
||||
$(g.cDrop).find('.coldrop-hover').removeClass('coldrop-hover');
|
||||
},
|
||||
|
||||
/**
|
||||
* Reposition the column visibility drop-down arrow.
|
||||
*/
|
||||
reposDrop: function() {
|
||||
$th = $(t).find('th:not(.draggable)');
|
||||
for (var i = 0; i < $th.length; i++) {
|
||||
var $cd = $(this.cDrop).find('div:eq(' + i + ')'); // column drop-down arrow
|
||||
var pos = $($th[i]).position();
|
||||
$cd.css({
|
||||
left: pos.left + $($th[i]).width() - $cd.width(),
|
||||
top: pos.top
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Show all hidden columns.
|
||||
*/
|
||||
showAllColumns: function() {
|
||||
for (var i = 0; i < this.colVisib.length; i++) {
|
||||
if (!this.colVisib[i]) {
|
||||
this.toggleCol(i);
|
||||
}
|
||||
}
|
||||
this.afterToggleCol();
|
||||
}
|
||||
}
|
||||
|
||||
// wrap all data cells, except actions cell, with span
|
||||
$(t).find('th, td:not(:has(span))')
|
||||
.wrapInner('<span />');
|
||||
|
||||
g.gDiv = document.createElement('div'); // create global div
|
||||
g.cRsz = document.createElement('div'); // column resizer
|
||||
g.cCpy = document.createElement('div'); // column copy, to store copy of dragged column header
|
||||
g.cPointer = document.createElement('div'); // column pointer, used when reordering column
|
||||
g.dHint = document.createElement('div'); // draggable hint
|
||||
g.cDrop = document.createElement('div'); // column drop-down arrows
|
||||
g.cList = document.createElement('div'); // column visibility list
|
||||
|
||||
// assign the table alignment
|
||||
g.alignment = $("#top_direction_dropdown").val();
|
||||
@ -432,6 +588,13 @@
|
||||
g.dHint.className = 'dHint';
|
||||
$(g.dHint).hide();
|
||||
|
||||
// adjust g.cDrop
|
||||
g.cDrop.className = 'cDrop';
|
||||
|
||||
// adjust g.cList
|
||||
g.cList.className = 'cList';
|
||||
$(g.cList).hide();
|
||||
|
||||
// chain table and grid together
|
||||
t.grid = g;
|
||||
g.t = t;
|
||||
@ -441,6 +604,14 @@
|
||||
$(t).find('tr:first th.draggable') :
|
||||
$(t).find('tr:first td');
|
||||
|
||||
// get first row of data headers (first column of data headers, in vertical mode)
|
||||
var $firstRowHeaders = g.alignment != 'vertical' ?
|
||||
$(t).find('tr:first th.draggable') :
|
||||
$(t).find('th.draggable:nth-child(1)');
|
||||
|
||||
// initialize g.visibleHeadersCount
|
||||
g.visibleHeadersCount = $firstRowHeaders.filter(':visible').length;
|
||||
|
||||
// assign first column (actions) span
|
||||
if (! $(t).find('tr:first th:first').hasClass('draggable')) { // action header exist
|
||||
g.actionSpan = g.alignment != 'vertical' ?
|
||||
@ -458,6 +629,8 @@
|
||||
g.reorderHint = $('#col_order_hint').val();
|
||||
g.sortHint = $('#sort_hint').val();
|
||||
g.markHint = $('#col_mark_hint').val();
|
||||
g.colVisibHint = $('#col_visib_hint').val();
|
||||
g.showAllColText = $('#show_all_col_text').val();
|
||||
|
||||
// initialize column order
|
||||
$col_order = $('#col_order');
|
||||
@ -468,37 +641,106 @@
|
||||
}
|
||||
} else {
|
||||
g.colOrder = new Array();
|
||||
for (var i = 0; i < $firstRowCols.length; i++) {
|
||||
for (var i = 0; i < $firstRowHeaders.length; i++) {
|
||||
g.colOrder.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
// initialize column visibility
|
||||
$col_visib = $('#col_visib');
|
||||
if ($col_visib.length > 0) {
|
||||
g.colVisib = $col_visib.val().split(',');
|
||||
for (var i = 0; i < g.colVisib.length; i++) {
|
||||
g.colVisib[i] = parseInt(g.colVisib[i]);
|
||||
}
|
||||
} else {
|
||||
g.colVisib = new Array();
|
||||
for (var i = 0; i < $firstRowHeaders.length; i++) {
|
||||
g.colVisib.push(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($firstRowHeaders.length > 1) {
|
||||
// create column drop-down arrow(s)
|
||||
$(t).find('th:not(.draggable)').each(function() {
|
||||
var cd = document.createElement('div'); // column drop-down arrow
|
||||
var pos = $(this).position();
|
||||
$(cd).addClass('coldrop')
|
||||
.css({
|
||||
left: pos.left + $(this).width() - $(cd).width(),
|
||||
top: pos.top
|
||||
})
|
||||
.click(function() {
|
||||
if (g.cList.style.display == 'none') {
|
||||
g.showColList(this);
|
||||
} else {
|
||||
g.hideColList();
|
||||
}
|
||||
});
|
||||
$(g.cDrop).append(cd);
|
||||
});
|
||||
|
||||
// add column visibility control
|
||||
g.cList.innerHTML = '<table cellpadding="0" cellspacing="0"><tbody></tbody></table>';
|
||||
var $tbody = $(g.cList).find('tbody');
|
||||
for (var i = 0; i < $firstRowHeaders.length; i++) {
|
||||
var currHeader = $firstRowHeaders[i];
|
||||
var tr = document.createElement('tr');
|
||||
$(tr).html('<td><input type="checkbox" ' + (g.colVisib[i] ? 'checked="checked" ' : '') + '/></td>' +
|
||||
'<td>' + $(currHeader).text() + '</td>');
|
||||
$tbody.append(tr);
|
||||
// add event on click
|
||||
$(tr).click(function() {
|
||||
if ( g.toggleCol($(this).index()) ) {
|
||||
g.afterToggleCol();
|
||||
}
|
||||
});
|
||||
}
|
||||
// add "show all column" button
|
||||
var showAll = document.createElement('div');
|
||||
$(showAll).addClass('showAllColBtn')
|
||||
.text(g.showAllColText);
|
||||
$(g.cList).append(showAll);
|
||||
$(showAll).click(function() {
|
||||
g.showAllColumns();
|
||||
});
|
||||
// prepend "show all column" button at top if the list is too long
|
||||
if ($firstRowHeaders.length > 10) {
|
||||
var clone = showAll.cloneNode(true);
|
||||
$(g.cList).prepend(clone);
|
||||
$(clone).click(function() {
|
||||
g.showAllColumns();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// create column borders
|
||||
$firstRowCols.each(function() {
|
||||
$this = $(this);
|
||||
var cb = document.createElement('div'); // column border
|
||||
var pad = parseInt($this.css('padding-right'));
|
||||
$(cb).css('left', Math.floor($this.position().left + $this.width() + pad));
|
||||
$(cb).addClass('colborder');
|
||||
$(cb).mousedown(function(e) {
|
||||
g.dragStartRsz(e, this);
|
||||
});
|
||||
$(cb).addClass('colborder')
|
||||
.mousedown(function(e) {
|
||||
g.dragStartRsz(e, this);
|
||||
});
|
||||
$(g.cRsz).append(cb);
|
||||
});
|
||||
|
||||
// wrap all data cells, except actions cell, with span
|
||||
$(t).find('th, td:not(:has(span))')
|
||||
.wrapInner('<span />');
|
||||
g.reposRsz();
|
||||
|
||||
// register events
|
||||
if ($firstRowCols.length > 1 && g.reorderHint) { // make sure columns is reorderable
|
||||
if (g.reorderHint) { // make sure columns is reorderable
|
||||
$(t).find('th.draggable')
|
||||
.css('cursor', 'move')
|
||||
.mousedown(function(e) {
|
||||
g.dragStartMove(e, this);
|
||||
if (g.visibleHeadersCount > 1) {
|
||||
g.dragStartMove(e, this);
|
||||
}
|
||||
})
|
||||
.mouseenter(function(e) {
|
||||
g.showReorderHint = true;
|
||||
if (g.visibleHeadersCount > 1) {
|
||||
g.showReorderHint = true;
|
||||
$(this).css('cursor', 'move');
|
||||
} else {
|
||||
$(this).css('cursor', 'inherit');
|
||||
}
|
||||
g.showHint(e);
|
||||
})
|
||||
.mouseleave(function(e) {
|
||||
@ -506,6 +748,15 @@
|
||||
g.showHint(e);
|
||||
});
|
||||
}
|
||||
$(t).find('th:not(.draggable)')
|
||||
.mouseenter(function(e) {
|
||||
g.showColVisibHint = true;
|
||||
g.showHint(e);
|
||||
})
|
||||
.mouseleave(function(e) {
|
||||
g.showColVisibHint = false;
|
||||
g.showHint(e);
|
||||
});
|
||||
$(t).find('th.draggable a')
|
||||
.attr('title', '') // hide default tooltip for sorting
|
||||
.mouseenter(function(e) {
|
||||
@ -533,7 +784,10 @@
|
||||
g.dragEnd(e);
|
||||
});
|
||||
$('.restore_column').click(function() {
|
||||
g.restore();
|
||||
g.restoreColOrder();
|
||||
});
|
||||
$(t).find('td, th.draggable').mouseenter(function() {
|
||||
g.hideColList();
|
||||
});
|
||||
|
||||
// add table class
|
||||
@ -543,9 +797,11 @@
|
||||
$(t).before(g.gDiv);
|
||||
$(g.gDiv).append(t);
|
||||
$(g.gDiv).prepend(g.cRsz);
|
||||
$(g.gDiv).append(g.cCpy);
|
||||
$(g.gDiv).append(g.cPointer);
|
||||
$(g.gDiv).append(g.cDrop);
|
||||
$(g.gDiv).append(g.cList);
|
||||
$(g.gDiv).append(g.dHint);
|
||||
$(g.gDiv).append(g.cCpy);
|
||||
|
||||
// some adjustment
|
||||
g.refreshRestoreButton();
|
||||
@ -574,9 +830,11 @@
|
||||
var t = this;
|
||||
$(document).ready(function() {
|
||||
$.grid(t);
|
||||
t.grid.reposDrop();
|
||||
});
|
||||
} else {
|
||||
$.grid(this);
|
||||
this.grid.reposDrop();
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -588,37 +846,19 @@
|
||||
if (!docready) {
|
||||
var t = this;
|
||||
$(document).ready(function() {
|
||||
if (t.grid) t.grid.reposRsz();
|
||||
if (t.grid) {
|
||||
t.grid.reposRsz();
|
||||
t.grid.reposDrop();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.grid) this.grid.reposRsz();
|
||||
if (this.grid) {
|
||||
this.grid.reposRsz();
|
||||
this.grid.reposDrop();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas
|
||||
var prevent = (p == null) ? true : p;
|
||||
if (prevent) {
|
||||
return this.each(function () {
|
||||
if ($.browser.msie || $.browser.safari) $(this).bind('selectstart', function () {
|
||||
return false;
|
||||
});
|
||||
else if ($.browser.mozilla) {
|
||||
$(this).css('MozUserSelect', 'none');
|
||||
$('body').trigger('focus');
|
||||
} else if ($.browser.opera) $(this).bind('mousedown', function () {
|
||||
return false;
|
||||
});
|
||||
else $(this).attr('unselectable', 'on');
|
||||
});
|
||||
} else {
|
||||
return this.each(function () {
|
||||
if ($.browser.msie || $.browser.safari) $(this).unbind('selectstart');
|
||||
else if ($.browser.mozilla) $(this).css('MozUserSelect', 'inherit');
|
||||
else if ($.browser.opera) $(this).unbind('mousedown');
|
||||
else $(this).removeAttr('unselectable', 'on');
|
||||
});
|
||||
}
|
||||
}; //end noSelect
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
@ -110,6 +110,8 @@ $js_messages['strNo'] = __('No');
|
||||
|
||||
/* For db_stucture.js */
|
||||
$js_messages['strInsertTable'] = __('Insert Table');
|
||||
$js_messages['strHideIndexes'] = __('Hide indexes');
|
||||
$js_messages['strShowIndexes'] = __('Show indexes');
|
||||
|
||||
/* For db_search.js */
|
||||
$js_messages['strSearching'] = __('Searching');
|
||||
|
||||
10
js/sql.js
10
js/sql.js
@ -1163,7 +1163,7 @@ $(document).ready(function() {
|
||||
}) // end $.post()
|
||||
}) // end insert table button "Go"
|
||||
|
||||
/**
|
||||
/**$("#buttonYes.ajax").live('click'
|
||||
* Click action for #buttonYes button in ajax dialog insertForm
|
||||
*/
|
||||
$("#buttonYes.ajax").live('click', function(event){
|
||||
@ -1370,22 +1370,22 @@ $(document).ready(function() {
|
||||
$("#sqlqueryresults").trigger('makegrid');
|
||||
});
|
||||
|
||||
/*
|
||||
/*
|
||||
* Profiling Chart
|
||||
*/
|
||||
function createProfilingChart() {
|
||||
if($('#profilingchart').length==0) return;
|
||||
|
||||
|
||||
var cdata = new Array();
|
||||
$.each(jQuery.parseJSON($('#profilingchart').html()),function(key,value) {
|
||||
cdata.push([key,parseFloat(value)]);
|
||||
});
|
||||
|
||||
|
||||
// Prevent the user from seeing the JSON code
|
||||
$('div#profilingchart').html('').show();
|
||||
|
||||
PMA_createChart({
|
||||
chart: {
|
||||
chart: {
|
||||
renderTo: 'profilingchart',
|
||||
backgroundColor: $('#sqlqueryresults fieldset').css('background-color')
|
||||
},
|
||||
|
||||
@ -250,4 +250,146 @@ $(document).ready(function() {
|
||||
}) // end $.post()
|
||||
}) // end insert table button "do_save_data"
|
||||
|
||||
/**
|
||||
*Ajax event handler for index edit
|
||||
**/
|
||||
$("#table_index tbody tr td.edit_index.ajax").live('click', function(event){
|
||||
event.preventDefault();
|
||||
var url = $(this).find("a").attr("href");
|
||||
if (url.substring(0, 16) == "tbl_indexes.php?") {
|
||||
url = url.substring(16, url.length );
|
||||
}
|
||||
url = url + "&ajax_request=true";
|
||||
|
||||
var div = $('<div id="edit_index_dialog"></div>');
|
||||
|
||||
/**
|
||||
* @var button_options Object that stores the options passed to jQueryUI
|
||||
* dialog
|
||||
*/
|
||||
var button_options = {};
|
||||
// in the following function we need to use $(this)
|
||||
button_options[PMA_messages['strCancel']] = function() {$(this).parent().dialog('close').remove();}
|
||||
|
||||
var button_options_error = {};
|
||||
button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();}
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
|
||||
$.get( "tbl_indexes.php" , url , function(data) {
|
||||
//in the case of an error, show the error message returned.
|
||||
if (data.success != undefined && data.success == false) {
|
||||
div
|
||||
.append(data.error)
|
||||
.dialog({
|
||||
title: PMA_messages['strEdit'],
|
||||
height: 230,
|
||||
width: 900,
|
||||
open: PMA_verifyTypeOfAllColumns,
|
||||
buttons : button_options_error
|
||||
})// end dialog options
|
||||
} else {
|
||||
div
|
||||
.append(data)
|
||||
.dialog({
|
||||
title: PMA_messages['strEdit'],
|
||||
height: 600,
|
||||
width: 900,
|
||||
open: PMA_verifyTypeOfAllColumns,
|
||||
buttons : button_options
|
||||
})
|
||||
//Remove the top menu container from the dialog
|
||||
.find("#topmenucontainer").hide()
|
||||
; // end dialog options
|
||||
}
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) // end $.get()
|
||||
});
|
||||
|
||||
/**
|
||||
*Ajax action for submiting the index form
|
||||
**/
|
||||
$("#index_frm.ajax input[name=do_save_data]").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var the_form object referring to the export form
|
||||
*/
|
||||
var $form = $("#index_frm");
|
||||
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
//User wants to submit the form
|
||||
$.post($form.attr('action'), $form.serialize()+"&do_save_data=Save", function(data) {
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
}
|
||||
if (data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("<div id='sqlqueryresults'></div>").insertAfter("#topmenucontainer");
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("#result_query .notice").remove();
|
||||
$("#result_query").prepend((data.message));
|
||||
|
||||
/*Reload the field form*/
|
||||
$("#table_index").remove();
|
||||
var temp_div = $("<div id='temp_div'><div>").append(data.index_table);
|
||||
$(temp_div).find("#table_index").insertAfter("#index_header");
|
||||
if ($("#edit_index_dialog").length > 0) {
|
||||
$("#edit_index_dialog").dialog("close").remove();
|
||||
}
|
||||
|
||||
} else {
|
||||
var temp_div = $("<div id='temp_div'><div>").append(data.error);
|
||||
var error = $(temp_div).find(".error code").addClass("error");
|
||||
PMA_ajaxShowMessage(error);
|
||||
}
|
||||
|
||||
}) // end $.post()
|
||||
}) // end insert table button "do_save_data"
|
||||
|
||||
/**
|
||||
*Ajax action for submiting the index form for add more columns
|
||||
**/
|
||||
$("#index_frm.ajax input[name=add_fields]").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var the_form object referring to the export form
|
||||
*/
|
||||
var $form = $("#index_frm");
|
||||
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
//User wants to submit the form
|
||||
$.post($form.attr('action'), $form.serialize()+"&add_fields=Go", function(data) {
|
||||
$("#index_columns").remove();
|
||||
var temp_div = $("<div id='temp_div'><div>").append(data);
|
||||
$(temp_div).find("#index_columns").insertAfter("#index_frm fieldset .error");
|
||||
}) // end $.post()
|
||||
}) // end insert table button "Go"
|
||||
|
||||
/**Add the show/hide index table option if the index is available*/
|
||||
if ($("#index_div.ajax").find("#table_index").length != 0) {
|
||||
/**
|
||||
*Prepare a div containing a link for toggle the index table
|
||||
*/
|
||||
$('<div id="toggletableindexdiv"><a id="toggletableindexlink"></a></div>')
|
||||
.insertAfter('#index_div')
|
||||
/** don't show it until we have index table on-screen */
|
||||
.show();
|
||||
|
||||
/** Changing the displayed text according to the hide/show criteria in table index*/
|
||||
|
||||
$('#toggletableindexlink')
|
||||
.html(PMA_messages['strHideIndexes'])
|
||||
.bind('click', function() {
|
||||
var $link = $(this);
|
||||
$('#index_div').slideToggle();
|
||||
if ($link.text() == PMA_messages['strHideIndexes']) {
|
||||
$link.text(PMA_messages['strShowIndexes']);
|
||||
} else {
|
||||
$link.text(PMA_messages['strHideIndexes']);
|
||||
}
|
||||
/** avoid default click action */
|
||||
return false;
|
||||
});
|
||||
} //end show/hide table index
|
||||
|
||||
|
||||
}) // end $(document).ready()
|
||||
|
||||
@ -419,10 +419,10 @@ class PMA_Index
|
||||
|
||||
$r = '';
|
||||
|
||||
$r .= '<h2>' . __('Indexes') . ': ';
|
||||
$r .= '<h2 id="index_header">' . __('Indexes') . ': ';
|
||||
$r .= PMA_showMySQLDocu('optimization', 'optimizing-database-structure');
|
||||
$r .= '</h2>';
|
||||
$r .= '<table>';
|
||||
$r .= '<table id="table_index">';
|
||||
$r .= '<thead>';
|
||||
$r .= '<tr>';
|
||||
if (! $print_mode) {
|
||||
@ -450,7 +450,11 @@ class PMA_Index
|
||||
if (! $print_mode) {
|
||||
$this_params = $GLOBALS['url_params'];
|
||||
$this_params['index'] = $index->getName();
|
||||
$r .= '<td ' . $row_span . '>'
|
||||
$r .= '<td class="edit_index ';
|
||||
if ($GLOBALS['cfg']['AjaxEnable']) {
|
||||
$r .= 'ajax" ';
|
||||
}
|
||||
$r .= '" ' . $row_span . '>'
|
||||
. ' <a href="tbl_indexes.php' . PMA_generate_common_url($this_params)
|
||||
. '">' . PMA_getIcon('b_edit.png', __('Edit')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
|
||||
@ -16,6 +16,7 @@ class PMA_Table
|
||||
*/
|
||||
const PROP_SORTED_COLUMN = 'sorted_col';
|
||||
const PROP_COLUMN_ORDER = 'col_order';
|
||||
const PROP_COLUMN_VISIB = 'col_visib';
|
||||
|
||||
static $cache = array();
|
||||
|
||||
@ -1305,6 +1306,7 @@ class PMA_Table
|
||||
* Available property:
|
||||
* - PROP_SORTED_COLUMN
|
||||
* - PROP_COLUMN_ORDER
|
||||
* - PROP_COLUMN_VISIB
|
||||
*
|
||||
*
|
||||
* @param string $property
|
||||
@ -1335,7 +1337,8 @@ class PMA_Table
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if ($property == self::PROP_COLUMN_ORDER) {
|
||||
} else if ($property == self::PROP_COLUMN_ORDER ||
|
||||
$property == self::PROP_COLUMN_VISIB) {
|
||||
if (isset($this->uiprefs[$property])) {
|
||||
// check if the table has not been modified
|
||||
if (self::sGetStatusInfo($this->db_name, $this->name, 'Create_time') ==
|
||||
@ -1361,10 +1364,11 @@ class PMA_Table
|
||||
* Available property:
|
||||
* - PROP_SORTED_COLUMN
|
||||
* - PROP_COLUMN_ORDER
|
||||
* - PROP_COLUMN_VISIB
|
||||
*
|
||||
* @param string $property
|
||||
* @param mixed $value
|
||||
* @param string $table_create_time Needed for PROP_COLUMN_ORDER
|
||||
* @param string $table_create_time Needed for PROP_COLUMN_ORDER and PROP_COLUMN_VISIB
|
||||
* @return boolean|PMA_Message
|
||||
*/
|
||||
public function setUiProp($property, $value, $table_create_time = NULL)
|
||||
@ -1373,8 +1377,10 @@ class PMA_Table
|
||||
$this->loadUiPrefs();
|
||||
}
|
||||
// we want to save the create time if the property is PROP_COLUMN_ORDER
|
||||
if ($property == self::PROP_COLUMN_ORDER) {
|
||||
$curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'Create_time');
|
||||
if ($property == self::PROP_COLUMN_ORDER ||
|
||||
$property == self::PROP_COLUMN_VISIB) {
|
||||
|
||||
$curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME');
|
||||
if (isset($table_create_time) &&
|
||||
$table_create_time == $curr_create_time) {
|
||||
$this->uiprefs['CREATE_TIME'] = $curr_create_time;
|
||||
|
||||
@ -263,11 +263,10 @@ function Swekey_login($input_name, $input_go)
|
||||
}
|
||||
}
|
||||
|
||||
if (strstr($_SERVER['QUERY_STRING'],'session_to_unset') != false)
|
||||
if (!empty($_GET['session_to_unset']))
|
||||
{
|
||||
parse_str($_SERVER['QUERY_STRING']);
|
||||
session_write_close();
|
||||
session_id($session_to_unset);
|
||||
session_id($_GET['session_to_unset']);
|
||||
session_start();
|
||||
$_SESSION = array();
|
||||
session_write_close();
|
||||
|
||||
@ -1117,6 +1117,7 @@ $cfg['DefaultTabDatabase'] = 'db_structure.php';
|
||||
*/
|
||||
$cfg['DefaultTabTable'] = 'sql.php';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Export defaults
|
||||
*/
|
||||
@ -1824,6 +1825,7 @@ $cfg['Export']['xml_export_contents'] = true;
|
||||
*/
|
||||
$cfg['Export']['yaml_structure_or_data'] = 'data';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Import defaults
|
||||
*/
|
||||
@ -2310,6 +2312,11 @@ $cfg['ShowBrowseComments'] = true;
|
||||
*/
|
||||
$cfg['ShowPropertyComments']= true;
|
||||
|
||||
/**
|
||||
* shows table display direction.
|
||||
*/
|
||||
$cfg['ShowDisplayDir'] = false;
|
||||
|
||||
/**
|
||||
* repeat header names every X cells? (0 = deactivate)
|
||||
*
|
||||
@ -2411,6 +2418,7 @@ $cfg['UserprefsDisallow'] = array();
|
||||
*/
|
||||
$cfg['UserprefsDeveloperTab'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Window title settings
|
||||
*/
|
||||
@ -2521,7 +2529,9 @@ $cfg['DefaultQueryDatabase'] = '';
|
||||
/*******************************************************************************
|
||||
* SQL Query box settings
|
||||
* These are the links display in all of the SQL Query boxes
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @global array $cfg['SQLQuery']
|
||||
*/
|
||||
$cfg['SQLQuery'] = array();
|
||||
@ -2593,7 +2603,7 @@ $cfg['SaveDir'] = '';
|
||||
$cfg['TempDir'] = '';
|
||||
|
||||
|
||||
/**
|
||||
/*******************************************************************************
|
||||
* Misc. settings
|
||||
*/
|
||||
|
||||
@ -2635,7 +2645,12 @@ $cfg['LinkLengthLimit'] = 2000;
|
||||
*/
|
||||
$cfg['DisableMultiTableMaintenance'] = false;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SQL Parser
|
||||
*/
|
||||
|
||||
/**
|
||||
* SQL Parser Settings
|
||||
*
|
||||
* @global array $cfg['SQP']
|
||||
@ -2665,6 +2680,10 @@ $cfg['SQP']['fmtIndUnit'] = 'em';
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SQL Validator
|
||||
*/
|
||||
|
||||
/**
|
||||
* If you wish to use the SQL Validator service, you should be aware of the
|
||||
* following:
|
||||
* All SQL statements are stored anonymously for statistical purposes.
|
||||
@ -2699,6 +2718,10 @@ $cfg['SQLValidator']['password'] = '';
|
||||
|
||||
/*******************************************************************************
|
||||
* Developers ONLY!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Debugging settings
|
||||
*
|
||||
* @global array $cfg['DBG']
|
||||
*/
|
||||
@ -2824,14 +2847,19 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'CHAR',
|
||||
'CHAR_LENGTH',
|
||||
'COMPRESS',
|
||||
'CONNECTION_ID',
|
||||
'COS',
|
||||
'COT',
|
||||
'CRC32',
|
||||
'CURDATE',
|
||||
'CURRENT_USER',
|
||||
'CURTIME',
|
||||
'DATABASE',
|
||||
'DATE',
|
||||
'DAYNAME',
|
||||
'DAYOFMONTH',
|
||||
'DAYOFWEEK',
|
||||
'DAYOFYEAR',
|
||||
'DEGREES',
|
||||
'DES_DECRYPT',
|
||||
'DES_ENCRYPT',
|
||||
@ -2841,35 +2869,53 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'FROM_DAYS',
|
||||
'FROM_UNIXTIME',
|
||||
'HEX',
|
||||
'HOUR',
|
||||
'INET_ATON',
|
||||
'INET_NTOA',
|
||||
'LAST_DAY',
|
||||
'LENGTH',
|
||||
'LN',
|
||||
'LOAD_FILE',
|
||||
'LOG',
|
||||
'LOG10',
|
||||
'LOG2',
|
||||
'LOWER',
|
||||
'LTRIM',
|
||||
'MD5',
|
||||
'MICROSECOND',
|
||||
'MINUTE',
|
||||
'MONTH',
|
||||
'MONTHNAME',
|
||||
'NOW',
|
||||
'OCT',
|
||||
'OLD_PASSWORD',
|
||||
'ORD',
|
||||
'PASSWORD',
|
||||
'PI',
|
||||
'QUARTER',
|
||||
'QUOTE',
|
||||
'RADIANS',
|
||||
'RAND',
|
||||
'REVERSE',
|
||||
'ROUND',
|
||||
'RTRIM',
|
||||
'SECOND',
|
||||
'SEC_TO_TIME',
|
||||
'SHA1',
|
||||
'SIGN',
|
||||
'SIN',
|
||||
'SOUNDEX',
|
||||
'SPACE',
|
||||
'SQRT',
|
||||
'STDDEV_POP',
|
||||
'STDDEV_SAMP',
|
||||
'SYSDATE',
|
||||
'TAN',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'TIME_TO_SEC',
|
||||
'TO_DAYS',
|
||||
'TRIM',
|
||||
'UNCOMPRESS',
|
||||
'UNCOMPRESSED_LENGTH',
|
||||
'UNHEX',
|
||||
'UNIX_TIMESTAMP',
|
||||
'UPPER',
|
||||
@ -2878,9 +2924,12 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'UUID',
|
||||
'VAR_POP',
|
||||
'VAR_SAMP',
|
||||
'VERSION',
|
||||
'WEEK',
|
||||
'WEEKDAY',
|
||||
'WEEKOFYEAR',
|
||||
'YEAR',
|
||||
'YEARWEEK',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -2908,29 +2957,29 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'TIME' => 'FUNC_DATE',
|
||||
'YEAR' => 'FUNC_DATE',
|
||||
|
||||
'CHAR' => 'FUNC_CHAR',
|
||||
'VARCHAR' => 'FUNC_CHAR',
|
||||
'TINYTEXT' => 'FUNC_CHAR',
|
||||
'TEXT' => 'FUNC_CHAR',
|
||||
'MEDIUMTEXT' => 'FUNC_CHAR',
|
||||
'LONGTEXT' => 'FUNC_CHAR',
|
||||
'BINARY' => 'FUNC_CHAR',
|
||||
'VARBINARY' => 'FUNC_CHAR',
|
||||
'TINYBLOB' => 'FUNC_CHAR',
|
||||
'MEDIUMBLOB' => 'FUNC_CHAR',
|
||||
'BLOB' => 'FUNC_CHAR',
|
||||
'LONGBLOB' => 'FUNC_CHAR',
|
||||
'ENUM' => '',
|
||||
'SET' => '',
|
||||
'CHAR' => 'FUNC_CHAR',
|
||||
'VARCHAR' => 'FUNC_CHAR',
|
||||
'TINYTEXT' => 'FUNC_CHAR',
|
||||
'TEXT' => 'FUNC_CHAR',
|
||||
'MEDIUMTEXT' => 'FUNC_CHAR',
|
||||
'LONGTEXT' => 'FUNC_CHAR',
|
||||
'BINARY' => 'FUNC_CHAR',
|
||||
'VARBINARY' => 'FUNC_CHAR',
|
||||
'TINYBLOB' => 'FUNC_CHAR',
|
||||
'MEDIUMBLOB' => 'FUNC_CHAR',
|
||||
'BLOB' => 'FUNC_CHAR',
|
||||
'LONGBLOB' => 'FUNC_CHAR',
|
||||
'ENUM' => '',
|
||||
'SET' => '',
|
||||
|
||||
'GEOMETRY' => 'FUNC_SPATIAL',
|
||||
'POINT' => 'FUNC_SPATIAL',
|
||||
'LINESTRING' => 'FUNC_SPATIAL',
|
||||
'POLYGON' => 'FUNC_SPATIAL',
|
||||
'MULTIPOINT' => 'FUNC_SPATIAL',
|
||||
'MULTILINESTRING' => 'FUNC_SPATIAL',
|
||||
'MULTIPOLYGON' => 'FUNC_SPATIAL',
|
||||
'GEOMETRYCOLLECTION' => 'FUNC_SPATIAL',
|
||||
'GEOMETRY' => 'FUNC_SPATIAL',
|
||||
'POINT' => 'FUNC_SPATIAL',
|
||||
'LINESTRING' => 'FUNC_SPATIAL',
|
||||
'POLYGON' => 'FUNC_SPATIAL',
|
||||
'MULTIPOINT' => 'FUNC_SPATIAL',
|
||||
'MULTILINESTRING' => 'FUNC_SPATIAL',
|
||||
'MULTIPOLYGON' => 'FUNC_SPATIAL',
|
||||
'GEOMETRYCOLLECTION' => 'FUNC_SPATIAL',
|
||||
|
||||
);
|
||||
|
||||
@ -2945,20 +2994,27 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'CHAR',
|
||||
'CURRENT_USER',
|
||||
'COMPRESS',
|
||||
'DATABASE',
|
||||
'DAYNAME',
|
||||
'DES_DECRYPT',
|
||||
'DES_ENCRYPT',
|
||||
'ENCRYPT',
|
||||
'HEX',
|
||||
'INET_NTOA',
|
||||
'LOAD_FILE',
|
||||
'LOWER',
|
||||
'LTRIM',
|
||||
'MD5',
|
||||
'MONTHNAME',
|
||||
'OLD_PASSWORD',
|
||||
'PASSWORD',
|
||||
'QUOTE',
|
||||
'REVERSE',
|
||||
'RTRIM',
|
||||
'SHA1',
|
||||
'SOUNDEX',
|
||||
'SPACE',
|
||||
'TRIM',
|
||||
'UNCOMPRESS',
|
||||
'UNHEX',
|
||||
'UPPER',
|
||||
@ -2972,8 +3028,11 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'DATE',
|
||||
'FROM_DAYS',
|
||||
'FROM_UNIXTIME',
|
||||
'LAST_DAY',
|
||||
'NOW',
|
||||
'SEC_TO_TIME',
|
||||
'SYSDATE',
|
||||
'TIME',
|
||||
'TIMESTAMP',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
@ -2991,31 +3050,46 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'BIT_COUNT',
|
||||
'CEILING',
|
||||
'CHAR_LENGTH',
|
||||
'CONNECTION_ID',
|
||||
'COS',
|
||||
'COT',
|
||||
'CRC32',
|
||||
'DAYOFMONTH',
|
||||
'DAYOFWEEK',
|
||||
'DAYOFYEAR',
|
||||
'DEGREES',
|
||||
'EXP',
|
||||
'FLOOR',
|
||||
'HOUR',
|
||||
'INET_ATON',
|
||||
'LENGTH',
|
||||
'LN',
|
||||
'LOG',
|
||||
'LOG2',
|
||||
'LOG10',
|
||||
'MICROSECOND',
|
||||
'MINUTE',
|
||||
'MONTH',
|
||||
'OCT',
|
||||
'ORD',
|
||||
'PI',
|
||||
'QUARTER',
|
||||
'RADIANS',
|
||||
'RAND',
|
||||
'ROUND',
|
||||
'SECOND',
|
||||
'SIGN',
|
||||
'SIN',
|
||||
'SQRT',
|
||||
'STDDEV_POP',
|
||||
'STDDEV_SAMP',
|
||||
'TAN',
|
||||
'TO_DAYS',
|
||||
'TIME_TO_SEC',
|
||||
'UNCOMPRESSED_LENGTH',
|
||||
'UNIX_TIMESTAMP',
|
||||
'VAR_POP',
|
||||
'VAR_SAMP',
|
||||
'WEEK',
|
||||
'WEEKDAY',
|
||||
'WEEKOFYEAR',
|
||||
'YEARWEEK',
|
||||
),
|
||||
|
||||
'FUNC_SPATIAL' => array(
|
||||
@ -3052,8 +3126,6 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'first_timestamp' => 'NOW',
|
||||
'pk_char36' => 'UUID',
|
||||
);
|
||||
|
||||
|
||||
} // end if
|
||||
|
||||
/**
|
||||
|
||||
@ -450,6 +450,8 @@ $strConfigShowAll_name = __('Allow to display all the rows');
|
||||
$strConfigShowChgPassword_desc = __('Please note that enabling this has no effect with [kbd]config[/kbd] authentication mode because the password is hard coded in the configuration file; this does not limit the ability to execute the same command directly');
|
||||
$strConfigShowChgPassword_name = __('Show password change form');
|
||||
$strConfigShowCreateDb_name = __('Show create database form');
|
||||
$strConfigShowDisplayDir_desc = __('Defines whether or not type display direction option is shown when browsing a table');
|
||||
$strConfigShowDisplayDir_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');
|
||||
|
||||
@ -198,6 +198,7 @@ $forms['Main_frame']['Browse'] = array(
|
||||
'Order',
|
||||
'BrowsePointerEnable',
|
||||
'BrowseMarkerEnable',
|
||||
'ShowDisplayDir',
|
||||
'RepeatCells',
|
||||
'LimitChars',
|
||||
'RowActionLinks',
|
||||
|
||||
@ -108,6 +108,7 @@ $forms['Main_frame']['Browse'] = array(
|
||||
'DisplayBinaryAsHex',
|
||||
'BrowsePointerEnable',
|
||||
'BrowseMarkerEnable',
|
||||
'ShowDisplayDir',
|
||||
'RepeatCells',
|
||||
'LimitChars',
|
||||
'RowActionLinks',
|
||||
|
||||
@ -836,86 +836,13 @@ function PMA_DBI_get_columns($database, $table, $full = false, $link = null)
|
||||
$fields = PMA_DBI_fetch_result(
|
||||
'SHOW ' . ($full ? 'FULL' : '') . ' COLUMNS
|
||||
FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
'Field', ($full ? null : 'Field'), $link);
|
||||
'Field', null, $link);
|
||||
if (! is_array($fields) || count($fields) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_DBI_get_column_values (string $database, string $table, string $column , mysql db link $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param string $column name of the column to retrieve data from
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $field_values
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_column_values($database, $table, $column, $link = null)
|
||||
{
|
||||
$query = 'SELECT ';
|
||||
for($i=0; $i< sizeof($column); $i++)
|
||||
{
|
||||
$query.= PMA_backquote($column[$i]);
|
||||
if($i < (sizeof($column)-1))
|
||||
{
|
||||
$query.= ', ';
|
||||
}
|
||||
}
|
||||
$query.= ' FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table);
|
||||
$field_values = PMA_DBI_fetch_result($query, null, null, $link);
|
||||
|
||||
if (! is_array($field_values) || count($field_values) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $field_values;
|
||||
}
|
||||
/**
|
||||
* array PMA_DBI_get_table_data (string $database, string $table, mysql db link $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of table to retrieve columns from
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $result
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_table_data($database, $table, $link = null)
|
||||
{
|
||||
|
||||
$result = PMA_DBI_fetch_result(
|
||||
'SELECT * FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
null,null, $link);
|
||||
|
||||
if (! is_array($result) || count($result) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* array PMA_DBI_get_table_indexes($database, $table, $link = null)
|
||||
*
|
||||
* @param string $database name of database
|
||||
* @param string $table name of the table whose indexes are to be retreived
|
||||
* @param mixed $link mysql link resource
|
||||
* @return array $indexes
|
||||
*/
|
||||
|
||||
function PMA_DBI_get_table_indexes($database, $table, $link = null)
|
||||
{
|
||||
|
||||
$indexes = PMA_DBI_fetch_result(
|
||||
'SHOW INDEXES FROM ' .PMA_backquote($database) . '.' . PMA_backquote($table),
|
||||
null, null, $link);
|
||||
|
||||
if (! is_array($indexes) || count($indexes) < 1) {
|
||||
return false;
|
||||
}
|
||||
return $indexes;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns value of given mysql server variable
|
||||
*
|
||||
|
||||
@ -35,13 +35,6 @@ if (empty($export_list)) {
|
||||
PMA_Message::error( __('Could not load export plugins, please check your installation!'))->display();
|
||||
require './libraries/footer.inc.php';
|
||||
}
|
||||
|
||||
// If the form data is being loaded from GET data, decode it
|
||||
foreach($_GET as $name => $value) {
|
||||
if(is_string($value)) {
|
||||
$_GET[urldecode($name)] = urldecode($value);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="post" action="export.php" name="dump">
|
||||
@ -73,7 +66,7 @@ echo '<input type="hidden" name="export_method" value="' . htmlspecialchars($cfg
|
||||
|
||||
|
||||
if(isset($_GET['sql_query'])) {
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars(urldecode($_GET['sql_query'])) . '" />' . "\n";
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($_GET['sql_query']) . '" />' . "\n";
|
||||
} elseif (! empty($sql_query)) {
|
||||
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
|
||||
}
|
||||
@ -325,7 +318,7 @@ if(isset($_GET['sql_query'])) {
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li><input type="radio" id="radio_view_as_text" name="output_format" value="astext" <?php echo isset($_GET['repopulate']) ? 'checked="checked"' : '' ?>/><label for="radio_view_as_text"><?php echo __('View output as text'); ?></label></li>
|
||||
<li><input type="radio" id="radio_view_as_text" name="output_format" value="astext" <?php echo (isset($_GET['repopulate']) || $GLOBALS['cfg']['Export']['asfile'] == false) ? 'checked="checked"' : '' ?>/><label for="radio_view_as_text"><?php echo __('View output as text'); ?></label></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@ -293,8 +293,9 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
?>
|
||||
|
||||
<!-- Navigation bar -->
|
||||
<table border="0" cellpadding="2" cellspacing="0" class="navigation">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="navigation">
|
||||
<tr>
|
||||
<td class="navigation_separator"></td>
|
||||
<?php
|
||||
// Move to the beginning or to the previous page
|
||||
if ($_SESSION['tmp_user_values']['pos'] && $_SESSION['tmp_user_values']['max_rows'] != 'all') {
|
||||
@ -330,8 +331,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
5,
|
||||
5,
|
||||
20,
|
||||
10,
|
||||
__('Page number:')
|
||||
10
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
@ -344,16 +344,16 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td>
|
||||
<form action="sql.php" method="post">
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||
<input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
|
||||
<input type="hidden" name="pos" value="0" />
|
||||
<input type="hidden" name="session_max_rows" value="all" />
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
<input type="submit" name="navig" value="<?php echo __('Show all'); ?>" />
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="sql.php" method="post">
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||
<input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
|
||||
<input type="hidden" name="pos" value="0" />
|
||||
<input type="hidden" name="session_max_rows" value="all" />
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
<input type="submit" name="navig" value="<?php echo __('Show all'); ?>" />
|
||||
</form>
|
||||
</td>
|
||||
<?php
|
||||
} // end show all
|
||||
|
||||
@ -386,9 +386,17 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
$onclick
|
||||
);
|
||||
} // end move toward
|
||||
|
||||
// show separator if pagination happen
|
||||
if ($nbTotalPage > 1){
|
||||
echo '<td><div class="navigation_separator">|</div></td>';
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<input class="restore_column hide" type="submit" value="<?php echo __('Restore column order'); ?>" />
|
||||
<div class="restore_column hide">
|
||||
<input type="submit" value="<?php echo __('Restore column order'); ?>" />
|
||||
<div class="navigation_separator">|</div>
|
||||
</div>
|
||||
<?php
|
||||
if (PMA_isSelect()) {
|
||||
// generate the column order, if it is set
|
||||
@ -397,6 +405,10 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
if ($col_order) {
|
||||
echo '<input id="col_order" type="hidden" value="' . implode(',', $col_order) . '" />';
|
||||
}
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
if ($col_visib) {
|
||||
echo '<input id="col_visib" type="hidden" value="' . implode(',', $col_visib) . '" />';
|
||||
}
|
||||
// generate table create time
|
||||
echo '<input id="table_create_time" type="hidden" value="' .
|
||||
PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], 'Create_time') . '" />';
|
||||
@ -405,40 +417,48 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
echo '<input id="col_order_hint" type="hidden" value="' . __('Drag to reorder') . '" />';
|
||||
echo '<input id="sort_hint" type="hidden" value="' . __('Click to sort') . '" />';
|
||||
echo '<input id="col_mark_hint" type="hidden" value="' . __('Click to mark/unmark') . '" />';
|
||||
echo '<input id="col_visib_hint" type="hidden" value="' . __('Click the drop-down arrow<br />to toggle column\'s visibility') . '" />';
|
||||
echo '<input id="show_all_col_text" type="hidden" value="' . __('Show all') . '" />';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php // if displaying a VIEW, $unlim_num_rows could be zero because
|
||||
// of $cfg['MaxExactCountViews']; in this case, avoid passing
|
||||
// the 5th parameter to checkFormElementInRange()
|
||||
// (this means we can't validate the upper limit ?>
|
||||
<div>
|
||||
<form action="sql.php" method="post"
|
||||
onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 1) && checkFormElementInRange(this, 'pos', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 0<?php echo $unlim_num_rows > 0 ? ',' . $unlim_num_rows - 1 : ''; ?>))">
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||
<input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
<input type="submit" name="navig" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?> value="<?php echo __('Show'); ?> :" />
|
||||
<input type="text" name="session_max_rows" size="3" value="<?php echo (($_SESSION['tmp_user_values']['max_rows'] != 'all') ? $_SESSION['tmp_user_values']['max_rows'] : $GLOBALS['cfg']['MaxRows']); ?>" class="textfield" onfocus="this.select()" />
|
||||
<?php echo __('row(s) starting from row #') . "\n"; ?>
|
||||
<input type="text" name="pos" size="6" value="<?php echo (($pos_next >= $unlim_num_rows) ? 0 : $pos_next); ?>" class="textfield" onfocus="this.select()" />
|
||||
<?php
|
||||
// Display mode (horizontal/vertical and repeat headers)
|
||||
$choices = array(
|
||||
'horizontal' => __('horizontal'),
|
||||
'horizontalflipped' => __('horizontal (rotated headers)'),
|
||||
'vertical' => __('vertical'));
|
||||
$param1 = PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['tmp_user_values']['disp_direction'], $id_for_direction_dropdown);
|
||||
unset($choices);
|
||||
<td class="navigation_goto">
|
||||
<form action="sql.php" method="post"
|
||||
onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 1) && checkFormElementInRange(this, 'pos', '<?php echo str_replace('\'', '\\\'', __('%d is not valid row number.')); ?>', 0<?php echo $unlim_num_rows > 0 ? ',' . $unlim_num_rows - 1 : ''; ?>))">
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||
<input type="hidden" name="sql_query" value="<?php echo $html_sql_query; ?>" />
|
||||
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
|
||||
<input type="submit" name="navig" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?> value="<?php echo __('Show'); ?> :" />
|
||||
<?php echo __('Start row') . ': ' . "\n"; ?>
|
||||
<input type="text" name="pos" size="3" value="<?php echo (($pos_next >= $unlim_num_rows) ? 0 : $pos_next); ?>" class="textfield" onfocus="this.select()" />
|
||||
<?php echo __('Number of rows') . ': ' . "\n"; ?>
|
||||
<input type="text" name="session_max_rows" size="3" value="<?php echo (($_SESSION['tmp_user_values']['max_rows'] != 'all') ? $_SESSION['tmp_user_values']['max_rows'] : $GLOBALS['cfg']['MaxRows']); ?>" class="textfield" onfocus="this.select()" />
|
||||
<?php
|
||||
if ($GLOBALS['cfg']['ShowDisplayDir']) {
|
||||
// Display mode (horizontal/vertical and repeat headers)
|
||||
echo __('Mode') . ': ' . "\n";
|
||||
$choices = array(
|
||||
'horizontal' => __('horizontal'),
|
||||
'horizontalflipped' => __('horizontal (rotated headers)'),
|
||||
'vertical' => __('vertical'));
|
||||
echo PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['tmp_user_values']['disp_direction'], $id_for_direction_dropdown);
|
||||
unset($choices);
|
||||
}
|
||||
|
||||
echo __('Headers every') . ': ' . "\n";
|
||||
echo '<input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />' . "\n";
|
||||
echo __('rows'). "\n";
|
||||
?>
|
||||
</form>
|
||||
</td>
|
||||
<td class="navigation_separator"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
$param2 = ' <input type="text" size="3" name="repeat_cells" value="' . $_SESSION['tmp_user_values']['repeat_cells'] . '" class="textfield" />' . "\n"
|
||||
. ' ';
|
||||
echo ' ' . sprintf(__('in %s mode and repeat headers after %s cells'), "\n" . $param1, "\n" . $param2) . "\n";
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} // end of the 'PMA_displayTableNavigation()' function
|
||||
|
||||
@ -779,8 +799,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
// prepare to get the column order, if available
|
||||
$pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
} else {
|
||||
$col_order = false;
|
||||
$col_visib = false;
|
||||
}
|
||||
|
||||
for ($j = 0; $j < $fields_cnt; $j++) {
|
||||
@ -921,6 +943,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
echo '<th';
|
||||
$th_class = array();
|
||||
$th_class[] = 'draggable';
|
||||
if ($col_visib && !$col_visib[$j]) {
|
||||
$th_class[] = 'hide';
|
||||
}
|
||||
if ($condition_field) {
|
||||
$th_class[] = 'condition';
|
||||
}
|
||||
@ -939,7 +964,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
echo '>' . $order_link . $comments . '</th>';
|
||||
}
|
||||
$vertical_display['desc'][] = ' <th '
|
||||
. 'class="draggable' . ($condition_field ? ' condition' : '') . '">' . "\n"
|
||||
. 'class="draggable'
|
||||
. ($condition_field ? ' condition' : '')
|
||||
. '">' . "\n"
|
||||
. $order_link . $comments . ' </th>' . "\n";
|
||||
} // end if (2.1)
|
||||
|
||||
@ -950,6 +977,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
echo '<th';
|
||||
$th_class = array();
|
||||
$th_class[] = 'draggable';
|
||||
if ($col_visib && !$col_visib[$j]) {
|
||||
$th_class[] = 'hide';
|
||||
}
|
||||
if ($condition_field) {
|
||||
$th_class[] = 'condition';
|
||||
}
|
||||
@ -971,7 +1001,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
echo "\n" . $comments . '</th>';
|
||||
}
|
||||
$vertical_display['desc'][] = ' <th '
|
||||
. 'class="draggable' . ($condition_field ? ' condition"' : '') . '">' . "\n"
|
||||
. 'class="draggable'
|
||||
. ($condition_field ? ' condition"' : '')
|
||||
. '">' . "\n"
|
||||
. ' ' . htmlspecialchars($fields_meta[$i]->name) . "\n"
|
||||
. $comments . ' </th>';
|
||||
} // end else (2.2)
|
||||
@ -1178,8 +1210,10 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
if (PMA_isSelect()) {
|
||||
$pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
} else {
|
||||
$col_order = false;
|
||||
$col_visib = false;
|
||||
}
|
||||
|
||||
// Correction University of Virginia 19991216 in the while below
|
||||
@ -1350,11 +1384,14 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
$meta = $fields_meta[$i];
|
||||
$not_null_class = $meta->not_null ? 'not_null' : '';
|
||||
$relation_class = isset($map[$meta->name]) ? 'relation' : '';
|
||||
$hide_class = ($col_visib && !$col_visib[$j] &&
|
||||
// hide per <td> only if the display direction is not vertical
|
||||
$_SESSION['tmp_user_values']['disp_direction'] != 'vertical') ? 'hide' : '';
|
||||
$pointer = $i;
|
||||
$is_field_truncated = false;
|
||||
//If the previous column had blob data, we need to reset the class
|
||||
// to $inline_edit_class
|
||||
$class = 'data ' . $inline_edit_class . ' ' . $not_null_class . ' ' . $alternating_color_class . ' ' . $relation_class;
|
||||
$class = 'data ' . $inline_edit_class . ' ' . $not_null_class . ' ' . $alternating_color_class . ' ' . $relation_class . ' ' . $hide_class;
|
||||
|
||||
// See if this column should get highlight because it's used in the
|
||||
// where-query.
|
||||
@ -1383,7 +1420,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
if ($GLOBALS['cfgRelation']['mimework'] && $GLOBALS['cfg']['BrowseMIME']) {
|
||||
|
||||
if (isset($GLOBALS['mime_map'][$meta->name]['mimetype']) && isset($GLOBALS['mime_map'][$meta->name]['transformation']) && !empty($GLOBALS['mime_map'][$meta->name]['transformation'])) {
|
||||
$include_file = $GLOBALS['mime_map'][$meta->name]['transformation'];
|
||||
$include_file = PMA_securePath($GLOBALS['mime_map'][$meta->name]['transformation']);
|
||||
|
||||
if (file_exists('./libraries/transformations/' . $include_file)) {
|
||||
$transformfunction_name = str_replace('.inc.php', '', $GLOBALS['mime_map'][$meta->name]['transformation']);
|
||||
@ -1702,13 +1739,15 @@ function PMA_displayVerticalTable()
|
||||
echo '<th></th>' . "\n";
|
||||
}
|
||||
echo $vertical_display['textbtn'];
|
||||
$foo_counter = 0;
|
||||
$cell_displayed = 0;
|
||||
foreach ($vertical_display['row_delete'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
if (($cell_displayed != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($cell_displayed % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th' .
|
||||
(($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? ' rowspan="4"' : '') .
|
||||
'></th>' . "\n";
|
||||
}
|
||||
echo str_replace('[%_PMA_CHECKBOX_DIR_%]', '_left', $val);
|
||||
$foo_counter++;
|
||||
$cell_displayed++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1720,14 +1759,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['edit'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo ' <th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1739,14 +1772,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['copy'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo ' <th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1758,14 +1785,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['delete'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1774,8 +1795,10 @@ function PMA_displayVerticalTable()
|
||||
// prepare to get the column order, if available
|
||||
$pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
} else {
|
||||
$col_order = false;
|
||||
$col_visib = false;
|
||||
}
|
||||
|
||||
// Displays data
|
||||
@ -1783,17 +1806,17 @@ function PMA_displayVerticalTable()
|
||||
// assign appropriate key with current column order
|
||||
$key = $col_order ? $col_order[$j] : $j;
|
||||
|
||||
echo '<tr>' . "\n";
|
||||
echo '<tr' . (($col_visib && !$col_visib[$j]) ? ' class="hide"' : '') . '>' . "\n";
|
||||
echo $val;
|
||||
|
||||
$foo_counter = 0;
|
||||
$cell_displayed = 0;
|
||||
foreach ($vertical_display['rowdata'][$key] as $subval) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) and !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
if (($cell_displayed != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) and !($cell_displayed % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo $val;
|
||||
}
|
||||
|
||||
echo $subval;
|
||||
$foo_counter++;
|
||||
$cell_displayed++;
|
||||
} // end while
|
||||
|
||||
echo '</tr>' . "\n";
|
||||
@ -1804,14 +1827,16 @@ function PMA_displayVerticalTable()
|
||||
&& is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
|
||||
echo '<tr>' . "\n";
|
||||
echo $vertical_display['textbtn'];
|
||||
$foo_counter = 0;
|
||||
$cell_displayed = 0;
|
||||
foreach ($vertical_display['row_delete'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
if (($cell_displayed != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($cell_displayed % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th' .
|
||||
(($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? ' rowspan="4"' : '') .
|
||||
'></th>' . "\n";
|
||||
}
|
||||
|
||||
echo str_replace('[%_PMA_CHECKBOX_DIR_%]', '_right', $val);
|
||||
$foo_counter++;
|
||||
$cell_displayed++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1823,14 +1848,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['edit'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1842,14 +1861,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['copy'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
} // end if
|
||||
@ -1861,14 +1874,8 @@ function PMA_displayVerticalTable()
|
||||
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach ($vertical_display['delete'] as $val) {
|
||||
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
|
||||
echo '<th></th>' . "\n";
|
||||
}
|
||||
|
||||
echo $val;
|
||||
$foo_counter++;
|
||||
} // end while
|
||||
echo '</tr>' . "\n";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1798
po/be@latin.po
1798
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1803
po/en_GB.po
1803
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1761
po/phpmyadmin.pot
1761
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
1784
po/pt_BR.po
1784
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1802
po/sr@latin.po
1802
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1821
po/uz@latin.po
1821
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
1784
po/zh_CN.po
1784
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1780
po/zh_TW.po
1780
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -39,7 +39,7 @@ class ConfigGenerator
|
||||
if ($cf->getServerCount() > 0) {
|
||||
$ret .= "/* Servers configuration */$crlf\$i = 0;" . $crlf . $crlf;
|
||||
foreach ($c['Servers'] as $id => $server) {
|
||||
$ret .= '/* Server: ' . strtr($cf->getServerName($id), '*/', '-') . " [$id] */" . $crlf
|
||||
$ret .= '/* Server: ' . strtr($cf->getServerName($id) . " [$id] ", '*/', '-') . "*/" . $crlf
|
||||
. '$i++;' . $crlf;
|
||||
foreach ($server as $k => $v) {
|
||||
$k = preg_replace('/[^A-Za-z0-9_]/', '_', $k);
|
||||
|
||||
9
sql.php
9
sql.php
@ -164,10 +164,17 @@ if(isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) {
|
||||
/**
|
||||
* Check ajax request to set the column order
|
||||
*/
|
||||
if(isset($_REQUEST['set_col_order']) && $_REQUEST['set_col_order'] == true) {
|
||||
if(isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) {
|
||||
$pmatable = new PMA_Table($table, $db);
|
||||
|
||||
// set column order
|
||||
$col_order = explode(',', $_REQUEST['col_order']);
|
||||
$retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER, $col_order, $_REQUEST['table_create_time']);
|
||||
|
||||
// set column visibility
|
||||
$col_visib = explode(',', $_REQUEST['col_visib']);
|
||||
$retval &= $pmatable->setUiProp(PMA_Table::PROP_COLUMN_VISIB, $col_visib, $_REQUEST['table_create_time']);
|
||||
|
||||
PMA_ajaxResponse(NULL, ($retval == true));
|
||||
}
|
||||
|
||||
|
||||
@ -97,7 +97,13 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
PMA_DBI_query($sql_query);
|
||||
$message = PMA_Message::success(__('Table %1$s has been altered successfully'));
|
||||
$message->addParam($table);
|
||||
|
||||
|
||||
if( $GLOBALS['is_ajax_request'] == true) {
|
||||
$extra_data['index_table'] = PMA_Index::getView($table, $db);
|
||||
$extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
|
||||
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
|
||||
}
|
||||
|
||||
$active_page = 'tbl_structure.php';
|
||||
require './tbl_structure.php';
|
||||
exit;
|
||||
@ -133,9 +139,9 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
|
||||
// end preparing form values
|
||||
?>
|
||||
|
||||
<form action="./tbl_indexes.php" method="post" name="index_frm"
|
||||
onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {
|
||||
this.elements['index'].disabled = false}">
|
||||
<form action="./tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>
|
||||
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
|
||||
this.elements['index[Key_name]'].disabled = false}">
|
||||
<?php
|
||||
$form_params = array(
|
||||
'db' => $db,
|
||||
@ -183,7 +189,7 @@ if (isset($_REQUEST['create_index'])) {
|
||||
PMA_Message::error(__('("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))->display();
|
||||
?>
|
||||
|
||||
<table>
|
||||
<table id="index_columns">
|
||||
<thead>
|
||||
<tr><th><?php echo __('Column'); ?></th>
|
||||
<th><?php echo __('Size'); ?></th>
|
||||
|
||||
@ -130,18 +130,27 @@ if (isset($_REQUEST['where_clause'])) {
|
||||
$query = array();
|
||||
$value_sets = array();
|
||||
$func_no_param = array(
|
||||
'NOW',
|
||||
'CONNECTION_ID',
|
||||
'CURRENT_USER',
|
||||
'CURDATE',
|
||||
'CURTIME',
|
||||
'DATABASE',
|
||||
'LAST_INSERT_ID',
|
||||
'NOW',
|
||||
'PI',
|
||||
'RAND',
|
||||
'SYSDATE',
|
||||
'UNIX_TIMESTAMP',
|
||||
'USER',
|
||||
'UTC_DATE',
|
||||
'UTC_TIME',
|
||||
'UTC_TIMESTAMP',
|
||||
'UNIX_TIMESTAMP',
|
||||
'RAND',
|
||||
'USER',
|
||||
'LAST_INSERT_ID',
|
||||
'UUID',
|
||||
'CURRENT_USER',
|
||||
'VERSION',
|
||||
);
|
||||
$func_optional_param = array(
|
||||
'RAND',
|
||||
'UNIX_TIMESTAMP',
|
||||
);
|
||||
|
||||
foreach ($loop_array as $rownumber => $where_clause) {
|
||||
@ -225,16 +234,15 @@ foreach ($loop_array as $rownumber => $where_clause) {
|
||||
|
||||
if (empty($me_funcs[$key])) {
|
||||
$cur_value = $val;
|
||||
} elseif ('UNIX_TIMESTAMP' === $me_funcs[$key] && $val != "''") {
|
||||
$cur_value = $me_funcs[$key] . '(' . $val . ')';
|
||||
} elseif ('UUID' === $me_funcs[$key]) {
|
||||
/* This way user will know what UUID new row has */
|
||||
$uuid = PMA_DBI_fetch_value('SELECT UUID()');
|
||||
$cur_value = "'" . $uuid . "'";
|
||||
} elseif (in_array($me_funcs[$key], $func_no_param)) {
|
||||
$cur_value = $me_funcs[$key] . '()';
|
||||
} else {
|
||||
} elseif (!in_array($me_funcs[$key], $func_no_param)
|
||||
|| ($val != "''" && in_array($me_funcs[$key], $func_optional_param))) {
|
||||
$cur_value = $me_funcs[$key] . '(' . $val . ')';
|
||||
} else {
|
||||
$cur_value = $me_funcs[$key] . '()';
|
||||
}
|
||||
|
||||
// i n s e r t
|
||||
|
||||
@ -14,7 +14,7 @@ require_once './libraries/mysql_charsets.lib.php';
|
||||
|
||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||
$GLOBALS['js_include'][] = 'tbl_structure.js';
|
||||
|
||||
$GLOBALS['js_include'][] = 'indexes.js';
|
||||
/**
|
||||
* handle multiple field commands if required
|
||||
*
|
||||
@ -699,6 +699,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
|
||||
</form>
|
||||
<iframe class="IE_hack" scrolling="no"></iframe>
|
||||
<hr />
|
||||
<div id="index_div" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?> >
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -720,9 +721,9 @@ if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_type) {
|
||||
*/
|
||||
echo PMA_Index::getView($table, $db);
|
||||
?>
|
||||
<br />
|
||||
</div>
|
||||
<form action="./tbl_indexes.php" method="post"
|
||||
onsubmit="return checkFormElementInRange(this, 'idx_num_fields',
|
||||
onsubmit="return checkFormElementInRange(this, 'added_fields',
|
||||
'<?php echo str_replace('\'', '\\\'', __('Column count has to be larger than zero.')); ?>',
|
||||
1)">
|
||||
<fieldset>
|
||||
@ -731,11 +732,7 @@ if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_type) {
|
||||
echo sprintf(__('Create an index on %s columns'),
|
||||
'<input type="text" size="2" name="added_fields" value="1" />');
|
||||
?>
|
||||
<input type="submit" name="create_index" value="<?php echo __('Go'); ?>"
|
||||
onclick="return checkFormElementInRange(this.form,
|
||||
'idx_num_fields',
|
||||
'<?php echo str_replace('\'', '\\\'', __('Column count has to be larger than zero.')); ?>',
|
||||
1)" />
|
||||
<input type="submit" name="create_index" value="<?php echo __('Go'); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
@ -2117,11 +2117,15 @@ span.mysql-number {
|
||||
border-right: solid 1px #FFFFFF;
|
||||
cursor: col-resize;
|
||||
height: 100%;
|
||||
margin-left: -3px;
|
||||
margin-left: -6px;
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.pma_table td {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.pma_table th.draggable span, .pma_table tbody td span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
@ -2171,9 +2175,120 @@ span.mysql-number {
|
||||
margin-top: -1em;
|
||||
opacity: 0.8;
|
||||
padding: 0.5em 1em;
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
text-shadow: -1px -1px #000;
|
||||
-moz-border-radius: 0.3em;
|
||||
-webkit-border-radius: 0.3em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.data {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cHide {
|
||||
background: #D3DCE3 url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_hide.png);
|
||||
color: #CCC;
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: -5px;
|
||||
margin-top: 0.3em;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.cHide:hover {
|
||||
background-color: #AAA;
|
||||
}
|
||||
|
||||
.cDrop {
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.coldrop {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_drop.png);
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: 0.5em;
|
||||
margin-top: 0.3em;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.coldrop:hover, .coldrop-hover {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.cList {
|
||||
background: #EEE;
|
||||
border: solid 1px #999;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cList table {
|
||||
}
|
||||
|
||||
.cList table tr:hover {
|
||||
background: #DDD;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cList table td input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.showAllColBtn {
|
||||
border-bottom: solid 1px #999;
|
||||
border-top: solid 1px #999;
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
padding: 0.35em 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.showAllColBtn:hover {
|
||||
background: #DDD;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
background: #E5E5E5;
|
||||
border: 1px solid black;
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
.navigation td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.navigation_separator {
|
||||
color: #555;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
width: 1.2em;
|
||||
text-shadow: 1px 0 #FFF;
|
||||
}
|
||||
|
||||
.navigation input[type=submit] {
|
||||
background: none;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0.3em 0.5em;
|
||||
min-width: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.navigation input[type=submit]:hover {
|
||||
background: #333;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navigation select {
|
||||
margin: 0 0.8em;
|
||||
}
|
||||
|
||||
BIN
themes/original/img/col_drop.png
Normal file
BIN
themes/original/img/col_drop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1002 B |
@ -65,7 +65,7 @@ h2 a img{display:inline;}
|
||||
|
||||
.data{
|
||||
margin: 0 0 12px 0;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@ -1729,7 +1729,7 @@ table#serverconnection_trg_local {
|
||||
*/
|
||||
input[type=text].invalid_value,
|
||||
.invalid_value {
|
||||
background:#F00;
|
||||
background:#FFCCCC;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2476,14 +2476,18 @@ span.mysql-number {
|
||||
}
|
||||
|
||||
.colborder {
|
||||
border-left: 1px solid #FFF;
|
||||
border-right: 1px solid #FFF;
|
||||
cursor: col-resize;
|
||||
height: 100%;
|
||||
margin-left: -1px;
|
||||
margin-left: -6px;
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.pma_table td {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.pma_table th.draggable span, .pma_table tbody td span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
@ -2537,9 +2541,140 @@ span.mysql-number {
|
||||
margin-top: -1em;
|
||||
opacity: 0.8;
|
||||
padding: 0.5em 1em;
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
text-shadow: -1px -1px #000;
|
||||
-moz-border-radius: 0.3em;
|
||||
-webkit-border-radius: 0.3em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.cHide {
|
||||
background: #EEE url(./themes/pmahomme/img/col_hide.png);
|
||||
color: #CCC;
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: -10px;
|
||||
margin-top: 0.3em;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.cHide:hover {
|
||||
background-color: #AAA;
|
||||
}
|
||||
|
||||
.cDrop {
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.coldrop {
|
||||
background: url(./themes/pmahomme/img/col_drop.png);
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: 0.3em;
|
||||
margin-top: 0.3em;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.coldrop:hover, .coldrop-hover {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.cList {
|
||||
background: #EEE;
|
||||
border: solid 1px #999;
|
||||
position: absolute;
|
||||
-moz-box-shadow: 0 0.2em 0.5em #333;
|
||||
-webkit-box-shadow: 0 0.2em 0.5em #333;
|
||||
box-shadow: 0 0.2em 0.5em #333;
|
||||
}
|
||||
|
||||
.cList table {
|
||||
}
|
||||
|
||||
.cList table tr:hover {
|
||||
background: #DDD;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cList table td input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.showAllColBtn {
|
||||
border-bottom: solid 1px #999;
|
||||
border-top: solid 1px #999;
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
padding: 0.35em 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.showAllColBtn:hover {
|
||||
background: #DDD;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
margin: 0.8em 0;
|
||||
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
|
||||
background-image: url(./themes/svg_gradient.php?from=eeeeee&to=cccccc);
|
||||
background-size: 100% 100%;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#cccccc));
|
||||
background: -moz-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background: -o-linear-gradient(top, #eeeeee, #cccccc);
|
||||
<?php echo PMA_ieFilter('#eeeeee', '#cccccc'); ?>
|
||||
}
|
||||
|
||||
.navigation td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.navigation_separator {
|
||||
color: #999;
|
||||
display: inline-block;
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
height: 1.4em;
|
||||
width: 1.2em;
|
||||
text-shadow: 1px 0 #FFF;
|
||||
}
|
||||
|
||||
.navigation input[type=submit] {
|
||||
background: none;
|
||||
border: 0;
|
||||
filter: none;
|
||||
margin: 0;
|
||||
padding: 0.8em 0.5em;
|
||||
|
||||
border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
}
|
||||
|
||||
.navigation input[type=submit]:hover {
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
text-shadow: none;
|
||||
|
||||
background-image: url(./themes/svg_gradient.php?from=333333&to=555555);
|
||||
background-size: 100% 100%;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#333333), to(#555555));
|
||||
background: -moz-linear-gradient(top, #333333, #555555);
|
||||
background: -o-linear-gradient(top, #333333, #555555);
|
||||
<?php echo PMA_ieFilter('#333333', '#555555'); ?>
|
||||
}
|
||||
|
||||
.navigation select {
|
||||
margin: 0 0.8em;
|
||||
}
|
||||
|
||||
BIN
themes/pmahomme/img/col_drop.png
Normal file
BIN
themes/pmahomme/img/col_drop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1002 B |
Loading…
Reference in New Issue
Block a user