Merge pull request #316 from xmujay/20130505_js
fix some JSLint error: using dot notation
This commit is contained in:
commit
0ce42cbb3c
@ -670,7 +670,7 @@ AJAX.registerOnload('config.js', function () {
|
||||
|
||||
// detect localStorage state
|
||||
var ls_supported = window.localStorage || false;
|
||||
var ls_exists = ls_supported ? (window.localStorage['config'] || false) : false;
|
||||
var ls_exists = ls_supported ? (window.localStorage.config || false) : false;
|
||||
$('div.localStorage-' + (ls_supported ? 'un' : '') + 'supported').hide();
|
||||
$('div.localStorage-' + (ls_exists ? 'empty' : 'exists')).hide();
|
||||
if (ls_exists) {
|
||||
|
||||
@ -1444,9 +1444,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
.dblclick(function (e) {
|
||||
e.preventDefault();
|
||||
$("<div/>")
|
||||
.prop("title", PMA_messages["strColNameCopyTitle"])
|
||||
.prop("title", PMA_messages.strColNameCopyTitle)
|
||||
.addClass("modal-copy")
|
||||
.text(PMA_messages["strColNameCopyText"])
|
||||
.text(PMA_messages.strColNameCopyText)
|
||||
.append(
|
||||
$("<input/>")
|
||||
.prop("readonly", true)
|
||||
|
||||
@ -134,8 +134,8 @@ $(function () {
|
||||
if (this.value !== '') {
|
||||
var arr = jQuery.parseJSON(this.value);
|
||||
var $form = $(this).closest('form');
|
||||
$form.find('input[name=db]').val(arr['db']);
|
||||
$form.find('input[name=table]').val(arr['table']);
|
||||
$form.find('input[name=db]').val(arr.db);
|
||||
$form.find('input[name=table]').val(arr.table);
|
||||
$form.submit();
|
||||
}
|
||||
});
|
||||
|
||||
@ -16,15 +16,15 @@
|
||||
*/
|
||||
function checkAddUser(the_form)
|
||||
{
|
||||
if (the_form.elements['pred_hostname'].value == 'userdefined' && the_form.elements['hostname'].value === '') {
|
||||
if (the_form.elements.pred_hostname.value == 'userdefined' && the_form.elements.hostname.value === '') {
|
||||
alert(PMA_messages.strHostEmpty);
|
||||
the_form.elements['hostname'].focus();
|
||||
the_form.elements.hostname.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (the_form.elements['pred_username'].value == 'userdefined' && the_form.elements['username'].value === '') {
|
||||
if (the_form.elements.pred_username.value == 'userdefined' && the_form.elements.username.value === '') {
|
||||
alert(PMA_messages.strUserEmpty);
|
||||
the_form.elements['username'].focus();
|
||||
the_form.elements.username.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
'username' : username
|
||||
};
|
||||
$.get(href, params, function(data) {
|
||||
if (data['user_exists']) {
|
||||
if (data.user_exists) {
|
||||
$warning.show();
|
||||
} else {
|
||||
$warning.hide();
|
||||
@ -405,7 +405,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
|
||||
// If any option other than 'keep the old one'(option 4) is chosen, we need to remove
|
||||
// the old one from the table.
|
||||
var $row_to_remove = null;
|
||||
var $row_to_remove;
|
||||
if (curr_submit_name == 'change_copy'
|
||||
&& $('input[name=mode]:checked', '#fieldset_mode').val() != '4') {
|
||||
var old_username = $t.find('input[name="old_username"]').val();
|
||||
|
||||
@ -377,7 +377,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
}
|
||||
}
|
||||
sql_query = sql_query.substring(0, sql_query.length - 2);
|
||||
sql_query += ' WHERE ' + PMA_urldecode(searchedData[searchedDataKey]['where_clause']);
|
||||
sql_query += ' WHERE ' + PMA_urldecode(searchedData[searchedDataKey].where_clause);
|
||||
|
||||
//Post SQL query to sql.php
|
||||
$.post('sql.php', {
|
||||
@ -546,7 +546,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
|
||||
// extra Y values
|
||||
value[dataLabel], // for highlighter
|
||||
// (may set an undefined value)
|
||||
value['where_clause'], // for click on point
|
||||
value.where_clause, // for click on point
|
||||
key // key from searchedData
|
||||
]);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user