mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
KnockoutJS scramble exportDependencies
This commit is contained in:
parent
667e50c9fb
commit
2876f92f4d
3 changed files with 4 additions and 4 deletions
|
|
@ -78,7 +78,7 @@ ko.bindingContext = class {
|
||||||
return self['$data'];
|
return self['$data'];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options?.['exportDependencies']) {
|
if (options?.exportDependencies) {
|
||||||
// The "exportDependencies" option means that the calling code will track any dependencies and re-create
|
// The "exportDependencies" option means that the calling code will track any dependencies and re-create
|
||||||
// the binding context when they change.
|
// the binding context when they change.
|
||||||
updateContext();
|
updateContext();
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function makeWithIfBinding(bindingKey, isWith, isNot) {
|
||||||
var savedNodes, contextOptions = {}, needAsyncContext;
|
var savedNodes, contextOptions = {}, needAsyncContext;
|
||||||
|
|
||||||
if (isWith) {
|
if (isWith) {
|
||||||
contextOptions = { 'exportDependencies': true };
|
contextOptions = { exportDependencies: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
needAsyncContext = allBindings['has'](ko.bindingEvent.descendantsComplete);
|
needAsyncContext = allBindings['has'](ko.bindingEvent.descendantsComplete);
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
// Ensure we've got a proper binding context to work with
|
// Ensure we've got a proper binding context to work with
|
||||||
var bindingContext = (dataOrBindingContext instanceof ko.bindingContext)
|
var bindingContext = (dataOrBindingContext instanceof ko.bindingContext)
|
||||||
? dataOrBindingContext
|
? dataOrBindingContext
|
||||||
: new ko.bindingContext(dataOrBindingContext, null, null, { "exportDependencies": true });
|
: new ko.bindingContext(dataOrBindingContext, null, null, { exportDependencies: true });
|
||||||
|
|
||||||
var templateName = resolveTemplateName(template, bindingContext['$data'], bindingContext);
|
var templateName = resolveTemplateName(template, bindingContext['$data'], bindingContext);
|
||||||
executeTemplate(targetNodeOrNodeArray, true, templateName, bindingContext, options);
|
executeTemplate(targetNodeOrNodeArray, true, templateName, bindingContext, options);
|
||||||
|
|
@ -248,7 +248,7 @@
|
||||||
var innerBindingContext = bindingContext;
|
var innerBindingContext = bindingContext;
|
||||||
if ('data' in options) {
|
if ('data' in options) {
|
||||||
innerBindingContext = bindingContext.createChildContext(options['data'], {
|
innerBindingContext = bindingContext.createChildContext(options['data'], {
|
||||||
'exportDependencies': true
|
exportDependencies: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
templateComputed = renderTemplate(template, innerBindingContext, options, element);
|
templateComputed = renderTemplate(template, innerBindingContext, options, element);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue