-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FLUID-4907: Created auxiliary schema starter grade.
- Loading branch information
Showing
5 changed files
with
138 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
/* | ||
Copyright 2013 OCAD University | ||
Licensed under the Educational Community License (ECL), Version 2.0 or the New | ||
BSD license. You may not use this file except in compliance with one these | ||
Licenses. | ||
You may obtain a copy of the ECL 2.0 License and BSD License at | ||
https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt | ||
*/ | ||
|
||
// Declare dependencies | ||
/*global fluid_1_5:true*/ | ||
|
||
// JSLint options | ||
/*jslint white: true, funcinvoke: true, undef: true, newcap: true, nomen: true, regexp: true, bitwise: true, browser: true, forin: true, maxerr: 100, indent: 4 */ | ||
|
||
var fluid_1_5 = fluid_1_5 || {}; | ||
|
||
(function (fluid) { | ||
|
||
/******************************************************************************* | ||
* Base auxiliary schema grade | ||
*******************************************************************************/ | ||
|
||
fluid.defaults("fluid.uiOptions.auxSchema", { | ||
gradeNames: ["fluid.littleComponent", "autoInit"], | ||
auxiliarySchema: {} | ||
}); | ||
|
||
/******************************************************************************* | ||
* Starter auxiliary schema grade | ||
* | ||
* Contains the settings for 6 preferences: text size, line space, text font, | ||
* table of contents, inputs larger and emphasize links | ||
*******************************************************************************/ | ||
|
||
fluid.defaults("fluid.uiOptions.auxSchema.starter", { | ||
gradeNames: ["fluid.uiOptions.auxSchema", "autoInit"], | ||
auxiliarySchema: { | ||
"namespace": "fluid.uiOptions.constructed", // The author of the auxiliary schema will provide this and will be the component to call to initialize the constructed UIO. | ||
"templatePrefix": "../html", // The common path to settings panel templates. The template defined in "panels" element will take precedence over this definition. | ||
"textSize": { | ||
"type": "fluid.uiOptions.textSize" | ||
}, | ||
"lineSpace": { | ||
"type": "fluid.uiOptions.lineSpace" | ||
}, | ||
"textFont": { | ||
"type": "fluid.uiOptions.textFont", | ||
"classes": { | ||
"default": "", | ||
"times": "fl-font-uio-times", | ||
"comic": "fl-font-uio-comic-sans", | ||
"arial": "fl-font-uio-arial", | ||
"verdana": "fl-font-uio-verdana" | ||
} | ||
}, | ||
"contrast": { | ||
"type": "fluid.uiOptions.contrast", | ||
"classes": { | ||
"default": "fl-theme-uio-default", | ||
"bw": "fl-theme-uio-bw fl-theme-bw", | ||
"wb": "fl-theme-uio-wb fl-theme-wb", | ||
"by": "fl-theme-uio-by fl-theme-by", | ||
"yb": "fl-theme-uio-yb fl-theme-yb" | ||
} | ||
}, | ||
"tableOfContents": { | ||
"type": "fluid.uiOptions.tableOfContents" | ||
}, | ||
"emphasizeLinks": { | ||
"type": "fluid.uiOptions.emphasizeLinks" | ||
}, | ||
"inputsLarger": { | ||
"type": "fluid.uiOptions.inputsLarger" | ||
}, | ||
"enactors": [{ | ||
"type": "fluid.uiOptions.enactors.textSize" | ||
}, { | ||
"type": "fluid.uiOptions.enactors.lineSpace", | ||
"fontSizeMap": { | ||
"xx-small": "9px", | ||
"x-small": "11px", | ||
"small": "13px", | ||
"medium": "15px", | ||
"large": "18px", | ||
"x-large": "23px", | ||
"xx-large": "30px" | ||
} | ||
}, { | ||
"type": "fluid.uiOptions.enactors.textFont", | ||
"classes": "@textFont.classes" | ||
}, { | ||
"type": "fluid.uiOptions.enactors.contrast", | ||
"classes": "@contrast.classes" | ||
}, { | ||
"type": "fluid.uiOptions.enactors.tableOfContents", | ||
"tocTemplate": "the-location-of-toc-template" | ||
}, { | ||
"type": "fluid.uiOptions.enactors.emphasizeLinks", | ||
"cssClass": "fl-link-enhanced" | ||
}, { | ||
"type": "fluid.uiOptions.enactors.inputsLarger", | ||
"cssClass": "fl-text-larger" | ||
}], | ||
"panels": [{ | ||
"type": "fluid.uiOptions.panels.textSize", | ||
"container": ".flc-uiOptions-text-size", // the css selector in the template where the panel is rendered | ||
"template": "templates/textSize" // optional | ||
}, { | ||
"type": "fluid.uiOptions.panels.lineSpace", | ||
"container": ".flc-uiOptions-line-space", // the css selector in the template where the panel is rendered | ||
"template": "templates/lineSpace" // optional | ||
}, { | ||
"type": "fluid.uiOptions.panels.textFont", | ||
"container": ".flc-uiOptions-text-font", // the css selector in the template where the panel is rendered | ||
"classnameMap": "@textFont.classes", | ||
"template": "templates/textFont" // optional | ||
}, { | ||
"type": "fluid.uiOptions.panels.contrast", | ||
"container": ".flc-uiOptions-contrast", // the css selector in the template where the panel is rendered | ||
"classnameMap": "@contrast.classes", | ||
"template": "templates/contrast" // optional | ||
}, { | ||
"type": "fluid.uiOptions.panels.layoutControls", | ||
"container": ".flc-uiOptions-layout-controls", // the css selector in the template where the panel is rendered | ||
"template": "templates/tableOfContents" // optional | ||
}, { | ||
"type": "fluid.uiOptions.panels.linksControls", | ||
"container": ".flc-uiOptions-links-controls", // the css selector in the template where the panel is rendered | ||
"template": "templates/linksControls" // optional | ||
}] | ||
} | ||
}); | ||
|
||
})(fluid_1_5); |
106 changes: 0 additions & 106 deletions
106
src/webapp/components/uiOptions/schema/AuxiliarySchema.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters