Skip to content

Commit

Permalink
Merge branch 'master' into FLUID-6176
Browse files Browse the repository at this point in the history
  • Loading branch information
jobara committed Mar 21, 2018
2 parents 8978d74 + 0d498cf commit 519c4b2
Show file tree
Hide file tree
Showing 22 changed files with 258 additions and 185 deletions.
3 changes: 2 additions & 1 deletion demos/prefsFramework/js/prefsEditorDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ var demo = demo || {};
modelListeners: {
simplify: {
listener: "{that}.set",
args: ["{change}.value"]
args: ["{change}.value"],
namespace: "setAdaptation"
}
},
events: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h1>Preferences Editor: Full Page</h1>
listeners: {
// Tells the PrefsEditor where to redirect to if the user cancels the operation.
// In this case, it goes back one step in the browser's history.
onCancel: {
"onCancel.back": {
"this": window.history,
method: "back"
}
Expand Down
21 changes: 14 additions & 7 deletions examples/framework/preferences/shared/js/enactors.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ var example = example || {};
modelListeners: {
"speak": {
funcName: "example.logModelValue",
args: ["speak", "{change}.value"]
args: ["speak", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -48,7 +49,8 @@ var example = example || {};
modelListeners: {
"incSize": {
funcName: "example.logModelValue",
args: ["incSize", "{change}.value"]
args: ["incSize", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -63,7 +65,8 @@ var example = example || {};
modelListeners: {
"volume": {
funcName: "example.logModelValue",
args: ["vol", "{change}.value"]
args: ["vol", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -78,7 +81,8 @@ var example = example || {};
modelListeners: {
"wordsPerMin": {
funcName: "example.logModelValue",
args: ["wpm", "{change}.value"]
args: ["wpm", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -93,7 +97,8 @@ var example = example || {};
modelListeners: {
"cursorMult": {
funcName: "example.logModelValue",
args: ["cursor", "{change}.value"]
args: ["cursor", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -108,7 +113,8 @@ var example = example || {};
modelListeners: {
"mag": {
funcName: "example.logModelValue",
args: ["magFactor", "{change}.value"]
args: ["magFactor", "{change}.value"],
namespace: "log"
}
}
});
Expand All @@ -123,7 +129,8 @@ var example = example || {};
modelListeners: {
"magPos": {
funcName: "example.logModelValue",
args: ["magPos", "{change}.value"]
args: ["magPos", "{change}.value"],
namespace: "log"
}
}
});
Expand Down
4 changes: 1 addition & 3 deletions src/components/reorderer/js/Reorderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
movables: ".flc-reorderer-movable",
selectables: ".flc-reorderer-movable",
dropTargets: ".flc-reorderer-movable",
grabHandle: "",
stylisticOffset: ""
grabHandle: ""
},
avatarCreator: fluid.reorderer.defaultAvatarCreator,
keysets: fluid.reorderer.defaultKeysets,
Expand Down Expand Up @@ -677,7 +676,6 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
dom.refresh("movables");
dom.refresh("selectables");
dom.refresh("grabHandle", dom.fastLocate("movables"));
dom.refresh("stylisticOffset", dom.fastLocate("movables"));
dom.refresh("dropTargets");
if (selectableContext) { // if it didn't exist on dispatch, it must be up to date now
selectableContext.selectables = dom.fastLocate("selectables");
Expand Down
39 changes: 23 additions & 16 deletions src/components/uiOptions/js/UIOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,31 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
fluid.defaults("fluid.uiOptions.prefsEditor", {
gradeNames: ["fluid.prefs.constructed.prefsEditor"],
lazyLoad: false,
distributeOptions: [{
record: "{that}.options.lazyLoad",
target: "{that separatedPanel}.options.lazyLoad"
}, {
source: "{that}.options.tocTemplate",
target: "{that uiEnhancer}.options.tocTemplate"
}, {
source: "{that}.options.ignoreForToC",
target: "{that uiEnhancer}.options.ignoreForToC"
}],
enhancer: {
distributeOptions: [{
distributeOptions: {
"uio.separatedPanel.lazyLoad": {
record: "{that}.options.lazyLoad",
target: "{that separatedPanel}.options.lazyLoad"
},
"uio.uiEnhancer.tocTemplate": {
source: "{that}.options.tocTemplate",
target: "{that > fluid.prefs.enactor.tableOfContents}.options.tocTemplate"
}, {
target: "{that uiEnhancer}.options.tocTemplate"
},
"uio.uiEnhancer.ignoreForToC": {
source: "{that}.options.ignoreForToC",
target: "{that > fluid.prefs.enactor.tableOfContents}.options.ignoreForToC"
}]
target: "{that uiEnhancer}.options.ignoreForToC"
}
},
enhancer: {
distributeOptions: {
"uio.enhancer.tableOfContents.tocTemplate": {
source: "{that}.options.tocTemplate",
target: "{that > fluid.prefs.enactor.tableOfContents}.options.tocTemplate"
},
"uio.enhancer.tableOfContents.ignoreForToC": {
source: "{that}.options.ignoreForToC",
target: "{that > fluid.prefs.enactor.tableOfContents}.options.ignoreForToC"
}
}
}
});

Expand Down
22 changes: 12 additions & 10 deletions src/framework/preferences/js/ArrowScrolling.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
args: ["{that}", "{arguments}.0"]
}
},
distributeOptions: [{
record: {
"afterRender.bindScrollArrows": {
"this": "{that}.dom.header",
method: "click",
args: ["{prefsEditor}.eventToScrollIndex"]
}
},
target: "{that > fluid.prefs.panel}.options.listeners"
}]
distributeOptions: {
"arrowScrolling.panel.listeners.bindScrollArrows": {
record: {
"afterRender.bindScrollArrows": {
"this": "{that}.dom.header",
method: "click",
args: ["{prefsEditor}.eventToScrollIndex"]
}
},
target: "{that > fluid.prefs.panel}.options.listeners"
}
}
});

fluid.prefs.arrowScrolling.calculatePanelMaxIndex = function (panels) {
Expand Down
78 changes: 45 additions & 33 deletions src/framework/preferences/js/Builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
}
}
},
distributeOptions: [{
source: "{that}.options.primarySchema",
removeSource: true,
target: "{that > primaryBuilder}.options.primarySchema"
}]
distributeOptions: {
"builder.primaryBuilder.primarySchema": {
source: "{that}.options.primarySchema",
removeSource: true,
target: "{that > primaryBuilder}.options.primarySchema"
}
}
});

fluid.defaults("fluid.prefs.assembler.uie", {
Expand All @@ -77,10 +79,12 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
type: "fluid.prefs.globalSettingsStore",
options: {
distributeOptions: {
target: "{that fluid.prefs.store}.options.contextAwareness.strategy.checks.user",
record: {
contextValue: "{fluid.prefs.assembler.uie}.options.storeType",
gradeNames: "{fluid.prefs.assembler.uie}.options.storeType"
"uie.store.context.checkUser": {
target: "{that fluid.prefs.store}.options.contextAwareness.strategy.checks.user",
record: {
contextValue: "{fluid.prefs.assembler.uie}.options.storeType",
gradeNames: "{fluid.prefs.assembler.uie}.options.storeType"
}
}
}
}
Expand All @@ -100,17 +104,21 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
}
}
},
distributeOptions: [{
source: "{that}.options.enhancer",
target: "{that uiEnhancer}.options",
removeSource: true
}, { // TODO: not clear that this hits anything since settings store is not a subcomponent
source: "{that}.options.store",
target: "{that fluid.prefs.store}.options"
}, {
source: "{that}.options.enhancerType",
target: "{that > enhancer}.options.enhancerType"
}]
distributeOptions: {
"uie.enhancer": {
source: "{that}.options.enhancer",
target: "{that uiEnhancer}.options",
removeSource: true
},
"uie.enhancer.enhancerType": {
source: "{that}.options.enhancerType",
target: "{that > enhancer}.options.enhancerType"
},
"uie.store": { // TODO: not clear that this hits anything since settings store is not a subcomponent
source: "{that}.options.store",
target: "{that fluid.prefs.store}.options"
}
}
});

fluid.defaults("fluid.prefs.assembler.prefsEd", {
Expand Down Expand Up @@ -152,19 +160,23 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
args: ["{that}"]
}
},
distributeOptions: [{
source: "{that}.options.loaderGrades",
removeSource: true,
target: "{that > prefsEditorLoader}.options.loaderGrades"
}, {
source: "{that}.options.prefsEditor",
removeSource: true,
target: "{that prefsEditor}.options"
}, {
source: "{that}.options.terms",
removeSource: true,
target: "{that prefsEditorLoader}.options.terms"
}]
distributeOptions: {
"prefsEdAssembler.prefsEditorLoader.loaderGrades": {
source: "{that}.options.loaderGrades",
removeSource: true,
target: "{that > prefsEditorLoader}.options.loaderGrades"
},
"prefsEdAssembler.prefsEditorLoader.terms": {
source: "{that}.options.terms",
removeSource: true,
target: "{that prefsEditorLoader}.options.terms"
},
"prefsEdAssembler.prefsEditor": {
source: "{that}.options.prefsEditor",
removeSource: true,
target: "{that prefsEditor}.options"
}
}
});

fluid.prefs.builder.generateGrade = function (name, namespace, options) {
Expand Down
15 changes: 10 additions & 5 deletions src/framework/preferences/js/Enactors.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
modelListeners: {
value: {
listener: "{that}.handleStyle",
args: ["{change}.value"]
args: ["{change}.value"],
namespace: "handleStyle"
}
}
});
Expand Down Expand Up @@ -88,7 +89,8 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
modelListeners: {
value: {
listener: "{that}.swap",
args: ["{change}.value"]
args: ["{change}.value"],
namespace: "swapClass"
}
},
members: {
Expand Down Expand Up @@ -397,12 +399,15 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
modelListeners: {
toc: {
listener: "{that}.applyToc",
args: ["{change}.value"]
args: ["{change}.value"],
namespace: "toggleToc"
}
},
distributeOptions: {
source: "{that}.options.ignoreForToC",
target: "{that tableOfContents}.options.ignoreForToC"
"tocEnactor.tableOfContents.ignoreForToC": {
source: "{that}.options.ignoreForToC",
target: "{that tableOfContents}.options.ignoreForToC"
}
}
});

