Project

General

Profile

« Previous | Next » 

Revision 5187

Added by daigle almost 15 years ago

change dropdown select event to work on IE.

View differences:

lib/style/skins/sanparks/searchWorkflowRun.jsp
36 36
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/footer2.css"/>
37 37
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_SKINS_URL%>/sanparks/sanparks.js"></script>
38 38
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/style/skins/sanparks/searchWorkflowPathQuery.js"></script>
39
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/branding.js">
39
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
40 40
		<script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/widgets/form-fields-widget.js"></script>
41 41
		<script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js"></script>
42 42
		<script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/ajax-utils.js"></script>
......
73 73
     									<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_ne.jpg" /></td>
74 74
     								</tr>
75 75
     								<tr>
76
     									<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_w.jpg" /></td>
76
     									<td class="search-box-w"><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_w.jpg" /></td>
77 77
     									<td>
78 78
  
79 79
							        		<form name="tpcSearch" id="tpcSearch">
......
92 92
%>		
93 93
												<div class="form-base-row" id="form-base-row">
94 94
													<div class="field-label dropdown-field-label" id='field-selector-section' >Add search term</div>
95
													<select class="dropdown-input" name="dd-field-selector" id="dd-field-selector">
96
														<option value="name" onclick="addSearchDropdownBefore('tpcSearch','Name','name','co|eq|sw|ew','form-base-row')">Name</option>
97
														<option value="keyword" onclick="addSearchDropdownBefore('tpcSearch','Keyword','keyword','co|eq|sw|ew','form-base-row')">Keyword</option>
98
														<option values="creator" onclick="addSearchDropdownBefore('tpcSearch','Creator','creator','co|eq|sw|ew','form-base-row')">Creator</option>
99
														<option values="description" onclick="addSearchDropdownBefore('tpcSearch','Description','description','co|eq|sw|ew','form-base-row')">Description</option>
100
														<option values="date-executed" onclick="addSearchDropdownBefore('tpcSearch','Date Executed','date-executed','be|af','form-base-row')">Date Executed</option>
101
														<option values="workflow-run-id" onclick="addSearchDropdownBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row')">Workflow Run ID</option>
102
														<option values="workflow-lsid" onclick="addSearchDropdownBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row')">Workflow ID</option>
103
														<option values="status" onclick="addSearchDropdownBefore('tpcSearch','Status','Status','is|in','form-base-row')">Status</option>
95
													<select class="dropdown-input" name="dd-field-selector" id="dd-field-selector" onchange="addSearchDropdownBefore(this)">
96
														<option value="name">Name</option>
97
														<option value="keyword">Keyword</option>
98
														<option value="creator">Creator</option>
99
														<option value="description">Description</option>
100
														<option value="date-executed">Date Executed</option>
101
														<option value="workflow-run-id">Workflow Run ID</option>
102
														<option value="workflow-lsid">Workflow ID</option>
103
														<option value="status">Status</option>
104 104
													</select>    
105 105
							        		
106 106
							        				<input class="submit-button" value="Search" type="button" onclick="setWorkflowQueryFormField('tpcSearch');submitFormIntoDiv('<%=SERVLET_URL%>','tpcSearch','workflow-search-results')">
lib/style/skins/sanparks/searchWorkflow.jsp
73 73
     									<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_ne.jpg" /></td>
74 74
     								</tr>
75 75
     								<tr>
76
     									<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_w.jpg" /></td>
76
     									<td class="search-box-w"><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_w.jpg" /></td>
77 77
     									<td>
78 78
			      						  	<form name="tpcSearch" id="tpcSearch">
79 79
			        							<input name="query" id="query" type="hidden" />
......
82 82
												<input name="action" value="squery" type="hidden" />  		
83 83
												<div class="form-base-row" id="form-base-row">
84 84
													<div class="field-label dropdown-field-label" id='field-selector-section' >Add search term</div>
85
													<select class="dropdown-input" name="dd-field-selector" id="dd-field-selector">
86
														<option value="name" onclick="addSearchDropdownBefore('tpcSearch','Name','name','co|eq|sw|ew','form-base-row')">Name</option>
87
														<option value="keyword" onclick="addSearchDropdownBefore('tpcSearch','Keyword','keyword','co|eq|sw|ew','form-base-row')">Keyword</option>
88
														<option values="creator" onclick="addSearchDropdownBefore('tpcSearch','Creator','creator','co|eq|sw|ew','form-base-row')">Creator</option>
