From fcf15718d13384721af86cba6cf9082914741d2a Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 23 Jan 2013 15:27:47 -0500 Subject: [PATCH] Restyle flash modal. Fixes #458 --- css/app.css | 11 +++++++++++ js/id/ui/flash.js | 4 ++-- js/id/ui/geocoder.js | 1 + js/id/ui/inspector.js | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/css/app.css b/css/app.css index 56e87ccd7..7227e6d82 100644 --- a/css/app.css +++ b/css/app.css @@ -940,6 +940,17 @@ div.typeahead a:first-child { display: block; } +.modal-flash .content { + box-shadow: none; + border-radius: 4px; + background: #111; + color: #eee; +} + +.modal-flash .close-modal { + display:none; +} + .changeset-list li { border-top:1px solid #ccc; padding:5px 10px; diff --git a/js/id/ui/flash.js b/js/id/ui/flash.js index 4ce6a3b0a..1e4d7379d 100644 --- a/js/id/ui/flash.js +++ b/js/id/ui/flash.js @@ -1,7 +1,7 @@ iD.ui.flash = function() { var modal = iD.ui.modal(); - modal.select('.modal').classed('modal-alert', true); + modal.select('.modal').classed('modal-flash', true); modal.select('.content') .classed('modal-section', true) @@ -13,7 +13,7 @@ iD.ui.flash = function() { setTimeout(function() { modal.remove(); return true; - }, 1000); + }, 1500); return modal; }; diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index ba3e0db2f..9a9c1e1d3 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -13,6 +13,7 @@ iD.ui.geocoder = function() { if (!resp.results.length) { return iD.ui.flash() .select('.content') + .append('h3') .text('No location found for "' + resp.query[0] + '"'); } var bounds = resp.results[0][0].bounds; diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 058f318df..22fac522d 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -178,6 +178,7 @@ iD.ui.inspector = function() { } else { iD.ui.flash() .select('.content') + .append('h3') .text('This is no documentation available for this tag combination'); } }); @@ -195,6 +196,7 @@ iD.ui.inspector = function() { } else { iD.ui.flash() .select('.content') + .append('h3') .text('This is no documentation available for this key'); } });