Index: components/physical_web/webui/resources/physical_web.js |
diff --git a/components/physical_web/webui/resources/physical_web.js b/components/physical_web/webui/resources/physical_web.js |
index 418dc1d6e90c1b5e8daffb35b8fbd841900eae08..9231430fd03c52776adb690e5564dd27ce9d2778 100644 |
--- a/components/physical_web/webui/resources/physical_web.js |
+++ b/components/physical_web/webui/resources/physical_web.js |
@@ -21,11 +21,24 @@ function physicalWebItemClicked(index) { |
chrome.send('physicalWebItemClicked', [index]); |
} |
+function clearScanNotification() { |
cco3
2017/02/23 20:07:31
I think the language of "notification" is a bit co
Ran
2017/02/23 20:59:46
Done.
|
+ var scanningContainer = $('scan-container'); |
cco3
2017/02/23 20:07:31
This selector isn't going to work. You need the
Ran
2017/02/23 20:59:46
I was referring the "body-container". If I add the
|
+ scanningContainer.style.visibility = 'hidden'; |
+} |
+ |
function returnNearbyURLs(nearbyUrlsData) { |
var bodyContainer = $('body-container'); |
renderTemplate(nearbyUrlsData); |
- |
bodyContainer.style.visibility = 'visible'; |
+ |
+ clearScanNotification(); |
mattreynolds
2017/02/23 20:18:42
How long does it normally take to receive the URLs
Ran
2017/02/23 20:59:46
It's very fast, when I am doing test, I did't see
mattreynolds
2017/02/23 22:58:19
With the current behavior it should always be inst
|
+ if (nearbyUrlsData['metadata'].length == 0) { |
+ var emptyMessage = $('empty-container'); |
+ emptyMessage.style.visibility = 'visible'; |
+ } |
} |
document.addEventListener('DOMContentLoaded', requestNearbyURLs); |
+document.addEventListener('DOMContentLoaded', function() { |
+ setTimeout(clearScanNotification, 6000); |
cco3
2017/02/23 20:07:31
Since we always return nearbyurls right away, this
Ran
2017/02/23 20:59:46
Removed.
when I test, it gives the nearbyurls righ
|
+}); |