Merge branch 'master' of https://github.com/phpmyadmin/phpmyadmin
This commit is contained in:
commit
f698bf5f41
@ -13,6 +13,7 @@ phpMyAdmin - ChangeLog
|
||||
4.1.3.0 (not yet released)
|
||||
- bug #3938 PDFDefaultPageSize doc and easy configurability
|
||||
- bug #4198 Hovering over pie chart gives fatal JS error
|
||||
+ rfe #1478 Make Column Headings Sticky
|
||||
|
||||
4.1.2.0 (2013-12-23)
|
||||
- bug #4178 Quick edit for BIT type does not work
|
||||
|
||||
17
js/chart.js
17
js/chart.js
@ -297,6 +297,11 @@ JQPlotLineChart.prototype.populateOptions = function (dataTable, options) {
|
||||
labelRenderer : $.jqplot.CanvasAxisLabelRenderer
|
||||
}
|
||||
},
|
||||
highlighter: {
|
||||
show: true,
|
||||
tooltipAxes: 'y',
|
||||
formatString:'%d'
|
||||
},
|
||||
series : []
|
||||
};
|
||||
$.extend(true, optional, options);
|
||||
@ -386,6 +391,11 @@ JQPlotScatterChart.prototype.populateOptions = function (dataTable, options) {
|
||||
labelRenderer : $.jqplot.CanvasAxisLabelRenderer
|
||||
}
|
||||
},
|
||||
highlighter: {
|
||||
show: true,
|
||||
tooltipAxes: 'xy',
|
||||
formatString:'%d, %d'
|
||||
},
|
||||
series : []
|
||||
};
|
||||
for (var i = 1; i < columns.length; i++) {
|
||||
@ -567,6 +577,11 @@ JQPlotBarChart.prototype.populateOptions = function (dataTable, options) {
|
||||
labelRenderer : $.jqplot.CanvasAxisLabelRenderer
|
||||
}
|
||||
},
|
||||
highlighter: {
|
||||
show: true,
|
||||
tooltipAxes: 'x',
|
||||
formatString:'%d'
|
||||
},
|
||||
series : [],
|
||||
seriesDefaults : {
|
||||
fillToZero : true
|
||||
@ -614,6 +629,8 @@ JQPlotPieChart.prototype.constructor = JQPlotPieChart;
|
||||
JQPlotPieChart.prototype.populateOptions = function (dataTable, options) {
|
||||
var optional = {
|
||||
highlighter: {
|
||||
show: true,
|
||||
tooltipAxes: 'xy',
|
||||
formatString:'%s, %d',
|
||||
useAxesFormatters: false
|
||||
}
|
||||
|
||||
@ -825,6 +825,9 @@ var ResizeHandler = function () {
|
||||
var pos = event.data.resize_handler.getPos(event);
|
||||
event.data.resize_handler.setWidth(pos);
|
||||
}
|
||||
if($('#sticky_columns').length !== 0) {
|
||||
handleStickyColumns();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Event handler for collapsing the panel
|
||||
|
||||
87
js/sql.js
87
js/sql.js
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
var $data_a;
|
||||
var prevScrollX = 0, fixedTop;
|
||||
|
||||
/**
|
||||
* decode a string URL_encoded
|
||||
@ -70,6 +71,7 @@ AJAX.registerTeardown('sql.js', function () {
|
||||
$('#bookmarkQueryForm').die('submit');
|
||||
$('input#bkm_label').unbind('keyup');
|
||||
$("#sqlqueryresults").die('makegrid');
|
||||
$("#sqlqueryresults").die('stickycolumns');
|
||||
$("#togglequerybox").unbind('click');
|
||||
$("#button_submit_query").die('click');
|
||||
$("input[name=bookmark_variable]").unbind("keypress");
|
||||
@ -81,6 +83,7 @@ AJAX.registerTeardown('sql.js', function () {
|
||||
$('a.browse_foreign').die('click');
|
||||
$('th.column_heading.pointer').die('hover');
|
||||
$('th.column_heading.marker').die('click');
|
||||
$(window).unbind('scroll');
|
||||
});
|
||||
|
||||
/**
|
||||
@ -147,6 +150,23 @@ AJAX.registerOnload('sql.js', function () {
|
||||
PMA_makegrid($('#table_results')[0]);
|
||||
});
|
||||
|
||||
/*
|
||||
* Attach a custom event for sticky column headings which will be
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#sqlqueryresults").live('stickycolumns', function () {
|
||||
if ($("#table_results").length === 0) {
|
||||
return;
|
||||
}
|
||||
//add sticky columns div
|
||||
initStickyColumns();
|
||||
//adjust sticky columns on scroll
|
||||
$(window).bind('scroll', function() {
|
||||
handleStickyColumns();
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Append the "Show/Hide query box" message to the query input form
|
||||
*
|
||||
@ -325,7 +345,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
});
|
||||
}
|
||||
|
||||
$sqlqueryresults.show().trigger('makegrid');
|
||||
$sqlqueryresults.show().trigger('makegrid').trigger('stickycolumns');
|
||||
$('#togglequerybox').show();
|
||||
PMA_init_slider();
|
||||
|
||||
@ -374,7 +394,6 @@ AJAX.registerOnload('sql.js', function () {
|
||||
}); //end displayOptionsForm handler
|
||||
}); // end $()
|
||||
|
||||
|
||||
/**
|
||||
* Starting from some th, change the class of all td under it.
|
||||
* If isAddClass is specified, it will be used to determine whether to add or remove the class.
|
||||
@ -422,7 +441,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
/**
|
||||
* create resizable table
|
||||
*/
|
||||
$("#sqlqueryresults").trigger('makegrid');
|
||||
$("#sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
});
|
||||
|
||||
/*
|
||||
@ -483,6 +502,68 @@ function initProfilingTables()
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Set position, left, top, width of sticky_columns div
|
||||
*/
|
||||
function setStickyColumnsPosition(position, top, left) {
|
||||
if ($("#sticky_columns").length !== 0) {
|
||||
$("#sticky_columns")
|
||||
.css("position", position)
|
||||
.css("top", top)
|
||||
.css("left", left ? left : "auto")
|
||||
.css("width", $("#table_results").width());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize sticky columns
|
||||
*/
|
||||
function initStickyColumns() {
|
||||
fixedTop = $('#floating_menubar').height();
|
||||
if ($("#sticky_columns").length === 0) {
|
||||
$('<table id="sticky_columns"></table>')
|
||||
.insertBefore('#page_content')
|
||||
.css("position", "fixed")
|
||||
.css("z-index", "99")
|
||||
.css("width", $("#table_results").width())
|
||||
.css("margin-left", $('#page_content').css("margin-left"))
|
||||
.css("top", fixedTop)
|
||||
.css("display", "none");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust sticky columns on horizontal/vertical scroll
|
||||
*/
|
||||
function handleStickyColumns() {
|
||||
var currentScrollX = $(window).scrollLeft();
|
||||
var windowOffset = $(window).scrollTop();
|
||||
var tableStartOffset = $("#table_results").offset().top;
|
||||
var tableEndOffset = tableStartOffset + $("#table_results").height();
|
||||
var $sticky_columns = $("#sticky_columns");
|
||||
if (windowOffset >= tableStartOffset && windowOffset <= tableEndOffset) {
|
||||
//for horizontal scrolling
|
||||
if(prevScrollX != currentScrollX) {
|
||||
prevScrollX = currentScrollX;
|
||||
setStickyColumnsPosition("absolute", fixedTop + windowOffset);
|
||||
//for vertical scrolling
|
||||
} else {
|
||||
setStickyColumnsPosition("fixed", fixedTop, $("#pma_navigation").width() - currentScrollX);
|
||||
}
|
||||
$sticky_columns.show();
|
||||
} else {
|
||||
var $originalHeader = $("#table_results > thead");
|
||||
var $originalColumns = $originalHeader.find("tr:first").children();
|
||||
var $clonedHeader = $originalHeader.clone();
|
||||
// clone width per cell
|
||||
$clonedHeader.find("tr:first").children().width(function(i,val) {
|
||||
return $originalColumns.eq(i).width();
|
||||
});
|
||||
$sticky_columns.empty().append($clonedHeader);
|
||||
$sticky_columns.hide();
|
||||
}
|
||||
}
|
||||
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
makeProfilingChart();
|
||||
initProfilingTables();
|
||||
|
||||
@ -53,12 +53,7 @@ function PMA_queryChart(data, columnNames, settings) {
|
||||
label : settings.yaxisLabel
|
||||
}
|
||||
},
|
||||
stackSeries : settings.stackSeries,
|
||||
highlighter: {
|
||||
show: true,
|
||||
showTooltip: true,
|
||||
tooltipAxes: 'xy'
|
||||
}
|
||||
stackSeries : settings.stackSeries
|
||||
};
|
||||
|
||||
// create the chart
|
||||
|
||||
@ -111,7 +111,7 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
} else { // results found
|
||||
$("#sqlqueryresults").html(data.message);
|
||||
$("#sqlqueryresults").trigger('makegrid');
|
||||
$("#sqlqueryresults").trigger('makegrid').trigger('stickycolumns');
|
||||
}
|
||||
$('#tbl_search_form')
|
||||
// workaround for bug #3168569 - Issue on toggling the "Hide search criteria" in chrome.
|
||||
|
||||
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.2.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2013-12-19 06:31-0500\n"
|
||||
"PO-Revision-Date: 2013-12-25 16:41+0200\n"
|
||||
"PO-Revision-Date: 2013-12-26 05:17+0200\n"
|
||||
"Last-Translator: Chien Wei Lin <cwlin0416@gmail.com>\n"
|
||||
"Language-Team: Traditional Chinese "
|
||||
"<http://l10n.cihar.com/projects/phpmyadmin/master/zh_TW/>\n"
|
||||
@ -8691,11 +8691,11 @@ msgstr ""
|
||||
|
||||
#: libraries/replication_gui.lib.php:99
|
||||
msgid "Replicate all databases; Ignore:"
|
||||
msgstr "複製所有資料庫,除了:"
|
||||
msgstr "備援所有資料庫,除了下列資料庫:"
|
||||
|
||||
#: libraries/replication_gui.lib.php:101
|
||||
msgid "Ignore all databases; Replicate:"
|
||||
msgstr "忽略所有資料庫;備援(Replicate):"
|
||||
msgstr "不備援所有資料庫,只挑選下列資料庫:"
|
||||
|
||||
#: libraries/replication_gui.lib.php:105
|
||||
msgid "Please select databases:"
|
||||
@ -8705,8 +8705,7 @@ msgstr "請選擇資料庫:"
|
||||
msgid ""
|
||||
"Now, add the following lines at the end of [mysqld] section in your my.cnf "
|
||||
"and please restart the MySQL server afterwards."
|
||||
msgstr ""
|
||||
"現在,將下列文字新增到您的 my.cnf 檔案末端,然後重新啓動 MySQL 伺服器。"
|
||||
msgstr "現在,將下列文字新增到您的 my.cnf 設定檔中 [mysqld] 區塊的最末端,然後重新啓動 MySQL 伺服器。"
|
||||
|
||||
#: libraries/replication_gui.lib.php:114
|
||||
msgid ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user