Rashaad Essop avatar Rashaad Essop committed 641ab24

Imported from svn by Bitbucket

Comments (0)

Files changed (76)

build/build-windows-deploy.iss

+; Based on a script found here: http://www.astuteq.de/blog/webrunner-packaging-howto/
+;
+; - Inno-Setup v5.4.2, IS-Tool v5.3.0.1
+;
+; SEE THE INNO-SETUP DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+; If this is defined by command line params, then we don't need to override it.
+; NOTE: If it's not defined at the command line, it won't include the SVN data.
+#if Defined(MyAppVersion)
+#else
+  #define MyAppVersion "0.9"
+#endif
+
+; Macros, change to your needs
+#define MyAppName "Story Steward"
+; NMS: TODO: Not sure what to put here, yet, was "My Company, Inc."
+#define MyAppPublisher ""
+#define MyAppURL "http://code.google.com/p/story-steward/"
+; NMS: TODO: Again, not sure what to put here, was "MyApp.exe"
+;#define MyAppExeName ""
+#define MySetupOutputDir = "..\deploy"
+
+#define MyFirefoxInstDir = "..\vendor\webrunner-components\firefox-6.0.2"
+#define MyWebAppHomeDir = "..\vendor\webrunner-components\story.steward@webrunner.app"
+#define MyStoryStewardReleaseDir = "..\release"
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{BD6876F0-7D33-4C1D-A7AD-6C5DDDA90907}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+DefaultDirName={pf}\{#MyAppName}
+DefaultGroupName={#MyAppName}
+OutputDir={#MySetupOutputDir}
+; NMS: The build process specifies the output file, with version numbers, from command
+; line. If these are not set, then we are probably just 'testing' the compile. We don't
+; want this output.
+OutputBaseFilename=delete-me-inno-setup-test
+Compression=lzma2
+SolidCompression=yes
+PrivilegesRequired=none
+
+[Languages]
+Name: english; MessagesFile: compiler:Default.isl
+; NMS: I don't support German in the app yet, so I shouldn't support it in the install.
+;Name: german; MessagesFile: compiler:Languages\German.isl
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+
+[Files]
+Source: {#MyFireFoxInstDir}\*; Excludes: testpilot@labs.mozilla.com; Flags: recursesubdirs ignoreversion; DestDir: {app}
+Source: {#MyWebAppHomeDir}\*; Excludes: profile,application.ini; Flags: recursesubdirs; DestDir: {app}\webapp
+Source: {#MyWebAppHomeDir}\profile\extensions\*; Excludes: webrunner-packager@salsitasoft.com; Flags: recursesubdirs; DestDir: {userappdata}\WebApps\{#MyAppName}\Profile\extensions
+; NMS: Removed the next line as file was not found (probably because I'm using FF 6, not 5).
+;Source: {#MyWebAppHomeDir}\profile\extensions\webrunner@salsitasoft.com\stub\portalMAPI.dll; DestDir: {app}\webapp\stub; Flags: ignoreversion
+Source: {#MyWebAppHomeDir}\profile\extensions\webrunner@salsitasoft.com\stub\application.ini; DestDir: {app}\webapp\stub; Flags: ignoreversion; AfterInstall: MyAfterInstall()
+;Optional: If you want to deliver a special base userChrome.css with your webapp
+; NMS: Removed the next two lines as file was not found (probably because I'm using FF 6, not 5).
+;Source: {#MyWebAppHomeDir}\profile\chrome\*; Excludes: userChrome.css; Flags: ignoreversion; DestDir: {userappdata}\WebApps\{code:GetName}\Profile\chrome
+;Source: {#MyWebAppHomeDir}\profile\chrome\userChrome.css; Flags: ignoreversion; DestDir: {userappdata}\WebApps\{code:GetName}\Profile\chrome; AfterInstall: MyAfterInstalluserChrome(ExpandConstant('{code:GetName}'))
+Source: {#MyStoryStewardReleaseDir}\*; Flags: recursesubdirs ignoreversion; DestDir: {app}\storysteward
+
+[Icons]
+Name: {userprograms}\{groupname}\{#MyAppName}; Filename: {app}\webapp\stub\webrunner.exe; Parameters: "-webapp ""{app}\webapp"""; WorkingDir: {app}; IconFilename: {app}\webapp\icons\default\main-window.ico; IconIndex: 0
+Name: {userprograms}\{groupname}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
+Name: {userdesktop}\{#MyAppName}; Filename: {app}\webapp\stub\webrunner.exe; Tasks: desktopicon; Parameters: "-webapp ""{app}\webapp"""; WorkingDir: {app}; IconFilename: {app}\webapp\icons\default\main-window.ico; IconIndex: 0
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filename: {app}\webapp\stub\webrunner.exe; Tasks: quicklaunchicon; Parameters: "-webapp ""{app}\webapp"""; WorkingDir: {app}; IconFilename: {app}\webapp\icons\default\main-window.ico; IconIndex: 0
+
+[Run]
+Filename: {app}\webapp\stub\webrunner.exe; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent; Parameters: "-webapp ""{app}\webapp"""; WorkingDir: {app}
+
+[Registry]
+;Registry Keys (if you need some?)
+
+[UninstallDelete]
+Name: {app}\*; Type: filesandordirs
+Name: {userappdata}\WebApps\{#MyAppName}\*; Type: filesandordirs
+Name: {app}; Type: filesandordirs
+
+[Code]
+
+procedure MyAfterInstall();
+var
+  ExpandedFileName : String;
+  uri : String;
+  name: String;
+
+begin
+  //post installation code: prepare application.ini, webapp.ini, etc.
+
+  ExpandedFileName := ExpandConstant(CurrentFileName);
+  name := '{#MyAppName}';
+
+  //prepare application.ini
+  SaveStringToFile(ExpandedFileName, #13 '[Environment]' #13, True);
+  SaveStringToFile(ExpandedFileName, 'GRE_HOME=' +  ExpandConstant('{app}') + '' #13, True);
+  SaveStringToFile(ExpandedFileName, 'XRE_PROFILE_PATH=' + ExpandConstant('{userappdata}') + '\WebApps\' + name + '\Profile' + #13, True);
+  //MsgBox('MyAfterInstall server = ' + server + ' dir = ' + ExpandConstant('{app}'), mbInformation, MB_OK);
+
+  //build webapp-uri
+  uri := ExpandConstant('{app}');
+  StringChangeEx(uri, '\', '/', True);
+  uri := 'file:///' + uri + '/storysteward/index.html';
+  //MsgBox('MyAfterInstall uri = ' + uri, mbInformation, MB_OK);
+
+  //prepare webapp.ini
+  SetIniString('Parameters', 'uri', uri, ExpandConstant('{app}') + '\webapp\webapp.ini');
+  //MsgBox('MyAfterInstall name = ' + name, mbInformation, MB_OK);
+  SetIniString('Parameters', 'name', name, ExpandConstant('{app}') + '\webapp\webapp.ini');
+  SetIniString('App', 'Name', name, ExpandConstant('{app}') + '\webapp\override.ini');
+end;

build/buildApplication.js

+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+require("dojo", "fileUtil");
+require("my", "fixFileUtil")
+require("dojo", "logger");
+require("my", "info");
+
+(function() {
+    var AppInfoText;
+    var jsonSchema;
+    
+    if (params.targets.development || params.targets.release) {
+        AppInfoText = "/* This file is automatically generated */\n" +
+        "ApplicationInfo = {\n" +
+        "	Title: \"" +
+        AppInfo.Title +
+        "\",\n" +
+        "	Name: \"" +
+        AppInfo.Name +
+        "\",\n" +
+        "	ID: \"" +
+        AppInfo.ID +
+        "\",\n" +
+        "	Version: {\n" +
+        "		Major: \"" +
+        AppInfo.Version.Major +
+        "\",\n" +
+        "		Minor: \"" +
+        AppInfo.Version.Minor +
+        "\",\n" +
+        "		Revision: \"" +
+        AppInfo.Version.Revision +
+        "\"\n" +
+        "	}\n" +
+        "}\n";
+        jsonSchema = fileUtil.readFile(params.scriptPath + "../vendor/json-schema/validate.js");
+        jsonSchema = jsonSchema.replace("module.exports", "JSON = window.JSON || {}; JSON.schema");
+    }
+    
+    if (params.targets.development) {
+    
+        logger.info("Copying test to development");
+        fileUtil.copyDir(params.scriptPath + "../test/", params.scriptPath + "../development/", /^(?:.*\.(?:html|js|htm|css|json|txt))|LICENSE|NOTICE$/g, true);
+        logger.info("Copying source to development");
+        fileUtil.copyDir(params.scriptPath + "../source/", params.scriptPath + "../development/", /^(?:.*\.(?:html|js|htm|css|txt))|LICENSE|NOTICE$/g, true);
+        logger.info("Copying resources to development");
+        fileUtil.copyFile(params.scriptPath + "../resources/icons/icons.png", params.scriptPath + "../development/resources/icons.png", true);
+        fileUtil.copyFile(params.scriptPath + "../resources/icons/readme.txt", params.scriptPath + "../development/resources/readme.txt", true);
+        fileUtil.copyFile(params.scriptPath + "../resources/quotes.js", params.scriptPath + "../development/resources/quotes.js", true);
+        logger.info("Copying non-dojo vendor to development");
+        fileUtil.copyFile(params.scriptPath + "../vendor/Math.uuid.js", params.scriptPath + "../development/js/Math.uuid.js", true);
+        fileUtil.saveFile(params.scriptPath + "../development/js/json-validate.js", jsonSchema);
+        logger.info("Copying version to development");
+        fileUtil.saveFile(params.scriptPath + "../development/js/appinfo.js", AppInfoText);
+    }
+    if (params.targets.release) {
+        logger.info("Copying source to release");
+        fileUtil.copyDir(params.scriptPath + "../source/", params.scriptPath + "../release/", {
+            include: /^(?:.*\.(?:html|js|htm|css|txt))|LICENSE|NOTICE$/g,
+            exclude: /^.*\/source\/js\/dojo\/my\/.*/g
+        }, true);
+        logger.info("Copying resources to release");
+        fileUtil.copyFile(params.scriptPath + "../resources/icons/icons.png", params.scriptPath + "../release/resources/icons.png", true);
+        fileUtil.copyFile(params.scriptPath + "../resources/icons/readme.txt", params.scriptPath + "../release/resources/readme.txt", true);
+        fileUtil.copyFile(params.scriptPath + "../resources/quotes.js", params.scriptPath + "../release/resources/quotes.js", true);
+        logger.info("Copying non-dojo vendor to release");
+        fileUtil.copyFile(params.scriptPath + "../vendor/Math.uuid.js", params.scriptPath + "../release/js/Math.uuid.js", true);
+        fileUtil.saveFile(params.scriptPath + "../release/js/json-validate.js", jsonSchema);
+        logger.info("Copying version to release");
+        fileUtil.saveFile(params.scriptPath + "../release/js/appinfo.js", AppInfoText);
+    }
+    logger.info("Files copied.")
+})();

build/buildDojo.js

+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+// TODO: The following link adds some stuff to the build process which might help:
+// http://asmodehn.wordpress.com/2011/09/07/dojo-toolkit-slim-build/
+require("dojo", "logger");
+require("my", "runprocess");
+
+(function() {
+    var jarPath = "../shrinksafe/";
+    var classPath = jarPath + "js.jar;" + jarPath + "shrinksafe.jar";
+    
+    
+    
+    if (params.targets.development || params.targets.release) {
+        // FUTURE: Pre-build, perhaps go through source and find dojo.requires and build 
+        // my own profile file.
+    }
+    
+    
+    /*
+     * NOTE: Yes, I'm aware of rhino's runCommand. The problem is that that function does
+     * not support setting the working directory. What I've done here to support these things
+     * appears to be quite simple, and it works.
+     * The working directory thing is necessary because the dojo build scripts use relative
+     * paths, and don't offer an easy option to avoid this.
+     */
+    if (params.targets.development) {
+        logger.info("Building dojo for development");
+        RunProcess(["java", "-classpath", classPath, "org.mozilla.javascript.tools.shell.Main", "build.js", "optimize=comments", "layerOptimize=comments", "cssOptimize=comments.keepLines", "mini=true", "profileFile=../../../../build/dojo-profile-development.js", "action=clean,release", "releaseDir=../../../../development/js"], params.buildScriptsPath, printer)
+    }
+    if (params.targets.release) {
+        logger.info("Building dojo for release");
+		if (params.targets.debug) {
+			RunProcess(["java", "-classpath", classPath, "org.mozilla.javascript.tools.shell.Main", "build.js", "optimize=comments", "copyTests=false", "layerOptimize=comments", "cssOptimize=comments.keepLines", "mini=true", "profileFile=../../../../build/dojo-profile-release.js", "action=clean,release", "releaseDir=../../../../release/js"], params.buildScriptsPath, printer);
+		} else {
+			RunProcess(["java", "-classpath", classPath, "org.mozilla.javascript.tools.shell.Main", "build.js", "optimize=shrinksafe", "copyTests=false", "layerOptimize=shrinksafe", "cssOptimize=comments", "mini=true", "stripConsole=warn", "profileFile=../../../../build/dojo-profile-release.js", "action=clean,release", "releaseDir=../../../../release/js"], params.buildScriptsPath, printer);
+		}
+    }
+    logger.info("Dojo built.")
+    
+})();

build/cleanApplication.js

+/*
+   Copyright 2011 Neil M. Sheldon
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+ */
+
+require("dojo","fileUtil");
+require("my","fixFileUtil");
+require("dojo","logger");
+
+function cleanOutputDir(path) {
+    var file = new java.io.File(path);
+    if (file.exists() && file.isDirectory()) {
+        var files = file.listFiles();
+        for (var i = 0; i < files.length; i++) {
+            if (files[i].getName() == "js") {
+                var jsfiles = files[i].listFiles();
+                for (var j = 0; j < jsfiles.length; j++) {
+                    if (jsfiles[j].getName() != "dojo") {
+                        fileUtil.deleteFile(jsfiles[j]);
+                        
+                    }
+                }
+            } else {
+                fileUtil.deleteFile(files[i]);
+            }
+        }
+    } else {
+        throw "Output file is not a directory."
+    }
+}
+
+if (params.targets.development) {
+    logger.info("Cleaning development");
+    cleanOutputDir(params.scriptPath + "../development/");
+}
+if (params.targets.release) {
+    logger.info("Cleaning release");
+    cleanOutputDir(params.scriptPath + "../release/");
+}
+logger.info("Cleaned.");

build/deployApplication.js

+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+require("dojo", "fileUtil");
+require("my", "fixFileUtil");
+require("dojo", "logger");
+require("my", "fileIterator");
+require("my", "info");
+
+(function() {
+    function CreatePackage(files, path) {
+        logger.info("Creating Package: " + path);
+        var zipstream = new java.util.zip.ZipOutputStream(new java.io.FileOutputStream(new java.io.File(path)));
+        var zipchannel = java.nio.channels.Channels.newChannel(zipstream);
+        try {
+            var file;
+            while (item = files.getCurrent()) {
+                logger.info("  Compressing: " + item.entry);
+                var sourcestream = new java.io.FileInputStream(item.file);
+                var sourcechannel = sourcestream.getChannel();
+                try {
+                    var entry = new java.util.zip.ZipEntry(item.entry);
+                    entry.setTime(item.file.lastModified());
+                    zipstream.putNextEntry(entry);
+                    sourcechannel.transferTo(0, sourcechannel.size(), zipchannel);
+                } finally {
+                    sourcechannel.close();
+                }
+                files.next();
+            }
+        } finally {
+            zipchannel.close();
+        }
+    }
+    
+    var filename = AppInfo.Name + "-" + AppInfo.Version.Major + "." + AppInfo.Version.Minor + "." + AppInfo.Version.Revision;
+    
+    if (params.targets.development) {
+        var base = params.scriptPath + "../development/";
+        var list = RecursiveFileIterator(base, null, true, false);
+        CreatePackage(list, params.scriptPath + "../deploy/" + filename + "-dev.zip");
+        
+    }
+    if (params.targets.release) {
+        var base = params.scriptPath + "../release/";
+        var list = RecursiveFileIterator(base, null, true, false);
+        CreatePackage(list, params.scriptPath + "../deploy/" + filename + ".zip");
+    }
+    logger.info("Packages Created.");
+    
+    if (params.targets.release) {
+        var compiler = "C:/Program Files/Inno Setup 5/ISCC.exe"
+        var compilerFile = new java.io.File(compiler);
+        if (compilerFile.exists()) {
+            logger.info("Building windows installer using Inno Setup (with Preprocesser)");
+            // RunProcess should already have been loaded in the info.js
+            var version = AppInfo.Version.Major + "." + AppInfo.Version.Minor;
+            RunProcess([compiler, "/dMyAppVersion=" + version, "/F" + filename + "-windows", "build-windows-deploy.iss"], params.scriptPath, printer);
+            
+        } else {
+            logger.info("Inno Setup is unavailable, windows installer will not be built.")
+        }
+        
+    }
+})();

build/dojo-profile-development.js

+/*
+   Copyright 2011 Neil M. Sheldon
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+ */
+dependencies = {
+
+    layers: [{
+		// NOTE: I need to put this in a separate layer to ensure that I can
+		// include the dojofixup stuff prior to loading my required files.
+        name: "dojo-core.js",
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dojo.parser", 
+		   "dojo.data.ItemFileWriteStore",
+		   "dojo.date.locale",
+		   "dojo.data.ItemFileReadStore",
+		   "dojo.io.script"
+		    ]
+    
+    },{
+        name: "dijit.js",
+		layerDependencies: ["dojo-core.js"],
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dijit.Dialog", 
+		   "dijit.layout.BorderContainer", 
+		   "dijit.layout.ContentPane", 
+		   "dijit.layout.AccordionContainer", 
+		   "dijit.layout.TabContainer",
+		   "dijit.Toolbar",
+		   "dijit.tree.ForestStoreModel",
+		   "dijit.Tree",
+		   "dijit.Declaration",
+		   "dijit.form.DropDownButton",
+		   "dijit.Menu",
+		   "dijit.tree.dndSource",
+		   "dijit.TitlePane",
+		   "dijit._Widget",
+		   "dijit._Templated",
+		   "dijit.InlineEditBox",
+		   "dijit.form.TextBox",
+		   "dijit.form.CheckBox",
+		   "dijit.form.DateTextBox",
+		   "dijit.form.TimeTextBox",
+		   "dijit.form.NumberTextBox",
+		   "dijit.form.Button",
+		   "dijit.Calendar",
+		   "dijit._TimePicker",
+		   "dijit.form.HorizontalSlider",
+		   "dijit.Editor",
+		   "dijit._editor.plugins.AlwaysShowToolbar",
+		   "dijit._editor.plugins.LinkDialog",
+		   "dijit._editor.plugins.TextColor",
+		   "dijit._editor.plugins.FullScreen",
+		   "dijit.form.MultiSelect",
+		   "dijit.form.ToggleButton",
+		   "dijit.form.ComboBox",
+		   "dijit.ProgressBar"
+		    ]
+    
+    },{
+        name: "dojox.js",
+		layerDependencies: ["dojo-core.js","dijit.js"],
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dojox.json.schema",
+		   "dojox.grid.EnhancedGrid",
+		   "dojox.charting.widget.Chart2D",
+		   "dojox.charting.themes.Distinctive",
+		   "dojox.editor.plugins.TablePlugins",
+		   "dojox.editor.plugins.PrettyPrint",
+		   "dojo.io.script"
+		    ]
+    
+    }],
+    
+    prefixes: [
+       [ "dijit", "../dijit" ],
+       [ "dojox", "../dojox" ]
+   ]
+
+}

build/dojo-profile-release.js

+/*
+   Copyright 2011 Neil M. Sheldon
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+ */
+dependencies = {
+
+    layers: [{
+		// NOTE: I need to put this in a separate layer to ensure that I can
+		// include the dojofixup stuff prior to loading my required files.
+        name: "dojo-core.js",
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dojo.parser", 
+		   "dojo.data.ItemFileWriteStore",
+		   "dojo.date.locale",
+		   "dojo.data.ItemFileReadStore",
+		   "dojo.io.script"
+		    ]
+    
+    },{
+        name: "dijit.js",
+		layerDependencies: ["dojo-core.js"],
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dijit.Dialog", 
+		   "dijit.layout.BorderContainer", 
+		   "dijit.layout.ContentPane", 
+		   "dijit.layout.AccordionContainer", 
+		   "dijit.layout.TabContainer",
+		   "dijit.Toolbar",
+		   "dijit.tree.ForestStoreModel",
+		   "dijit.Tree",
+		   "dijit.Declaration",
+		   "dijit.form.DropDownButton",
+		   "dijit.Menu",
+		   "dijit.tree.dndSource",
+		   "dijit.TitlePane",
+		   "dijit._Widget",
+		   "dijit._Templated",
+		   "dijit.InlineEditBox",
+		   "dijit.form.TextBox",
+		   "dijit.form.CheckBox",
+		   "dijit.form.DateTextBox",
+		   "dijit.form.TimeTextBox",
+		   "dijit.form.NumberTextBox",
+		   "dijit.form.Button",
+		   "dijit.Calendar",
+		   "dijit._TimePicker",
+		   "dijit.form.HorizontalSlider",
+		   "dijit.Editor",
+		   "dijit._editor.plugins.AlwaysShowToolbar",
+		   "dijit._editor.plugins.LinkDialog",
+		   "dijit._editor.plugins.TextColor",
+		   "dijit._editor.plugins.FullScreen",
+		   "dijit.form.MultiSelect",
+		   "dijit.form.ToggleButton",
+		   "dijit.form.ComboBox",
+		   "dijit.ProgressBar"
+		    ]
+    
+    },{
+        name: "dojox.js",
+		layerDependencies: ["dojo-core.js","dijit.js"],
+		localeList: "en-gb,en-us",
+        dependencies: [
+		   "dojox.json.schema",
+		   "dojox.grid.EnhancedGrid",
+		   "dojox.charting.widget.Chart2D",
+		   "dojox.charting.themes.Distinctive",
+		   "dojox.editor.plugins.TablePlugins",
+		   "dojox.editor.plugins.PrettyPrint",
+		   "dojo.io.script"
+		    ]
+    
+    },{
+		name: "storysteward.js",
+		layerDependencies: ["dojo-core.js","dijit.js","dojox.js"],
+		dependencies: [
+		   "my.Editors",
+           "my.LocalFileAccess",
+		   "my.Settings",
+		   "my.ProjectData",
+           "my.DataItemViewer",
+           "my.extensions",
+           "my.GoalProgress",
+           "my.DataGrid"
+		],
+	}],
+    
+    prefixes: [
+       [ "dijit", "../dijit" ],
+       [ "dojox", "../dojox" ],
+	   [ "my", "../../../source/js/dojo/my", "../../../../source/js/dojo/my/copyright.txt" ]
+   ]
+
+}

build/fileIterator.js

+/*
+   Copyright 2011 Neil M. Sheldon
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+function RecursiveFileIterator(startDir, checkCallback, makeUnixPaths, startDirIsJavaObject, prefix) {
+
+    prefix = prefix || "";
+	
+    var topDir = startDir;
+    if (!startDirIsJavaObject) {
+        topDir = new java.io.File(startDir);
+    }
+    
+    if (topDir.exists()) {
+        var dirFileArray = topDir.listFiles();
+        var i = 0;
+        var current = null;
+        
+        var result = {
+            getCurrent: function() {
+                if (current && current.getCurrent) {
+                    return current.getCurrent();
+                }
+                return current;
+            },
+            
+            next: function() {
+                if (current && current.next) {
+                    current.next();
+                    if (current.getCurrent()) {
+                        return;
+                    }
+                }
+                current = null;
+                while ((i < dirFileArray.length) && (current == null)) {
+                    var file = dirFileArray[i];
+                    if (file.isFile()) {
+                        var filePath = file.getPath();
+                        if (makeUnixPaths) {
+                            //Make sure we have a JS string.
+                            filePath = String(filePath);
+                            if (filePath.indexOf("/") == -1) {
+                                filePath = filePath.replace(/\\/g, "/");
+                            }
+                        }
+                        
+                        var ok = true;
+                        if (checkCallback) {
+                            ok = checkCallback(file, filePath);
+                        }
+                        
+                        if (ok && !file.getName().match(/^\./)) {
+                            current = {
+                                file: file,
+                                entry: prefix + file.getName()
+                            }
+                            
+                        }
+                    } else if (file.isDirectory() && !file.getName().match(/^\./)) {
+                        current = RecursiveFileIterator(file, checkCallback, makeUnixPaths, true, prefix + file.getName() + "/");
+                        if (!current.getCurrent()) {
+                            current = null;
+                        }
+                    }
+                    i++;
+                }
+            }
+        }
+        result.next();
+        return result;
+        
+    }
+    return {
+    
+        getCurrent: function() {
+            return null;
+        },
+        
+        next: function() {
+        }
+        
+        
+    }
+    
+}
+

build/fixFileUtil.js

+/*
+   Copyright 2011 Neil M. Sheldon
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+if (fileUtil && fileUtil.copyFile) {
+	
+	(function() {
+		var oldCopyFile = fileUtil.copyFile;
+		fileUtil.copyFile = function(/*String*/srcFileName, /*String*/ destFileName, /*boolean?*/ onlyCopyNew) {
+			if (oldCopyFile.call(fileUtil,srcFileName,destFileName,onlyCopyNew)) {
+				var oldFileTime = new java.io.File(srcFileName).lastModified();
+				java.io.File(destFileName).setLastModified(oldFileTime);
+				return true;
+			}
+			return false;
+		}
+	})();
+
+}
+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+/*
+ * This contains the basic editable attributes for this project. The build system
+ * may do some substitution from from the values here.
+ * NOTE: In addition to tracking version numbers easily, the primary reason for
+ * this file is to have one place in which to store the Application name and other
+ * identifiers. I'm not particularly proud of the name, and I'd like to be able to
+ * switch it easily when I come up with something better.
+ */
+require("my", "runprocess");
+// Get the svn version stuff...
+
+var AppInfo;
+
+(function() {
+    logger.info("Retrieving current revision number");
+    var revision = "0";
+    var buffer = new java.io.ByteArrayOutputStream();
+    var ps = new java.io.PrintStream(buffer);
+    try {
+        RunProcess("svnversion", params.scriptPath + "../", ps);
+        revision = new String(buffer.toString()).replace(/^\s*/, "").replace(/\s*$/, "") || "0";
+    } finally {
+        ps.close();
+    }
+    logger.info("Revision number found is: " + revision);
+    
+    
+    AppInfo = {
+        // ApplicationTitle is the full name for the application, as
+        // displayed on screen to the user.
+        Title: "Story Steward",
+        // ApplicationName is used in file naming.
+        Name: "StorySteward",
+        // ApplicationID is used in creating IDs, such as the acceptable
+        // file formats for the current version.
+        ID: "story-steward",
+        Version: {
+            Major: "0",
+            Minor: "9",
+            // The following numbers are automatically generated. 
+            /* 
+             * The Revision number is taken from revision-number.txt. This needs
+             * to be generated by a script which extracts the information from the
+             * version control system, and should always match the revision number
+             * of the version that was extracted from the system.
+             */
+            Revision: revision
+        
+        }
+    }
+    logger.info("Working with: " + AppInfo.Title + " " + AppInfo.Version.Major + "." + AppInfo.Version.Minor + "." + AppInfo.Version.Revision);
+})();
+@echo off
+rem Copyright 2011 Neil M. Sheldon
+rem 
+rem    Licensed under the Apache License, Version 2.0 (the "License");
+rem    you may not use this file except in compliance with the License.
+rem    You may obtain a copy of the License at
+rem 
+rem        http://www.apache.org/licenses/LICENSE-2.0
+rem 
+rem    Unless required by applicable law or agreed to in writing, software
+rem    distributed under the License is distributed on an "AS IS" BASIS,
+rem    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem    See the License for the specific language governing permissions and
+rem    limitations under the License.
+rem 
+java -classpath ../vendor/dojo/util/shrinksafe/js.jar org.mozilla.javascript.tools.shell.Main make.js %~dp0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+var scriptArguments = arguments;
+var global = this;
+
+if (scriptArguments.length == 0) {
+    throw "Please call this script using the the appropriate shell script for your platform."
+}
+
+var params = {};
+params.scriptPath = scriptArguments[0];
+if (params.scriptPath.indexOf("/") == -1) {
+    params.scriptPath = params.scriptPath.replace(/\\/g, "/");
+}
+params.buildScriptsPath = "../vendor/dojo/util/buildscripts/";
+
+// This thing overrides the global print function to print to the log file,
+// so I don't have to change any included scripts to do this. This is basically
+// the closest thing to changing stdout in rhino.
+var printer = (function() {
+    var oldPrint = global.print;
+    var outFile = new java.io.File(params.scriptPath + "build.log");
+    var outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile));
+    var bufferedWriter = new java.io.BufferedWriter(outWriter);
+	
+	global.print = function() {
+		oldPrint.apply(null, arguments);
+		bufferedWriter.write(Array.join(arguments," "));
+		bufferedWriter.newLine();
+		bufferedWriter.flush();
+	}
+    
+    return {
+        println: function(text) {
+			global.print(text);
+        },
+		printToStandardOut: function() {
+			oldPrint.apply(null,arguments);
+		},
+        close: function() {
+            bufferedWriter.close();
+        }
+    }
+})();
+try {
+
+    function showUsage() {
+        printer.printToStandardOut("\
+Usage: make [action] [target]\n\
+  action: a plus-separated list of actions to perform.\n\
+  target: a plus-separated list of targets to build for.\n\
+Available Actions: (default is 'application' if target is specified instead)\n\
+  dojo:\n\
+     cleans dojo custom build and recreates it.\n\
+  shrink:\n\
+     removes unnecessary files from the release or debug target. This action is only\n\
+	 valid for the release or debug target. The development target is never shrunk, to\n\
+	 make development easier.\n\
+  touch:\n\
+     makes sure the target dojo build has the same file timestamps as the\n\
+     source, to help in synchronization. This action is only valid for the release\n\
+	 or debug target.\n\
+  clean:\n\
+     cleans out application code for the target. Does not touch dojo.\n\
+  application:\n\
+     copies application code to the target. Does nothing with dojo.\n\
+  deploy:\n\
+     creates package from current code for target and places in deploy.\n\
+  allDojo:\n\
+     shortcut for dojo,shrink,touch.\n\
+  all:\n\
+     shortcut for clean,dojo,shrink,touch,application,deploy.\n\
+Available Targets: (default is 'all' if nothing is specified)\n\
+  development:\n\
+     Includes debugging and testing code in the development directory.\n\
+  release:\n\
+     Includes production-quality code in the release directory.\n\
+  debug:\n\
+     Includes easier to debug code in the release directory. If\n\
+	 both debug and release are used, debug will override release.\n\
+  all:\n\
+     Shortcut for development,target.");
+    }
+    
+    var require = (function() {
+    
+        var loadedDojoScripts = [];
+        var loadedMyScripts = [];
+        var dojoScriptPath = params.buildScriptsPath + "jslib/";
+        
+        return function(source, name) {
+            var path;
+            var registry;
+            switch (source) {
+                case "dojo":
+                    path = dojoScriptPath + name + ".js";
+                    registry = loadedDojoScripts;
+                    break;
+                case "my":
+                    path = params.scriptPath + name + ".js";
+                    registry = loadedMyScripts;
+                    break;
+                default:
+                    throw "Unknown script source";
+            }
+            if (registry.indexOf(name) == -1) {
+                load.apply(global, [path]);
+                registry.push(name);
+            }
+        }
+        
+    })();
+    
+    
+    
+    (function() {
+        params.actions = {};
+        params.targets = {};
+        
+        argActions = (scriptArguments[1] && scriptArguments[1].split("+")) || ["usage"];
+        argTargets = scriptArguments[2] && scriptArguments[2].split("+") || ["all"];
+		
+        
+        for (var i = 0; i < argActions.length; i++) {
+            switch (argActions[i]) {
+				case "usage":
+                case "dojo":
+                case "shrink":
+                case "touch":
+                case "clean":
+                case "application":
+                case "deploy":
+                    params.actions[argActions[i]] = true;
+                    break;
+                case "allDojo":
+                    params.actions.dojo = true;
+                    params.actions.shrink = true;
+                    params.actions.touch = true;
+                    break;
+                case "all":
+                    params.actions.clean = true;
+                    params.actions.dojo = true;
+                    params.actions.shrink = true;
+                    params.actions.touch = true;
+                    params.actions.application = true;
+                    params.actions.deploy = true;
+                    break;
+                case "development":
+                case "release":
+				case "debug":
+                    params.actions.application = true;
+                    params.targets[argActions[i]] = true;
+                    print("Target: " + argActions[i]);
+                    // clear out the targets, lest they did 
+                    // make development all, expecting it to be like make all development,
+                    // only to find out it is more like make application development,release
+                    argTargets = [];
+                    break;
+                default:
+                    print("Unknown action: " + argActions[i]);
+            }
+        }
+        for (var i = 0; i < argTargets.length; i++) {
+            switch (argTargets[i]) {
+                case "development":
+                case "release":
+				case "debug":
+                    params.targets[argTargets[i]] = true;
+                    print("Target: " + argTargets[i]);
+                    break;
+                case "all":
+                    params.targets.release = true;
+                    print("Target: release");
+                    params.targets.development = true;
+                    print("Target: development");
+            }
+        }
+		
+		// debug also turns on release, since only a few scripts actually
+		// know anything about debug.
+		if (params.targets.debug) {
+			params.targets.release = true;
+		}
+        
+        
+    })();
+    
+	print("Starting build at: " + (new Date()).toString());
+	params.actions.usage && showUsage();
+    params.actions.clean && load(params.scriptPath + "cleanApplication.js");
+    params.actions.dojo && load(params.scriptPath + "buildDojo.js");
+    params.actions.shrink && load(params.scriptPath + "shrinkDojo.js");
+    params.actions.touch && load(params.scriptPath + "touchDojo.js");
+    params.actions.application && load(params.scriptPath + "buildApplication.js");
+    params.actions.deploy && load(params.scriptPath + "deployApplication.js");
+	print("Build completed at: " + (new Date()).toString());
+    
+} finally {
+    printer.close();
+}

build/runprocess.js

+function PipeThread(inputStream,out) {
+
+    spawn(function() {
+        var isr = new java.io.InputStreamReader(inputStream);
+        var br = new java.io.BufferedReader(isr);
+        var line = null;
+        while ((line = br.readLine()) != null) {
+            out.println(line);
+        }
+        
+    });
+    
+}
+
+function RunProcess(cmdArgs, workingDirectory, out) {
+
+    if (!out) {
+		out = java.lang.System.out;
+	}
+
+    var p = java.lang.Runtime.getRuntime().exec(cmdArgs, null, new java.io.File(workingDirectory));
+    
+    try {
+        // simply close the output stream (actually the input stream, 
+        // it's output from our process to the new one) to avoid weird deadlocks.
+        p.getOutputStream().close();
+        
+        PipeThread(p.getInputStream(),out);
+        
+        PipeThread(p.getErrorStream(),out);
+        
+        
+        // wait for process completion
+        var exitCode = p.waitFor();
+        if (exitCode != 0) {
+            throw "Process ended with exit code: " + exitCode;
+        }
+    } finally {
+        p.destroy();
+    }
+    
+}

build/shrinkDojo.js

+/*
+ * Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+require("dojo", "fileUtil");
+require("my", "fixFileUtil")
+require("dojo", "logger");
+require("my", "fileIterator");
+
+(function() {
+    // NOTE: Change these to add more possible locales
+    var nlsMatch = /_(?:en|en-us|en-gb)\.js$/
+    var includeLocales = ["en", "en-us", "en-gb"];
+    
+    function deleteAllBut(base, path, keepFiles, removeFiles, dryRun) {
+        var list = (new java.io.File(base + path)).listFiles();
+        for (var i = 0; i < list.length; i++) {
+            var name = list[i].getName();
+            if (!keepFiles || !keepFiles.test(name)) {
+                if ((!removeFiles) || (removeFiles.test(name))) {
+                    logger.info("Deleting " + path + name);
+                    if (!dryRun) {
+                        fileUtil.deleteFile(list[i].getAbsolutePath());
+                    }
+                }
+                
+            }
+        }
+        
+    }
+    
+    function shrinkDojo(target) {
+        load(params.scriptPath + "dojo-profile-" + target + ".js");
+        var dojopath = params.scriptPath + "../" + target + "/js/dojo/";
+        var nlsKeep = /^(?:.*_en\.js|.*_en-gb\.js|.*_en-us\.js|en|en-gb|en-us)$/;
+        
+        deleteAllBut(dojopath, "dojo/", /^(?:dojo\.js|dojo-core\.js|storysteward\.js|dijit\.js|dojox\.js|LICENSE|build\.txt|resources|nls)$/);
+        deleteAllBut(dojopath, "dojo/resources/", /^(?:dojo\.css|LICENSE)$/, /\.(?:js|css)$/);
+        deleteAllBut(dojopath, "dojo/nls/", nlsKeep);
+        
+        deleteAllBut(dojopath, "dijit/", /^(?:LICENSE|themes|icons)$/);
+        deleteAllBut(dojopath, "dijit/themes/", /^(?:dijit\.css|a11y|tundra)$/);
+        deleteAllBut(dojopath, "dijit/themes/tundra/", /^(?:tundra.css|images)$/);
+        deleteAllBut(dojopath, "dijit/icons", /^images$/);
+        
+        // Clear out all dojox folders which aren't required. I wish I could do
+        // something similar for the others, but their directory structures aren't
+        // quite as expected...
+        // the stuff in gfx is loaded dynamically depending on the browser, so it
+        // can't be built into everything.
+        var requireddojoxdirs = ["LICENSE", "gfx"];
+        for (var i = 0; i < dependencies.layers.length; i++) {
+            for (var j = 0; j < dependencies.layers[i].dependencies.length; j++) {
+                if (dependencies.layers[i].dependencies[j].indexOf("dojox.") == 0) {
+                    var depdir = dependencies.layers[i].dependencies[j].substring("dojox.".length);
+                    depdir = depdir.substring(0, depdir.indexOf("."));
+                    // NOTE: I don't *really* need anything here:
+                    // Add to this if more dependencies are added which we don't need.
+                    if ((depdir != "json") && (depdir != "charting")) {
+                        requireddojoxdirs.push(depdir);
+                    }
+                    requireddojoxdirs.push(depdir + ".js");
+                    
+                }
+            }
+        }
+        // don't really need any of this:
+        var requiredRegExp = new RegExp("^(?:" + requireddojoxdirs.join("|") + ")$");
+        deleteAllBut(dojopath, "dojox/", requiredRegExp);
+        
+        // When I know about other required dojox stuff, add it in here...
+        
+        deleteAllBut(dojopath, "dojox/grid/", /^(?:resources)$/)
+        deleteAllBut(dojopath, "dojox/grid/resources/", /^(?:images|Grid.css|tundraGrid.css)$/)
+        
+        if (target == "release") {
+            logger.info("deleting my components");
+            fileUtil.deleteFile(dojopath + "my");
+        }
+        
+        logger.info("Dojo shrunken for " + target + ".");
+        
+    }
+    
+    //if (params.targets.development) {
+    //    shrinkDojo("development");
+    //}
+    if (params.targets.release) {
+		logger.info("Shrinking dojo for release");
+        shrinkDojo("release");
+    }
+    
+})();

build/touchDojo.js

+/*
+ Copyright 2011 Neil M. Sheldon
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+require("dojo", "logger");
+
+(function() {
+    var sourcePath = params.scriptPath + "../vendor/dojo/";
+    
+    var excludeFiles = /(?:dijit\/themes\/tundra\/tundra\.css|dojo\/dojo\.js|dojo\/dijit\.js|dojo\/dojox\.js|dojo\/dojo-core\.js|dojo\/storysteward\.js)$/
+    
+    var synchronizeTimestamps = function(source, dest, path, dirsAreJavaObjects) {
+    
+    
+        if (!dirsAreJavaObjects) {
+            source = new java.io.File(source);
+            dest = new java.io.File(dest);
+        }
+        path = path || "";
+        
+        if (source.getName().match(/^\./)) {
+            return;
+        }
+        
+        if (path && path.match(excludeFiles)) {
+            logger.info("Skipping " + path);
+            return;
+        }
+        
+        if (source.exists() && dest.exists()) {
+            if (source.isDirectory() && !source.getName().match(/^\./)) {
+                if (dest.isDirectory() && !source.getName().match(/^\./)) {
+                    var files = source.listFiles();
+                    for (var i = 0; i < files.length; i++) {
+                        var file = files[i];
+                        var name = file.getName();
+                        synchronizeTimestamps(file, new java.io.File(dest, name), path + "/" + name, true);
+                    }
+                }
+            } else if (!dest.isDirectory()) {
+                //			logger.info("Synchronizing " + path);
+                dest.setLastModified(source.lastModified());
+            }
+        }
+        
+    }
+    
+    
+    if (params.targets.development) {
+        logger.info("Touching dojo for development...");
+        synchronizeTimestamps(sourcePath, params.scriptPath + "../development/js/dojo/");
+    }
+    if (params.targets.release) {
+        logger.info("Touching dojo for release...");
+        synchronizeTimestamps(sourcePath, params.scriptPath + "../release/js/dojo/");
+    }
+    logger.info("Dojo touched.")
+    
+})();
Add a comment to this file

resources/icons/blank.png

Added
New image
Add a comment to this file

resources/icons/book_open_add.png

Added
New image
Add a comment to this file

resources/icons/calendar_view_day_add.png

Added
New image

resources/icons/createicons.png.sh

+#!/bin/bash
+montage blank.png ../../vendor/famfam-silkicons/icons/book.png ../../vendor/famfam-silkicons/icons/book_add.png ../../vendor/famfam-silkicons/icons/book_open.png book_open_add.png ../../vendor/famfam-silkicons/icons/report.png ../../vendor/famfam-silkicons/icons/report_add.png blank.png ../../vendor/famfam-silkicons/icons/script.png ../../vendor/famfam-silkicons/icons/script_add.png ../../vendor/famfam-silkicons/icons/note.png ../../vendor/famfam-silkicons/icons/note_add.png subnote.png subnote_add.png blank.png ../../vendor/famfam-silkicons/icons/calendar_view_day.png calendar_view_day_add.png ../../vendor/famfam-silkicons/icons/user_gray.png user_gray_add.png ../../vendor/famfam-silkicons/icons/building.png ../../vendor/famfam-silkicons/icons/building_add.png blank.png ../../vendor/famfam-silkicons/icons/brick.png ../../vendor/famfam-silkicons/icons/brick_add.png ../../vendor/famfam-silkicons/icons/chart_bar.png ../../vendor/famfam-silkicons/icons/chart_bar_add.png blank.png blank.png ../../vendor/famfam-silkicons/icons/folder.png ../../vendor/famfam-silkicons/icons/disk.png ../../vendor/famfam-silkicons/icons/application_form.png ../../vendor/famfam-silkicons/icons/user_comment.png ../../vendor/famfam-silkicons/icons/tab_go.png ../../vendor/famfam-silkicons/icons/application_side_expand.png ../../vendor/famfam-silkicons/icons/application_side_contract.png ../../vendor/famfam-silkicons/icons/page_white_text.png ../../vendor/famfam-silkicons/icons/wrench.png ../../vendor/famfam-silkicons/icons/folder_find.png dictionary.png ../../vendor/famfam-silkicons/icons/text_letter_omega.png blank.png blank.png ../../vendor/famfam-silkicons/icons/tag_blue_add.png ../../vendor/famfam-silkicons/icons/tag_blue_delete.png ../../vendor/famfam-silkicons/icons/date.png ../../vendor/famfam-silkicons/icons/time.png blank.png ../../vendor/famfam-silkicons/icons/book_go.png ../../vendor/famfam-silkicons/icons/delete.png -background none -geometry 16x16+0+0 icons.png
+
+
Add a comment to this file

resources/icons/dictionary.png

Added
New image
Add a comment to this file

resources/icons/icons.png

Added
New image

resources/icons/readme.txt

+The images in this folder are based on the Silk Icon set. They
+are taken from either original icons from that set, or new
+icons which utilize images, themes and elements from the icons
+in that set.
+
+
+Silk icon set 1.3
+
+_________________________________________
+Mark James
+http://www.famfamfam.com/lab/icons/silk/
+_________________________________________
+
+This work is licensed under a
+Creative Commons Attribution 2.5 License.
+[ http://creativecommons.org/licenses/by/2.5/ ]
+
+This means you may use it for any purpose,
+and make any changes you like.
+All I ask is that you include a link back
+to this page in your credits.
+
+Are you using this icon set? Send me an email
+(including a link or picture if available) to
+mjames@gmail.com
+
+Any other questions about this icon set please
+contact mjames@gmail.com
Add a comment to this file

resources/icons/subnote.png

Added
New image
Add a comment to this file

resources/icons/subnote_add.png

Added
New image
Add a comment to this file

resources/icons/user_gray_add.png

Added
New image

resources/quotes.js

+/*
+ * The quotes below are taken from the list of Oblique Strategies found
+ * at http://www.bbc.co.uk/dna/place-nireland/A635528 on 2011-02-17.
+ * The original text for these is probably copyright Brian Eno,
+            but 
+ * this list and other versions of it have been circulating around
+ * the internet for years without noticeable complaint. There is no
+ * guarantee that the list below is accurate for any edition of the
+ * Oblique Strategies card deck.
+ * 
+ * You can find more information on Oblique Strategies at: 
+ * http://www.rtqe.net/ObliqueStrategies.
+ * 
+ * If you do not like these,
+            feel free to compile your own list of quotes.
+ *  */
+Controller.Quotes = {
+	title: "Oblique Strategy",
+	items: ["(Organic) machinery",
+            "A line has two sides",
+            "A very small object -Its centre",
+            "Abandon desire",
+            "Abandon normal instructions",
+            "Accept advice",
+            "Accretion",
+            "Adding on",
+            "Allow an easement (an easement is the abandonment of a stricture)",
+            "Always first steps",
+            "Always give yourself credit for having more than personality",
+            "Always the first steps",
+            "Are there sections? Consider transitions",
+            "Ask people to work against their better judgement",
+            "Ask your body",
+            "Assemble some of the elements in a group and treat the group",
+            "Back up a few steps. What else could you have done?",
+            "Balance the consistency principle with the inconsistency principle",
+            "Be dirty",
+            "Be extravagant",
+            "Be less critical more often",
+            "Breathe more deeply",
+            "Bridges -build -burn",
+            "Call your mother and ask her what to do.",
+            "Cascades",
+            "Change ambiguities to specifics",
+            "Change instrument roles",
+            "Change nothing and continue with immaculate consistency",
+            "Change specifics to ambiguities",
+            "Children's voices -speaking -singing",
+            "Cluster analysis",
+            "Consider different fading systems",
+            "Consider transitions",
+            "Consult other sources -promising -unpromising",
+            "Convert a melodic element into a rhythmic element",
+            "Courage!",
+            "Cut a vital connection",
+            "Decorate, decorate",
+            "Define an area as `safe' and use it as an anchor",
+            "Describe the landscape in which this belongs. (9 August)",
+            "Destroy nothing; Destroy the most important thing",
+            "Discard an axiom",
+            "Disciplined self-indulgence",
+            "Disconnect from desire",
+            "Discover the recipes you are using and abandon them",
+            "Discover your formulas and abandon them",
+            "Display your talent",
+            "Distorting time",
+            "Do nothing for as long as possible",
+            "Do something boring",
+            "Do something sudden, destructive and unpredictable",
+            "Do the last thing first",
+            "Do the washing up",
+            "Do the words need changing?",
+            "Do we need holes?",
+            "Don't avoid what is easy",
+            "Don't be afraid of things because they're easy to do",
+            "Don't be frightened of cliches",
+            "Don't be frightened to display your talents",
+            "Don't break the silence",
+            "Don't stress one thing more than another",
+            "Emphasize differences",
+            "Emphasize repetitions",
+            "Emphasize the flaws",
+            "Faced with a choice, do both",
+            "Feed the recording back out of the medium",
+            "Feedback recordings into an acoustic situation",
+            "Fill every beat with something",
+            "Find a safe part and use it as an anchor",
+            "First work alone, then work in unusual pairs.",
+            "From nothing to more than nothing",
+            "Get your neck massaged",
+            "Ghost echoes",
+            "Give the game away",
+            "Give way to your worst impulse",
+            "Go outside. Shut the door.",
+            "Go slowly all the way round the outside",
+            "Go to an extreme, move back to a more comfortable place",
+            "How would someone else do it?",
+            "How would you explain this to your parents?",
+            "How would you have done it?",
+            "Humanize something that is free of error.",
+            "Idiot glee (?)",
+            "Imagine the music as a moving chain or caterpillar",
+            "Imagine the music as a series of disconnected events",
+            "In total darkness, or in a very large room, very quietly",
+            "Infinitesimal gradations",
+            "Instead of changing the thing, change the world around it.",
+            "Intentions -credibility of -nobility of -humility of",
+            "Into the impossible",
+            "Is it finished?",
+            "Is something missing?",
+            "Is the intonation correct?",
+            "Is the style right?",
+            "Is the tuning appropriate?",
+            "Is the tuning intonation correct?",
+            "Is there something missing?",
+            "It is quite possible (after all)",
+            "It is simply a matter or work",
+            "Just carry on",
+            "Left channel, right channel, centre channel",
+            "List the qualities it has. List those you'd like.",
+            "Listen in total darkness, or in a very large room, very quietly",
+            "Listen to the quiet voice",
+            "Look at a very small object, look at its centre",
+            "Look at the order in which you do things",
+            "Look closely at the most embarrassing details and amplify.",
+            "Lost in useless territory",
+            "Lowest common denominator check -single beat -single note -single riff",
+            "Magnify the most difficult details",
+            "Make a blank valuable by putting it in an excquisite frame",
+            "Make a sudden, destructive unpredictable action; incorporate",
+            "Make an exhaustive list of everything you might do and do the last thing on the list",
+            "Make it more sensual",
+            "Make what's perfect more human",
+            "Mechanize something idiosyncratic",
+            "Move towards the unimportant",
+            "Mute and continue",
+            "Not building a wall but making a brick",
+            "Once the search has begun, something will be found",
+            "Only a part, not the whole",
+            "Only one element of each kind",
+            "Overtly resist change",
+            "Pae White's non-blank graphic metacard",
+            "Pay attention to distractions",
+            "Picture of a man spotlighted",
+            "Put in earplugs",
+            "Question the heroic approach",
+            "Remember those quiet evenings",
+            "Remove a restriction",
+            "Remove ambiguities and convert to specifics",
+            "Remove specifics and convert to ambiguities",
+            "Remove the middle, extend the edges",
+            "Repetition is a form of change",
+            "Retrace your steps",
+            "Revaluation (a warm feeling)",
+            "Reverse",
+            "Short circuit (example; a man eating peas with the idea that they will improve his virility shovels them straight into his lap)",
+            "Shut the door and listen from outside",
+            "Simple subtraction",
+            "Simply a matter of work",
+            "Slow preparation, fast execution",
+            "Spectrum analysis",
+            "State the problem in words as simply as possible",
+            "Steal a solution.",
+            "Take a break",
+            "Take away as much mystery as possible. What is left?",
+            "Take away the elements in order of apparent non-importance",
+            "Take away the important parts",
+            "Tape your mouth",
+            "The inconsistency principle",
+            "The most important thing is the thing most easily forgotten",
+            "The tape is now the music",
+            "Think - inside the work -outside the work",
+            "Think of the radio",
+            "Tidy up",
+            "Towards the insignificant",
+            "Trust in the you of now",
+            "Try faking it",
+            "Turn it upside down",
+            "Twist the spine",
+            "Use \"unqualified\" people.",
+            "Use an old idea",
+            "Use an unacceptable color",
+            "Use cliches",
+            "Use fewer notes",
+            "Use filters",
+            "Use something nearby as a model",
+            "Use your own ideas",
+            "Voice your suspicions",
+            "Water",
+            "What are the sections sections of? Imagine a caterpillar moving",
+            "What context would look right?",
+            "What do you do? Now, what do you do best?",
+            "What else is this like?",
+            "What is the reality of the situation?",
+            "What is the simplest solution?",
+            "What mistakes did you make last time?",
+            "What most recently impressed you? How is it similar? What can you learn from it? What could you take from it?",
+            "What to increase? What to reduce? What to maintain?",
+            "What were the branch points in the evolution of this entity",
+            "What were you really thinking about just now? Incorporate",
+            "What would make this really successful?",
+            "What would your closest friend do?",
+            "What wouldn't you do?",
+            "When is it for? Who is it for?",
+            "Where is the edge?",
+            "Which parts can be grouped?",
+            "Who would make this really successful?",
+            "Work at a different speed",
+            "Would anyone want it?",
+            "You are an engineer",
+            "You can only make one dot at a time",
+            "You don't have to be ashamed of using your own ideas",
+            "Your mistake was a hidden intention "]
+}
+Story Steward is available under the terms of the Apache License version 2.0.
+Some modules may not be the copyright of Neil M. Sheldon. These modules contain 
+explicit declarations of copyright in one or more of LICENSE or readme.txt 
+files in the directories in which they reside or in the code itself. No external
+contributions are allowed under licenses which are fundamentally incompatible
+with the Apache License that Story Steward is distributed under.
+
+The text of the Apache license is reproduced below. 
+
+-------------------------------------------------------------------------------
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+Story Steward
+Copyright 2011 Neil M. Sheldon
+
+This project is built with the Dojo Toolkit, which is open
+source software, licensed under the modified BSD License,
+and copyright The Dojo Foundation. The original
+source is available at http://dojotoolkit.org/.
+
+This project includes images from the Silk icon set, 
+licensed under the Creative Commons Attribution 2.5 
+License, and copyright Mark James. The original icons 
+are available from http://www.famfamfam.com/lab/icons/silk/.
+
+Code for generating universally unique identifiers is
+licensed under the MIT License, and copyright Robert
+Kieffer. The original source is available from
+http://www.broofa.com/. 
+
+Code for accessing the local file system is modified from
+code licensed under the MIT License, and copyright
+UnaMesa Association. The original source is available
+at http://jquery.tiddlywiki.org/twFile.html.
+
+Code for validating and working with JSON Schemas is 
+licensed under the MIT License, and copyright Kris Zyp
+of SitePen. The original source is available at
+https://github.com/kriszyp/json-schema.

source/desktop.css

+/* The following makes sure we fill the browser window, and only the browser window */
+html, body, #main {
+    height: 100%;
+    width: 100%;
+    padding: 0;
+    border: 0;
+    margin: 0;
+}
+
+/* pre-loader specific stuff to prevent unsightly flash of unstyled content */
+#loader {
+    padding: 0;
+    margin: 0;
+    border: 0;
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: #ededed;
+    z-index: 999;
+    vertical-align: middle;
+}
+
+#loaderInner {
+    position: relative;
+    text-align: center;
+}
+
+/* some special layout stuff */
+#systemToolbar {
+    float: right;
+}
+
+/* Gets rid of the padding in the content pane where we are similating a TitlePane */
+.tundra .dijitTabContainerLeft-dijitContentPane.sidebarPane, .tundra .dijitTabContainerRight-dijitContentPane.sidebarPane {
+    padding: 0;
+}
+
+/* NOTE: The style thing works around a bug in the tundra css for this icon */
+.dijitIconEditProperty {
+    background-position: -160px;
+}
+
+/* Dynamic classes */
+.hideOnLoad {
+    display: none;
+}
+
+.fullScreen #mainHeader, .fullScreen #leftSidebar, .fullScreen #rightSidebar, .fullScreen #statusBar, .fullScreen #contentTabs_tablist {
+    display: none;
+}
+
+#floatingHeader {
+    display: none;
+    position: fixed;
+    right: 5px;
+    top: 0;
+    z-index: 9999;
+}
+
+.fullScreen #floatingHeader {
+    display: block;
+}
+
+/* Read Only stuff */
+.readOnly .readOnlyDisable {
+    display: none;
+}
+
+/* Get rid of some of the ****EXTREEEME MARRRGIIIN-TOPPPPS!*** that dojo put in
+ * (This is a plague of many common stylesheets... why? */
+h1 {
+    margin-top: 0.25em;
+    margin-bottom: 0;
+}
+
+h2 {
+    margin-top: 0.48225em; /* Original was 1.929--- ? Where'd that magic number come from? */
+    margin-bottom: 0;
+}
+
+h3, h4, h5, h6 {
+    margin-top: 0.375em;
+    margin-bottom: 0;
+}
+
+/* paragraphs, quotes and lists */
+p {
+    margin-top: 0.75em;
+    margin-bottom: 0;
+}
+
+blockquote {
+    margin-top: 0.75em;
+    margin-bottom: 0;
+    padding: 0;
+    padding-left: 1.636em;
+}
+
+pre {
+    padding-left: 1.5em;
+}
+
+/** A few classes which I want to use **/
+/** Draw 'subtitles' up into the master heading */
+h1.subtitle, h2.subtitle, h3.subtitle, h4.subtitle, h5.subtitle, h6.subtitle, p.subtitle {
+    margin-top: 0;
+    padding-left: 0.5em;
+    font-style: italic;
+    font-size: 90%;
+}
+
+.tagsLabel {
+    display: inline;
+}
+
+/** This just looks a little nicer in the various property editors. */
+label {
+    font-weight: bold;
+}
+
+/** But not in the subtitle */
+.subtitle label {
+    font-weight: normal;
+}
+
+.iconChooseTab {
+    background: url(resources/icons.png);
+    background-position: -64px -64px;
+    width: 16px;
+    height: 16px;
+}
+
+.iconFullScreenOff {
+    /* FUTURE: Come up with our own full screen icon that goes with silk. */
+    /*    background: url(resources/icons.png);
+     width: 16px;
+     height: 16px;
+     background-position: -80px -64px;*/
+    background-image: url('js/dojo/dijit/icons/images/editorIconsEnabled.png');
+    background-repeat: no-repeat;
+    width: 16px;
+    height: 16px;
+    background-position: -793px;
+}
+
+.iconFullScreenOn {
+    /* FUTURE: Come up with our own full screen icon that goes with silk. */
+    /*    background: url(resources/icons.png);
+     width: 16px;
+     height: 16px;
+     background-position: -96px -64px;*/
+    background-image: url('js/dojo/dijit/icons/images/editorIconsEnabled.png');
+    background-repeat: no-repeat;
+    width: 16px;
+    height: 16px;
+    background-position: -793px;
+}
+
+.iconOpenProject {
+    background: url(resources/icons.png);
+    background-position: 0px -64px;
+    width: 16px;
+    height: 16px;
+}
+
+.iconSaveProject {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -64px;
+}
+
+.iconEditProject {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -32px -64px;
+}
+
+.iconNewChapter {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -96px 0px;
+}
+
+.iconNewScene {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -32px -16px;
+}
+
+.iconNewNote {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -64px -16px;
+}
+
+.iconNewSubnote {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -96px -16px;
+}
+
+.iconNewJournal {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -32px -32px;
+}
+
+.iconNewPerson {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -64px -32px;
+}
+
+.iconNewPlace {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -96px -32px;
+}
+
+.iconNewThing {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -32px -48px;
+}
+
+.iconNewGoal {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -64px -48px;
+}
+
+.iconQuote {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px -64px;
+}
+
+.iconContent {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: 0 -80px;
+}
+
+.iconBook {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px 0;
+}
+
+.iconPart {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px 0;
+}
+
+.iconChapter {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -80px 0;
+}
+
+.iconScene {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -16px;
+}
+
+.iconNote {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px -16px;
+}
+
+.iconJournal {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -32px;
+}
+
+.iconPerson {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px -32px;
+}
+
+.iconPlace {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -80px -32px;
+}
+
+.iconThing {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -48px;
+}
+
+.iconGoal {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px -48px;
+}
+
+.iconTools {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -80px;
+}
+
+.iconSearchFiles {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -32px -80px;
+}
+
+.iconDictionary {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -48px -80px;
+}
+
+.iconSymbols {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -64px -80px;
+}
+
+.iconAddTag {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: 0 -96px;
+}
+
+.iconRemoveTag {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;
+    background-position: -16px -96px;
+}
+
+.iconSetDate {
+    background: url(resources/icons.png);
+    width: 16px;
+    height: 16px;