wysihtml5
Forced ACE editor to use "\n" as newline separator (unix style).

Pasting code from apps that use "\r" (such as Skype) caused troubles
with ACE as it drops the "\r" characters upon submission. Forcing
the editor to use "\n" fixes the problem.
Added minimal ACE optional libraries for testing purpose.

The files are those of the src-noconflict folder in the ace-builds
repo:
 https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict

The only difference is that the code of ace.js needs to be wrapped
in a (function(define,require,requirejs){...}() wrapper.
ACE editor field: print margin delimiter hidden
Label and value templating now supported.

All properties that appear as labels can now be set to template
strings. JSON Form uses the "data" property of the JSON Form object
to fetch the appropriate values.

Example:
{
 schema: {
  textfield: {
   title: '{{hello}} {{user.name}}',
   type: 'string',
   'default': '{{def}}',
   description: '{{desc}}'
  }
 },
 form: [
  {
   key: 'textfield',
   prepend: '{{prepend}}',
   append: '{{append}}'
  }
 ],
 data: {
  hello: 'Hi',
  user: { name: 'tidoust' },
  def: 'Meh',
  desc: 'Foo',
  prepend: 'I am feeling',
  append: 'today'
 }
}

Specific values {{idx}} and {{value}} are reserved and replaced by
the index of the element in an array and the value of the first
child field that sets the "valueInLegend" property.

This feature may be presented as internationalization support,
although it's probably easier to just update the form part instead
of using the convoluted format shown in the example. That could still
be useful when JSON is needed (as opposed to JavaScript) and when
the form is created by some third-party entity.
Fixed array re-ordering bug.

JSON Form correctly switched values upon reordering but the jQuery
UI Sortable plug-in that it uses still changed the order of the DOM
elements, whereas that's not what we want. I could not find a simple
way to prevent the DOM element switching, so the fix is basically to
move the elements back to their initial position afterwards.
Renamed "data" into "tpldata" to clarify the purpose of the data.
Added special templating option {{value foo[].bar.baz}}

The template gets replaced upon form initialization by the initial
value of the field targeted by the given key. If the key references
an enumeration, the final value is the result of running the
titleMap to the field's value if such a titleMap is defined.

This lets form authors initialize a field with the value of a
second field to start with.

The jsonform-defaults library still needs to be updated accordingly
to apply templating rules to the default values.
{{value key}} switched to {{values.key}}. Various fixes.
getInitialValue function defined and exposed.

The function returns the "initial" value that a field should take.
The initial value is somewhat different from the default value in
the sense that it may rely on templating through {{values.key}}
patterns.

Not fully tested yet, the code may still contain bugs
Various bug fixed on getInitialValue. Comments added.
Defaults lib: incorrect call to Underscore replaced by local func.

The library should be stand-alone as it is to be embedded in
constrained environments.
ACE input field: not injecting value in ACE <div> section anymore.

Not sure why, but the initial value was both injected in the <div>
section linked to the ACE editor and set in code through a call to
setValue. The injection did not escape the HTML, which caused
troubles when the value contained HTML tags, especially <script>
tags that were interpreted.
Merge branch 'master' of https://github.com/semanticdreamer/jsonform into semanticdreamer-master

Conflicts:
	lib/jsonform.js

Not sure how non-breakable spaces found their way in regular code. Not a big deal normally
except if file is not served as UTF-8 for some reason. The non-breakable space set for the
checkbox field was there on purpose but does not seem to be needed any longer (Bootstrap
v2.0.x correctly clears floats when the text of the checkbox is not set, so not a problem
anymore. I dropped the temp hack as a result.
First version of JSON Form playground page implemented.
Playground page: minor UI improvements.
Playground: Submit button added to proposed form
Fixed value initialialization for transloadit field.

The bug was due to a recent commit that introduced a nuance between
"value", defined as the stringified value of the field and
"node.value" that returns the actual value. In the case of the
transloadit, the field needs to use "node.value" as it performs
the conversion to a string on its own.
"selectfieldset": fields in other tabs were not disabled on init.

The fields in non selected alternative are automatically disabled
not to pollute the final result and not to create false errors,
but this was only done when the user changed the value of the
selection field, and not when the form was first loaded. Now fixed.

(old bug, probably there since the introduction of selectfieldset)
Added a couple of regression tests for a few former issues