Skip the pull request import step with no opened requests.

When the list of pull requests displayed in the import
table is empty or no rows are checked for import.

Change-Id: I3da70e6855c871c48f4b34c39a69faf1c37a202b
diff --git a/github-plugin/src/main/resources/static/js/pullrequests.js b/github-plugin/src/main/resources/static/js/pullrequests.js
index 449a48b..1fdee28 100644
--- a/github-plugin/src/main/resources/static/js/pullrequests.js
+++ b/github-plugin/src/main/resources/static/js/pullrequests.js
@@ -42,7 +42,7 @@
 	$("#submit").click(function() {
 		var destination;
 
-		if(completed || $("tr").length <= 0) {
+		if(completed || $("input#checkall:checked").length <= 1) {
 			$('#pullrequests').submit();
 			return true;
 		} else {
@@ -182,6 +182,10 @@
 			}
 		}
 		
+		if(idx == 0) {
+			$("#submit").html("<span class=\"button green\"><span>Next &gt;</span></span>")
+		}
+
 		if(repository == undefined) {
 			var repoSort = function sortAlpha(a,b){  
 				var cmpA = ($(a).find("p") == undefined ? "0":$(a).find("p").text()) + $(a).find("a").text();