2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
16 |
17 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # This bash file will deploy the dist folder to the project gh-page
3 | set -e
4 |
5 | # Base directory for this entire project
6 | BASEDIR=$(cd $(dirname $0) && pwd)
7 |
8 | # Destination directory for built code
9 | DISTDIR="$BASEDIR/dist"
10 |
11 | # run the build script
12 | ./build.sh
13 |
14 | # Create a new Git repo in dist folder
15 | cd "$DISTDIR"
16 | git init
17 |
18 | # Set user details
19 | git config user.name "ibuild.io"
20 | git config user.email "ibuild@ibuild.io"
21 |
22 | # First commit, .. horray!
23 | git add .
24 | git commit -m "Deploy to gh-pages"
25 |
26 | # Force push ...
27 | git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
28 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | script: bash ./deploy.sh
2 | before_script:
3 | - npm install -g bower
4 | - bower install
5 | env:
6 | global:
7 | - GH_REF: github.com/websemantics/semantic-dojo.git
8 | - secure: ipnod23DN9ejT6OGQWStyfH/m471DjTwQTc1VzBXIgfzGSzYZBRE5w3zFwBufXcswZznXOTl17IEtjeZieR5JE/nb7AgSTl+Ij88ZAsOQSpjfDfJYLX66JlEyTuLkTzfAmeXj6lFv74Xowga9BkdAvgDLG6OHS8WpKxgbf2++CWbwi2FpdmpGgmht1k8MxFxHdeHf9l7R3OWhseEDrV2wd3zXoE7d1VAl15YOuo0XGfpcNfjjFBYFs+8RwCOxLRam9z5+UewU0sDjg19q+Te4pCb5QSONx7THePRnDgff/A/ej5dy/fILKtmtEb3S5CIBIf0oNp0K/LU2yXMM4hVjofqZRZ41/R9MYoxl6rPxAcATtFyliSIyvTrtZfDXPOakTrrl3VUwgcrswujV+M8/b/iehnzJRHtA4GuPlWwn14khpwhQTk72gN0pyXqlWyJdGLewJUXVSjHGU0lkX98WjQDW79ph+Vss5o9ahoerwTxdsJ3Xo1yp1xhl6+CHQGBNOctzyIoAcQ6qQHK5p+Bv096JwhjrwIdtvGuNeDlKmGfYU790SbnXhfjnpTSGCmUeKK4pK1PqiUG3XSTgyeQQPIRj4hymQvIL7d69mJZ/j2TEW/fCcN3yh4rv4J2pVb2dSuAGKAMvGIrPv2iEw8SLr0gzpQnZTR72nIuH44g4Fs=
9 |
--------------------------------------------------------------------------------
/CHANGELOG:
--------------------------------------------------------------------------------
1 | 0.2.1
2 | date: 2016-03-30
3 | changes:
4 | - Fix issues with font icons in 'dist'
5 | - Make 'dist' folder self-contained app
6 | - Add deploy script to 'gh-pages'
7 | - Add Travis-CI support
8 |
9 | 0.2.0
10 | date: 2016-03-29
11 | changes:
12 | - Greatly improve build script
13 | - Add CHANGELOG file
14 | - Move Semantic-Dojo less styles into a bower package
15 | - Add examples for TooltipDialog dropdown menus (Semantic UI and Dijit).
16 | - Optimize build process
17 |
18 | 0.1.1
19 | date: 2015-08-31
20 | changes:
21 | - Update demo app
22 | - Optimize build process
23 |
24 | 0.1.0
25 | date: 2015-08-26
26 | changes:
27 | - Textbox
28 | - TextArea
29 | - Select
30 | - Button
31 | - Progress Bar
32 | - Tooltip
33 | - DialogTooltip
34 | - Tab
35 | - Sliders
36 | - Color Palette
37 | - RadioButton
38 | - Checkbox.
39 | - Use [Bower](http://bower.io/) for dependancies.
40 | - Merged main project and `gh-pages` into one codebase.
41 |
--------------------------------------------------------------------------------
/src/app/dev.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Semantic Dojo Dev
7 |
8 |
9 |
10 |
11 |
12 |
15 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Web Semantics, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Semantic Dojo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/app/temp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Semantic Dojo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | /*******************************
2 | Set-up
3 | *******************************/
4 |
5 | var
6 | gulp = require('gulp-help')(require('gulp')),
7 | gulpif = require('gulp-if'),
8 | less = require('gulp-less'),
9 | chmod = require('gulp-chmod'),
10 | requireDotFile = require('require-dot-file'),
11 | minifyCSS = require('gulp-minify-css'),
12 | replace = require('gulp-replace'),
13 | config;
14 |
15 |
16 | /*******************************
17 | Config
18 | *******************************/
19 |
20 | try {
21 | config = requireDotFile('config.json');
22 | }
23 | catch(error) {
24 | if(error.code === 'MODULE_NOT_FOUND') {
25 | console.error('No config.json file found');
26 | }
27 | }
28 |
29 | var
30 | output = config.paths.output,
31 | source = config.paths.source;
32 |
33 | gulp.task('default', function() {
34 |
35 | console.info('Building Assets');
36 |
37 | gulp.src(source.themes + '/**/assets/**/*.*')
38 | .pipe(gulp.dest(output.themes));
39 |
40 | console.info('Building Semantic-Dojo');
41 |
42 | gulp.src(["src/semantic-dojo-styles/src/semantic-dojo.less"])
43 | .pipe(less())
44 | .pipe(replace(config.paths.source.themes, config.paths.output.themes))
45 | .pipe(replace(config.paths.source.assets, config.paths.output.assets))
46 | .pipe(minifyCSS())
47 | .pipe(gulp.dest('dist'));
48 |
49 | });
50 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Semantic Dojo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/profiles/app.profile.js:
--------------------------------------------------------------------------------
1 | var profile = (function(){
2 | return {
3 | basePath: "../",
4 | localeList: 'ar,ca,cs,da,de,el,en,en-gb,en-us,es,es-es,fi,fi-fi,fr,fr-fr,he,he-il,hu,it,it-it,ja,ja-jp,ko,ko-kr,nl,nl-nl,nb,pl,pt,pt-br,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw,zh-cn',
5 | releaseName: "app",
6 | action: "release",
7 | layerOptimize: "closure",
8 | optimize: "closure",
9 | cssOptimize: "comments",
10 | mini: true,
11 | stripConsole: "all",
12 | selectorEngine: "lite",
13 | defaultConfig: {
14 | hasCache:{
15 | "dojo-built": 1,
16 | "dojo-loader": 1,
17 | "dom": 1,
18 | "host-browser": 1,
19 | "config-selectorEngine": "lite"
20 | },
21 | async: 1
22 | },
23 | staticHasFeatures: {
24 | "config-deferredInstrumentation": 0,
25 | "config-dojo-loader-catches": 0,
26 | "config-tlmSiblingOfDojo": 0,
27 | "dojo-amd-factory-scan": 0,
28 | "dojo-combo-api": 0,
29 | "dojo-config-api": 1,
30 | "dojo-config-require": 0,
31 | "dojo-debug-messages": 0,
32 | "dojo-dom-ready-api": 1,
33 | "dojo-firebug": 0,
34 | "dojo-guarantee-console": 1,
35 | "dojo-has-api": 1,
36 | "dojo-inject-api": 1,
37 | "dojo-loader": 1,
38 | "dojo-log-api": 0,
39 | "dojo-modulePaths": 0,
40 | "dojo-moduleUrl": 0,
41 | "dojo-publish-privates": 0,
42 | "dojo-requirejs-api": 0,
43 | "dojo-sniff": 1,
44 | "dojo-sync-loader": 0,
45 | "dojo-test-sniff": 0,
46 | "dojo-timeout-api": 0,
47 | "dojo-trace-api": 0,
48 | "dojo-undef-api": 0,
49 | "dojo-v1x-i18n-Api": 1,
50 | "dom": 1,
51 | "host-browser": 1,
52 | "extend-dojo": 1
53 | },
54 | packages:[{
55 | name: "dojo",
56 | location: "dojo"
57 | },{
58 | name: "dijit",
59 | location: "dijit"
60 | },{
61 | name: "dojox",
62 | location: "dojox"
63 | },{
64 | name: "app",
65 | location: "app"
66 | }],
67 | layers: {
68 | "dojo/dojo": {
69 | include: [ "dojo/dojo", "dojo/i18n", "dojo/domReady","app/app"],
70 | customBase: true,
71 | boot: true
72 | }
73 | }
74 | };
75 | })();
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "semantic-dojo",
3 | "version": "0.2.0",
4 | "title": "Semantic Dojo",
5 | "description": "A responsive Dojo theme that harnesses the style awesomeness of Semantic UI Framework for powerful and modern Web apps.",
6 | "homepage": "http://websemantics.ca",
7 | "author": "Adnan M.Sagar, PhD.
",
8 | "license": "MIT",
9 | "repository": {
10 | "type": "git",
11 | "url": "git://github.com/websemantics/semantic-dojo.git"
12 | },
13 | "bugs": {
14 | "url": "https://github.com/websemantics/semantic-dojo.git/issues"
15 | },
16 | "peerDependencies": {
17 | "better-console": "*",
18 | "del": "*",
19 | "extend": "*",
20 | "gulp": "*",
21 | "gulp-autoprefixer": "*",
22 | "gulp-chmod": "*",
23 | "gulp-clone": "*",
24 | "gulp-concat": "*",
25 | "gulp-concat-css": "*",
26 | "gulp-copy": "*",
27 | "gulp-flatten": "*",
28 | "gulp-header": "*",
29 | "gulp-help": "*",
30 | "gulp-if": "*",
31 | "gulp-less": "*",
32 | "gulp-minify-css": "*",
33 | "gulp-notify": "*",
34 | "gulp-plumber": "*",
35 | "gulp-print": "*",
36 | "gulp-rename": "*",
37 | "gulp-replace": "*",
38 | "gulp-rtlcss": "*",
39 | "gulp-uglify": "*",
40 | "gulp-util": "*",
41 | "gulp-watch": "*",
42 | "map-stream": "*",
43 | "require-dot-file": "*",
44 | "yamljs": "*"
45 | },
46 | "dependencies": {
47 | "better-console": "*",
48 | "del": "^1.2.0",
49 | "extend": "^2.0.1",
50 | "gulp": "^3.9.0",
51 | "gulp-autoprefixer": "^2.3.1",
52 | "gulp-chmod": "^1.2.0",
53 | "gulp-clone": "^1.0.0",
54 | "gulp-concat": "^2.6.0",
55 | "gulp-concat-css": "^2.2.0",
56 | "gulp-copy": "0.0.2",
57 | "gulp-flatten": "^0.1.0",
58 | "gulp-header": "^1.2.2",
59 | "gulp-help": "^1.6.0",
60 | "gulp-if": "^1.2.5",
61 | "gulp-json-editor": "^2.2.1",
62 | "gulp-less": "^3.0.3",
63 | "gulp-minify-css": "^1.2.0",
64 | "gulp-notify": "^2.2.0",
65 | "gulp-plumber": "^1.0.1",
66 | "gulp-print": "^1.1.0",
67 | "gulp-prompt": "^0.1.2",
68 | "gulp-rename": "^1.2.2",
69 | "gulp-replace": "^0.5.3",
70 | "gulp-rtlcss": "^0.1.4",
71 | "gulp-uglify": "^1.2.0",
72 | "gulp-util": "^3.0.6",
73 | "gulp-watch": "^4.3.1",
74 | "jquery": "^2.1.4",
75 | "map-stream": "^0.1.0",
76 | "mkdirp": "^0.5.1",
77 | "require-dot-file": "^0.4.0",
78 | "run-sequence": "^1.1.0",
79 | "wrench": "https://github.com/derekslife/wrench-js/tarball/156eaceed68ed31ffe2a3ecfbcb2be6ed1417fb2",
80 | "yamljs": "^0.2.3"
81 | },
82 | "devDependencies": {
83 | "github": "^0.2.4",
84 | "gulp-concat-filenames": "^1.0.0",
85 | "gulp-debug": "^2.0.1",
86 | "gulp-git": "^1.2.4",
87 | "gulp-tap": "^0.1.3",
88 | "merge-stream": "^0.1.7"
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/app/data/countries.json:
--------------------------------------------------------------------------------
1 | {
2 | "identifier": "id",
3 | "label": "name",
4 | "items": [
5 | { "id": "AF", "name":"Africa", "type":"continent", "population":"900 million", "area": "30,221,532 sq km",
6 | "timezone": "-1 UTC to +4 UTC",
7 | "children":[{"_reference":"EG"}, {"_reference":"KE"}, {"_reference":"SD"}] },
8 | { "id": "EG", "name":"Egypt", "type":"country" },
9 | { "id": "KE", "name":"Kenya", "type":"country",
10 | "children":[{"_reference":"Nairobi"}, {"_reference":"Mombasa"}] },
11 | { "id": "Nairobi", "name":"Nairobi", "type":"city" },
12 | { "id": "Mombasa", "name":"Mombasa", "type":"city" },
13 | { "id": "SD", "name":"Sudan", "type":"country",
14 | "children":{"_reference":"Khartoum"} },
15 | { "id": "Khartoum", "name":"Khartoum", "type":"city" },
16 | { "id": "AS", "name":"Asia", "type":"continent",
17 | "children":[{"_reference":"CN"}, {"_reference":"IN"}, {"_reference":"RU"}, {"_reference":"MN"}] },
18 | { "id": "CN", "name":"China", "type":"country" },
19 | { "id": "IN", "name":"India", "type":"country" },
20 | { "id": "RU", "name":"Russia", "type":"country" },
21 | { "id": "MN", "name":"Mongolia", "type":"country" },
22 | { "id": "OC", "name":"Oceania", "type":"continent", "population":"21 million",
23 | "children":{"_reference":"AU"}},
24 | { "id": "AU", "name":"Australia", "type":"country", "population":"21 million"},
25 | { "id": "EU", "name":"Europe", "type":"continent",
26 | "children":[{"_reference":"DE"}, {"_reference":"FR"}, {"_reference":"ES"}, {"_reference":"IT"}] },
27 | { "id": "DE", "name":"Germany", "type":"country" },
28 | { "id": "FR", "name":"France", "type":"country" },
29 | { "id": "ES", "name":"Spain", "type":"country" },
30 | { "id": "IT", "name":"Italy", "type":"country" },
31 | { "id": "NA", "name":"North America", "type":"continent",
32 | "children":[{"_reference":"MX"}, {"_reference":"CA"}, {"_reference":"US"}] },
33 | { "id": "MX", "name":"Mexico", "type":"country", "population":"108 million", "area":"1,972,550 sq km",
34 | "children":[{"_reference":"Mexico City"}, {"_reference":"Guadalajara"}] },
35 | { "id": "Mexico City", "name":"Mexico City", "type":"city", "population":"19 million", "timezone":"-6 UTC"},
36 | { "id": "Guadalajara", "name":"Guadalajara", "type":"city", "population":"4 million", "timezone":"-6 UTC" },
37 | { "id": "CA", "name":"Canada", "type":"country", "population":"33 million", "area":"9,984,670 sq km",
38 | "children":[{"_reference":"Ottawa"}, {"_reference":"Toronto"}] },
39 | { "id": "Ottawa", "name":"Ottawa", "type":"city", "population":"0.9 million", "timezone":"-5 UTC"},
40 | { "id": "Toronto", "name":"Toronto", "type":"city", "population":"2.5 million", "timezone":"-5 UTC" },
41 | { "id": "US", "name":"United States of America", "type":"country" },
42 | { "id": "SA", "name":"South America", "type":"continent",
43 | "children":[{"_reference":"BR"}, {"_reference":"AR"}] },
44 | { "id": "BR", "name":"Brazil", "type":"country", "population":"186 million" },
45 | { "id": "AR", "name":"Argentina", "type":"country", "population":"40 million" }
46 | ]}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ```
2 | __________________________
3 | |░░░░░░░░░░░░░░░░░░░░░░░░░░|
4 | |░░░░░░░░░|` ,|░░░░░░░░|
5 | |░░░░░░░| |░░░░░░░| __ _________ __ _________
6 | |░░░░░░░| |░░░░░░░░░░░░░░| | | |_________| |__| |_________|
7 | |░░░░░░░| `|░░░░░░░░░░| ______| | _________ __ _________
8 | |░░░░░░░░░░| |░░░░░░░| ( ___ | ( ___ ) | | ( ___ )
9 | |░░░░░░░░░░░░░░| |░░░░░░| | | | | | | | | | | | | | |
10 | |░░░░░░░| `.,. .|░░░░░░| | | | | | | | | | | | | | |
11 | |░░░░░░░░| |░░░░░░░░| | | | | | | | | | | | | | |
12 | |░░░░░░░░░░░░░░░░░░░░░░░░░░| | |___| | | |___| | | | | |___| |
13 | |░░░░░░░░░░░░░░░░░░░░░░░░░░| (_________) (_________) | | (_________)
14 | | |
15 | TOOLKIT |\_/ /
16 | \___/
17 | ```
18 | > Last update: 2 August 2016
19 |
20 | [](https://travis-ci.org/websemantics/semantic-dojo)
21 |
22 | A responsive Dojo theme that harnesses the style awesomeness of [Semantic UI](http://semantic-ui.com/) Framework with [Dojo Toolkit](https://dojotoolkit.org/) powerful UI widgets, for modern Web apps.
23 |
24 | A new method of building Dijit Themes following the Semantic UI approach with a similar folder structure throught this project.
25 |
26 | Dijit widgets directly import and inherint CSS from their Semantic UI conterparts, if any!
27 |
28 | Try [live demo](http://websemantics.github.io/semantic-dojo).
29 | ------
30 | 
31 |
32 | ## Install
33 |
34 | This will generate the master Semantic Dojo styles at `dist/semantic-dojo.css`, assets at `dist/themes` and compiled Dojo app at `dist/src/app`
35 |
36 | Clone locally
37 | ```
38 | git clone https://github.com/websemantics/semantic-dojo
39 | ```
40 |
41 | Run build script
42 | ```
43 | ./build.sh
44 | ```
45 |
46 | View `index.html` or `src/app/index.html`
47 |
48 | ## Guide
49 |
50 | [Semantic UI](http://semantic-ui.com/) is an awesome CSS framework that provides a wide range of UI components. A powerful feature of Semantic UI is the ability to build various themes to each of its compoenents. For example, the Button widget comes with a varity of themes for example, flat default, basic, github, raised and many more.
51 |
52 | [Semantic Dojo](https://github.com/websemantics/semantic-dojo) brings these awesome features to Dojo Toolkit, allowing those who love DTK to build modern Web apps.
53 |
54 | To test different themes for the supported widgets, go to 'less/theme.config' and change the Button theme for example from 'default' to 'raised': `@button : 'raised';`, refresh and enjoy!
55 |
56 | This will build the dojo app to `dist/app` folder, and also run `gulp` for Semantic Dojo.
57 |
58 | ## Development
59 |
60 | To contribute to Semantic Dojo, follow the installation steps above then edit:
61 |
62 | - The main dev page, `src/app/dev.html`
63 | - Semantic Dojo home page, `src/app/index.html`
64 |
65 | ## Logo
66 |
67 | 
68 |
69 | ## Credits
70 |
71 | Few of this themes elements have been a port from [Dojo Flat Theme](https://github.com/Esri/dojo-theme-flat) with adjucements for the Semantic UI generic styles and user experince.
72 |
73 | ## Open Source Projects Used
74 |
75 | * Semantic Dojo Styles
76 | https://github.com/websemantics/semantic-dojo-styles
77 | * Dojo Flat Theme - https://github.com/Esri/dojo-theme-flat
78 | * Semantic UI - https://github.com/Semantic-Org/Semantic-UI
79 | * Dojo Boilerplate - https://github.com/csnover/dojo-boilerplate
80 |
--------------------------------------------------------------------------------
/src/app/widgets/Temp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Main Widget
3 | *
4 | * For development of individual widgets purposes only
5 | *
6 | * @link http://websemantics.ca/ibuild
7 | * @link http://ibuild.io
8 | * @author WebSemantics, Inc.
9 | * @author Adnan M.Sagar, PhD.
10 | * @copyright 2012-2015 Web Semantics, Inc.
11 | * @since August 28th 2015
12 | * @package SemanticDojo\Main
13 | */
14 |
15 | define(["dojo/_base/declare",
16 | "dojo",
17 | "dojo/on",
18 | "dojo/dom",
19 | "dijit/registry",
20 | "dijit/_WidgetBase",
21 | "dijit/_TemplatedMixin",
22 | "dijit/_WidgetsInTemplateMixin",
23 | "dojo/text!../template/temp.html",
24 | "dijit/form/Select",
25 | "dijit/form/VerticalSlider",
26 | "dijit/form/CheckBox",
27 | "dijit/form/RadioButton",
28 | "dijit/form/HorizontalSlider",
29 | "dijit/form/HorizontalRule",
30 | "dijit/form/HorizontalRuleLabels",
31 | "dijit/form/TextBox",
32 | "dijit/form/Textarea",
33 | "dijit/form/ValidationTextBox",
34 | "dijit/layout/ContentPane",
35 | "dijit/layout/TabContainer",
36 | "dijit/form/DropDownButton",
37 | "dijit/DropDownMenu",
38 | "dijit/MenuItem",
39 | "dijit/TooltipDialog",
40 | "dijit/Tooltip",
41 | "dijit/form/Form",
42 | "dijit/ColorPalette",
43 | "dijit/ProgressBar",
44 | "dijit/layout/BorderContainer",
45 | "dijit/Tree",
46 | "dijit/tree/ForestStoreModel",
47 | "dojo/data/ItemFileWriteStore"
48 |
49 | ], function (declare, dojo, on, dom, registry, WidgetBase, TemplatedMixin,WidgetsInTemplateMixin,
50 | template, Select, VerticalSlider, CheckBox,RadioButton, HorizontalSlider,
51 | HorizontalRule,HorizontalRuleLabels,TextBox, Textarea, ValidationTextBox,
52 | ContentPane, TabContainer,DropDownButton, DropDownMenu, MenuItem, TooltipDialog,Tooltip, Form,
53 | ColorPalette, ProgressBar, BorderContainer, Tree, ForestStoreModel, ItemFileWriteStore) {
54 | return declare([WidgetBase, TemplatedMixin, WidgetsInTemplateMixin], {
55 |
56 | templateString: template,
57 |
58 | widgetsInTemplate: true,
59 |
60 | postCreate: function () {
61 |
62 | this.inherited(arguments);
63 |
64 |
65 |
66 |
67 |
68 | /*
69 |
70 | var tooltipDialog2 = new TooltipDialog({
71 | content: '\
72 | \
92 | '
93 | });
94 |
95 | this['tooltipdialogButton2'].set("dropDown", tooltipDialog2);
96 |
97 | */
98 |
99 |
100 |
101 |
102 | // var menu = new DropDownMenu({ style: "display: none;"});
103 | // var menuItem1 = new MenuItem({
104 | // label: "Save",
105 | // iconClass:"dijitEditorIcon dijitEditorIconSave",
106 | // onClick: function(){ alert('save'); }
107 | // });
108 | // menu.addChild(menuItem1);
109 |
110 | // var menuItem2 = new MenuItem({
111 | // label: "Cut",
112 | // iconClass:"dijitEditorIcon dijitEditorIconCut",
113 | // onClick: function(){ alert('cut'); }
114 | // });
115 |
116 | // menu.addChild(menuItem2);
117 | // menu.startup();
118 |
119 | // var button = new DropDownButton({
120 | // label: "hello!",
121 | // name: "programmatic2",
122 | // dropDown: menu,
123 | // id: "progButton"
124 | // }).startup();
125 |
126 | // this['dropDownButtonContainer'].appendChild(button.domNode);
127 |
128 | // ---------------------------------------------------------------
129 | // Remove loading ...
130 | // ---------------------------------------------------------------
131 | dojo.destroy("loading");
132 |
133 | },
134 | startup: function () {
135 | this.inherited(arguments);
136 | }
137 | });
138 | });
--------------------------------------------------------------------------------
/src/app/resources/css/main.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Semantic Dojo Styles
3 | *
4 | * @author Adnan M.Sagar, PhD.
5 | * @copyright 2002-2015 Web Semantics, Inc. (http://websemantics.ca)
6 | * @license http://www.opensource.org/licenses/mit-license.php MIT
7 | * @link http://websemantics.ca
8 | * @package websemantics/semantic-dojo
9 | */
10 |
11 |
12 | @font-face {
13 | font-family: 'Conv_origami_making';
14 | src: url('../fonts/origami/origami_making.eot');
15 | src: local('☺'), url('../fonts/origami/origami_making.woff') format('woff'), url('../fonts/origami/origami_making.ttf') format('truetype'), url('../fonts/origami/origami_making.svg') format('svg');
16 | font-weight: normal;
17 | font-style: normal;
18 | }
19 |
20 | /*********************************************************************************
21 | Flay Theme
22 | *********************************************************************************/
23 |
24 | html, body {
25 | height: 100%;
26 | width: 100%;
27 | margin: 0;
28 | padding: 0;
29 | }
30 |
31 | body {
32 | font-family: Lato, 'Helvetica Neue', Arial;
33 | background-color: #ffffff;
34 | }
35 |
36 | * { outline: none !important; }
37 |
38 | *.unselectable{
39 | -moz-user-select: -moz-none;
40 | -khtml-user-select: none;
41 | -webkit-user-select: none;
42 | -ms-user-select: none;
43 | user-select: none;
44 | }
45 |
46 | #container{
47 | width: 100%;
48 | height: 100%;
49 | overflow: hidden;
50 | padding: 0px;
51 | margin: 0px;
52 | }
53 |
54 | #header {
55 | height: 50px;
56 | background: #ffffff;
57 | border:none!important;
58 | padding:15px;
59 | overflow: hidden;
60 | }
61 |
62 | #header h3 {
63 | width:100%;
64 | }
65 |
66 | #center {
67 | border:none!important;
68 | padding: 0px;
69 | }
70 |
71 | .secondary {
72 | color: #999;
73 | }
74 |
75 | .completed,
76 | .in-progress,
77 | .almost,
78 | .not-started {
79 | font-size: 11px;
80 | color: white;
81 | border-left: 1px solid #ddd;
82 | }
83 |
84 | .completed {
85 | background: #468847;
86 | }
87 |
88 | .in-progress {
89 | background: #F89406;
90 | }
91 |
92 | .almost {
93 | background: #3A87AD;
94 | }
95 |
96 | .not-started {
97 | background: #B94A48;
98 | }
99 |
100 | header {}
101 |
102 | header h2 {
103 | font-size: 26px;
104 | text-align: center;
105 | margin: 15px;
106 | }
107 |
108 | .content-wrapper {
109 | margin: 6px auto;
110 | position: relative;
111 | z-index: 1;
112 | }
113 |
114 | .section-title {
115 | background: none repeat scroll 0 0 #00B9F2;
116 | color: white;
117 | display: block;
118 | float: left;
119 | padding: 4px 15px;
120 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35);
121 | margin-bottom: 0;
122 | }
123 |
124 | .content-table {
125 | width: 100%;
126 | text-align: left;
127 | border-spacing: 0;
128 | background-color: #f8f8f8;
129 | border-collapse: collapse;
130 | margin: 0;
131 | table-layout: fixed;
132 |
133 | }
134 | .content-table > tbody > tr > td,
135 | .content-table > thead > tr > th {
136 | padding: 8px 8px 8px 15px;
137 | text-align: left;
138 | vertical-align: middle;
139 | }
140 |
141 | .content-table > thead > tr > th {
142 | font-size: 16px;
143 | }
144 |
145 | .content-table > tbody > tr:nth-child(odd) {
146 | background-color: #f5f5f5;
147 | }
148 |
149 |
150 | /*********************************************************************************
151 | Custmom Styles
152 | *********************************************************************************/
153 |
154 | .origami {
155 | font-family: 'Conv_origami_making', Lato, 'Helvetica Neue', Arial!important;
156 | }
157 |
158 | #example .example > h4:first-child {
159 | font-size: 18px;
160 | margin: 0em 0em 0em;
161 | }
162 |
163 | .claro .container.head {
164 | background-color: #00B5AD;
165 | height: 55vh;
166 | margin-left: auto !important;
167 | margin-right: auto !important;
168 | min-height: 400px;
169 | -webkit-box-align: center;
170 | -webkit-align-items: center;
171 | -ms-flex-align: center;
172 | align-items: center;
173 | display: -webkit-box;
174 | display: -webkit-flex;
175 | display: -ms-flexbox;
176 | display: flex;
177 | -webkit-box-pack: center;
178 | -webkit-justify-content: center;
179 | -ms-flex-pack: center;
180 | justify-content: center;
181 | }
182 |
183 | .head h1.title {
184 | font-size: 3.75em;
185 | font-weight: 100;
186 | }
187 |
188 | .ui.inverted {
189 | color:#ffffff;
190 | }
191 |
192 | .ui label {
193 | padding-left: 5px;
194 | }
195 |
196 | .field label {
197 | display: block;
198 | margin: 0em 0em 0.28571429rem 0em;
199 | color: rgba(0, 0, 0, 0.87);
200 | font-size: 0.92857143em;
201 | font-weight: bold;
202 | text-transform: none;
203 | }
204 |
--------------------------------------------------------------------------------
/src/app/widgets/Main.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Main Widget
3 | *
4 | * Contains index.html content
5 | *
6 | * @link http://websemantics.ca/ibuild
7 | * @link http://ibuild.io
8 | * @author WebSemantics, Inc.
9 | * @author Adnan M.Sagar, PhD.
10 | * @copyright 2012-2015 Web Semantics, Inc.
11 | * @since August 28th 2015
12 | * @package SemanticDojo\Main
13 | */
14 |
15 | define(["dojo/_base/declare",
16 | "dojo",
17 | "dijit/registry",
18 | "dijit/_WidgetBase",
19 | "dijit/_TemplatedMixin",
20 | "dijit/_WidgetsInTemplateMixin",
21 | "dojo/text!../template/main.html",
22 | "dijit/form/Select",
23 | "dijit/form/VerticalSlider",
24 | "dijit/form/CheckBox",
25 | "dijit/form/RadioButton",
26 | "dijit/form/HorizontalSlider",
27 | "dijit/form/HorizontalRule",
28 | "dijit/form/HorizontalRuleLabels",
29 | "dijit/form/TextBox",
30 | "dijit/form/Textarea",
31 | "dijit/form/ValidationTextBox",
32 | "dijit/layout/ContentPane",
33 | "dijit/layout/TabContainer",
34 | "dijit/form/DropDownButton",
35 | "dijit/TooltipDialog",
36 | "dijit/Tooltip",
37 | "dijit/form/Form",
38 | "dijit/ColorPalette",
39 | "dijit/ProgressBar",
40 | "dijit/layout/BorderContainer",
41 | "dijit/Tree",
42 | "dijit/tree/ForestStoreModel",
43 | "dojo/data/ItemFileWriteStore"
44 |
45 | ], function (declare, dojo, registry, WidgetBase, TemplatedMixin,WidgetsInTemplateMixin,
46 | template, Select, VerticalSlider, CheckBox,RadioButton, HorizontalSlider,
47 | HorizontalRule,HorizontalRuleLabels,TextBox, Textarea, ValidationTextBox,
48 | ContentPane, TabContainer,DropDownButton,TooltipDialog,Tooltip, Form,
49 | ColorPalette, ProgressBar, BorderContainer, Tree, ForestStoreModel, ItemFileWriteStore) {
50 | return declare([WidgetBase, TemplatedMixin, WidgetsInTemplateMixin], {
51 | templateString: template,
52 | widgetsInTemplate: true,
53 |
54 | postCreate: function () {
55 |
56 | this.inherited(arguments);
57 | // ----------------------------------------------------
58 | // Colored Vertical Sliders
59 | // ----------------------------------------------------
60 |
61 | var colors = ['red','orange','yellow','olive','green','teal','blue','violet','purple','pink','brown','grey','black'];
62 | for (var i = 0; i < colors.length; i++) {
63 | var color = colors[i];
64 | new VerticalSlider({
65 | name: "default vertical slider",
66 | 'class': color ,value: Math.floor((Math.random() * 100) + 1),
67 | intermediateChanges: true,
68 | style: "margin:10px 30px 10px 10px;height:240px;float:left",
69 | showButtons: false
70 | }, this['vs_' + (i+1)]);
71 | }
72 |
73 | // ----------------------------------------------------
74 | // Create Horizontal Sliders
75 | // ----------------------------------------------------
76 |
77 | new HorizontalSlider({
78 | name: "default horizontal slider",
79 | value: 50, 'class' : 'orange',
80 | style: "margin:10px 10px 30px",
81 | showButtons:false
82 | }, this["hs_1"]);
83 |
84 | var sliderRulesH = new HorizontalRule({
85 | count: 11,
86 | style: { height: "5px" }
87 | });
88 |
89 | var sliderRuleLabelsH = new HorizontalRuleLabels({
90 | labels: ["low", "mid", "high"]
91 | });
92 |
93 | var horizontalSliderAdvanced = new HorizontalSlider({
94 | name: "default horizontal slider",
95 | value: 50, 'class' : 'yellow',
96 | style: "margin:10px 10px 30px"
97 | }, this["hs_2"]);
98 |
99 | sliderRulesH.placeAt(horizontalSliderAdvanced.containerNode);
100 | sliderRuleLabelsH.placeAt(horizontalSliderAdvanced.containerNode);
101 |
102 | // ----------------------------------------------------
103 | // Create Tabs
104 | // ----------------------------------------------------
105 |
106 | var tcpnestedBottom1 = new ContentPane({
107 | title: "Tab 1",
108 | content: " Nested tab container(bottom)"
109 | });
110 | var tcpnestedBottom2 = new ContentPane({
111 | title: "Tab 2"
112 | });
113 | var tcpnestedBottom3 = new ContentPane({
114 | title: "Tab 3"
115 | });
116 | var tcnestedBottom = new TabContainer({
117 | tabPosition: "top",
118 | nested: true
119 | });
120 | tcnestedBottom.addChild(tcpnestedBottom1);
121 | tcnestedBottom.addChild(tcpnestedBottom2);
122 | tcnestedBottom.addChild(tcpnestedBottom3);
123 |
124 | tcnestedBottom.startup();
125 |
126 | var tcbp1 = new ContentPane({title: "Tab 1",content: tcnestedBottom});
127 | var tcbp2 = new ContentPane({title: "Tab2"});
128 | var tcbp3 = new ContentPane({title: "Tab 3"});
129 | var tcbp4 = new ContentPane({title: "Tab 4"});
130 | var tcbp5 = new ContentPane({title: "Tab 5"});
131 | var tcb = new TabContainer({
132 | region : 'center',
133 | tabPosition: "top"},this.tabContainer);
134 |
135 | tcb.addChild(tcbp1);
136 | tcb.addChild(tcbp2);
137 | tcb.addChild(tcbp3);
138 | tcb.addChild(tcbp4);
139 | tcb.addChild(tcbp5);
140 |
141 | // ----------------------------------------------------
142 | // Create Tooltip
143 | // ----------------------------------------------------
144 | new Tooltip({
145 | connectId: this['tooltipAbove'],
146 | label: "tooltip: above",
147 | position: ['above']
148 | });
149 | new Tooltip({
150 | connectId: this['tooltipAboveCentered'],
151 | label: "tooltip: above centered",
152 | position: ['above-centered']
153 | });
154 | new Tooltip({
155 | connectId: this['tooltipBelow'],
156 | label: "tooltip: below",
157 | position: ['below']
158 | });
159 | new Tooltip({
160 | connectId: this['tooltipBelowCentered'],
161 | label: "tooltip: below centered",
162 | position: ['below-centered']
163 | });
164 | new Tooltip({
165 | connectId: this['tooltipBefore'],
166 | label: "tooltip: before",
167 | position: ['before']
168 | });
169 | new Tooltip({
170 | connectId: this['tooltipAfter'],
171 | label: "tooltip: after",
172 | position: ['after']
173 | });
174 |
175 | // ----------------------------------------------------
176 | // Create Tooltip Dialog
177 | // ----------------------------------------------------
178 |
179 | var tooltipDialog1 = new TooltipDialog({
180 | content: '