Get tabs to work for the box

This commit is contained in:
Tom MacWright
2012-10-18 15:16:35 -04:00
parent 8459cbc742
commit 836e14d0e2
4 changed files with 24 additions and 6 deletions
+15 -3
View File
@@ -153,10 +153,10 @@ require(["dojo/dom-geometry","dojo/dom-class","dojo/on","dojo/dom","dojo/Evented
<h2>&nbsp;</h2>
<a class='close' href='#close'>&times;</a>
<div class='tabs'>
<a class='active' href='#presets'>Presets</a>
<a href='#tags'>Tags</a>
<a class='tab' href='#presets'>Presets</a>
<a class='tab' href='#tags'>Tags</a>
</div>
<div class='panel presets'>
<div class='hud presets'>
<ul>
<li>Primary
<li>Secondary
@@ -164,6 +164,18 @@ require(["dojo/dom-geometry","dojo/dom-class","dojo/on","dojo/dom","dojo/Evented
<li>Service
</ul>
</div>
<div class='hud tags'>
<table>
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
+8
View File
@@ -26,6 +26,14 @@ declare("iD.controller.edit.EditBaseState", [iD.controller.ControllerState], {
left: x,
top: y
}).show();
$('.edit-pane a.tab').click(function(e) {
$('.edit-pane a.tab').removeClass('active');
var hud = $(e.currentTarget).addClass('active')
.attr('href').split('#').pop();
$('.edit-pane .hud').hide();
$('.edit-pane .' + hud).show();
});
$('.edit-pane a.tab:first').click();
$('.edit-pane a[href=#close]').click(this.closeEditorTooltip);
},
+1 -1
View File
@@ -30,7 +30,7 @@ declare("iD.controller.edit.SelectedWayNode", [iD.controller.edit.EditBaseState]
},
processMouseEvent:function(event,entityUI) {
if (event.type !== 'click') return;
if (event.type !== 'click') return this;
var entity = entityUI ? entityUI.entity : null;
var entityType = entity ? entity.entityType : null;
-2
View File
@@ -155,5 +155,3 @@ relation[type=route][route=bicycle][network=ncn] way { z-index: 1; width: 12; co
relation[type=route][route=bicycle][network=rcn] way { z-index: 1; width: 12; color: cyan; opacity: 0.3; }
relation[type=route][route=bicycle][network=lcn] way { z-index: 1; width: 12; color: blue; opacity: 0.3; }
relation[type=route][route=foot] way { z-index: 1; width: 10; color: #80ff80; opacity: 0.6; }