summaryrefslogtreecommitdiff
path: root/docroot/classes/sme.namespace.js
diff options
context:
space:
mode:
Diffstat (limited to 'docroot/classes/sme.namespace.js')
-rwxr-xr-xdocroot/classes/sme.namespace.js140
1 files changed, 140 insertions, 0 deletions
diff --git a/docroot/classes/sme.namespace.js b/docroot/classes/sme.namespace.js
new file mode 100755
index 0000000..05ad125
--- /dev/null
+++ b/docroot/classes/sme.namespace.js
@@ -0,0 +1,140 @@
1/*
2 * Material Experience - Santoprene Material Experience Namespace
3 *
4 * EYEMG - Interactive Media Group
5 * Created by Mike Crute (mcrute@eyemg.com)
6 * Updated by Mike Crute (mcrute@eyemg.com) on 9/26/07
7 *
8 * The Santoprene Materials Experience Namespace holds all non-generic data
9 * and methods governing the working of this application.
10 *
11 * There may be a lot of things set here that are used at runtime but I
12 * explicitly define them in the SME namespace so other developers can see
13 * exactly what is contained here. There are also some dynamically defined
14 * variables based on the current querystring.
15 */
16
17var SME =
18{
19 /*
20 * Release version of the site. This has nothing to do with the SVN
21 * version of the site. This is not used right now but should be
22 * incremented with each production release of the site.
23 */
24 releaseVersion: '1.2.2',
25
26 /*
27 * The color table exists to provide aliases to the colors used in the
28 * interface. This will make it much easier to change at a later date
29 * should that ever be required. The color table should be used only
30 * for default values.
31 */
32 colors:
33 {
34 blue : 'rgb(100, 129, 145)',
35 brown : 'rgb(100, 065, 040)',
36 green : 'rgb(100, 150, 040)',
37 grey : 'rgb(100, 100, 100)',
38 orange : 'rgb(225, 125, 010)',
39 red : 'rgb(150, 035, 020)'
40 },
41
42 /*
43 * The sizes table governs the size of the user interface elements.
44 * This exists for much the same reason as the color table, to provide
45 * an easy way to change sizes later. Note that the rest of the styles
46 * in the interface should be set relatively so changing these
47 * parameters should not destroy the interface.
48 */
49 sizes:
50 {
51 card : { height: 520, width: 925 }, // Card Size
52 innerCard : { height: 481, width: 914 }, // Inside Size of Card
53 chipMax : { height: 180, width: 143 }, // Maximum Chip Size
54 windMin : { height: 589, width: 1020 } // Minimum Window Size
55 },
56
57 // URLs Used by the Application
58 url:
59 {
60 tableList : 'data/card_tables.js',
61 perisitChips : 'data/persist_chip.js',
62 loginScreen : 'http://' + window.location.hostname + '/cgi-bin/login.pl',
63 sketchBook : 'http://' + window.location.hostname + '/cgi-bin/sketchbook.pl',
64 sketchBookIN : 'http://' + window.location.hostname + '/cgi-bin/sketchbook.pl?interactive=false',
65 manageAccount: 'http://www.santoprene.com/cgi-bin/protected/register/account.pl?template=designer_',
66 introCards : 'http://' + window.location.hostname + '/cgi-bin/sop_proxy.pl?site=http://www.santoprene.com/cms/designer_json/224fa06db73ece8a/index.html',
67 cards : new Template('http://' + window.location.hostname + '/cgi-bin/sop_proxy.pl?site=http://www.santoprene.com/cms/designer_card/#{card}/index.html'),
68 sendToFriend : new Template('http://www.santoprene.com/cgi-bin/send_page/send.pl?tmpl=designer&title=#{title}&durl=#{durl}'),
69 cardTables : new Template('http://' + window.location.hostname + '/cgi-bin/card_table.pl?table=#{table}&h=#{h}&w=#{w}'),
70 chipResolver : new Template('http://' + window.location.hostname + '/cgi-bin/sketchbook_resolver.pl?card=#{card}'),
71 cardPreview : new Template('http://' + window.location.hostname + '/cgi-bin/sop_preview_proxy.pl?site=http://admin.santoprene.com/cgi-bin/content/display_content.pl?form_id=48&content_id=#{card}&site_id=1'),
72
73 // Debugging and Development URLS (removed by build system)
74/*;;;*/ chipResolver : new Template('http://' + window.location.hostname + '/cgi-bin/sop_proxy.pl?site=http://materialexperience.santoprene.com/cgi-bin/sketchbook_resolver.pl?card=#{card}'),
75/*;;;*/ cardTables : new Template('http://' + window.location.hostname + '/cgi-bin/sop_proxy.pl?site=http://materialexperience.santoprene.com/cgi-bin/card_table.pl?table=#{table}&h=#{h}&w=#{w}'),
76 // END Debugging and Development URLS
77
78 // Dummy item terminates the list since the items above are
79 // removed by the build system and the trailing comma would
80 // break in IE. Don't Remove this!
81 dontRemove: null
82 },
83
84 /*
85 * Compose layout name to layout engine mapping. Allows us to add more
86 * layout engines later a lot simpler than the previous method allowed.
87 */
88 engineMapping :
89 {
90 'narrow-left' : Card.Layout.Primary,
91 'narrow-right' : Card.Layout.Primary,
92 'special' : Card.Layout.Special,
93 'intro' : Card.Layout.Primary,
94 'custom-menu' : Card.Layout.Custom
95 },
96
97 /*
98 * When the page is called with a query string of debug then you will
99 * be able to open a firebug console and view debugging messages. Also
100 * checks to make sure console.log() is actually defined to avoid
101 * throwing errors on browsers w/out firebug.
102 */
103 debug: /debug=.*(true)/.test(window.location.search) && !!(console.log),
104
105 /*
106 * Skip the intro card because it wastes time during development.
107 */
108 skipIntro: /.*intro=false.*/.test(window.location.search),
109
110 /*
111 *
112 * RUNTIME VARIABLES SECTION
113 *
114 * These are variables set at runtime but declared explicitly here
115 * so other developers can have a clear picture of what is in this
116 * namespace.
117 *
118 * If you set a variable in this namespace at runtime please declare
119 * it explicitly here.
120 *
121 */
122
123 // Array of all loaded tables.
124 tables: [],
125
126 // AJAX information bezel.
127 AJAXBezel: null,
128
129 // Currently active card table.
130 currentTable: null,
131
132 // Sketchbook.
133 sketchbook: null,
134
135 // History manager.
136 history: null,
137
138 // Card currently being displayed.
139 currentCard: null
140};