Skip to content

Commit

Permalink
Commit 83 (v0.9.83 - Beta)
Browse files Browse the repository at this point in the history
Feature improvements:

- New boundProps feature for custom tag controls. See sample here:
  http://www.jsviews.com/#samples/tag-controls/range

Downloads:

- Minified files provided for all 'plugin librairies'
- Updated download pages:
  http://www.jsviews.com/#download/sample-tagcontrols
  http://www.jsviews.com/#download/jqueryui-tagcontrols
  http://www.jsviews.com/#download/jsrplugins

Documentation:

- New sample for {{draggable}} and {{droppable}}:
  http://www.jsviews.com/#samples/tag-controls/draggable-droppable

- New jQuery widget controls documentation topic:
  http://www.jsviews.com/#jqui

Bug fixes:

- #351: Binding contextual parameters
- #352: multiselect not showing initial selection
- BorisMoore/jsrender#305 "Unknown template" error message with jQuery 3.0+
- validate.js minor bugfix/improvement
- Several minor bug fixes

Unit tests:

- Several additional unit tests
  • Loading branch information
BorisMoore committed Nov 18, 2016
1 parent ac5401b commit bf667cb
Show file tree
Hide file tree
Showing 28 changed files with 2,181 additions and 1,715 deletions.
22 changes: 16 additions & 6 deletions jquery.observable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JsObservable v0.9.82 (Beta): http://jsviews.com/#jsobservable */
/*! JsObservable v0.9.83 (Beta): http://jsviews.com/#jsobservable */
/*
* Subcomponent of JsViews
* Data change events for data-linking
Expand Down Expand Up @@ -44,7 +44,7 @@ if (!$ || !$.fn) {
throw "JsObservable requires jQuery"; // We require jQuery
}

var versionNumber = "v0.9.82",
var versionNumber = "v0.9.83",
$observe, $observable,

$views = $.views =
Expand Down Expand Up @@ -461,8 +461,8 @@ if (!$.observe) {
}
}

var i, p, skip, parts, prop, path, dep, unobserve, callback, cbId, inId, el, data, events, contextCb, items, cbBindings,
depth, innerCb, parentObs, allPath, filter, initNsArr, initNsArrLen,
var i, p, skip, parts, prop, path, dep, unobserve, callback, cbId, inId, el, data, events, contextCb, innerContextCb,
items, cbBindings, depth, innerCb, parentObs, allPath, filter, initNsArr, initNsArrLen,
ns = observeStr,
paths = this != 1 // Using != for IE<10 bug- see jsviews/issues/237
? concat.apply([], arguments) // Flatten the arguments - this is a 'recursive call' with params using the 'wrapped array'
Expand Down Expand Up @@ -491,7 +491,7 @@ if (!$.observe) {
}
callback = lastArg;
if (l && $isFunction(paths[l - 1])) {
contextCb = callback;
innerContextCb = contextCb = callback;
callback = paths.pop();
l--;
}
Expand Down Expand Up @@ -544,6 +544,11 @@ if (!$.observe) {
if (path === "") {
continue;
}
if (path && path._cp) { // Contextual parameter
contextCb = $sub._gccb(path[0]); // getContextCb: Get context callback for the contextual view (where contextual param evaluated/assigned)
origRoot = root = path[0].data; // Contextual data
path = path[1];
}
object = root;
if ("" + path === path) {
// Consider support for computed paths: jsviews/issues/292
Expand All @@ -562,7 +567,11 @@ if (!$.observe) {
depth = path.split(".").length - depth;
// if more than one ^ in the path, the first one determines depth
}
if (contextCb && (items = contextCb(path, root, depth))) {
if (contextCb) {
items = contextCb(path, root, depth);
contextCb = innerContextCb;
}
if (items) {
// If the array of objects and paths returned by contextCb is non empty, insert them
// into the sequence, replacing the current item (path). Otherwise simply remove current item (path)
l += items.length - 1;
Expand Down Expand Up @@ -1107,6 +1116,7 @@ if (!$.observe) {
};

$sub.advSet = function() { // refresh advanced settings
$sub._gccb = this._gccb; // getContextCallback method
global._jsv = $subSettings.advanced._jsv
? { // create global _jsv, for accessing views, etc
cbBindings: cbBindingsStore
Expand Down
4 changes: 2 additions & 2 deletions jquery.observable.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jquery.observable.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit bf667cb

Please sign in to comment.