Skip to content

Commit

Permalink
Merge remote-tracking branch 'cindyli/FLUID-5076'
Browse files Browse the repository at this point in the history
* cindyli/FLUID-5076:
  FLUID-5076: Synchronized names for "textSizer" and "lineSpace" as well as placing all panel component into namespace "fluid.uiOptions.panels". Also replaced all the occurrence of "settingsPanel" to "panel".
  FLUID-5076: Rename the settings panel namespace from "fluid.uiOptions.settingsPanel" to "fluid.uiOptions.panels".
  FLUID-5076: Replace the enactor namespace from "fluid.uiOptions.enactor" to "fluid.uiOptions.enactors".
  • Loading branch information
michelled committed Jul 3, 2013
2 parents 5cd0ac5 + 0e4cc43 commit 89719d9
Show file tree
Hide file tree
Showing 33 changed files with 295 additions and 295 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/webapp/components/uiOptions/js/FatPanelUIOptions.js
Expand Up @@ -203,7 +203,7 @@ var fluid_1_5 = fluid_1_5 || {};
// when the iframe is hidden.
iframeEnhancer.events.onIframeVisible.addListener(function () {
iframeEnhancer.textSize.set(iframeEnhancer.model.textSize);
iframeEnhancer.lineSpacing.set(iframeEnhancer.model.lineSpacing);
iframeEnhancer.lineSpace.set(iframeEnhancer.model.lineSpace);
});

