aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-04-08 21:33:14 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-04-08 21:33:14 +0000
commit873688e87be6762e794cfc6e11c2c9d407d8929a (patch)
treef9adc87272a3da52ffabcbfee123a486489d4995
parentd58c8698aa924355ee9d59407ba064b0ed5ff308 (diff)
downloadphpicalendar-873688e87be6762e794cfc6e11c2c9d407d8929a.tar.gz
phpicalendar-873688e87be6762e794cfc6e11c2c9d407d8929a.tar.bz2
phpicalendar-873688e87be6762e794cfc6e11c2c9d407d8929a.zip
Really fix jump-box
-rw-r--r--functions/event.js9
-rw-r--r--templates/default/calendar_nav.tpl12
-rw-r--r--templates/default/sidebar.tpl10
-rw-r--r--templates/default/sidebar_year.tpl12
4 files changed, 24 insertions, 19 deletions
diff --git a/functions/event.js b/functions/event.js
index 012a32c..c6eb29e 100644
--- a/functions/event.js
+++ b/functions/event.js
@@ -59,7 +59,12 @@ function submitform(form, value) {
var action = temp[0];
values[0] = temp[1];
- form.setAttribute("action", action);
+ try {
+ form.setAttribute("action", action);
+ }
+ catch(e) {
+ form.action = action;
+ }
// Stuff the hidden form fields.
for (var i = 0; i < values.length; i++) {
@@ -68,7 +73,7 @@ function submitform(form, value) {
}
// Clear the select+option value.
- var select = form.elements.namedItem("action")
+ var select = form.elements.namedItem("form_action")
select.options[select.selectedIndex].value = "";
form.submit();
diff --git a/templates/default/calendar_nav.tpl b/templates/default/calendar_nav.tpl
index 2244dc5..dc3cfc8 100644
--- a/templates/default/calendar_nav.tpl
+++ b/templates/default/calendar_nav.tpl
@@ -3,7 +3,7 @@
<tr>
<td>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php?{LOGIN_QUERYS}" method="post">
- <input type="hidden" name="action" value="login" />
+ <input type="hidden" name="form_action" value="login" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="calborder">
<tr>
<td colspan="2" align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">{L_LOGIN}</div></td>
@@ -94,31 +94,31 @@
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
</form>
<!-- switch show_search on -->
{SEARCH_BOX}
diff --git a/templates/default/sidebar.tpl b/templates/default/sidebar.tpl
index 0a3dad4..d751f42 100644
--- a/templates/default/sidebar.tpl
+++ b/templates/default/sidebar.tpl
@@ -81,31 +81,31 @@
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
</form>
<!-- switch show_search on -->
{SEARCH_BOX}
diff --git a/templates/default/sidebar_year.tpl b/templates/default/sidebar_year.tpl
index 701eacd..31ce68a 100644
--- a/templates/default/sidebar_year.tpl
+++ b/templates/default/sidebar_year.tpl
@@ -1,6 +1,6 @@
<!-- switch show_user_login on -->
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php?{LOGIN_QUERYS}" method="post">
-<input type="hidden" name="action" value="login" />
+<input type="hidden" name="form_action" value="login" />
<table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder">
<tr>
<td colspan="2" align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">{L_LOGIN}</div></td>
@@ -81,31 +81,31 @@
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_JUMPS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_ICALS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_YEARS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_MONTHS}</select>
</form>
<form style="margin-bottom:0;" action="{CURRENT_VIEW}.php" method="get">
<input type="hidden" name="cpath" value="{CPATH}"/>
<input type="hidden" name="cal" value=""/>
<input type="hidden" name="getdate" value=""/>
- <select name="action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
+ <select name="form_action" class="query_style" onchange="submitform(this.form, this.options[this.selectedIndex].value);">{LIST_WEEKS}</select>
</form>
<!-- switch show_search on -->
{SEARCH_BOX}

© 2014-2024 Faster IT GmbH | imprint | privacy policy