fixed BUG-14 (add/sel buttons not being disabled again when no selections)
This commit is contained in:
1
BUGs
1
BUGs
@@ -1,5 +1,4 @@
|
||||
#### BUGS (next-15)
|
||||
BUG-14: Add/Rem Sel buttons don't disable again if all selections are NULL
|
||||
|
||||
### DB/back-end
|
||||
BUG-2: series does not deal with calcd_rating...
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<script>
|
||||
function ActivateBFLRemSelButton()
|
||||
{
|
||||
$('#bfl-remsel-btn').removeClass('disabled')
|
||||
$('#bfl-remsel-btn').attr('disabled',false)
|
||||
if( $("#book_table input:checkbox:checked").length > 0 )
|
||||
{
|
||||
$('#bfl-remsel-btn').removeClass('disabled')
|
||||
$('#bfl-remsel-btn').attr('disabled',false)
|
||||
}
|
||||
else
|
||||
DeactivateBFLRemSelButton()
|
||||
}
|
||||
|
||||
function DeactivateBFLRemSelButton()
|
||||
@@ -52,14 +57,25 @@
|
||||
|
||||
function ActivateBFLAddSelButton()
|
||||
{
|
||||
$('#bfl-addsel-btn').removeClass('disabled')
|
||||
$('#bfl-addsel-btn').attr('disabled',false)
|
||||
if( $("#addsel_table input:checkbox:checked").length > 0 )
|
||||
{
|
||||
$('#bfl-addsel-btn').removeClass('disabled')
|
||||
$('#bfl-addsel-btn').attr('disabled',false)
|
||||
}
|
||||
else
|
||||
DeactivateBFLAddSelButton()
|
||||
|
||||
}
|
||||
|
||||
function DeactivateBFLAddSelButton()
|
||||
{
|
||||
$('#bfl-addsel-btn').addClass('disabled')
|
||||
$('#bfl-addsel-btn').attr('disabled',true)
|
||||
}
|
||||
|
||||
function RemoveBFLAddSelButton()
|
||||
{
|
||||
DeactivateBFLAddSelButton()
|
||||
$('#bfl-addsel-btn').attr('style','display:none')
|
||||
}
|
||||
|
||||
@@ -67,7 +83,7 @@
|
||||
{
|
||||
var params=$("#addsel_table :input").serializeArray()
|
||||
$.post( "/add_books_to_loan/" + {{loan_id}}, params, function(data) {
|
||||
DeactivateBFLAddSelButton()
|
||||
RemoveBFLAddSelButton()
|
||||
DeactivateBFLRemSelButton()
|
||||
$('#bfl-search-term').val('')
|
||||
$('#bfl-new').html('')
|
||||
|
||||
Reference in New Issue
Block a user