diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 738079e6a..ddd7211b8 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -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) { diff --git a/js/id/ui/tageditor.js b/js/id/ui/tageditor.js index ef9025e46..59e1a3284 100644 --- a/js/id/ui/tageditor.js +++ b/js/id/ui/tageditor.js @@ -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); diff --git a/js/id/ui/taglist.js b/js/id/ui/taglist.js index 388ac90be..dd9a41091 100644 --- a/js/id/ui/taglist.js +++ b/js/id/ui/taglist.js @@ -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) {