summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-03-31 09:56:17 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-03-31 09:56:17 -0300
commit02b29d72f91d5fe4e9d9a2d4a4f7be3b4db119a1 (patch)
tree3c234656625710402c42378c719d8a16ab5eaa26 /usr
parent6e474fa9a12514cbdea68e380b79229e4be3034e (diff)
downloadpfsense-02b29d72f91d5fe4e9d9a2d4a4f7be3b4db119a1.zip
pfsense-02b29d72f91d5fe4e9d9a2d4a4f7be3b4db119a1.tar.gz
Revert "XHTML Compliance"
This commit broke schedules edit, it should fix #3555. This reverts commit e1002cd2724869eabdfe1f9258d4522d572722e4.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/firewall_schedule_edit.php37
1 files changed, 15 insertions, 22 deletions
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 656f7cf..b7cc7c3 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -251,11 +251,11 @@ function repeatExistingDays(){
}
}
-function daytogglerepeating(year,week,daypos,bExists){
+function daytogglerepeating(week,daypos,bExists){
var tempstr, daycell, dayoriginal = "";
for (j=1; j<=53; j++)
{
- tempstr = 'y' + year +'w' + j + 'p' + daypos;
+ tempstr = 'w' + j + 'p' + daypos;
daycell = eval('document.getElementById(tempstr)');
dayoriginalpos = daysSelected.indexOf(tempstr);
@@ -288,15 +288,8 @@ function daytoggle(id) {
var bFoundValid = false;
iddashpos = id.search("-");
-
- var tempstryearpos = id.search("y");
- var tempstrweekpos = id.search("w");
var tempstrdaypos = id.search("p");
-
- var year = id.substring(tempstryearpos + 1,tempstrweekpos);
- year = parseInt(year);
-
- var week = id.substring(tempstrweekpos + 1,tempstrdaypos);
+ var week = id.substring(1,tempstrdaypos);
week = parseInt(week);
if (iddashpos == "-1")
@@ -324,7 +317,7 @@ function daytoggle(id) {
}
else if (rgb2hex(daycell.style.backgroundColor) == "#F08080") // lightcoral
{
- daytogglerepeating(year,week,daypos,true);
+ daytogglerepeating(week,daypos,true);
}
else //color is white cell
{
@@ -335,7 +328,7 @@ function daytoggle(id) {
else
{
daycell.style.backgroundColor = "#F08080"; // lightcoral
- daytogglerepeating(year,week,daypos,false);
+ daytogglerepeating(week,daypos,false);
}
daysSelected += id + ",";
}
@@ -345,7 +338,7 @@ function daytoggle(id) {
{
//we found an invalid cell when column was clicked, move up to the next week
week++;
- tempstr = "y" + year + "w" + week + "p" + daypos;
+ tempstr = "w" + week + "p" + daypos;
idmod = tempstr;
}
}
@@ -857,13 +850,13 @@ EOD;
<tr><td colspan="7" align="center" class="listbg"><b><?php echo date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></b></td>
</tr>
<tr>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p1');"><u><b><?=gettext("Mon");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p2');"><u><b><?=gettext("Tue");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p3');"><u><b><?=gettext("Wed");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p4');"><u><b><?=gettext("Thu");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p5');"><u><b><?=gettext("Fri");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p6');"><u><b><?=gettext("Sat");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p7');"><u><b><?=gettext("Sun");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></td>
</tr>
<?php
$firstmonth = FALSE;
@@ -875,14 +868,14 @@ EOD;
echo "<tr>";
}
if ($firstdayofmonth == $positioncounter){?>
- <td align="center" style="cursor: pointer;" class="listr" id="y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
$firstdayprinted = TRUE;
echo "</td>";
}
elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays){?>
- <td align="center" style="cursor: pointer;" class="listr" id="y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
echo "</td>";
OpenPOWER on IntegriCloud