From edb3a3b68210e26b3eb0548dfae2dceb4ee00180 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 31 Jan 2013 10:03:43 -0500 Subject: [PATCH] Entire notice is clickable. Fixes #262 --- css/app.css | 16 ++++++++++++---- js/id/ui/notice.js | 21 +++++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/css/app.css b/css/app.css index 98ba49e57..4c149843d 100644 --- a/css/app.css +++ b/css/app.css @@ -1052,7 +1052,8 @@ a.success-action { text-align:center; } -.notice .notice-inner { +.notice .zoom-to { + width:100%; height: 40px; border-radius: 5px; line-height: 40px; @@ -1061,12 +1062,19 @@ a.success-action { opacity: 0.9; } -.notice .notice-inner .zoom-to { - width:40px; - height:40px; +.notice .zoom-to:hover { + background: #bde5aa; +} + +.notice .zoom-to .icon { + margin-top:10px; margin-right:10px; } +.icon.zoom-in-invert { + background-position: -240px -40px; +} + /* Tooltips ------------------------------------------------------- */ diff --git a/js/id/ui/notice.js b/js/id/ui/notice.js index bcf44b7c9..12b1a2c09 100644 --- a/js/id/ui/notice.js +++ b/js/id/ui/notice.js @@ -4,20 +4,17 @@ iD.ui.notice = function(selection) { notice = {}; var div = selection.append('div') - .attr('class', 'notice') - .append('div') - .attr('class', 'notice-inner'); + .attr('class', 'notice'); - div.append('button') - .attr('class', 'zoom-to') - .on('click', function() { - event.zoom(); - }) - .append('span') - .attr('class', 'icon invert zoom-in'); + var button = div.append('button') + .attr('class', 'zoom-to notice') + .on('click', event.zoom); - div.append('span') - .attr('class', 'notice-text') + button.append('span') + .attr('class', 'icon zoom-in-invert'); + + button.append('span') + .attr('class', 'label') .text(t('zoom_in_edit')); notice.message = function(_) {