Skip to content
This repository was archived by the owner on Jun 8, 2018. It is now read-only.

Commit 32e348a

Browse files
author
committed
upgraded to compliant AMD module format; reorganized to package structure
1 parent b58ea35 commit 32e348a

File tree

219 files changed

+687
-484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+687
-484
lines changed

LICENSE.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
backdraft is available under the BSD license which is included below. Some resources (files) may not be the copyright of
2+
Rawld Gill and/or ALTOVISO LLC and/or may not be available under the BSD license. These resources contain explicit
3+
declarations of copyright in both the LICENSE.txt files in the directories in which they reside and in the resource itself.
4+
15
backdraft
26
Copyright (c) 2007 - 2010, Rawld Gill and ALTOVISO LLC
37
All rights reserved.

demo/appFrame/appFrame.html

+5-14
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,12 @@
44
<head>
55
<title>Backdraft Demonstration - Application Frame</title>
66
<style type="text/css">
7-
@import url("../../dojo-sie/dojo/resources/dojo.css");
8-
@import url("../../dojo-sie/dijit/themes/tundra/tundra.css");
9-
@import url("../../src/bd/themes/tundra/tundra.css");
7+
@import url("../../../dojo-v2x/lib/resources/dojo.css");
8+
@import url("../../../dijit-v2x/lib/themes/tundra/tundra.css");
9+
@import url("../../lib/themes/tundra/tundra.css");
1010
</style>
11-
<script type="text/javascript">
12-
var require= {
13-
urlMap: [
14-
[/^bd/, "../../src/bd"],
15-
[/^appFrame/, "../appFrame"]
16-
],
17-
pageLoaded: 1,
18-
load: ["appFrame/main"],
19-
};
20-
</script>
21-
<script type="text/javascript" src= "../../dojo-sie/dojo/dojo-sie.js"></script>
11+
<script src="../config.js"></script>
12+
<script data-main="main.js" src="../../loader/require.js"></script>
2213
</head>
2314
<body class="tundra">
2415
</body>

