Skip to content
Permalink
Browse files

Removed IE-specific hack for resource deletion.

  • Loading branch information...
vyshane
vyshane committed Feb 8, 2007
1 parent 45ce915 commit 1ab383075003be75196903931f969eaff143f5f6
Showing with 7 additions and 31 deletions.
  1. +0 −6 lib/ajax/ajaxcourse.js
  2. +0 −6 lib/ajax/ajaxlib.php
  3. +7 −19 lib/ajax/section_classes.js
@@ -244,12 +244,6 @@ function php_portal_class() {
//flag for week fomat
this.isWeek = false;

//client browser
this.clientIsIE = null;

//session key
this.sesskey = null;

//strings
this.strings = [];

@@ -115,12 +115,6 @@ function print_javascript($courseid, $return=false) {
$output .= "<script language='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";
@@ -396,9 +396,6 @@ section_class.prototype.remove_resource = function(el) {
parentEl.removeChild(kids[i]);
}
}
// Remove the resource.
// FIXME
// Line below is causing IE 6 and 7 to freeze.
parentEl.removeChild(resourceEl);

this.write_sequence_list();
@@ -766,23 +763,14 @@ resource_class.prototype.toggle_groupmode = function() {


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);
}


0 comments on commit 1ab3830

Please sign in to comment.
You can’t perform that action at this time.