When I run the script through http://www.javascriptlint.com/online_lint.php 
I get this error. I don't know if it is serius but I still get the error on 
the network-TW :(

 1  (function($){
 2  jQuery.validator.addMethod("val-title", function (value, element) { 
 3          if (store.tiddlerExists(value)) return false; else return true; 
    ==================================^
    lint warning: block statement without curly braces
    =====================================================^
    lint warning: block statement without curly braces
 4      }, "En anteckning med det namnet finns redan. Välj ett annat namn.");
 5  
 6      var validator = jQuery("#form").validate({
 7          rules: {
 8              username: {
 9                  required : function(el) {
10                      if (el.value === "") { 
11                          el.value= config.options.txtUserName ? 
config.options.txtUserName : ""
12                      }
    =====^
    lint warning: missing semicolon
13                      // console.log("focusout", el)
14                      return true;
15                  }
16              },
17              title: "required"
18          },
19          messages: {
20              username: "Ett användanamn krävs"
21          },
22          // specifying a submitHandler prevents the default submit, good for 
the demo
23          submitHandler: function(form, event) {
24  
25              event.preventDefault();
26  
27              var f = jQuery(form).serializeObject();
28                  console.log("formData: ", f);
29  
30              var tid = new Tiddler( f.title);
31              tid.text = f.text;
32              tid.modifier = f.username;
33              tid.creator = f.username;
34              tid.tags = f.tags || [];
35  
36              store.saveTiddler(tid);
37  
38              saveChanges(true,[tid]);
39  
40              story.closeTiddler('formTemplate');
41              story.displayTiddler(null,f.title);
42  
43              console.log("tid: ", tid)
44              return false;
45          }
46  })})(jQuery);

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to