89
														<option values="description" onclick="addSearchDropdownBefore('tpcSearch','Description','description','co|eq|sw|ew','form-base-row')">Description</option>
90
														<option values="date-created" onclick="addSearchDropdownBefore('tpcSearch','Date Created','date-created','be|af','form-base-row')">Date Created</option>
91
														<option values="workflow-id" onclick="addSearchDropdownBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row')">Workflow ID</option>
85
													<select class="dropdown-input" name="dd-field-selector" id="dd-field-selector" onchange="addSearchDropdownBefore(this)">
86
														<option value="name">Name</option>
87
														<option value="keyword">Keyword</option>
88
														<option value="creator">Creator</option>
89
														<option value="description">Description</option>
90
														<option value="date-created">Date Created</option>
91
														<option value="workflow-id">Workflow ID</option>
92 92
													</select>         		
93 93
			        								<input class="submit-button" value="Search" type="button" onclick="setWorkflowQueryFormField('tpcSearch');submitFormIntoDiv('<%=SERVLET_URL%>','tpcSearch','workflow-search-results')">
94 94
			        							</div> 
95 95
			        						</form>
96 96
        								</td>
97
        								<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_e.jpg" /></td>
97
        								<td class="search-box-e"><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_e.jpg" /></td>
98 98
			        				</tr>
99 99
			        				<tr>
100 100
			     						<td><img src="<%=STYLE_SKINS_URL%>/sanparks/images/search_box_sw.jpg" /></td>
lib/style/skins/sanparks/sanparks-tpc.css
58 58
	width: 100%;
59 59
}
60 60

  
61
.search-box-w {
62
	background: transparent url("images/search_box_w.jpg") left 0px repeat-y;
63
}
64

  
65
.search-box-e {
66
	background: transparent url("images/search_box_e.jpg") left 0px repeat-y;
67
}
68

  
61 69
.content-section-header {
62 70
	text-align:	left;
63 71
	color: #124325;
lib/style/common/widgets/form-fields-widget.js
89 89
  	lastInputIndex++;
90 90
}
91 91

  
92
function addSearchDropdownBefore(formId, inputLabel, inputName,  searchModes, beforeElementId) {
93
	// alert('in addDropdownInputBefore - formId: ' + formId + ' inputLabel: ' + inputLabel + ' inputName: ' + inputName + ' searchModes: ' + searchModes + ' beforeElementId: ' + beforeElementId);
92
function addSearchDropdownBefore(selectObj) {
93
	//alert(selectObj.value);
94
	if (selectObj.value == "name") {
95
		addSearchSelectionBefore('tpcSearch','Name','name','co|eq|sw|ew','form-base-row');
96
	} else if (selectObj.value == "keyword") {
97
		addSearchSelectionBefore('tpcSearch','Keyword','keyword','co|eq|sw|ew','form-base-row');
98
	} else if (selectObj.value == "creator") {
99
		addSearchSelectionBefore('tpcSearch','Creator','creator','co|eq|sw|ew','form-base-row');
100
	} else if (selectObj.value == "description") {
101
		addSearchSelectionBefore('tpcSearch','Description','description','co|eq|sw|ew','form-base-row');
102
	} else if (selectObj.value == "date-executed") {
103
		addSearchSelectionBefore('tpcSearch','Date Executed','date-executed','be|af','form-base-row');
104
	} else if (selectObj.value == "workflow-run-id") {
105
		addSearchSelectionBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row');
106
	} else if (selectObj.value == "workflow-lsid") {
107
		addSearchSelectionBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row');
108
	} else if (selectObj.value == "status") {
109
		addSearchSelectionBefore('tpcSearch','Status','Status','is|in','form-base-row');
110
	} else if (selectObj.value == "date-created") {
111
		addSearchSelectionBefore('tpcSearch','Date Created','date-created','be|af','form-base-row');
112
	} else if (selectObj.value == "workflow-id") {
113
		addSearchSelectionBefore('tpcSearch','Workflow-id','workflow-id','co|eq|sw|ew','form-base-row');
114
	}		
115
}
116

  
117
function addSearchSelectionBefore(formId, inputLabel, inputName,  searchModes, beforeElementId) {
118
	//alert('in addDropdownInputBefore - formId: ' + formId + ' inputLabel: ' + inputLabel + ' inputName: ' + inputName + ' searchModes: ' + searchModes + ' beforeElementId: ' + beforeElementId);
94 119
	var formObj = document.getElementById(formId);
95 120
	var beforeObj = document.getElementById(beforeElementId);
96 121
	var newDiv = document.createElement('div');

Also available in: Unified diff