demo/appFrame/main.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
require.def("appFrame/main", [
1+
require([
22
"dojo",
33
"dijit",
44
"bd",
5+
"i18n!bd/nls/command",
56
"bd/command/accelerators",
67
"bd/widget/menu",
7-
"i18n!bd/nls/command",
88
"bd/widget/messageBox"
9-
], function(dojo, dijit, bd) {
9+
], function(dojo, dijit, bd, commandBundle) {
1010

1111
// add the stock localized command items to the backdraft command cache
12-
bd.forEachHash(require.module("i18n!bd/nls/command"), function(item) {
12+
bd.forEachHash(commandBundle, function(item) {
1313
bd.command.addItem(item);
1414
});
1515

@@ -101,7 +101,7 @@ var
101101
className:"bd:widget.borderContainer",
102102
name:"main",
103103
id:"main",
104-
style:"width:100%; height:100%; position:absolute; top:0; left:0; z-index:-5;",
104+
style:"width:100%; height:100%; position:absolute; top:0; left:0;",
105105
design:"headline",
106106
children:[menu, statusbar,
107107
{

demo/config.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
var require= {
2+
baseUrl: "./",
3+
main: "main",
4+
urlMap: [
5+
function(name) {
6+
if (name=="i18n") {
7+
return "dojo/plugins/i18n";
8+
}
9+
if (name=="text") {
10+
return "dojo/plugins/text";
11+
}
12+
return 0;
13+
}
14+
],
15+
packages: [{
16+
name:"bd",
17+
location:"../.."
18+
},{
19+
name:"dijit",
20+
location:"../../../dijit-v2x"
21+
},{
22+
name:"dojo",
23+
location:"../../../dojo-v2x"
24+
}],
25+
traceSet: {
26+
"loader-define":0,
27+
"loader-onModule":0,
28+
"loader-runDefQ":0,
29+
"loader-runFactory":0,
30+
"loader-execModule":0,
31+
"loader-execModule-out":0
32+
}
33+
};

demo/helloWorld/helloWorld.html

+5-13
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,12 @@
44
<head>
55
<title>Backdraft Demonstration - Hello World</title>
66
<style type="text/css">
7-
@import url("../../dojo-sie/dojo/resources/dojo.css");
8-
@import url("../../dojo-sie/dijit/themes/tundra/tundra.css");
9-
@import url("../../src/bd/themes/tundra/tundra.css");
7+
@import url("../../../dojo-v2x/lib/resources/dojo.css");
8+
@import url("../../../dijit-v2x/lib/themes/tundra/tundra.css");
9+
@import url("../../lib/themes/tundra/tundra.css");
1010
</style>
11-
<script type="text/javascript">
12-
var require= {
13-
urlMap: [
14-
[/^bd/, "../../src/bd"],
15-
[/^helloWorld/, "../helloWorld"]
16-
],
17-
load: ["helloWorld/main"],
18-
};
19-
</script>
20-
<script type="text/javascript" src= "../../dojo-sie/dojo/dojo-sie.js"></script>
11+
<script src="../config.js"></script>
12+
<script data-main="main.js" src="../../loader/require.js"></script>
2113
</head>
2214
<body class="tundra">
2315
</body>

demo/helloWorld/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("helloWorld/main", ["dojo", "bd", "bd/command/accelerators", "bd/widget/messageBox"], function(dojo, bd) {
1+
require(["dojo", "bd", "bd/command/accelerators", "bd/widget/messageBox"], function(dojo, bd) {
22

33
// insert six accelerators; connect each to the same command id as the accelerator key; connect
44
// each command id to a handler that shows a message box telling the user which acclerator was

demo/smoke.html

-33
This file was deleted.

demo/smoke/smoke.html

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2+
"http://www.w3.org/TR/html4/strict.dtd">
3+
<html>
4+
<head>
5+
<title>smoke backdraft demos</title>
6+
<script>
7+
var start= (new Date()).getTime();
8+
var require= {
9+
baseUrl: "./",
10+
packages: [{
11+
name:"bd",
12+
location:"../.."
13+
},{
14+
name:"dijit",
15+
location:"../../../dijit-v2x"
16+
},{
17+
name:"dojo",
18+
location:"../../../dojo-v2x"
19+
}],
20+
traceSet: {
21+
"loader-define":0,
22+
"loader-onModule":0,
23+
"loader-runDefQ":0,
24+
"loader-runFactory":0,
25+
"loader-execModule":0,
26+
"loader-execModule-out":0
27+
}
28+
};
29+
</script>
30+
<script src="../../loader/require.js"></script>
31+
<script type="text/javaScript">
32+
require(["dojo", "bd"], function() {
33+
require.addOnLoad(function() {
34+
dojo.byId("status").innerHTML= (require.onError.log.length==0) ?
35+
"dojo-sie asynchronous loader and bootstrap loaded without errors." :
36+
"dojo-sie asynchronous loader and bootstrap caused errors during bootstrapping.";
37+
dojo.byId("time").innerHTML= (((new Date()).getTime() - start) / 1000) + "s";
38+
var moduleList= [];
39+
for (var p in require.modules) moduleList.push(p);
40+
moduleList.sort();
41+
dojo.byId("modules").innerHTML= moduleList.join("<br/>");
42+
});
43+
});
44+
</script>
45+
</head>
46+
<body class="tundra">
47+
<h1>Location</h1>
48+
<p>loading backdraft/demo/smoke/smoke.html</p>
49+
<h1>Status</h1>
50+
<p id="status">loading</p>
51+
<h1>Load Time</h1>
52+
<p id="time"></p>
53+
<h1>Modules Loaded</h1>
54+
<p id="modules"></p>
55+
</body>
56+
</html>

src/bd/async.js lib/async.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/async", [
1+
define("bd/async", [
22
"bd",
33
"bd/dom"
44
], function(bd) {

src/bd/buildTools.js lib/buildTools.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
require.def("bd/buildTools", [
2-
"dojo", "bd"
3-
], function(dojo, bd) {
1+
define("bd/buildTools", ["bd/kernel"], function(bd) {
42

53
bd.devTools=
64
///namespace

src/bd/clone.js lib/clone.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/clone", ["bd/kernel", "dojo", "bd/declare"], function(bd, dojo) {
1+
define("bd/clone", ["bd/kernel", "dojo", "bd/declare"], function(bd, dojo) {
22
///
33
// Defines the function bd.clone.
44
///

src/bd/collections.js lib/collections.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/collections", ["bd/kernel", "dojo", "bd/lang"], function(bd, dojo) {
1+
define("bd/collections", ["bd/kernel", "dojo", "bd/lang"], function(bd, dojo) {
22
///
33
// Augments the bd namespace with several functions that operate on collections.
44
///

src/bd/command/accelerators.js lib/command/accelerators.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/command/accelerators", [
1+
define("bd/command/accelerators", [
22
"dojo", "dijit", "bd", "bd/command/namespace",
33
"bd/collections",
44
"bd/command/item",

src/bd/command/dispatch.js lib/command/dispatch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/command/dispatch", [
1+
define("bd/command/dispatch", [
22
"dojo", "dijit", "bd", "bd/command/namespace",
33
"bd/async"
44
], function(dojo, dijit, bd) {

src/bd/command/item.js lib/command/item.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/command/item", [
1+
define("bd/command/item", [
22
"dojo", "bd", "bd/command/namespace",
33
"bd/namespace"
44
], function(dojo, bd) {
@@ -134,7 +134,10 @@ bd.declare(
134134
// A container that defines all the visual aspects of a command as well as its enabled/disabled and checked/unchecked state.
135135

136136
//class name
137-
"bd:command.item",
137+
"command.item",
138+
139+
//context
140+
bd,
138141

139142
//superclasses
140143
[],
@@ -461,7 +464,10 @@ bd.declare(
461464
// bd.namespace-derived class used for the global command item cache (bd.command.itemCache).
462465

463466
//class name
464-
"bd:command.namespace",
467+
"command.namespace",
468+
469+
//context
470+
bd,
465471

466472
//superclasses
467473
[bd.namespace],

src/bd/command/namespace.js lib/command/namespace.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/command/namespace", ["bd"], function(bd) {
1+
define("bd/command/namespace", ["bd"], function(bd) {
22
///
33
// Augments the bd namespace with the bd.command namespace.
44
///

src/bd/connect.js lib/connect.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/connect", ["bd/kernel", "dojo", "bd/declare"], function(bd, dojo) {
1+
define("bd/connect", ["bd/kernel", "dojo", "bd/declare"], function(bd, dojo) {
22
///
33
// Augments the bd namespace with machinery that extends the dojo connection framework.
44
///
@@ -107,7 +107,10 @@ bd.declare(
107107
// destroyed. For the canonical example, study bd.visual.
108108

109109
//class name
110-
"bd:connect.handle",
110+
"connect.handle",
111+
112+
//context
113+
bd,
111114

112115
//superclasses
113116
[],

src/bd/connectable.js lib/connectable.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/connectable", [
1+
define("bd/connectable", [
22
"bd",
33
"bd/lang",
44
"bd/collections",
@@ -149,7 +149,10 @@ bd.declare(
149149
// postscript (or equivalent) is applied during the creation process.
150150

151151
//class name
152-
"bd:connectable",
152+
"connectable",
153+
154+
//context
155+
bd,
153156

154157
//superclasses
155158
[],

src/bd/containable.js lib/containable.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/containable", [
1+
define("bd/containable", [
22
"bd"
33
], function(bd) {
44
///
@@ -28,7 +28,10 @@ bd.declare(
2828
//
2929

3030
//class name
31-
"bd:containable",
31+
"containable",
32+
33+
//context
34+
bd,
3235

3336
//superclasses
3437
[],

src/bd/container.js lib/container.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/container", [
1+
define("bd/container", [
22
"bd",
33
"dojo"
44
], function(bd, dojo) {
@@ -30,7 +30,10 @@ bd.declare(
3030
//
3131

3232
//class name
33-
"bd:container",
33+
"container",
34+
35+
//context
36+
bd,
3437

3538
//superclasses
3639
[],

src/bd/creatable.js lib/creatable.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require.def("bd/creatable", [
1+
define("bd/creatable", [
22
"bd",
33
"dojo",
44
"bd/stateful",
@@ -36,7 +36,10 @@ bd.declare(
3636
//
3737

3838
//class name
39-
"bd:creatable",
39+
"creatable",
40+
41+
//context
42+
bd,
4043

4144
//superclasses
4245
[],

0 commit comments

Comments
 (0)