Skip to content

Commit

Permalink
Merge branch 'master' into FLUID-5213
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyli committed Nov 27, 2013
2 parents 8455a1e + 7388946 commit 6894e11
Show file tree
Hide file tree
Showing 41 changed files with 2,402 additions and 47 deletions.
12 changes: 6 additions & 6 deletions src/framework/preferences/css/SeparatedPanelPrefsEditorFrame.css
Expand Up @@ -2,7 +2,7 @@
font-family: "OpenSans";
src: url("../../../lib/fonts/OpenSans-Light.ttf");
font-weight: 300;
font-style: normal;
font-style: normal;
}

@font-face {
Expand Down Expand Up @@ -34,12 +34,12 @@ html {
background-image: url('../images/default/separatedpanelbg.png');
background-repeat: repeat;
height: 100%;
overflow-x: scroll;
overflow-x: auto;
overflow-y: hidden;
color: #766d68;
padding: 10px 0px;
margin: 0px;

}

/* Preference Panels */
Expand All @@ -65,8 +65,8 @@ html {
.fl-prefsEditor-separatedPanel h2 {
color: #766d68;
padding: 0 0 0.5em 0;
margin: 0 0 1.5em 0;
width: 100%;
margin: 0 0 1.5em 0;
width: 100%;
border-bottom: solid #ccc 1px;
box-shadow: 0px 6px 7px -6px rgba(0,0,0,0.3);
font-size: 1.2em;
Expand Down Expand Up @@ -124,7 +124,7 @@ html {
-webkit-font-smoothing: antialiased;
float: left;
margin: 0.2em 0.3em 0 0;
font-size: 1.5em;
font-size: 1.5em;
}
.fl-prefsEditor-separatedPanel .fl-icon-next:before {
content: "\e001";
Expand Down
24 changes: 22 additions & 2 deletions src/framework/preferences/js/AuxBuilder.js
Expand Up @@ -247,9 +247,26 @@ var fluid_1_5 = fluid_1_5 || {};
templates = fluid.prefs.rearrangeDirect(thisCompositeOptions, compositeKey, "template");
messages = fluid.prefs.rearrangeDirect(thisCompositeOptions, compositeKey, "message");

var subPanelList = []; // list of subpanels to generate options for
var subPanels = {};
var subPanelRenderOn = {};

// panels can contain an array of always on panels, or an object
// describing which panels are always and which are initialized by a preference value
if (!fluid.isPrimitive(thisCompositeOptions.panels)) {
fluid.each(thisCompositeOptions.panels, function (subpanelArray, pref) {
subPanelList = subPanelList.concat(subpanelArray);
if (pref !== "always") {
fluid.each(subpanelArray, function (onePanel) {
fluid.set(subPanelRenderOn, onePanel, pref);
});
}
});
} else {
subPanelList = thisCompositeOptions.panels;
}

fluid.each(thisCompositeOptions.panels, function (subPanelID) {
fluid.each(subPanelList, function (subPanelID) {
panelsToIgnore.push(subPanelID);
var subPanelPrefsKey = fluid.get(auxSchema, [subPanelID, "type"]);
var safeSubPanelPrefsKey = fluid.prefs.subPanel.safePrefKey(subPanelPrefsKey);
Expand All @@ -259,6 +276,10 @@ var fluid_1_5 = fluid_1_5 || {};
var subPanelType = fluid.get(subPanelOptions, "type");

fluid.set(subPanels, [safeSubPanelPrefsKey, "type"], subPanelType);
var renderOn = fluid.get(subPanelRenderOn, subPanelID);
if (renderOn) {
fluid.set(subPanels, [safeSubPanelPrefsKey, "options", "renderOnPreference"], renderOn);
}

// Deal with preferenceMap related options
var map = fluid.defaults(subPanelType).preferenceMap[subPanelPrefsKey];
Expand Down Expand Up @@ -429,7 +450,6 @@ var fluid_1_5 = fluid_1_5 || {};
"%subPrefKey": "{templateLoader}.resources.%subPrefKey"
},
subPanel: {
"createOnEvent": "initSubPanels",
"container": "{%compositePanel}.dom.%prefKey"
},
enactor: {
Expand Down

0 comments on commit 6894e11

Please sign in to comment.