mod-forum MDL-16706 Removed inline JS and replaced with new PAGE methods

This commit is contained in:
samhemelryk
2009-06-26 07:49:37 +00:00
parent a39fe289b0
commit 002575adeb
2 changed files with 11 additions and 5 deletions
+9 -1
View File
@@ -15,4 +15,12 @@ function forum_produce_tracking_link(forumid, ltext, ltitle) {
if(subs_link){
subs_link.innerHTML = "<a title="+ltitle+" href='"+moodle_cfg.wwwroot+"/mod/forum/settracking.php?id="+forumid+"'>"+ltext+"<\/a>";
}
}
}
function lockoptions_timetoitems() {
lockoptions('searchform','timefromrestrict', timefromitems);
}
function lockoptions_timefromitems() {
lockoptions('searchform','timetorestrict', timetoitems);
}
+2 -4
View File
@@ -351,10 +351,8 @@ function forum_print_big_search_form($course) {
echo '</table>';
echo '</form>';
echo "<script type=\"text/javascript\">";
echo "lockoptions('searchform','timefromrestrict', timefromitems);";
echo "lockoptions('searchform','timetorestrict', timetoitems);";
echo "</script>\n";
echo $PAGE->requires->js_function_call('lockoptions_timetoitems')->asap();
echo $PAGE->requires->js_function_call('lockoptions_timefromitems')->asap();
print_simple_box_end();
}