150 |
150 |
return false;
|
151 |
151 |
|
152 |
152 |
}
|
|
153 |
setControlVisibility = function() {
|
|
154 |
if (document.getElementById("ajaxCartResults")) {
|
|
155 |
new Effect.Appear("removeCart");
|
|
156 |
//new Effect.Fade("addCart");
|
|
157 |
}
|
|
158 |
else {
|
|
159 |
new Effect.Appear("addCart");
|
|
160 |
//new Effect.Fade("removeCart");
|
|
161 |
}
|
|
162 |
}
|
|
163 |
|
153 |
164 |
hideDiv = function(divId) {
|
154 |
165 |
new Effect.Fade(divId);
|
155 |
166 |
//Element.hide(divId);
|
... | ... | |
167 |
178 |
if there are not then don't show the query results -->
|
168 |
179 |
|
169 |
180 |
<xsl:if test="count(resultset/document) > 0">
|
|
181 |
<script type="text/javascript" language="Javascript">
|
|
182 |
<![CDATA[
|
|
183 |
//call on load
|
|
184 |
setControlVisibility();
|
|
185 |
]]>
|
|
186 |
</script>
|
170 |
187 |
<p>
|
171 |
|
Download Selected (.csv):
|
172 |
188 |
<a>
|
173 |
189 |
<xsl:attribute name="href">javascript:{}</xsl:attribute>
|
174 |
190 |
<xsl:attribute name="onclick">javascript:downloadMergedResponseData('assessmentForm', 'fieldForm')</xsl:attribute>
|
... | ... | |
177 |
193 |
<xsl:value-of select="$contextURL" />
|
178 |
194 |
<xsl:text>/style/images/page_white_put.png</xsl:text>
|
179 |
195 |
</xsl:attribute>
|
180 |
|
</img>
|
181 |
|
</a>
|
182 |
|
</p>
|
183 |
|
<p>
|
184 |
|
Edit Selected:
|
185 |
|
<a>
|
186 |
|
<xsl:attribute name="href">javascript:{}</xsl:attribute>
|
187 |
|
<xsl:attribute name="onclick">javascript:editCart('assessmentForm', 'add')</xsl:attribute>
|
188 |
|
<img border="none">
|
189 |
|
<xsl:attribute name="src">
|
190 |
|
<xsl:value-of select="$contextURL" />
|
191 |
|
<xsl:text>/style/images/fav.gif</xsl:text>
|
192 |
|
</xsl:attribute>
|
193 |
196 |
</img>
|
194 |
|
<xsl:text> Add to Cart</xsl:text>
|
|
197 |
<xsl:text> Download Selection (.csv)</xsl:text>
|
195 |
198 |
</a>
|
196 |
|
/
|
197 |
|
<a>
|
198 |
|
<xsl:attribute name="href">javascript:{}</xsl:attribute>
|
199 |
|
<xsl:attribute name="onclick">javascript:editCart('assessmentForm', 'remove')</xsl:attribute>
|
200 |
|
<!-- <xsl:text>Remove </xsl:text> -->
|
201 |
|
<img border="none">
|
202 |
|
<xsl:attribute name="src">
|
203 |
|
<xsl:value-of select="$contextURL" />
|
204 |
|
<xsl:text>/style/images/delete.gif</xsl:text>
|
205 |
|
</xsl:attribute>
|
206 |
|
</img>
|
207 |
|
<xsl:text> Remove from Cart</xsl:text>
|
208 |
|
</a>
|
209 |
199 |
</p>
|
|
200 |
<div id="addCart" style="display:none;">
|
|
201 |
<p/>
|
|
202 |
<p>
|
|
203 |
<a>
|
|
204 |
<xsl:attribute name="href">javascript:{}</xsl:attribute>
|
|
205 |
<xsl:attribute name="onclick">javascript:editCart('assessmentForm', 'add')</xsl:attribute>
|
|
206 |
<img border="none">
|
|
207 |
<xsl:attribute name="src">
|
|
208 |
<xsl:value-of select="$contextURL" />
|
|
209 |
<xsl:text>/style/images/fav.gif</xsl:text>
|
|
210 |
</xsl:attribute>
|
|
211 |
</img>
|
|
212 |
<xsl:text> Add Selection to Cart</xsl:text>
|
|
213 |
</a>
|
|
214 |
</p>
|
|
215 |
</div>
|
|
216 |
<div id="removeCart" style="display:none;">
|
|
217 |
<p/>
|
|
218 |
<p>
|
|
219 |
<a>
|
|
220 |
<xsl:attribute name="href">javascript:{}</xsl:attribute>
|
|
221 |
<xsl:attribute name="onclick">javascript:editCart('assessmentForm', 'remove')</xsl:attribute>
|
|
222 |
<!-- <xsl:text>Remove </xsl:text> -->
|
|
223 |
<img border="none">
|
|
224 |
<xsl:attribute name="src">
|
|
225 |
<xsl:value-of select="$contextURL" />
|
|
226 |
<xsl:text>/style/images/delete.gif</xsl:text>
|
|
227 |
</xsl:attribute>
|
|
228 |
</img>
|
|
229 |
<xsl:text> Remove Selection from Cart</xsl:text>
|
|
230 |
</a>
|
|
231 |
</p>
|
|
232 |
</div>
|
210 |
233 |
|
211 |
234 |
<!-- for reading the assessment details -->
|
212 |
235 |
<form action="{$contextURL}/metacat" method="POST" id="readForm" name="readForm" >
|
improve clarity of the available cart actions by:
-hiding/showing the logical options for a given screen (only allowed to remove when viewing the cart)
-refresh when cart changes - more positive feedback that pushing buttons actually did something.