Update of /cvsroot/phpwebapp/top10/templates/proj_list/filter
In directory sc8-pr-cvs1:/tmp/cvs-serv5584/templates/proj_list/filter
Modified Files:
filter.php filter.js filter.html
Log Message:
Index: filter.php
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/filter/filter.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** filter.php 23 Sep 2003 14:04:12 -0000 1.1.1.1
--- filter.php 2 Oct 2003 07:09:40 -0000 1.2
***************
*** 32,35 ****
--- 32,36 ----
"order_by" => "points"
));
+ if (ADMIN=='true') $this->addSVar("new", "true");
}
***************
*** 46,49 ****
--- 47,56 ----
$order_by = $this->getSVar("order_by");
WebApp::addVar($order_by."_selected", "selected");
+ if (ADMIN=='true')
+ {
+ $new = $this->getSVar("new");
+ $checked = ($new=="true" ? "checked" : "");
+ WebApp::addVar("new_checked", $checked);
+ }
}
}
Index: filter.js
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/filter/filter.js,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** filter.js 23 Sep 2003 14:04:12 -0000 1.1.1.1
--- filter.js 2 Oct 2003 07:09:40 -0000 1.2
***************
*** 53,54 ****
--- 53,60 ----
session.setVar("filter->order_by", order);
}
+
+ function set_new(chkbox)
+ {
+ var value = (chkbox.checked ? 'true' : 'false');
+ session.setVar("filter->new", value);
+ }
Index: filter.html
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/filter/filter.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** filter.html 24 Sep 2003 14:01:36 -0000 1.2
--- filter.html 2 Oct 2003 07:09:40 -0000 1.3
***************
*** 45,48 ****
--- 45,53 ----
</td>
<td>
+ <If condition="'{{ADMIN}}'=='true'">
+ New:<input type="checkbox" {{new_checked}} onclick="set_new(this)">
+ </If>
+ </td>
+ <td>
<a class="button" href="javascript:SendEvent('filter','refresh')">Refresh</a>
</td>
|