[Title] dibs web sever : page move -> remain distribution select
authordibs <dibs@samsung.com>
Wed, 12 Dec 2012 14:12:30 +0000 (23:12 +0900)
committerdibs <dibs@samsung.com>
Wed, 12 Dec 2012 14:12:30 +0000 (23:12 +0900)
dibs-web/public/index.html
dibs-web/public/javascripts/build.js
dibs-web/public/javascripts/jobs.js
dibs-web/public/javascripts/projects.js

index ab1eddd3ecf5a3966ea473be302cedbb371f95fa..8b72caded445c1cfef504e238e7d5f1f082daf5d 100644 (file)
                <div data-role="content" >
                        <div class="content-primary">
                                <div id="jobDivDistribution" data-role="fieldcontain" style="text-align: center; font-size: 14px;">
-                                       <select id="jobSelectDistribution" date-mini="true" data-native-menu="false" onchange="jobsQuerySelected()">
+                                       <select id="jobSelectDistribution" date-mini="true" data-native-menu="false" onchange="jobsSearchSelected()">
                                        </select>
                                </div>
                                <br/>
                                <div class="ui-grid-a">
-                               <div id="jobSearchSelect" class="ui-block-a">
-                                       <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
-                                               <form>
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-1" class="jobSearch" value="ALL" checked="checked" />
-                                                       <label for="search-radio-choice-1">ALL</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-2" class="jobSearch" value="JOBID"  />
-                                                       <label for="search-radio-choice-2">JOB ID</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-3" class="jobSearch" value="USER"  />
-                                                       <label for="search-radio-choice-3">USER</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-4" class="jobSearch" value="GROUP"  />
-                                                       <label for="search-radio-choice-4">GROUP</label>
+                                       <div id="jobSearchSelect" class="ui-block-a">
+                                               <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
+                                                       <form>
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-1" class="jobSearch" value="ALL" checked="checked" />
+                                                               <label for="search-radio-choice-1">ALL</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-2" class="jobSearch" value="JOBID"  />
+                                                               <label for="search-radio-choice-2">JOB ID</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-3" class="jobSearch" value="USER"  />
+                                                               <label for="search-radio-choice-3">USER</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-4" class="jobSearch" value="GROUP"  />
+                                                               <label for="search-radio-choice-4">GROUP</label>
+               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-5" class="jobSearch" value="PROJECT"  />
+                                                               <label for="search-radio-choice-5">PROJECT</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="radio-choice-6" class="jobSearch" value="DATE"  />
+                                                               <label for="radio-choice-6">DATE</label>
+                                                       </form>
+                                               </fieldset>
+                                       </div>
+                                       <div id="jobStatusSelect" class="ui-block-b" style="text-align:right">
+                                               <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
+                                                       <form>
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-1" class="jobSearch" value="ALL" checked="checked" />
+                                                               <label for="search-radio-choice-1">ALL</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-2" class="jobSearch" value="SUCCESS"  />
+                                                               <label for="search-radio-choice-2">SUCCESS</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-3" class="jobSearch" value="WORKING"  />
+                                                               <label for="search-radio-choice-3">WORKING</label>
+                                                               
+                                                               <input type="radio" name="radio-choice" id="search-radio-choice-4" class="jobSearch" value="ERROR"  />
+                                                               <label for="search-radio-choice-4">ERROR</label>
+                                                       </form>
        
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-5" class="jobSearch" value="PROJECT"  />
-                                                       <label for="search-radio-choice-5">PROJECT</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="radio-choice-6" class="jobSearch" value="DATE"  />
-                                                       <label for="radio-choice-6">DATE</label>
-                                               </form>
-                                       </fieldset>
-                               </div>
-                               <div id="jobStatusSelect" class="ui-block-b" style="text-align:right">
-                                       <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
-                                               <form>
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-1" class="jobSearch" value="ALL" checked="checked" />
-                                                       <label for="search-radio-choice-1">ALL</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-2" class="jobSearch" value="SUCCESS"  />
-                                                       <label for="search-radio-choice-2">SUCCESS</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-3" class="jobSearch" value="WORKING"  />
-                                                       <label for="search-radio-choice-3">WORKING</label>
-                                                       
-                                                       <input type="radio" name="radio-choice" id="search-radio-choice-4" class="jobSearch" value="ERROR"  />
-                                                       <label for="search-radio-choice-4">ERROR</label>
-                                               </form>
-
-                                       </fieldset>
-                               </div>
+                                               </fieldset>
+                                       </div>
                                </div>
 
                                <div id="jobDivSearchInput" >
index 1b9d247abed8add953ec34a0cc97b66f7fb67670..ab67195af4c412724494e64af6337c78fe02495b 100644 (file)
@@ -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("<option value=\'"+name+"\'>"+name+"</option>");
+       if( $("#select-distribution").children().length == 0 ) {
+               queryDistribution( function(xml) {
+                       $(xml).find("Data").find("DistributionName").each(function(){
+                               var name = $(this).text();
+               
+                               $("#select-distribution").append("<option value=\'"+name+"\'>"+name+"</option>");
+                       });
+               
+                       /* 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() {
index 3e675184e7d895e00d047fe564c570cd33ae7410..eb0dda59d6a260bd99ecec50cd06b8dd47e646e7 100644 (file)
@@ -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("<option value='ALL'>ALL</option>");
-       
-               $(xml).find("Data").find("DistributionName").each(function(){
-                       var name = $(this).text();
-       
-                       $("#jobSelectDistribution").append("<option value=\'"+name+"\'>"+name+"</option>");
+       if( $("#jobSelectDistribution").children().length == 0 ) {
+               queryDistribution( function(xml) {
+                       // remove old select options
+                       $("#jobSelectDistribution").empty();
+                       $("#jobSelectDistribution").append("<option value='ALL'>ALL</option>");
+               
+                       $(xml).find("Data").find("DistributionName").each(function(){
+                               var name = $(this).text();
+               
+                               $("#jobSelectDistribution").append("<option value=\'"+name+"\'>"+name+"</option>");
+                       });
+               
+                       /* 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) {
index 03542d61e60a115e0dc769ccb5140f6910de300d..81be46942b5babd7afbec63686a7408e879bcc3e 100644 (file)
@@ -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("<option value=\'"+name+"\'>"+name+"</option>");
+       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("<option value=\'"+name+"\'>"+name+"</option>");
+                       });
+               
+                       /* 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) {