Remove error when cancelling save, dialogs should always be light-themed.

This commit is contained in:
Thomas Wilburn 2013-09-13 18:38:11 -07:00
parent f7e6e73590
commit 98fc8a79dc
3 changed files with 9 additions and 6 deletions

View file

@ -1,9 +1,11 @@
//display always uses the white coloring
.dialog {
position: fixed;
width: 250px;
left: ~"calc(50% - 100px)";
top: 200px;
background: @background;
background: white;
color: black;
box-shadow: 4px 4px 8px rgba(0, 0, 0, .2);
z-index: 999;
padding: 10px;
@ -20,8 +22,8 @@
padding: 8px;
border: 1px solid #888;
text-align: center;
background: @background;
color: @foreground;
background: white;
color: black;
min-width: 75px;
box-shadow: 4px 4px 8px rgba(0, 0, 0, .1);
@ -39,7 +41,7 @@
bottom: 0;
left: 0;
right: 0;
background: fade(@background, 20%);
background: rgba(255, 255, 255, .5);
z-index: 99;
}

View file

@ -1,7 +1,7 @@
define(["dom2"], function() {
return function(text, buttons, callback) {
if (typeof buttons == "function") {
if (typeof buttons == "function" || typeof buttons == "undefined") {
callback = buttons;
buttons = ["ok"];
}

View file

@ -25,7 +25,8 @@ define(function() {
chrome.fileSystem.chooseEntry({
type: modes[mode]
}, function(entry) {
if (!entry) return c("Couldn't open file");
//cancelling acts like an error, but isn't.
if (!entry) return;
self.entry = entry;
c(null, self)
});