Releases: tdukai/bimo
Support for HTML5 controls: date, time, datetime-local
Present release contains support for more exotic controls: date, time, datetime-local
Added extra code to empty out HTML controls when the value is empty.
Updated gulp tasks for latest references, it caused way too many alerts.
The released code has NO DEPENENCY and PURE VANILLA JAVASCRIPT
Object subcomponents are no longer ignored
Fix to allow objects stay in the model (even though they not tracked for simplicity)
Fix for generating options for binded SELECT tags
The options were generated incorrectly for SELECT tags if "options" were used in the binding configuration.
Added _changed method and _clone method
Added _changed method to help support quick model check.
var model = new bimo.Model({ name: "John Doe", age: 34 });
model.age = 44;
model._delta();
/* change object:
age: {
actual: 44,
original: 34,
previous: 34
};
*/
model._changed(); // true - checks any changes
model._changed('age'); // true - checks specified property changed
model._changed(['age', 'name']); // true - checks any property changed
model._changed('name'); // false - the name property did not change
Fixed _revert() method
Thanks for Matt Pratap for inspiration!
Added model unwrap code when a model created from another model
Support native object passed in selector to single binding
Now native object can be passed as binding selector.
Also added error handling to misspelled string selector.
Documentation update
Added extra note about using multi-level object with binding.
Each model should have it's own binding object.
Fix for binded intercept method
When model has intercept methods Read or and binded to the control the data value the control received was the raw value of the model from the watch event. Now it changed to receive it via normal property assignment which means the READ intercept method will run (and if formatting code there it will modify the value)
Stringify ready model
Changed model to handle JSON stringify method better without exposing internal variables
Added error handling when container selector misspelled.
When binder container specified as string and not found in DOM. The erro not contained the selector string which would have helped locate the problem. This release using an error message when container is a null.