Remove tagview

Discussion in #581
Unecessary since additional tags are displayed below
preset ui. Editing preset tags in raw form seems
like a very corner case.
This commit is contained in:
Ansis Brammanis
2013-02-21 13:00:17 -05:00
parent 4b64b40de6
commit f6fc15f7e9
3 changed files with 16 additions and 30 deletions

View File

@@ -3,7 +3,6 @@ iD.ui.Inspector = function() {
taginfo = iD.taginfo(),
presetData = iD.presetData(),
initial = false,
expert = false,
inspectorbody,
entity,
presetUI,
@@ -32,7 +31,7 @@ iD.ui.Inspector = function() {
.context(context)
.on('message', changeMessage)
.on('choose', function(preset) {
inspectorbody.call(tagEditor, expert, preset);
inspectorbody.call(tagEditor, preset);
});
tagEditor = iD.ui.TagEditor()
@@ -77,16 +76,6 @@ iD.ui.Inspector = function() {
.attr('href', 'http://www.openstreetmap.org/browse/' + entity.type + '/' + entity.osmId())
.attr('target', '_blank')
.text(t('inspector.view_on_osm'));
var expertButton = selection.append('button')
.attr('class', 'apply')
.text('Tag view')
.on('click', function() {
expert = !expert;
expertButton.text(expert ? 'Preset view' : 'Tag view');
inspectorbody.call(tagEditor, expert);
});
}
function apply(entity) {

View File

@@ -12,7 +12,7 @@ iD.ui.TagEditor = function() {
tagList,
context;
function tageditor(selection, tagview, preset) {
function tageditor(selection, preset) {
entity = selection.datum();
@@ -100,7 +100,7 @@ iD.ui.TagEditor = function() {
var tageditorpreset = editorwrap.append('div')
.attr('class', 'inspector-preset');
if (presetMatch && !tagview) {
if (presetMatch) {
tageditorpreset.call(presetUI
.preset(presetMatch));
}
@@ -108,7 +108,7 @@ iD.ui.TagEditor = function() {
event.message('Edit ' + (presetMatch && presetMatch.name || ''));
var taglistwrap = editorwrap.append('div')
.attr('class','inspector-inner col12 fillL2').call(tagList, !tagview);
.attr('class','inspector-inner col12 fillL2').call(tagList);
tageditor.tags(tags);
event.change(tags);

View File

@@ -5,21 +5,20 @@ iD.ui.Taglist = function() {
list,
context;
function taglist(selection, collapsed) {
function taglist(selection) {
if (collapsed) {
var collapsebutton = selection.append('a')
.attr('href','#')
.attr('class','hide-toggle')
.text('Additional tags')
.on('click', function() {
collapsebutton.classed('expanded', wrap.classed('hide'));
wrap.call(iD.ui.Toggle(wrap.classed('hide')));
selection.node().parentNode.scrollTop += 200;
});
}
var collapsebutton = selection.append('a')
.attr('href','#')
.attr('class','hide-toggle')
.text('Additional tags')
.on('click', function() {
collapsebutton.classed('expanded', wrap.classed('hide'));
wrap.call(iD.ui.Toggle(wrap.classed('hide')));
selection.node().parentNode.scrollTop += 200;
});
var wrap = selection.append('div');
var wrap = selection.append('div')
.attr('class', 'hide');
list = wrap.append('ul')
.attr('class', 'tag-list');
@@ -38,8 +37,6 @@ iD.ui.Taglist = function() {
newTag.append('span')
.attr('class', 'label')
.text(t('inspector.new_tag'));
wrap.classed('hide', collapsed);
}
function drawTags(tags) {