From 669d3ecd7c6546fb0dc735f7fb4cabca9d602a7c Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 21 Sep 2006 17:17:00 +0000 Subject: [PATCH] Some fixes to move Javascript files to PHP script, so that we can tweak the contents better. This was supposed to fix MDL-6544 but it didn't work. Checking it in because it will help a fix later. --- lib/ajax/ajaxlib.php | 4 ++-- .../{block_classes.js => block_classes.php} | 18 +++++++++++++- ...esource_classes.js => section_classes.php} | 24 ++++++++++++++++--- 3 files changed, 40 insertions(+), 6 deletions(-) rename lib/ajax/{block_classes.js => block_classes.php} (96%) rename lib/ajax/{section-resource_classes.js => section_classes.php} (97%) diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index 8387dcb31e..bf00499c92 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -20,8 +20,8 @@ "yui_dragdrop" => "/lib/yui/dragdrop/dragdrop.js", "yui_logger" => "/lib/yui/logger/logger.js", "yui_connection" => "/lib/yui/connection/connection.js", - "ajaxcourse_blocks" => "/lib/ajax/block_classes.js", - "ajaxcourse_sections" => "/lib/ajax/section-resource_classes.js", + "ajaxcourse_blocks" => "/lib/ajax/block_classes.php", + "ajaxcourse_sections" => "/lib/ajax/section_classes.php", "ajaxcourse_topic" => "/course/format/topics/ajaxcourse-topics.js", "ajaxcourse_week" => "/course/format/weeks/ajaxcourse-weeks.js" ); diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.php similarity index 96% rename from lib/ajax/block_classes.js rename to lib/ajax/block_classes.php index f413dd68ea..9e041df1b4 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.php @@ -1,3 +1,19 @@ + /* * library for ajaxcourse formats, the classes and related functions for drag and drop blocks * @@ -350,4 +366,4 @@ column_class.prototype.remove_block = function(el){ } - \ No newline at end of file + diff --git a/lib/ajax/section-resource_classes.js b/lib/ajax/section_classes.php similarity index 97% rename from lib/ajax/section-resource_classes.js rename to lib/ajax/section_classes.php index edbb1bb2cb..ff7327ad3b 100755 --- a/lib/ajax/section-resource_classes.js +++ b/lib/ajax/section_classes.php @@ -1,3 +1,19 @@ + /* * library for ajaxcourse formats, the classes and related functions for sections and resources * this library requires a 'main' object created in calling document @@ -482,9 +498,11 @@ resource_class.prototype.init_buttons = function(){ //find edit button var updateButton = null; var buttons = commandContainer.getElementsByTagName('a'); - for(var x=0;x') { updateButton = buttons[x]; + } + } if(updateButton == null) YAHOO.log('Cannot find updateButton for '+this.getEl().id,'error'); @@ -671,4 +689,4 @@ activity_class.prototype.toggle_group = function(){ main.connect('post','class=resource&field=groupmode',null,'value='+this.currentGroup+'&id='+this.id); } - \ No newline at end of file + -- 2.39.5