<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" >
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() {
});
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();
}
}
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) {
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) {