Permalink
Browse files

misc

  • Loading branch information...
1 parent a56affd commit ea4ce010baf7e5bb274c6e8bfcc08d7d3b75df1b @Gabino3 Gabino3 committed Jul 19, 2012
Showing with 58 additions and 9 deletions.
  1. +2 −2 index.html
  2. +46 −7 js/geocamMaps.js
  3. +10 −0 style/styles.css
View
4 index.html
@@ -44,9 +44,9 @@
<div class="columnHeader">
<script type="text/x-handlebars">
{{GeocamResponderMaps.name}}
-
</script>
- <div>Current Map Set</div>
+ <div id="mapSetName">
+ </div>
</div>
View
53 js/geocamMaps.js
@@ -50,19 +50,27 @@ GeocamResponderMaps.MapOverlay = Em.Object.extend({
return this.name;
}
});
+
+GeocamResponderMaps.MapSetLayer = Em.Object.extend({
+ name: '',
+ alias: '',
+ type: '',
+ url: '',
+ show: false,
+ json: '',
+ mapset: '',
+});
+
/*
* The overlay library. This holds MapOverlay objects, not the overlays themselves
*/
GeocamResponderMaps.Library = Em.Object.extend({
- MapOverlays: [],
+ MapOverlays: Em.A([]),
add: function(overlay){
this.MapOverlays.insertAt(0, overlay);
},
- remove: function(overlay){
- //TODO
- },
- removeLast: function(){
- //TODO
+ remove: function(overlayIndex){
+ this.MapOverlays.removeAt(overlayIndex);
},
findOverlay: function(overlay){
return ;//TODO
@@ -72,19 +80,50 @@ GeocamResponderMaps.Library = Em.Object.extend({
}
});
+GeocamResponderMaps.MapSet = Em.Object.extend({
+ shortName: '',
+ name: '',
+ description: '',
+ url: '',
+ mapsetjson: '',
+ json: '',
+});
+
/**************************
* Views
**************************/
+GeocamResponderMaps.MapSetView = Ember.View.create({
+ classNames: ['nameContainer'],
+ template: Ember.Handlebars.compile('{{#if isEditing}}\
+ {{view Ember.TextField class="editing" placeholderBinding="name" valueBinding="change"}}\
+ {{else}}\
+ {{name}}\
+ {{/if}}'),
+ isEditing: false,
+ name: 'Untitled',
+ change: '',
+ doubleClick: function(){
+ this.set('isEditing', !this.isEditing);
+ if(!this.isEditing){
+ if(this.change != ''){
+ this.set('name', this.change);
+ this.set('change','');
+ }
+ }
+ }
+
+}).appendTo('#mapSetName');
+
/*
* defines the Mapset area
*/
GeocamResponderMaps.MapSetView = Ember.View.create({
classNames: ['map_set', 'overlayContainer'],
- template: Ember.Handlebars.compile('<button id="undo" {{action "undo" target="GeocamResponderMaps.LibController"}}>Undo</button><button id="redo" {{action "redo" target="GeocamResponderMaps.LibController"}}>Redo</button><button id="save" >Save</button>')
+ template: Ember.Handlebars.compile('<button id="undo" {{action "undo" target="GeocamResponderMaps.LibController"}}>Undo</button><button id="redo" {{action "redo" target="GeocamResponderMaps.LibController"}}>Redo</button><button id="save" >Save</button><button id="load" >Load</button>')
}).appendTo('#mapset_canvas');
View
10 style/styles.css
@@ -70,6 +70,16 @@ button:active {
}
+.nameContainer input[type='text'] {
+ width: 380px;
+ font-size: 14px;
+ font-family: Helvetica, sans-serif;
+ padding: 5px;
+ margin-left: 0px;
+ border: 1px solid #bbbbbb;
+ font-weight: 300;
+}
+
.mapsetdiv input[type='text'] {
width: 200px;
}

0 comments on commit ea4ce01

Please sign in to comment.