diff -r f5e18f8ed036 -r de4a2ed2f34b hsbook_back.js
--- a/hsbook_back.js Fri Oct 15 15:59:28 2010 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-function qid(id) {
- return id.replace(/([.:])/g, "\\$1");
-}
-
-function beforeComment(formData, jqForm, options) {
- var form=jqForm[0];
-
- if (form.comment.textLength.toString()=='0') {
- $("span.comment_error").empty().append(
- "");
- return false;
- }
- if (form.name.textLength.toString()=='0') {
- $("span.comment_error").empty().append(
- "");
- return false;
- }
- $(options.target + " span.comment_error").empty().after(
- "");
- $("input[@name=submit]").attr("disabled", true);
-}
-
-function ajaxifyForm(id) {
-
-// $('#form_func_1').replaceWith('something');
-
- var substring=id.substr(9);
- $('#form_'+substring).ajaxForm({beforeSubmit: beforeComment,
- success: function(){ loadComments(id);}
-
- });}
-
-
-function toggleComment(id) {
- $("#toggle_" + qid(id)).nextAll().toggle();
- return false;
-}
-
-
-function loadComments(id)
-{
-
- var substring=id.substr(9);
- $('#comments_'+substring).load("http://127.0.0.1:8000/single/"+ substring +'/',function() { ajaxifyForm(id);}
- );
-
-}
-
-
-
-
-function loadAllComments() {
- $("a.commenttoggle").each(function() {
- var id = $(this).attr("pid");
- if (id) {
- loadComments(id);
- }
- });
-}
-
-
-
-$(document).ready(function() {
- function loading(id) {
- return "