[title] add spinner about page loading
authordibs <dibs@samsung.com>
Wed, 26 Dec 2012 10:12:42 +0000 (19:12 +0900)
committerdibs <dibs@samsung.com>
Wed, 26 Dec 2012 10:12:42 +0000 (19:12 +0900)
dibs-web/app/controllers/jobs_controller.rb
dibs-web/config/database.yml
dibs-web/public/index.html
dibs-web/public/javascripts/dibs-api.js
dibs-web/public/javascripts/jobs.js
dibs-web/public/javascripts/popup-window.js

index 34bad93a132626647289e668d77804b50dc64a6e..9d1f77955ee226169a696133815f9b212afb1327 100644 (file)
@@ -106,40 +106,45 @@ class JobsController < ApplicationController
 
                #generate to XML
                doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 )
-               doc.JobList {
-                       jobs.each {|job_list|
-                               job = get_job_info(job_list.id)
-
-                               doc.Job {
-                                       doc.Id(job.job_id)
-                                       doc.Distribution(job.distribution_name)
-                                       doc.ProjectName(job.project_name)
-                                       doc.JobType(job.job_type)
-                                       doc.JobAttribute(job_list.job_attribute)
-                                       doc.Os(job.supported_os_name)
-                                       doc.Status(job.status)
-                                       doc.UserName(job.user_name)
-                                       doc.StartTime(job.start_time)
-                                       doc.EndTime(job.end_time)
-                               }
+               doc.Response {
+                       generate_xml_header(doc)
+                       doc.Data {
+                               doc.JobList {
+                                       jobs.each {|job_list|
+                                               job = get_job_info(job_list.id)
 
-                               if job_list.job_attribute == "MULTI"
-                                       child_jobs = get_child_job_info(job.job_id)
-                                       child_jobs.each {|job|
                                                doc.Job {
                                                        doc.Id(job.job_id)
                                                        doc.Distribution(job.distribution_name)
                                                        doc.ProjectName(job.project_name)
                                                        doc.JobType(job.job_type)
-                                                       doc.JobAttribute("CHILD")
+                                                       doc.JobAttribute(job_list.job_attribute)
                                                        doc.Os(job.supported_os_name)
                                                        doc.Status(job.status)
                                                        doc.UserName(job.user_name)
                                                        doc.StartTime(job.start_time)
                                                        doc.EndTime(job.end_time)
                                                }
+
+                                               if job_list.job_attribute == "MULTI"
+                                                       child_jobs = get_child_job_info(job.job_id)
+                                                       child_jobs.each {|job|
+                                                               doc.Job {
+                                                                       doc.Id(job.job_id)
+                                                                       doc.Distribution(job.distribution_name)
+                                                                       doc.ProjectName(job.project_name)
+                                                                       doc.JobType(job.job_type)
+                                                                       doc.JobAttribute("CHILD")
+                                                                       doc.Os(job.supported_os_name)
+                                                                       doc.Status(job.status)
+                                                                       doc.UserName(job.user_name)
+                                                                       doc.StartTime(job.start_time)
+                                                                       doc.EndTime(job.end_time)
+                                                               }
+                                                       }
+                                               end
                                        }
-                               end
+                               }
                        }
                }
        
@@ -197,40 +202,45 @@ class JobsController < ApplicationController
 
                #generate to XML
                doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 )
-               doc.JobList {
-                       jobs.each {|job_list|
-                               job = get_job_info(job_list.id)
-
-                               doc.Job {
-                                       doc.Id(job.job_id)
-                                       doc.Distribution(job.distribution_name)
-                                       doc.ProjectName(job.project_name)
-                                       doc.JobType(job.job_type)
-                                       doc.JobAttribute(job_list.job_attribute)
-                                       doc.Os(job.supported_os_name)
-                                       doc.Status(job.status)
-                                       doc.UserName(job.user_name)
-                                       doc.StartTime(job.start_time)
-                                       doc.EndTime(job.end_time)
-                               }
+               doc.Response {
+                       generate_xml_header(doc)
+                       doc.Data {
+                               doc.JobList {
+                                       jobs.each {|job_list|
+                                               job = get_job_info(job_list.id)
 
-                               if job_list.job_attribute == "MULTI"
-                                       child_jobs = get_child_job_info(job.job_id)
-                                       child_jobs.each {|job|
                                                doc.Job {
                                                        doc.Id(job.job_id)
                                                        doc.Distribution(job.distribution_name)
                                                        doc.ProjectName(job.project_name)
                                                        doc.JobType(job.job_type)
-                                                       doc.JobAttribute("CHILD")
+                                                       doc.JobAttribute(job_list.job_attribute)
                                                        doc.Os(job.supported_os_name)
                                                        doc.Status(job.status)
                                                        doc.UserName(job.user_name)
                                                        doc.StartTime(job.start_time)
                                                        doc.EndTime(job.end_time)
                                                }
+
+                                               if job_list.job_attribute == "MULTI"
+                                                       child_jobs = get_child_job_info(job.job_id)
+                                                       child_jobs.each {|job|
+                                                               doc.Job {
+                                                                       doc.Id(job.job_id)
+                                                                       doc.Distribution(job.distribution_name)
+                                                                       doc.ProjectName(job.project_name)
+                                                                       doc.JobType(job.job_type)
+                                                                       doc.JobAttribute("CHILD")
+                                                                       doc.Os(job.supported_os_name)
+                                                                       doc.Status(job.status)
+                                                                       doc.UserName(job.user_name)
+                                                                       doc.StartTime(job.start_time)
+                                                                       doc.EndTime(job.end_time)
+                                                               }
+                                                       }
+                                               end
                                        }
-                               end
+                               }
                        }
                }
        
@@ -293,21 +303,26 @@ class JobsController < ApplicationController
 
                #generate to XML
                doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 )
-               doc.JobList {
-                       jobs.each {|job_list|
-                               job = get_job_info(job_list.id)
-
-                               doc.Job {
-                                       doc.Id(job.job_id)
-                                       doc.Distribution(job.distribution_name)
-                                       doc.ProjectName(job.project_name)
-                                       doc.JobType(job.job_type)
-                                       doc.JobAttribute(job_list.job_attribute)
-                                       doc.Os(job.supported_os_name)
-                                       doc.Status(job.status)
-                                       doc.UserName(job.user_name)
-                                       doc.StartTime(job.start_time)
-                                       doc.EndTime(job.end_time)
+               doc.Response {
+                       generate_xml_header(doc)
+                       doc.Data {
+                               doc.JobList {
+                                       jobs.each {|job_list|
+                                               job = get_job_info(job_list.id)
+
+                                               doc.Job {
+                                                       doc.Id(job.job_id)
+                                                       doc.Distribution(job.distribution_name)
+                                                       doc.ProjectName(job.project_name)
+                                                       doc.JobType(job.job_type)
+                                                       doc.JobAttribute(job_list.job_attribute)
+                                                       doc.Os(job.supported_os_name)
+                                                       doc.Status(job.status)
+                                                       doc.UserName(job.user_name)
+                                                       doc.StartTime(job.start_time)
+                                                       doc.EndTime(job.end_time)
+                                               }
+                                       }
                                }
                        }
                }
index 319f61e84847ed42ae00139258f228da9a31cc75..a9445ecec356d1054c1ff6cec96509f8f2286c66 100644 (file)
@@ -43,4 +43,4 @@
    username: 
    password: 
    pool: 
-   timeout: 
+   timeout:
index f099a2fecced840181456421d19cf5c09e189b8d..966cefbc3594053bb2391cb1e618160ceb09855f 100644 (file)
@@ -26,15 +26,15 @@ Contributors:
 - S-Core Co., Ltd
 -->
 
-<!DOCTYPE html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
+       <title>DIBS 2.0</title>
+       
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta name="description" content="A master-detail template generated by Tizen Web IDE"/>
 
-       <title>DIBS 2.0</title>
-       
        <link rel="stylesheet" href="stylesheets/jquery.mobile-1.1.0.css"/>
        <link rel="stylesheet" href="stylesheets/jqm-docs.css"/>
        <link rel="stylesheet" href="stylesheets/style.css"/>
index 5d77209e66e4f5faaa96a8f50def79c712436310..4bf515ffbf21ba62b5d5780c6e0bae63de41e428 100644 (file)
@@ -83,6 +83,11 @@ function queryProjectsInfoInDistribution(distName, successFunction) {
        getInfoFromServer(url, successFunction);
 }
 
+// controller : jobs
+function queryJobsList(url, successFunction) {
+       getInfoFromServer(url, successFunction);
+}
+
 // controller : admin_group
 function queryAllGroup(successFunction) {
        var url = 'admin_group/queryAllGroup';
@@ -265,6 +270,8 @@ function getInfoFromServer(url, successFunction) {
                type: 'GET',
                dataType: 'xml',
                timeout: 10000,
+               beforeSend: function() { $.mobile.showPageLoadingMsg(); }, //Show spinner
+               complete: function() { $.mobile.hidePageLoadingMsg() }, //Hide spinner
                success: function(xml) {
                        setSessionInfo(xml);
                        successFunction(xml);
@@ -283,6 +290,8 @@ function postForServer(url, changeInfoList, successFunction) {
                dataType: 'json',
                contentType: "application/json; charset=utf-8",
                timeout: 10000,
+               beforeSend: function() { $.mobile.showPageLoadingMsg(); }, //Show spinner
+               complete: function() { $.mobile.hidePageLoadingMsg() }, //Hide spinner
                success: function(xml) {
                        successFunction(xml);
                },
@@ -300,6 +309,8 @@ function deleteForServer(url, successFunction) {
                cache: false,
                dataType: 'xml',
                timeout: 1000,
+               beforeSend: function() { $.mobile.showPageLoadingMsg(); }, //Show spinner
+               complete: function() { $.mobile.hidePageLoadingMsg() }, //Hide spinner
                success: function(xml) {
                        expireSession();
                        dibsWebClear();
index b348ae9fdecf847207b112594f7967b72e8dbda4..02a4a2b55d3e45fd2a1f1294fca0ebb0b72fd1b4 100644 (file)
@@ -237,38 +237,38 @@ function clearJobList() {
 function queryJobListAll(distribution) {
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/list", distribution, selectedStatus, "LATEST");
+       queryJobList("jobs/list", distribution, selectedStatus, "LATEST");
 }
 
 function queryJobListJobId(distribution, jobId) {
        var distribution = $("#jobSelectDistribution option:selected").val(); 
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/list", distribution, selectedStatus, eval(parseInt(jobId) + 1));
+       queryJobList("jobs/list", distribution, selectedStatus, eval(parseInt(jobId) + 1));
 }
 function queryJobListUserName(distribution, name) {
        var distribution = $("#jobSelectDistribution option:selected").val(); 
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/listSearchUser/"+name, distribution, selectedStatus, "LATEST");
+       queryJobList("jobs/listSearchUser/"+name, distribution, selectedStatus, "LATEST");
 }
 
 function queryJobListUserGroup(distribution, group) {
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/listSearchGroup/"+group, distribution, selectedStatus, "LATEST");
+       queryJobList("jobs/listSearchGroup/"+group, distribution, selectedStatus, "LATEST");
 }
 
 function queryJobListProject(distribution, project) {
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/listSearchProject/"+project, distribution, selectedStatus, "LATEST");
+       queryJobList("jobs/listSearchProject/"+project, distribution, selectedStatus, "LATEST");
 }
 
 function queryJobListDate(distribution, date) {
        var selectedStatus= $('#jobStatusSelect').find("input[type='radio']:checked").val();
        clearJobList();
-       queryJobList(baseUrl+"jobs/listSearchDate/"+date, distribution, selectedStatus, "LATEST");
+       queryJobList("jobs/listSearchDate/"+date, distribution, selectedStatus, "LATEST");
 }
 
 function jobQueryDistribution() {
@@ -296,123 +296,112 @@ function jobQueryDistribution() {
 }
 
 function queryJobList(requestUrl, distribution, selectedStatus, jobId) {
-               var url = requestUrl+"/"+ distribution +"/"+ selectedStatus+"/"+jobId;
-console.log(url);
-//console.log(escape(url));
-//console.log(encodeURI(url));
-//console.log(encodeURIComponent(url));
-//console.log(jobId);
-       $.ajax({
-               url: url,
-               type: 'GET',
-               dataType: 'xml',
-               crossDomain: true,
-               timeout: 10000,
-               error: function(jqXHR) {
-                       errorProcess(jqXHR);
-               },
-               success: function(xml) {
-                       var lastJobId = 0;
-                       $(xml).find("JobList").find("Job").each(function(){
-                               var id = $(this).find("Id").text();
-                               var distribution = $(this).find("Distribution").text();
-                               var projectName = $(this).find("ProjectName").text();
-                               var jobType = $(this).find("JobType").text();
-                               var jobAttribute = $(this).find("JobAttribute").text();
-                               var os = $(this).find("Os").text();
-                               var jobStatus = $(this).find("Status").text();
-                               var userName = $(this).find("UserName").text();
-                               var startTime = $(this).find("StartTime").text();
-                               var endTime = $(this).find("EndTime").text();
-                               var li = "";
-       
-                               if(jobAttribute == "SINGLE")
-                               {
-                                       li = '<li data-role="list-divider">'
-                                               + id+ ' ' +projectName+ '</li>'
-                                               + '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
-                                               + '<h3>' +projectName+ '</h3>'
-                                               + '<p>ID : <strong>' +id+ '</strong></p>'
-                                               + '<p>TYPE : <strong>' +jobType+ '</strong></p>'
-                                               + '<p>OS : <strong>' + os + '</strong></p>'
-                                               + '<p>USER : <strong>' +userName+ '</strong></p>'
-                                               + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
-                                               if(jobStatus == "ERROR" || jobStatus == "CANCELED") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "JUST_CREATED" || jobStatus == "WAITING" 
-                                                               || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING"
-                                                               || jobStatus == "PENDING") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "FINISHED") {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               } else {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               }
-
-                                               li = li + '</a></li>';
-                               }
-                               else if(jobAttribute == "MULTI")
-                               {
-                                       li = '<li data-role="list-divider">' +id+ ' ' +jobType+ '</li>'
-                                               + '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
-                                               + '<p>USER : <strong>' +userName+ '</strong></p>'
-                                               + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
-                                               if(jobStatus.toUpperCase() == "ERROR" || jobStatus.toUpperCase() == "CANCELED") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "JUST_CREATED" || jobStatus == "WAITING" 
-                                                               || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING"
-                                                               || jobStatus == "PENDING") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "FINISHED") {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               } else {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               }
-
-                                               li = li + '</a></li>';
-                               }
-                               else if(jobAttribute == "CHILD")
-                               {
-                                       li = '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
-                                               + '<h3>' +projectName+ '</h3>'
-                                               + '<p>ID : <strong>' +id+ '</strong></p>'
-                                               + '<p>TYPE : <strong>' +jobType+ '</strong></p>'
-                                               + '<p>OS : <strong>' +os+ '</strong></p>'
-                                               + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
-                                               if(jobStatus.toUpperCase() == "ERROR" || jobStatus.toUpperCase() == "CANCELED") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "JUST_CREATED" || jobStatus == "WAITING" 
-                                                               || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING"
-                                                               || jobStatus == "PENDING") {
-                                                li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
-                                               } else if(jobStatus == "FINISHED") {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               } else {
-                                                li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
-                                               }
-
-                                               li = li + '</a></li>';
-                               }
-
-                               lastJobId = id;
-                               $("#jobList").append(li).listview('refresh');
-                       });
-       
-                       console.log(lastJobId);
-                       if(lastJobId > 0)
+       var url = requestUrl+"/"+ distribution +"/"+ selectedStatus+"/"+jobId;
+       console.log(url);
+       queryJobsList(url, function(xml) {
+               var lastJobId = 0;
+               $(xml).find("JobList").find("Job").each(function(){
+                       var id = $(this).find("Id").text();
+                       var distribution = $(this).find("Distribution").text();
+                       var projectName = $(this).find("ProjectName").text();
+                       var jobType = $(this).find("JobType").text();
+                       var jobAttribute = $(this).find("JobAttribute").text();
+                       var os = $(this).find("Os").text();
+                       var jobStatus = $(this).find("Status").text();
+                       var userName = $(this).find("UserName").text();
+                       var startTime = $(this).find("StartTime").text();
+                       var endTime = $(this).find("EndTime").text();
+                       var li = "";
+
+                       if(jobAttribute == "SINGLE")
+                       {
+                               li = '<li data-role="list-divider">'
+                                       + id+ ' ' +projectName+ '</li>'
+                                       + '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
+                                       + '<h3>' +projectName+ '</h3>'
+                                       + '<p>ID : <strong>' +id+ '</strong></p>'
+                                       + '<p>TYPE : <strong>' +jobType+ '</strong></p>'
+                                       + '<p>OS : <strong>' + os + '</strong></p>'
+                                       + '<p>USER : <strong>' +userName+ '</strong></p>'
+                                       + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
+                                       if(jobStatus == "ERROR" || jobStatus == "CANCELED") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "JUST_CREATED" || jobStatus == "PENDING"
+                                                       || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "WAITING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="green">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "FINISHED") {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       } else {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       }
+
+                                       li = li + '</a></li>';
+                       }
+                       else if(jobAttribute == "MULTI")
                        {
-                               var moreJobListUrl = 'queryJobList("'+requestUrl+'", "'+distribution+'", "'+selectedStatus+'", "'+lastJobId+'")';
-                               $('#moreJobList').attr("onClick", moreJobListUrl);
-                               $('#moreJobList').removeClass('ui-disabled');
+                               li = '<li data-role="list-divider">' +id+ ' ' +jobType+ '</li>'
+                                       + '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
+                                       + '<p>USER : <strong>' +userName+ '</strong></p>'
+                                       + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
+                                       if(jobStatus.toUpperCase() == "ERROR" || jobStatus.toUpperCase() == "CANCELED") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "JUST_CREATED" || jobStatus == "PENDING"
+                                                       || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "WAITING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="green">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "FINISHED") {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       } else {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       }
+
+                                       li = li + '</a></li>';
                        }
-                       else
+                       else if(jobAttribute == "CHILD")
                        {
-                               $('#moreJobList').addClass('ui-disabled');
+                               li = '<li><a href=log.html?jobid='+id+' class="logWindow" data-ajax="false">'
+                                       + '<h3>' +projectName+ '</h3>'
+                                       + '<p>ID : <strong>' +id+ '</strong></p>'
+                                       + '<p>TYPE : <strong>' +jobType+ '</strong></p>'
+                                       + '<p>OS : <strong>' +os+ '</strong></p>'
+                                       + '<p>TIME: <strong>' +startTime+ ' ~ '+endTime+ '</strong></p>';
+                                       if(jobStatus.toUpperCase() == "ERROR" || jobStatus.toUpperCase() == "CANCELED") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="red">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "JUST_CREATED" || jobStatus == "PENDING"
+                                                       || jobStatus == "WORKING" || jobStatus == "REMOTE_WORKING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="blue">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "WAITING") {
+                                        li = li + '<p class="ui-li-aside"><strong><font color="green">' +jobStatus+ '</strong></p>'
+                                       } else if(jobStatus == "FINISHED") {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       } else {
+                                        li = li + '<p class="ui-li-aside"><strong>' +jobStatus+ '</strong></p>'
+                                       }
+
+                                       li = li + '</a></li>';
                        }
-                       $('#moreJobList').button('refresh');
-                       applyStyleLogWindow();
+
+                       lastJobId = id;
+                       $("#jobList").append(li).listview('refresh');
+               });
+
+               console.log(lastJobId);
+               if(lastJobId > 0)
+               {
+                       var moreJobListUrl = 'queryJobList("'+requestUrl+'", "'+distribution+'", "'+selectedStatus+'", "'+lastJobId+'")';
+                       $('#moreJobList').attr("onClick", moreJobListUrl);
+                       $('#moreJobList').removeClass('ui-disabled');
                }
-       });
+               else
+               {
+                       $('#moreJobList').addClass('ui-disabled');
+               }
+               $('#moreJobList').button('refresh');
+               applyStyleLogWindow();
+       }, errorProcess); 
 }
 
 function clearSuggestJobSearchList() {
index 10e0081b46f251513b58e29601e8b37bfc8bd4a3..fd5d493c567960ee1f71e9a9bf815a1760b05b89 100644 (file)
@@ -38,7 +38,7 @@ Contributors:
                        centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left
                        height:500, // sets the height in pixels of the window.
                        left:0, // left position when the window appears.
-                       location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
+                       location:1, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
                        menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
                        resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
                        scrollbars:1, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.