From c8b3eb2cac6a9c955b156d5839888ea9a03de374 Mon Sep 17 00:00:00 2001 From: dibs Date: Wed, 12 Dec 2012 23:12:30 +0900 Subject: [PATCH] [Title] dibs web sever : page move -> remain distribution select --- dibs-web/public/index.html | 82 ++++++++++++------------- dibs-web/public/javascripts/build.js | 40 +++++++----- dibs-web/public/javascripts/jobs.js | 40 ++++++------ dibs-web/public/javascripts/projects.js | 34 +++++----- 4 files changed, 105 insertions(+), 91 deletions(-) diff --git a/dibs-web/public/index.html b/dibs-web/public/index.html index ab1eddd..8b72cad 100644 --- a/dibs-web/public/index.html +++ b/dibs-web/public/index.html @@ -234,52 +234,52 @@
-

-
-
-
- - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + +
- - - - - - -
-
-
-
-
- - - - - - - - - - - -
- -
-
+
+
diff --git a/dibs-web/public/javascripts/build.js b/dibs-web/public/javascripts/build.js index 1b9d247..ab67195 100644 --- a/dibs-web/public/javascripts/build.js +++ b/dibs-web/public/javascripts/build.js @@ -1,27 +1,35 @@ function buildInit() { - queryDistribution( function(xml) { - // remove old select options - $("#select-distribution").empty(); - - $(xml).find("Data").find("DistributionName").each(function(){ - var name = $(this).text(); - - $("#select-distribution").append(""); + if( $("#select-distribution").children().length == 0 ) { + queryDistribution( function(xml) { + $(xml).find("Data").find("DistributionName").each(function(){ + var name = $(this).text(); + + $("#select-distribution").append(""); + }); + + /* default distribution selection */ + $("#select-distribution option:eq(0)").attr("selected", "selected"); + $("#select-distribution").selectmenu('refresh'); + + // query Project list + buildQueryProjectList(); + + // query Running project list + //buildQueryRunningProjectList(); + + // add batch file selector event + //buildBatchFilePathSelector(); }); - - /* default distribution selection */ - $("#select-distribution option:eq(0)").attr("selected", "selected"); - $("#select-distribution").selectmenu('refresh'); - + } else { // query Project list buildQueryProjectList(); - + // query Running project list //buildQueryRunningProjectList(); - + // add batch file selector event //buildBatchFilePathSelector(); - }); + } } function buildQueryProjectList() { diff --git a/dibs-web/public/javascripts/jobs.js b/dibs-web/public/javascripts/jobs.js index 3e67518..eb0dda5 100644 --- a/dibs-web/public/javascripts/jobs.js +++ b/dibs-web/public/javascripts/jobs.js @@ -35,10 +35,6 @@ $(function() { }); function jobsInit() { - $('#jobSearchSelect input[type="radio"]').attr("checked",false).checkboxradio("refresh"); - $('#jobSearchSelect input[type="radio"]:first').attr("checked",true).checkboxradio("refresh"); - $('#jobStatusSelect input[type="radio"]').attr("checked",false).checkboxradio("refresh"); - $('#jobStatusSelect input[type="radio"]:first').attr("checked",true).checkboxradio("refresh"); jobQueryDistribution(); } @@ -244,23 +240,27 @@ function queryJobListDate(distribution, date) { } function jobQueryDistribution() { - queryDistribution( function(xml) { - // remove old select options - $("#jobSelectDistribution").empty(); - $("#jobSelectDistribution").append(""); - - $(xml).find("Data").find("DistributionName").each(function(){ - var name = $(this).text(); - - $("#jobSelectDistribution").append(""); + if( $("#jobSelectDistribution").children().length == 0 ) { + queryDistribution( function(xml) { + // remove old select options + $("#jobSelectDistribution").empty(); + $("#jobSelectDistribution").append(""); + + $(xml).find("Data").find("DistributionName").each(function(){ + var name = $(this).text(); + + $("#jobSelectDistribution").append(""); + }); + + /* default distribution selection */ + $("#jobSelectDistribution option:eq(0)").attr("selected", "selected"); + $("#jobSelectDistribution").selectmenu('refresh'); + + selectJobAll(); }); - - /* default distribution selection */ - $("#jobSelectDistribution option:eq(0)").attr("selected", "selected"); - $("#jobSelectDistribution").selectmenu('refresh'); - - selectJobAll(); - }, errorProcess); + } else { + jobsSearchSelected(); + } } function queryJobList(requestUrl, distribution, selectedStatus, jobId) { diff --git a/dibs-web/public/javascripts/projects.js b/dibs-web/public/javascripts/projects.js index 03542d6..81be469 100644 --- a/dibs-web/public/javascripts/projects.js +++ b/dibs-web/public/javascripts/projects.js @@ -1,22 +1,28 @@ function projectsInit() { - queryDistribution( function(xml) { - // remove old select options - $("#projects-select-distribution").empty(); - - $(xml).find("Data").find("DistributionName").each(function(){ - var name = $(this).text(); - - $("#projects-select-distribution").append(""); + if( $("#projects-select-distribution").children().length == 0 ) { + queryDistribution( function(xml) { + // remove old select options + $("#projects-select-distribution").empty(); + + $(xml).find("Data").find("DistributionName").each(function(){ + var name = $(this).text(); + + $("#projects-select-distribution").append(""); + }); + + /* default distribution selection */ + $("#projects-select-distribution option:eq(0)").attr("selected", "selected"); + $("#projects-select-distribution").selectmenu('refresh'); + + projectsQueryProjectListType("MY"); + $('#projectsSearchSelect input[type="radio"]').attr("checked",false).checkboxradio("refresh"); + $('#projectsSearchSelect input[type="radio"]:first').attr("checked",true).checkboxradio("refresh"); }); - - /* default distribution selection */ - $("#projects-select-distribution option:eq(0)").attr("selected", "selected"); - $("#projects-select-distribution").selectmenu('refresh'); - + } else { projectsQueryProjectListType("MY"); $('#projectsSearchSelect input[type="radio"]').attr("checked",false).checkboxradio("refresh"); $('#projectsSearchSelect input[type="radio"]:first').attr("checked",true).checkboxradio("refresh"); - }); + } } function projectsQueryProjectListType(queryType) { -- 2.34.1