Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Work in progress on trying to get everything to load.

  • Loading branch information...
commit 373786e79e01afb3b0fec898b31ffba5c16df7fa 1 parent 8a3aab2
Brett van de Sande authored
2  web-UI/andes/PreferenceRegistry.js
View
@@ -10,7 +10,7 @@ define([],function(){
// andes.api.recordAction({type:"set-preference", name: "display-timer", value: true});
_prefs = {};
- andes.preferenceRegistry = {
+ return {
// Prefs are name value pairs with scope so that the server
// can update them.
registerPref: function(/*String*/pref, /*function*/setter, scope){
4 web-UI/andes/WordTip.js
View
@@ -1,6 +1,6 @@
-define([], function(){
+define(['dojo/_base/declare'], function(declare){
+ return declare(null, {
-dojo.declare("andes.WordTip", null, {
// Summary:
// Singleton whose job is to watch the textbox
// and connect to the server when there are changes
2  web-UI/andes/andes3.smd
View
@@ -1,7 +1,7 @@
{
"envelope": "JSON-RPC-2.0",
"transport": "POST",
- "target": "/help",
+ "target": "/help-test",
"SMDVersion": "2.0",
"description": "Client-server communication for Andes3. The server is be allowed to make arbitrary changes to graphics objects in the solution-step and seek-help methods. This specification should match web-UI/Documentation/AsuDocs/nokes-example-json.txt. There is a lot of duplication of code in this version. Also, this enforces strict typing for return parameters, by setting additionalProperties to false.",
"parameters": [
2  web-UI/andes/convert.js
View
@@ -1,7 +1,7 @@
// Pre-AMD version had a function wrapper.
define([],function(){
- andes.convert = {
+ return {
// summary:
// The conversion object used to transform objects
// from and ande object to a drawing object and
2  web-UI/andes/defaults.js
View
@@ -1,7 +1,7 @@
// Pre-AMD version had a function wrapper.
define([],function(){
- andes.defaults = {
+ return {
// summary:
// The style used for Andes3.
// description:
6 web-UI/andes/drawing.js
View
@@ -1,7 +1,7 @@
// Pre-AMD version had a function wrapper.
-define([],function(){
+define(["dojo/cookie"],function(cookie){
- dojo.cookie("mikeDev", null, { expires: -1 });
+ cookie("mikeDev", null, { expires: -1 });
// the html ID in index for the drawing app
var drawingId = "drawing";
@@ -96,7 +96,7 @@ define([],function(){
});
- andes.drawing = {
+ return {
// summary:
// The master object that controls behavior of Drawing items
// and handles transfer of data between server and client
7 web-UI/andes/menu.js
View
@@ -1,17 +1,18 @@
define([
+ "dijit/registry",
"andes/options",
"dijit/Menu",
"dijit/MenuSeparator"
-],function(){
+],function(registry){
// In the pre-AMD version, the body was wrapped
// in "dojo.addOnLoad(function(){ ... })
// Add problem name to menu
- dojo.byId("problemName").innerHTML = andes.projectId;
+ registry.byId("problemName").innerHTML = andes.projectId;
// shortcut for adding an onClick handler to a dijit
function wireItem(item, fn){
- var o = dijit.byId(item);
+ var o = registry.byId(item);
if(o){
// Wrapper function which adds logging to server
// when menu item is selected.
22 web-UI/index.html
View
@@ -4,24 +4,28 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Andes Physics Tutor</title>
<script type="text/javascript">
- djConfig = {
+ dojoConfig = {
isDebug:true,
parseOnLoad:true,
- popup:true
- }
-
- if(djConfig.isDebug){
- djConfig.modulePaths = {'andes':'../andes'};
+ async: true,
+ popup:true,
+ baseUrl: "./",
+ packages: [
+ {name: "dojo", location: "dojo"},
+ {name: "dijit", location: "dijit"},
+ {name: "dojox", location: "dojox"},
+ {name: "andes", location: "andes"}]
+ };
+ if(dojoConfig.isDebug){
document.write('<link href="css/andes.css" rel="stylesheet" />');
document.write('<scr'+'ipt src="dojo/dojo.js"></scr'+'ipt>');
}else{
- djConfig.modulePaths = {'andes':'../andes'};
document.write('<link href="release/dojo/css/andes.css" rel="stylesheet" />');
document.write('<scr'+'ipt src="release/dojo/dojo/dojo.js"></scr'+'ipt>');
- }
+ };
</script>
<script type="text/javascript">
- dojo.require("andes.profile");
+ require(["dojo/parser","andes"]);
</script>
</head>
<body class="tundra">
Please sign in to comment.
Something went wrong with that request. Please try again.