From 140b56a68a030c0d16a4ca527032e27f0e37f18c Mon Sep 17 00:00:00 2001 From: samanpwbb Date: Fri, 31 Oct 2014 17:09:49 -0400 Subject: [PATCH] style adjustments + clean out unused code --- css/app.css | 68 ++++---------------------------------------- data/core.yaml | 2 +- dist/locales/en.json | 2 +- js/id/ui/preset.js | 2 +- 4 files changed, 8 insertions(+), 66 deletions(-) diff --git a/css/app.css b/css/app.css index db9800b7b..fede8747b 100644 --- a/css/app.css +++ b/css/app.css @@ -1002,7 +1002,7 @@ a:hover .icon.out-link { background-position: -500px -14px;} .inspector-preset .preset-form { padding: 10px; - margin: 0 10px 20px 10px; + margin: 0 10px 10px 10px; border-radius: 8px; } @@ -1265,75 +1265,17 @@ input, /* adding additional preset fields */ -.inspector-inner .more-fields { +.more-fields { + padding: 0 20px 20px 20px; font-weight: bold; - padding-top: 0; -webkit-transition: padding 200ms 200ms, max-height 200ms 200ms; -moz-transition: padding 200ms 200ms, max-height 200ms 200ms; -o-transition: padding 200ms 200ms, max-height 200ms 200ms; transition: padding 200ms 200ms, max-height 200ms 200ms; } -button.preset-add-field { - background: #f6f6f6; - width: 25%; - height: 40px; - -webkit-transition: width 200ms; - -moz-transition: width 200ms; - -o-transition: width 200ms; - transition: width 200ms; -} - -button.preset-add-field:hover { - background: #ececec; -} - -/* set width based on # of buttons */ - -button.preset-add-field:only-child { - width: 100%; -} - -button.preset-add-field:nth-last-child(2), -button.preset-add-field:nth-last-child(2) ~ button.preset-add-field { - width: 50%; -} - -button.preset-add-field:nth-last-child(3), -button.preset-add-field:nth-last-child(3) ~ button.preset-add-field { - width: 33.3333%; -} - -button.preset-add-field:nth-last-child(4), -button.preset-add-field:nth-last-child(4) ~ button.preset-add-field { - width: 25%; -} - -button.preset-add-field:nth-last-child(5), -button.preset-add-field:nth-last-child(5) ~ button.preset-add-field { - width: 20%; -} - -button.preset-add-field:nth-last-child(6), -button.preset-add-field:nth-last-child(6) ~ button.preset-add-field { - width: 16.6666%; -} - -button.preset-add-field:nth-last-child(7), -button.preset-add-field:nth-last-child(7) ~ button.preset-add-field { - width: 14.2857%; -} - -button.preset-add-field:nth-last-child(8), -button.preset-add-field:nth-last-child(8) ~ button.preset-add-field { - width: 12.5%; -} - -.preset-fav button.fav { - height: 30px; - margin: 5px; - padding: 0 10px; -} +.more-fields label { padding: 5px 10px 5px 0; } +.more-fields input { width: 50%;} /* preset form access */ diff --git a/data/core.yaml b/data/core.yaml index 43cbc67fb..3344ad573 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -227,7 +227,7 @@ en: way: Way relation: Relation location: Location - add_fields: Add additional fields + add_fields: "Add field:" background: title: Background description: Background settings diff --git a/dist/locales/en.json b/dist/locales/en.json index d9a9b0d78..426260f0c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -279,7 +279,7 @@ "way": "Way", "relation": "Relation", "location": "Location", - "add_fields": "Add additional fields" + "add_fields": "Add field:" }, "background": { "title": "Background", diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index c7152f1f9..8487bda6d 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -164,7 +164,7 @@ iD.ui.preset = function(context) { }; }); - var $more = $form.selectAll('.more-fields') + var $more = selection.selectAll('.more-fields') .data((notShown.length > 0) ? [0] : []); $more.enter().append('div')