From 5884a8e6b32fe2890f2c0b09fdecfbf85c3a8dcf Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 10 Nov 2009 19:45:34 +0000 Subject: [PATCH] MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- lib/ajax/block_classes.js | 104 ++++++++++++++++++------------------ lib/ajax/section_classes.js | 8 +-- lib/xmldb/xmldb_file.php | 4 +- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.js index 9c5e373a9b..bd69cb6225 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.js @@ -1,12 +1,12 @@ /** * library for ajaxcourse formats, the classes and related functions for drag and drop blocks - * + * * this library requires a 'main' object created in calling document */ -//set Drag and Drop to Intersect mode: -YAHOO.util.DDM.mode = YAHOO.util.DDM.INTERSECT; +//set Drag and Drop to Intersect mode: +YAHOO.util.DDM.mode = YAHOO.util.DDM.INTERSECT; /** @@ -60,7 +60,7 @@ block_class.prototype.init_block = function(id, sGroup, config) { block_class.prototype.startDrag = function(x, y) { //operates in intersect mode YAHOO.util.DDM.mode = YAHOO.util.DDM.INTERSECT; - + YAHOO.log(this.id + " startDrag"); var dragEl = this.getDragEl(); @@ -78,12 +78,12 @@ block_class.prototype.startDrag = function(x, y) { var targets = YAHOO.util.DDM.getRelated(this, true); YAHOO.log(targets.length + " targets"); - + //restyle side boxes to highlight for (var i=0; i 0){ tempStore = this.blocks[i]; this.blocks[i] = nextStore; - nextStore = tempStore; - + nextStore = tempStore; + }else if(this.blocks[i] == targetel){ found = i; nextStore = this.blocks[i]; - this.blocks[i] = el; + this.blocks[i] = el; blockcount++; - } + } } - + if(found<0){//insert at end - found = this.blocks.length; - this.add_block(el); - + found = this.blocks.length; + this.add_block(el); + } - + el.updatePosition(found,this.ident); } @@ -359,8 +359,8 @@ column_class.prototype.has_block = function(el){ return true; return false; } - - + + column_class.prototype.remove_block = function(el){ var blockcount = this.blocks.length; var found = false; @@ -368,16 +368,16 @@ column_class.prototype.remove_block = function(el){ if(this.blocks[i]==el || found){ if(!found) found = true; - + if(i < blockcount-1){ - this.blocks[i] = this.blocks[i+1]; + this.blocks[i] = this.blocks[i+1]; }else{ - this.blocks.pop(); + this.blocks.pop(); } } } YAHOO.log("column "+this.indent+" has "+blockcount+"blocks"); } - - - + + + diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js index d8df269976..24a771c8de 100755 --- a/lib/ajax/section_classes.js +++ b/lib/ajax/section_classes.js @@ -91,7 +91,7 @@ section_class.prototype.init_buttons = function() { YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true); commandContainer.appendChild(highlightbutton); this.highlightButton = highlightbutton; - } + } if (this.sectionId > 0 ) { var viewbutton = main.mk_button('div', main.portal.icons['hide'], main.getString('hidesection', this.sectionId), [['title', main.portal.strings['hide'] ]]); @@ -172,7 +172,7 @@ section_class.prototype.startDrag = function(x, y) { } -section_class.prototype.onDragDrop = function(e, id) { +section_class.prototype.onDragDrop = function(e, id) { // get the drag and drop object that was targeted var target = YAHOO.util.DDM.getDDById(id); @@ -228,7 +228,7 @@ section_class.prototype.move_to_section = function(target) { //move on front end for (var i=loopStart; eval(loopCondition); eval(loopInc)) { - if ((main.sections[i] == this) && !found) { + if ((main.sections[i] == this) && !found) { //encounter with original node if (this.debug) { YAHOO.log("Found Original "+main.sections[i].getEl().id); @@ -242,7 +242,7 @@ section_class.prototype.move_to_section = function(target) { YAHOO.log("Found target "+main.sections[i].getEl().id); } main.sections[i].swap_with_section(main.sections[eval(loopmodifier)]); - main.sections[i].swap_dates(main.sections[eval(loopmodifier)]); + main.sections[i].swap_dates(main.sections[eval(loopmodifier)]); found = false; break; } else if (found) { diff --git a/lib/xmldb/xmldb_file.php b/lib/xmldb/xmldb_file.php index 62768e3deb..51a736edbd 100644 --- a/lib/xmldb/xmldb_file.php +++ b/lib/xmldb/xmldb_file.php @@ -67,7 +67,7 @@ class xmldb_file extends xmldb_object { } /** - * This function will check/validate the XML file for correctness + * This function will check/validate the XML file for correctness * Dinamically if will use the best available checker/validator * (expat syntax checker or DOM schema validator */ @@ -117,7 +117,7 @@ class xmldb_file extends xmldb_object { /// Create one structure to store errors $structure = new xmldb_structure($this->path); /// Add error to structure - $structure->errormsg = sprintf("XML Error: %s at line %d", + $structure->errormsg = sprintf("XML Error: %s at line %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser)); /// Add structure to file -- 2.39.5