Skip to content

Commit

Permalink
fixed undefined var in web2py.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Sep 27, 2016
1 parent cee7c87 commit 4026357
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions applications/admin/static/js/web2py.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@
}
if (confirm_message) {
if (confirm_message == 'default') {
confirm_message = w2p_ajax_confirm_message ||
'Are you sure you want to delete this object?';
confirm_message = !web2py.isUndefined(w2p_ajax_confirm_message) ?
w2p_ajax_confirm_message : 'Are you sure you want to delete this object?';
}
if (!web2py.confirm(confirm_message)) {
web2py.stopEverything(e);
Expand Down
6 changes: 3 additions & 3 deletions applications/examples/static/js/web2py.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
var flash = $('.w2p_flash');
web2py.hide_flash();
flash.html(message).addClass(status);
if (flash.html()) flash.slideDown();
if (flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
},
hide_flash: function () {
$('.w2p_flash').fadeOut(0).html('');
Expand Down Expand Up @@ -617,8 +617,8 @@
}
if (confirm_message) {
if (confirm_message == 'default') {
confirm_message = w2p_ajax_confirm_message ||
'Are you sure you want to delete this object?';
confirm_message = !web2py.isUndefined(w2p_ajax_confirm_message) ?
w2p_ajax_confirm_message : 'Are you sure you want to delete this object?';
}
if (!web2py.confirm(confirm_message)) {
web2py.stopEverything(e);
Expand Down
10 changes: 5 additions & 5 deletions applications/welcome/static/js/web2py.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
showsTime: true,
timeFormat: '24'
});
$(this).prop('autocomplete', 'off');
$(this).attr('autocomplete', 'off');
$(this).data('w2p_datetime', 1);
$(this).trigger('click');
}
Expand All @@ -218,7 +218,7 @@
showsTime: false
});
$(this).data('w2p_date', 1);
$(this).prop('autocomplete', 'off');
$(this).attr('autocomplete', 'off');
$(this).trigger('click');
}
});
Expand All @@ -227,7 +227,7 @@
if (web2py.isUndefined(active)) {
$(this).timeEntry({
spinnerImage: ''
}).prop('autocomplete', 'off');
}).attr('autocomplete', 'off');
$(this).data('w2p_time', 1);
}
});
Expand Down Expand Up @@ -617,8 +617,8 @@
}
if (confirm_message) {
if (confirm_message == 'default') {
confirm_message = w2p_ajax_confirm_message ||
'Are you sure you want to delete this object?';
confirm_message = !web2py.isUndefined(w2p_ajax_confirm_message) ?
w2p_ajax_confirm_message : 'Are you sure you want to delete this object?';
}
if (!web2py.confirm(confirm_message)) {
web2py.stopEverything(e);
Expand Down

0 comments on commit 4026357

Please sign in to comment.