modfeedback MDL-16706 Removed inline scripts in mod feedback and added feedback.js
This commit is contained in:
@@ -228,14 +228,8 @@
|
||||
// print_box_end();
|
||||
|
||||
if ($typ!='label') {
|
||||
echo <<<EOD
|
||||
<script language="javascript">
|
||||
var item = document.getElementById("id_itemname");
|
||||
if(item){
|
||||
item.focus();
|
||||
}
|
||||
</script>
|
||||
EOD;
|
||||
$PAGE->requires->js('mod/feedback/feedback.js');
|
||||
$PAGE->requires->js_function_call('set_item_focus', Array('id_itemname'));
|
||||
}
|
||||
|
||||
/// Finish the page
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
function set_item_focus(itemid) {
|
||||
var item = document.getElementById(itemid);
|
||||
if(item){
|
||||
item.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function feedbackGo2delete(form) {
|
||||
form.action = moodle_cfg.wwwroot+'/mod/feedback/delete_completed.php';
|
||||
form.submit();
|
||||
}
|
||||
@@ -84,15 +84,8 @@
|
||||
//print the list with anonymous completeds
|
||||
// print_simple_box_start("center");
|
||||
print_box_start('generalbox boxaligncenter boxwidthwide');
|
||||
$PAGE->requires->js('mod/feedback/feedback.js');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function feedbackGo2delete(form)
|
||||
{
|
||||
form.action = "<?php echo $CFG->wwwroot;?>/mod/feedback/delete_completed.php";
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="mdl-align">
|
||||
<form name="frm" action="<?php echo me();?>" method="post">
|
||||
<table>
|
||||
|
||||
Reference in New Issue
Block a user