$output .= "<script type=\"text/javascript\">\n";
$output .= " main.portal.id = ".$courseid.";\n";
$output .= " main.portal.blocks = new Array(".$blocksoutput.");\n";
- $output .= " main.portal.sesskey = \"".$USER->sesskey."\";\n";
- if (check_browser_version('MSIE')) {
- $output .= " main.portal.clientIsIE = true;\n";
- } else {
- $output .= " main.portal.clientIsIE = false;\n";
- }
$output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
$output .= " main.portal.strings['pixpath']='".$CFG->pixpath."';\n";
$output .= " main.portal.strings['move']='".get_string('move')."';\n";
resource_class.prototype.delete_button = function() {
-
- if (!main.portal.clientIsIE) {
- if (this.debug) {
- YAHOO.log("Deleting "+this.getEl().id+" from parent "+this.parentObj.getEl().id);
- }
- if (!confirm(main.getString('deletecheck', main.getString(this.is)+" "+this.id))) {
- return false;
- }
- this.parentObj.remove_resource(this);
- main.connect('DELETE', 'class=resource&id='+this.id);
- } else {
- // Not currently doing deletion by ajax because of unsolved problem in
- // resource_class.remove_resource()
- self.location = main.portal.strings['wwwroot']+"/course/mod.php?delete="
- +this.id+"&sesskey="+main.portal.sesskey+
- "&sr=" + this.parentObj.sectionId;
+ if (this.debug) {
+ YAHOO.log("Deleting "+this.getEl().id+" from parent "+this.parentObj.getEl().id);
+ }
+ if (!confirm(main.getString('deletecheck', main.getString(this.is)+" "+this.id))) {
+ return false;
}
+ this.parentObj.remove_resource(this);
+ main.connect('DELETE', 'class=resource&id='+this.id);
}