Expand Down
39 changes: 23 additions & 16 deletions src/framework/preferences/js/FullPreviewPrefsEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
}
},
distributeOptions: {
source: "{that}.options.preview",
removeSource: true,
target: "{that > preview}.options"
"fullPreview.prefsEditor.preview": {
source: "{that}.options.preview",
removeSource: true,
target: "{that > preview}.options"
}
}
}
}
Expand All @@ -64,19 +66,24 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
args: "{that}"
}
},
distributeOptions: [{
source: "{that}.options.outerUiEnhancerOptions",
target: "{that enhancer}.options"
}, {
source: "{that}.options.preview",
target: "{that preview}.options"
}, {
source: "{that}.options.previewEnhancer",
target: "{that enhancer}.options"
}, {
source: "{that}.options.outerUiEnhancerGrades",
target: "{that enhancer}.options.gradeNames"
}]
distributeOptions: {
"fullPreview.enhancer.outerUiEnhancerOptions": {
source: "{that}.options.outerUiEnhancerOptions",
target: "{that enhancer}.options"
},
"fullPreview.enhancer.previewEnhancer": {
source: "{that}.options.previewEnhancer",
target: "{that enhancer}.options"
},
"fullPreviw.preview": {
source: "{that}.options.preview",
target: "{that preview}.options"
},
"fullPreview.enhancer.outerUiEnhancerGrades": {
source: "{that}.options.outerUiEnhancerGrades",
target: "{that enhancer}.options.gradeNames"
}
}
});

})(jQuery, fluid_3_0_0);
2 changes: 1 addition & 1 deletion src/framework/preferences/js/LetterSpaceEnactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
},
modelRelay: {
target: "unit",
namespace: "toUnit",
singleTransform: {
type: "fluid.transforms.round",
scale: 1,
Expand All @@ -74,7 +75,6 @@ var fluid_3_0_0 = fluid_3_0_0 || {};
}
}
}

}
});

Expand Down
Loading

0 comments on commit 519c4b2

Please sign in to comment.