Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabino3 committed Jun 29, 2012
0 parents commit 351491f
Show file tree
Hide file tree
Showing 9 changed files with 794 additions and 0 deletions.
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.common.project.facet.core.builder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
28 changes: 28 additions & 0 deletions .project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>geocamResponderMapsNextGen</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.common.project.facet.core.builder (2).launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
</projectDescription>
6 changes: 6 additions & 0 deletions .settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="geocamResponderMapsNextGen">
<wb-resource deploy-path="/" source-path="/js"/>
</wb-module>
</project-modules>
59 changes: 59 additions & 0 deletions index.html
@@ -0,0 +1,59 @@
<!doctype html>
<html>
<head>
<!-- <script id="template" type="text/handlebars">-->
<title>temporary</title>

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<link rel="stylesheet" href="styles.css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.6.min.js"></script>
<script src="jquery-ui-1.8.18.custom.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="app.js"></script>
</head>

<body>

<div id="pageHeader">

<div id="navBar">

</div>
</div>

<div id="contents">

<table id="mapSetTable">
<tr>
<td><div id="map_canvas"></div></td>
<td>
<div>
<div class="columnHeader pageTitle"></div>

<div class="columnHeader"></div>
</div>
<div id="mapset_canvas"></div></td>
<td>
<div>
<div class="columnHeader">Layer Library</div>
<div class="columnHeader">(drag and drop layers into your map set)</div>
</div>
<div id="mapsetlib_canvas"></div>
</td>
</tr>
</table>
<div id="dialogDiv" style="display: none;"></div>

</div>






</body>
</html>
14 changes: 14 additions & 0 deletions js/ember-0.9.6.min.js

Large diffs are not rendered by default.

159 changes: 159 additions & 0 deletions js/geocamMaps.js
@@ -0,0 +1,159 @@
/**************************
* Application
**************************/
GeocamResponderMaps = Em.Application.create({
name: "Hurricane"
});

/**************************
* Models
**************************/

GeocamResponderMaps.User = Em.Object.extend({
username: null,
password: null,
email: null,
});

GeocamResponderMaps.MapOverlay = Em.Object.extend({
externalCopy: null,
localCopy: null,
complete: null,
name: null,
type: null,
description: null,
coverage: null,
creator: null,
contributer: null,
publisher: null,
rights: null,
license: null,
permissions: null,
acceptTerms: null,
json: null,
toString: function(){
return this.name;
}
});

GeocamResponderMaps.Library = Em.Object.extend({
MapOverlays: [],
add: function(overlay){
this.MapOverlays.pushObject(overlay);
},
remove: function(overlay){
//TODO
},
removeLast: function(){
//TODO
},
findOverlay: function(overlay){
return ;//TODO
},
numOfOverlays: function(){
return MapOverlays.length;
}
});


/**************************
* Views
**************************/
GeocamResponderMaps.MapView = Ember.View.create({
template: Ember.Handlebars.compile('{{GeocamResponderMaps.name}}\n')

}).appendTo('.pageTitle');

GeocamResponderMaps.MapView = Ember.View.create({
classNames: ['map'],

}).appendTo('#map_canvas');


GeocamResponderMaps.MapSetView = Ember.View.create({
classNames: ['map_set', 'overlayContainer'],

}).appendTo('#mapset_canvas');


GeocamResponderMaps.LibraryView = Ember.View.create({
classNames: ['library', 'overlayContainer'],
template: Ember.Handlebars.compile('<button {{action "createLayer" target="GeocamResponderMaps.LibController"}}>New Layer</button>')

}).appendTo('#mapsetlib_canvas');

GeocamResponderMaps.MapSetsLib = Ember.CollectionView.create({
tagName: 'ul',
classNames: ['ulList'],
content: Em.A([]),

itemViewClass: Ember.View.extend({
template: Ember.Handlebars.compile("{{content}}"),
attributeBindings: 'draggable',
draggable: 'true',
doubleClick: function(){
return GeocamResponderMaps.LibController.addOverlay(this.content);

}
})
}).appendTo('.library');



GeocamResponderMaps.MapSets = Ember.CollectionView.create({
tagName: 'ul',
classNames: ['ulList'],
content: Em.A([]),

itemViewClass: Ember.View.extend({
template: Ember.Handlebars.compile('<input type="checkbox">{{content}}'),
attributeBindings: 'draggable',
draggable: 'true',
doubleClick: function(){
GeocamResponderMaps.LibController.removeOverlay(this);
}

})
}).appendTo('.map_set');



/**************************
* Controllers
**************************/
GeocamResponderMaps.LibController = Em.ArrayController.create({
contentLib: [],
library: GeocamResponderMaps.Library.create({MapOverlays: []}),
createLayer: function() {
var overlay = GeocamResponderMaps.MapOverlay.create({name: "Mountain View Sewer System"});
this.library.add(overlay);
console.log(this.library);
this.updateLibrary();
},
updateLibrary: function() {
GeocamResponderMaps.MapSetsLib.content.clear();
GeocamResponderMaps.MapSetsLib.content.pushObjects(this.library.MapOverlays);
},
addOverlay: function(overlay) {
GeocamResponderMaps.MapSets.content.pushObject(overlay);
console.log(overlay);
},
showOverlay: function(that){
console.log();
},
removeOverlay: function(that){
var index = that.valueOf().contentIndex;
var end = GeocamResponderMaps.MapSets.get('childViews').length;
GeocamResponderMaps.MapSets.content.removeAt(index);
//updating the variable (contentIndex) that keeps track of their position
var childs = GeocamResponderMaps.MapSets.get('childViews');
for(index;index<end;index++){
childs.objectAt(index).valueOf().contentIndex = index;
}
}
});





4 changes: 4 additions & 0 deletions js/jquery-1.7.1-min.js

Large diffs are not rendered by default.

0 comments on commit 351491f

Please sign in to comment.