Skip to content

Commit

Permalink
Merge pull request phpmyadmin#316 from xmujay/20130505_js
Browse files Browse the repository at this point in the history
fix some JSLint error: using dot notation
  • Loading branch information
nijel committed May 5, 2013
2 parents d8a8281 + 9eb23b5 commit 0ce42cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions js/makegrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions js/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down
12 changes: 6 additions & 6 deletions js/server_privileges.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions js/tbl_zoom_plot_jqplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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
]);
});
Expand Down

0 comments on commit 0ce42cb

Please sign in to comment.