Skip to content
Browse files

use the same element for all modals

  • Loading branch information...
1 parent 607780b commit fbb7bc9a5c8739830d96e2c49a8f3c8d326a9f03 @nilclass committed Feb 2, 2013
Showing with 15 additions and 12 deletions.
  1. +3 −4 app/views/modal/addFeature.js
  2. +8 −0 app/views/modal/base.js
  3. +3 −4 app/views/modal/userOptions.js
  4. +1 −4 index.dev.html
View
7 app/views/modal/addFeature.js
@@ -3,13 +3,12 @@ define([
'ender',
'backbone',
'models/feature',
- 'views/panels',
+ 'views/modal/base',
'templateMap'
-], function(_, $, Backbone, Feature, panels, templates) {
+], function(_, $, Backbone, Feature, BaseModal, templates) {
- return panels.Base.extend({
+ return BaseModal.extend({
- el: '#addFeatureModal',
template: templates.addFeature,
initialize: function(location) {
View
8 app/views/modal/base.js
@@ -0,0 +1,8 @@
+define([
+ 'backbone',
+ 'views/panels'
+], function(Backbone, panels) {
+ return panels.Base.extend({
+ el: '#modal'
+ });
+});
View
7 app/views/modal/userOptions.js
@@ -1,8 +1,8 @@
define([
'backbone',
- 'views/panels',
+ 'views/modal/base',
'templateMap',
-], function(Backbone, panels, templates) {
+], function(Backbone, BaseModal, templates) {
/**
* Class: Modal.UserOptions
@@ -11,9 +11,8 @@ define([
*
* (see optionsPanel.png)
*/
- return panels.Base.extend({
+ return BaseModal.extend({
- el: '#userOptionModal',
template: templates.userOptionModal,
events: {
View
5 index.dev.html
@@ -73,10 +73,7 @@
<div id='featureBox'></div>
<div id='miniMap'></div>
</div>
- <div id='featureOptionModal' class='uiModal'></div>
- <div id='userOptionModal' class='uiModal'></div>
- <div id='featureInfoModal' class='uiModal'></div>
- <div id='addFeatureModal' class='uiModal'></div>
+ <div id='modal' class='uiModal'></div>
</div>
</body>

0 comments on commit fbb7bc9

Please sign in to comment.
Something went wrong with that request. Please try again.