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