# HG changeset patch # User Lennard de Rijk # Date 1238447778 0 # Node ID 59de158c936dc363d8094821f1835ed109a11635 # Parent 26174bfb0a4470b35dfc724a98fc9b59b6683705 Fixed the duplicate slots view. The script would not clear the screen upon recalculation also the list of duplicates would increase with every iteration because the variables weren't properly reset. Patch by: Merio Ferraro, Lennard de Rijk Reviewed by: to-be-reviewed diff -r 26174bfb0a44 -r 59de158c936d app/soc/content/js/duplicate-slots-090330.js --- a/app/soc/content/js/duplicate-slots-090330.js Mon Mar 30 21:12:44 2009 +0000 +++ b/app/soc/content/js/duplicate-slots-090330.js Mon Mar 30 21:16:18 2009 +0000 @@ -12,6 +12,7 @@ this.showDuplicatesInit = function() { // Remember this object for Javascript scoping + html_string = ''; var this_object = this; var NUMBER_OF_ORGS = number_of_orgs; var OFFSET_LENGTH = offset_length; @@ -59,6 +60,8 @@ function showDuplicates(url_to_query,OFFSET_LENGTH,NUMBER_OF_ORGS) { var current_offset = 0; + orgs_details = {}; + assigned_proposals = new Array(); // Here Ajax call is handled setTimeout(function() { @@ -163,7 +166,8 @@ // public function to output actual HTML out of the data (cached or not) this.showDuplicatesHtml = function(orgs_details,student,student_key,proposals) { - if (html_string==='') { + if (html_string == '') { + $("#div_duplicate_slots").html(''); html_string='