mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
initial commit of form revamp
This commit is contained in:
+3
-8
@@ -30,21 +30,16 @@ iD.ui.preset = function(context) {
|
||||
.data(preset.form)
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'preset-section fillL inspector-inner col12');
|
||||
.attr('class', 'fr preset-section fillL inspector-inner col9');
|
||||
|
||||
sections.each(function(d) {
|
||||
var s = d3.select(this);
|
||||
var wrap = s.append('div')
|
||||
.attr('class', 'preset-section-input');
|
||||
|
||||
wrap.append('div')
|
||||
.attr('class', 'col3 preset-label')
|
||||
.append('h4')
|
||||
s.append('h4')
|
||||
.attr('for', 'input-' + d.key)
|
||||
.text(function(d) { return d.label(); });
|
||||
|
||||
input.call(wrap.append('div')
|
||||
.attr('class', 'col9 preset-input'), d);
|
||||
input.call(s, d);
|
||||
});
|
||||
if (tags) event.setTags(tags);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
iD.ui.preset.combo = function(form) {
|
||||
|
||||
var event = d3.dispatch('change', 'close'),
|
||||
wrap,
|
||||
input;
|
||||
|
||||
function combo(selection) {
|
||||
|
||||
wrap = this.append('span').attr('class', 'input-wrap-position');
|
||||
|
||||
input = wrap.append('input')
|
||||
input = this.append('input')
|
||||
.attr('type', 'text')
|
||||
.on('change', change)
|
||||
.on('blur', change);
|
||||
|
||||
var combobox = d3.combobox();
|
||||
wrap.call(combobox);
|
||||
input.call(combobox);
|
||||
|
||||
if (form.options) {
|
||||
options(form.options);
|
||||
|
||||
@@ -57,13 +57,14 @@ iD.ui.TagEditor = function(context) {
|
||||
typebutton.node().focus();
|
||||
|
||||
var namewrap = headerwrap.append('div')
|
||||
.attr('class', 'name preset-section fillL inspector-inner col9');
|
||||
.attr('class', 'name fillL inspector-inner col9');
|
||||
|
||||
typebutton.append('span')
|
||||
.attr('class','label')
|
||||
.text(preset.name);
|
||||
|
||||
namewrap.append('h4').text(t('inspector.name'));
|
||||
namewrap.append('h4')
|
||||
.text(t('inspector.name'));
|
||||
|
||||
name = namewrap.append('input')
|
||||
.attr('placeholder', 'unknown')
|
||||
@@ -83,7 +84,7 @@ iD.ui.TagEditor = function(context) {
|
||||
.on('change', changeTags);
|
||||
|
||||
var tageditorpreset = editorwrap.append('div')
|
||||
.attr('class', 'inspector-preset');
|
||||
.attr('class', 'inspector-preset cf fillL');
|
||||
|
||||
if (preset) {
|
||||
tageditorpreset.call(presetUI
|
||||
|
||||
+1
-3
@@ -75,9 +75,7 @@ iD.ui.Taglist = function(context) {
|
||||
event.change(taglist.tags());
|
||||
});
|
||||
|
||||
inputs.append('span')
|
||||
.attr('class', 'input-wrap-position')
|
||||
.append('input')
|
||||
inputs.append('input')
|
||||
.property('type', 'text')
|
||||
.attr('class', 'value')
|
||||
.attr('maxlength', 255)
|
||||
|
||||
Reference in New Issue
Block a user