Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Embedded js and demo html file. Updated app.App to app/App. Removed .pyc files.
- Loading branch information
Scott Davis
committed
May 24, 2013
1 parent
e63ec8f
commit aaeafa6
Showing
14 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,24 @@ | ||
For Single Page Apps | ||
==================== | ||
- copy mxd's to hnas/serverprojects | ||
- add analytics code | ||
- add analytics code | ||
- _SpecRunner.html | ||
- Bump app version number and update changelog | ||
- change apiKey in main.js from localhost to server | ||
- build.sh | ||
- test in dist | ||
- change apiKey in main.js back | ||
|
||
For Embedded Widget Projects | ||
============================ | ||
- copy mxd's to hnas/serverprojects | ||
- add analytics code | ||
- _SpecRunner.html | ||
- Bump app version number and update changelog | ||
- change apiKey in main.js from localhost to server | ||
- build.sh | ||
- test in dist | ||
- change server to point to url in dist/EmbeddedMapLoader.js | ||
- push to server and test dist again | ||
- change apiKey in main.js back | ||
- change dist/EmbeddedMapLoader.js to point back to relative path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// This file is used when the app is an embedded widget in another web site. | ||
// This is the file that loads the widget and it's dependencies. | ||
(function(){ | ||
var server = location.pathname.replace(/\/[^\/]+$/, ""); | ||
if (window.jasmine) { | ||
server += '/src'; | ||
window.dojoConfig = { | ||
has: { | ||
"dojo-undef-api": true, | ||
isDebug: true | ||
} | ||
}; | ||
} else { | ||
window.dojoConfig = { | ||
isDebug: true | ||
}; | ||
} | ||
// var server = 'http://168.177.223.158/SolarMapWidget'; | ||
|
||
var head = document.getElementsByTagName('head').item(0); | ||
|
||
function loadCss(href){ | ||
// summary: | ||
// Adds a css link element to the document head with the | ||
// passed in href | ||
console.log(this.declaredClass + "::loadCss", arguments); | ||
|
||
var link = document.createElement('link'); | ||
link.rel = 'stylesheet'; | ||
link.type = 'text/css'; | ||
link.href = href; | ||
head.appendChild(link); | ||
} | ||
|
||
function loadJavaScript(src){ | ||
// summary: | ||
// Adds a script element to the head with the passed | ||
// in src. | ||
console.log(this.declaredClass + "::loadJavaScript", arguments); | ||
|
||
document.write("<script type='text/javascript' src='" + src + "'></script>"); | ||
} | ||
|
||
|
||
// load dojo and agrc css | ||
loadCss('http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/claro/claro.css'); | ||
loadCss('http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css'); | ||
loadCss(server + '/app/resources/App.css'); | ||
|
||
loadJavaScript('http://serverapi.arcgisonline.com/jsapi/arcgis/3.4'); | ||
loadJavaScript(server + '/app/run.js'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- | ||
This file is for when the application will be an embedded widget in another website | ||
It is intended to be a demo page to show how to embed the widget. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Project Title Demo Page</title> | ||
<style> | ||
html, body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="agrc-container"> | ||
<div data-dojo-type='app/App'></div> | ||
</div> | ||
<script src="EmbeddedMapLoader.js"></script> | ||
|
||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.