fatPanel.slidingPanel.events.afterPanelHide.addListener(function () {
Expand Down
Expand Up @@ -26,23 +26,23 @@ var fluid_1_5 = fluid_1_5 || {};

fluid.defaults("fluid.uiOptions.textfieldSlider", {
gradeNames: ["fluid.textfieldSlider", "autoInit"],
model: "{fluid.uiOptions.settingsPanel}.model",
range: "{fluid.uiOptions.settingsPanel}.options.range",
model: "{fluid.uiOptions.panels}.model",
range: "{fluid.uiOptions.panels}.options.range",
listeners: {
modelChanged: {
listener: "{fluid.uiOptions.settingsPanel}.applier.requestChange",
listener: "{fluid.uiOptions.panels}.applier.requestChange",
args: ["{that}.options.path", "{arguments}.0"]
}
},
path: "value",
sliderOptions: "{fluid.uiOptions.settingsPanel}.options.sliderOptions"
sliderOptions: "{fluid.uiOptions.panels}.options.sliderOptions"
});

/**
* A sub-component of fluid.uiOptions that renders the "text size" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.textSizer", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.textSize", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
// The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component.
// i.e. from the settings store, or specific defaults derived from schema.
// Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out
Expand Down Expand Up @@ -83,23 +83,23 @@ var fluid_1_5 = fluid_1_5 || {};
/**
* A sub-component of fluid.uiOptions that renders the "text font" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.textFont", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.textFont", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
selectors: {
textFont: ".flc-uiOptions-text-font",
label: ".flc-uiOptions-text-font-label"
},
strings: {
textFont: "{uioMsgBundle}.options.messageBase.textFont"
},
produceTree: "fluid.uiOptions.textFont.produceTree",
produceTree: "fluid.uiOptions.panels.textFont.produceTree",
classnameMap: null, // must be supplied by implementors
controlValues: {
textFont: ["default", "times", "comic", "arial", "verdana"]
}
});

fluid.uiOptions.textFont.produceTree = function (that) {
fluid.uiOptions.panels.textFont.produceTree = function (that) {
// render drop down list box
return {
label: {messagekey: "textFontLabel"},
Expand All @@ -125,8 +125,8 @@ var fluid_1_5 = fluid_1_5 || {};
/**
* A sub-component of fluid.uiOptions that renders the "line spacing" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.lineSpacer", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.lineSpace", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
// The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component.
// i.e. from the settings store, or specific defaults derived from schema.
// Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out
Expand All @@ -135,18 +135,18 @@ var fluid_1_5 = fluid_1_5 || {};
max: 2
},
selectors: {
lineSpacing: ".flc-uiOptions-line-spacing",
lineSpace: ".flc-uiOptions-line-spacing",
label: ".flc-uiOptions-line-spacing-label",
narrowIcon: ".flc-uiOptions-line-spacing-narrowIcon",
wideIcon: ".flc-uiOptions-line-spacing-wideIcon",
multiplier: ".flc-uiOptions-multiplier"
},
protoTree: {
label: {messagekey: "lineSpacingLabel"},
narrowIcon: {messagekey: "lineSpacingNarrowIcon"},
wideIcon: {messagekey: "lineSpacingWideIcon"},
label: {messagekey: "lineSpaceLabel"},
narrowIcon: {messagekey: "lineSpaceNarrowIcon"},
wideIcon: {messagekey: "lineSpaceWideIcon"},
multiplier: {messagekey: "multiplier"},
lineSpacing: {
lineSpace: {
decorators: {
type: "fluid",
func: "fluid.uiOptions.textfieldSlider"
Expand All @@ -167,8 +167,8 @@ var fluid_1_5 = fluid_1_5 || {};
/**
* A sub-component of fluid.uiOptions that renders the "contrast" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.contrast", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.contrast", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
listeners: {
afterRender: "{that}.style"
},
Expand All @@ -182,7 +182,7 @@ var fluid_1_5 = fluid_1_5 || {};
theme: "{uioMsgBundle}.options.messageBase.theme"
},
repeatingSelectors: ["themeRow"],
produceTree: "fluid.uiOptions.contrast.produceTree",
produceTree: "fluid.uiOptions.panels.contrast.produceTree",
controlValues: {
theme: ["default", "bw", "wb", "by", "yb"]
},
Expand All @@ -191,15 +191,15 @@ var fluid_1_5 = fluid_1_5 || {};
},
invokers: {
style: {
funcName: "fluid.uiOptions.contrast.style",
funcName: "fluid.uiOptions.panels.contrast.style",
args: ["{that}.dom.themeLabel", "{that}.options.strings.theme",
"{that}.options.markup.label", "{that}.options.controlValues.theme",
"{that}.options.classnameMap.theme"]
}
}
});

fluid.uiOptions.contrast.style = function (labels, strings, markup, theme, style) {
fluid.uiOptions.panels.contrast.style = function (labels, strings, markup, theme, style) {
fluid.each(labels, function (label, index) {
label = $(label);
label.html(fluid.stringTemplate(markup, {
Expand All @@ -208,8 +208,8 @@ var fluid_1_5 = fluid_1_5 || {};
label.addClass(style[theme[index]]);
});
};

fluid.uiOptions.contrast.produceTree = function (that) {
fluid.uiOptions.panels.contrast.produceTree = function (that) {
return {
label: {messagekey: "contrastLabel"},
expander: {
Expand All @@ -234,8 +234,8 @@ var fluid_1_5 = fluid_1_5 || {};
/**
* A sub-component of fluid.uiOptions that renders the "layout and navigation" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.layoutControls", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.layoutControls", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
selectors: {
toc: ".flc-uiOptions-toc",
label: ".flc-uiOptions-toc-label",
Expand All @@ -254,8 +254,8 @@ var fluid_1_5 = fluid_1_5 || {};
/**
* A sub-component of fluid.uiOptions that renders the "links and buttons" panel of the user preferences interface.
*/
fluid.defaults("fluid.uiOptions.linksControls", {
gradeNames: ["fluid.uiOptions.settingsPanel", "autoInit"],
fluid.defaults("fluid.uiOptions.panels.linksControls", {
gradeNames: ["fluid.uiOptions.panels", "autoInit"],
selectors: {
links: ".flc-uiOptions-links",
inputsLarger: ".flc-uiOptions-inputs-larger",
Expand Down Expand Up @@ -299,15 +299,15 @@ var fluid_1_5 = fluid_1_5 || {};
/************************************************************************
* The grade that contains shared options by all default settings panels
************************************************************************/

fluid.defaults("fluid.uiOptions.defaultSettingsPanel", {
fluid.defaults("fluid.uiOptions.defaultPanel", {
gradeNames: ["fluid.eventedComponent", "autoInit"],
mergePolicy: {
sourceApplier: "nomerge"
},
sourceApplier: "{fluid.uiOptions}.applier",
listeners: {
"{uiOptions}.events.onUIOptionsRefresh": "{fluid.uiOptions.settingsPanel}.refreshView"
"{uiOptions}.events.onUIOptionsRefresh": "{fluid.uiOptions.panels}.refreshView"
}
});

Expand All @@ -316,58 +316,58 @@ var fluid_1_5 = fluid_1_5 || {};
*
* A collection of all the default UIO setting panels.
*********************************************************************************************************/
fluid.defaults("fluid.uiOptions.starterSettingsPanels", {
fluid.defaults("fluid.uiOptions.starterPanels", {
gradeNames: ["fluid.uiOptions", "autoInit"],
selectors: {
textSizer: ".flc-uiOptions-text-sizer",
textSize: ".flc-uiOptions-text-sizer",
textFont: ".flc-uiOptions-text-font",
lineSpacer: ".flc-uiOptions-line-spacer",
lineSpace: ".flc-uiOptions-line-spacer",
contrast: ".flc-uiOptions-contrast",
textControls: ".flc-uiOptions-text-controls",
layoutControls: ".flc-uiOptions-layout-controls",
linksControls: ".flc-uiOptions-links-controls"
},
components: {
textSizer: {
type: "fluid.uiOptions.textSizer",
container: "{uiOptions}.dom.textSizer",
textSize: {
type: "fluid.uiOptions.panels.textSize",
container: "{uiOptions}.dom.textSize",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
rules: {
"selections.textSize": "value"
},
model: {
value: "{fluid.uiOptions.rootModel}.rootModel.textSize"
},
resources: {
template: "{templateLoader}.resources.textSizer"
template: "{templateLoader}.resources.textSize"
}
}
},
lineSpacer: {
type: "fluid.uiOptions.lineSpacer",
container: "{uiOptions}.dom.lineSpacer",
lineSpace: {
type: "fluid.uiOptions.panels.lineSpace",
container: "{uiOptions}.dom.lineSpace",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
rules: {
"selections.lineSpacing": "value"
"selections.lineSpace": "value"
},
model: {
value: "{fluid.uiOptions.rootModel}.rootModel.lineSpacing"
value: "{fluid.uiOptions.rootModel}.rootModel.lineSpace"
},
resources: {
template: "{templateLoader}.resources.lineSpacer"
template: "{templateLoader}.resources.lineSpace"
}
}
},
textFont: {
type: "fluid.uiOptions.textFont",
type: "fluid.uiOptions.panels.textFont",
container: "{uiOptions}.dom.textFont",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
classnameMap: "{uiEnhancer}.options.classnameMap",
rules: {
"selections.textFont": "value"
Expand All @@ -381,11 +381,11 @@ var fluid_1_5 = fluid_1_5 || {};
}
},
contrast: {
type: "fluid.uiOptions.contrast",
type: "fluid.uiOptions.panels.contrast",
container: "{uiOptions}.dom.contrast",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
classnameMap: "{uiEnhancer}.options.classnameMap",
rules: {
"selections.theme": "value"
Expand All @@ -399,11 +399,11 @@ var fluid_1_5 = fluid_1_5 || {};
}
},
layoutControls: {
type: "fluid.uiOptions.layoutControls",
type: "fluid.uiOptions.panels.layoutControls",
container: "{uiOptions}.dom.layoutControls",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
rules: {
"selections.toc": "toc"
},
Expand All @@ -416,11 +416,11 @@ var fluid_1_5 = fluid_1_5 || {};
}
},
linksControls: {
type: "fluid.uiOptions.linksControls",
type: "fluid.uiOptions.panels.linksControls",
container: "{uiOptions}.dom.linksControls",
createOnEvent: "onUIOptionsMarkupReady",
options: {
gradeNames: "fluid.uiOptions.defaultSettingsPanel",
gradeNames: "fluid.uiOptions.defaultPanel",
rules: {
"selections.links": "links",
"selections.inputsLarger": "inputsLarger"
Expand All @@ -442,17 +442,17 @@ var fluid_1_5 = fluid_1_5 || {};
******************************/

/**
* A template loader component that specifies the templates used by starterSettingsPanels
* A template loader component that specifies the templates used by starterPanels
*
* @param {Object} options
*/

fluid.defaults("fluid.uiOptions.starterTemplateLoader", {
gradeNames: ["fluid.uiOptions.templateLoader", "autoInit"],
templates: {
textSizer: "%prefix/UIOptionsTemplate-textSizer.html",
textSize: "%prefix/UIOptionsTemplate-textSize.html",
textFont: "%prefix/UIOptionsTemplate-textFont.html",
lineSpacer: "%prefix/UIOptionsTemplate-lineSpacer.html",
lineSpace: "%prefix/UIOptionsTemplate-lineSpace.html",
contrast: "%prefix/UIOptionsTemplate-contrast.html",
layoutControls: "%prefix/UIOptionsTemplate-layout.html",
linksControls: "%prefix/UIOptionsTemplate-links.html"
Expand Down

0 comments on commit 89719d9

Please sign in to comment.