Tags: dimagi/Vellum
Tags
Merge pull request #230 from dimagi/revert-227-120776 Revert "Edit Warning Message when adding image capture question"
major refactoring Use RequireJS, eliminate the formdesigner singleton with controller, model, and ui having tangled inter-references including a bunch of event soup, in favor of well-defined coponents using events only for loose coupling. See https://gist.github.com/mwhite/10e42de5b24b3437a610 for additional explanation. This removes the recently added duplicate ID renaming on save, in favor of, when the nodeID property is changed via a widget change, short-circuiting the change if a sibling has the same nodeID, and then behaving similarly to when the XPath editor has unsaved changes until you've finished entering a valid nodeID. In service of this, the "unsaved changes" short-circuiting now fires on several other events besides selecting a node: - adding a question - saving the form - selecting any tools menu item - moving a question Currently these are all done explicitly, although it might be possible to have fewer locations where the check is called by putting it in e.g. beforeSerialize(). This also manages all of the media uploader dependencies using RequireJS. Fixes: - #59: use RequireJS - #84: choice icon in tree should change when moving from single to multiple answer or vice versa