When there is an error getting includes, report it correctly.

The previous code reported that only members could see includes.
This is not true. The public recipe is _public_, therefore anyone
can see it. Thus, if there is an error here it is going to be
something weird and it is best if we know the HTTP response code
so we can make some real diagnosis, or at least find the entry
in the log.
jslint cleanup

Unfortunately this is will be hard to decipher without a diff -w
as jslint wanted everything shifted over once.

There were a fair few unused variables, logic problems, and
even some missing code that was discovered as a result of
this. Some of that stuff remains to be fixed.

I suspect much of this is just going to go away, but in order
to see what should go it is important to know what's there
and without these changes, it is quite hard to tell.
Adjust to reign in line length.

This required a followup with more jslint to get acceptable
line wraps and line endings.
Return two typeof that had been removed in previous cleanups

Comparing directly with undefined is not actually what's
desired here. There's a corner case where false is passed
in and needs to be detected appropriately.

Got rid of the overladen ternary, replaced with a (to me)
more legible if statement that has the same results.
Make sure the right stuff is passed in to the function.

Without window being passed in, 'ts' is not found by
other calling code.
continued efforts to keep jslint happy
update version
Extract addMembersFromSpace to function.

This a) ameliorates some endless right shifting, b) adjusts
the code so that the xhr's are done sequentially (but still
asynch) to avoid confusing the bag and recipe policies. See:

    http://cdent.tiddlyspace.com/20120809
    http://cdent.tiddlyspace.com/20120812

for additional context. Fixes (or should):

    https://github.com/TiddlySpace/tiddlyspace/issues/983
update version
Pull ts.forms out to its own entry.

Doing this as part of a continued effort to have a bit less nesting.
This is just a first step, since things are still nested in the
data structure, just not in the code.
Extract message display utility functions.

ts.messages.display() does not provide additional value over
just displayMessage(). This is because ts.js is supposed to
provide standardized behavior to forms (as widgets) that are
used throughout tiddlyspace admin interfaces used by users.

That is: the message display functionality isn't going to be
exported; it is available as a result of form being ts.js-ified.

Again: small steps in achieving a form of scrutability in the code.
Extract ts.lists

While reading to do this move, quite a number of places where
ajax errors are unhandled were revealed. That's the benefit of
this kind of exercise: even for pretty redundant things like
just moving some code, issues are made more visible.
up version, add README
displayMessage doesn't ever use an options.selector

So don't pass it in the caller. I assume it was being passed
earlier when being strongly associated with the form was not going
to be the way.
Don't look up form to reset, we already know it.

It is the form we are currently in.

Again, this appears to be a hold over from previous, more general,
code.
Up version number for release.
Move init handling that is done if status is present to own function.

In the process change loginStatus to use its own variables,
as they are not used anywhere else.

Remove the tsInitializing classes. These were only used because
status was being loaded asynch. Now, with status.js, by the time
this code is reached, we have status, so the changes are not relevant.
extract and rename loadHash

The name doesn't describe what it actually does. Now it does.

And it would be better as a straight function, so made it return
its results, rather than assign then within.

However, in order to make it testable, it was necessary to stick
the function back on the ts object so it can be reached.

The test is rudimentary, just as a proof. The complexity suggests
that the way in which the object is reached/established is a bit
wack.
extract ts.forms.csrf form input additions to addCSRF

Somewhat more sensible as a simple function.

Also, stuff local to this scope shouldn't be looking on window
for getCSRFToken(). a) No need. b) What if some other (naughty)
code has clobbered window in the interim?
Note a potentially void errback.