|
Lines 45-51
function Clear(id) {
Link Here
|
| 45 |
$("#"+id).val(''); |
45 |
$("#"+id).val(''); |
| 46 |
} |
46 |
} |
| 47 |
|
47 |
|
| 48 |
function Check_page1() { |
48 |
function Check_page(){ |
| 49 |
if ( $("#aqbooksellerid").val().length == 0) { |
49 |
if ( $("#aqbooksellerid").val().length == 0) { |
| 50 |
input_box = confirm( MSG_LINK_TO_VENDOR ); |
50 |
input_box = confirm( MSG_LINK_TO_VENDOR ); |
| 51 |
if (input_box==false) { |
51 |
if (input_box==false) { |
|
Lines 57-66
function Check_page1() {
Link Here
|
| 57 |
return false; |
57 |
return false; |
| 58 |
} |
58 |
} |
| 59 |
|
59 |
|
| 60 |
return true; |
|
|
| 61 |
} |
| 62 |
|
| 63 |
function Check_page2(){ |
| 64 |
if( more_than_one_serial == "" ){ |
60 |
if( more_than_one_serial == "" ){ |
| 65 |
if($("#acqui_date").val().length == 0){ |
61 |
if($("#acqui_date").val().length == 0){ |
| 66 |
alert( MSG_REQUIRED_PUB_DATE ); |
62 |
alert( MSG_REQUIRED_PUB_DATE ); |
|
Lines 260-284
function testPredictionPattern() {
Link Here
|
| 260 |
var error = 0; |
256 |
var error = 0; |
| 261 |
var error_msg = ""; |
257 |
var error_msg = ""; |
| 262 |
if(frequencyid == undefined || frequencyid == ""){ |
258 |
if(frequencyid == undefined || frequencyid == ""){ |
| 263 |
error_msg += "- " + MSG_FREQUENCY_UNDEFINED + "\n"; |
259 |
error_msg += "<li>" + MSG_FREQUENCY_UNDEFINED + "</li>"; |
| 264 |
error ++; |
260 |
error ++; |
| 265 |
} |
261 |
} |
| 266 |
acquidate = $("#acqui_date").val(); |
262 |
acquidate = $("#acqui_date").val(); |
| 267 |
if(acquidate == undefined || acquidate == ""){ |
263 |
if(acquidate == undefined || acquidate == ""){ |
| 268 |
error_msg += "-" + MSG_PUB_DATE_UNDEFINED + "\n"; |
264 |
error_msg += "<li>" + MSG_PUB_DATE_UNDEFINED + "</li>"; |
| 269 |
error ++; |
265 |
error ++; |
| 270 |
} |
266 |
} |
| 271 |
if( more_than_one_serial !== "" ){ |
267 |
if( more_than_one_serial !== "" ){ |
| 272 |
var nextacquidate = $("#nextacquidate").val(); |
268 |
var nextacquidate = $("#nextacquidate").val(); |
| 273 |
if(nextacquidate == undefined || nextacquidate == ""){ |
269 |
if(nextacquidate == undefined || nextacquidate == ""){ |
| 274 |
error_msg += "-" + MSG_NEXT_ISSUE_UNDEFINED + "\n"; |
270 |
error_msg += "<li>" + MSG_NEXT_ISSUE_UNDEFINED + "</li>"; |
| 275 |
error ++; |
271 |
error ++; |
| 276 |
} |
272 |
} |
| 277 |
} |
273 |
} |
| 278 |
|
274 |
|
| 279 |
if(error){ |
275 |
if(error){ |
| 280 |
alert( MSG_PATTERN_TEST_FAILED.format(error_msg) ); |
276 |
$("#pattern_error_box").show(); |
|
|
277 |
$("#pattern_errors").html( error_msg ); |
| 278 |
$("#displayexample").hide(); |
| 279 |
// alert( MSG_PATTERN_TEST_FAILED.format(error_msg) ); |
| 281 |
return false; |
280 |
return false; |
|
|
281 |
} else { |
| 282 |
$("#pattern_error_box").hide(); |
| 283 |
$("#pattern_errors").html(""); |
| 282 |
} |
284 |
} |
| 283 |
|
285 |
|
| 284 |
var custompattern = 0; |
286 |
var custompattern = 0; |
|
Lines 382-388
function saveAdvancedPattern() {
Link Here
|
| 382 |
function show_page_1() { |
384 |
function show_page_1() { |
| 383 |
$("#page_1").show(); |
385 |
$("#page_1").show(); |
| 384 |
$("#page_2").hide(); |
386 |
$("#page_2").hide(); |
| 385 |
$("#page_number").text("1/2"); |
|
|
| 386 |
} |
387 |
} |
| 387 |
|
388 |
|
| 388 |
function show_page_2() { |
389 |
function show_page_2() { |
|
Lines 615-625
$(document).ready(function() {
Link Here
|
| 615 |
}); |
616 |
}); |
| 616 |
} |
617 |
} |
| 617 |
|
618 |
|
| 618 |
$("#mana_search").hide(); |
619 |
//$("#mana_search").hide(); |
| 619 |
|
620 |
|
| 620 |
show_page_1(); |
621 |
//show_page_1(); |
|
|
622 |
testPredictionPattern(); |
| 621 |
$("#subscription_add_form").on("submit",function(){ |
623 |
$("#subscription_add_form").on("submit",function(){ |
| 622 |
return Check_page2(); |
624 |
return Check_page(); |
| 623 |
}); |
625 |
}); |
| 624 |
$("#vendor_search").on("click",function(e){ |
626 |
$("#vendor_search").on("click",function(e){ |
| 625 |
e.preventDefault(); |
627 |
e.preventDefault(); |
|
Lines 665-672
$(document).ready(function() {
Link Here
|
| 665 |
e.preventDefault(); |
667 |
e.preventDefault(); |
| 666 |
saveAdvancedPattern(); |
668 |
saveAdvancedPattern(); |
| 667 |
}); |
669 |
}); |
| 668 |
$("#testpatternbutton").on("click",function(e){ |
670 |
$("#frequency, #acqui_date, #nextacquidate, #numberpattern, #moreoptionst input").on("change input",function(e){ |
| 669 |
e.preventDefault(); |
671 |
console.log("trig"); |
|
|
672 |
//e.preventDefault(); |
| 673 |
numberpatternload(); |
| 670 |
testPredictionPattern(); |
674 |
testPredictionPattern(); |
| 671 |
}); |
675 |
}); |
| 672 |
$('#save-subscription').on("click", function(e){ |
676 |
$('#save-subscription').on("click", function(e){ |
| 673 |
- |
|
|