app/soc/templates/soc/org_app/review_overview.html
changeset 1358 6be502a1bcc6
parent 1328 cd175dddc15c
child 1359 582661519e5d
--- a/app/soc/templates/soc/org_app/review_overview.html	Sun Feb 15 20:26:15 2009 +0000
+++ b/app/soc/templates/soc/org_app/review_overview.html	Sun Feb 15 20:27:09 2009 +0000
@@ -12,56 +12,9 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
-{% block scripts %}
-<script type="text/javascript" src="/jquery/jquery-progressbar.js"></script>
-<script type="text/javascript">
-	$(document).ready(function() {
-		$("#applications_progress_bar").progressBar({showText: false});
-	});
 
-	function acceptOrgInit() {
-		$("#acceptance_text").fadeOut("slow",
-			function() {
-				$("#applications_progress_bar").fadeIn("slow");
-			}
-		);
-		$.getJSON("{{ bulk_accept_link|safe }}",
-			function(data){
-				setTimeout(function(){acceptOrg(data)}, 0);
-			}
-		);
-	}
-
-	function acceptOrg(accepted_applications) {
-		var application_index = 0, max_applications=accepted_applications.applications.length;
-		for (application_index; application_index<max_applications; application_index++) {
-			// regular expression to find a valid scope path inside matching parenthesis
-			var re = /\((\w*)\)/;
-			var scope_path = accepted_applications.link.match(re)[1];
-			// the URL is obtained by using the scope path found in the matching parenthesis
-			var url_to_call = accepted_applications.link.replace(re,eval("accepted_applications.applications[application_index]."+scope_path));
-			// now we can call the URL found
-			$.ajax({
-				async: false,
-				url: url_to_call,
-				timeout: 10000,
-				complete: function(data) {
-					if (data) {
-						// update progress bar percentage and description
-						var percentage = Math.floor(100 * (application_index+1) / (accepted_applications.nr_applications));
-						$("#description_progressbar").html(" Processed application "+accepted_applications.applications[application_index].name+" ("+(application_index+1)+"/"+accepted_applications.nr_applications+")");
-						$("#applications_progress_bar").progressBar(percentage);
-					}
-				}
-			});
-		}
-		// tell the user we are done
-		$("#description_done").html(" <strong>Done!</strong>");
-
-	}
-</script>
-{% endblock %}
 {% block body %}
 <span id="acceptance_text">If you want to accept all pre-accepted organizations please <button id="button_accept" onclick="javascript:acceptOrgInit();">click here</button></span><span class="progressBar" style="display:none;" id="applications_progress_bar"></span><span id="description_progressbar"></span><span id="description_done"></span>
 {{ block.super}}
+
 {% endblock %}