diff --git a/customize.dist/src/less2/include/buttons.less b/customize.dist/src/less2/include/buttons.less index ad6aaf9cc..a907d2a0b 100644 --- a/customize.dist/src/less2/include/buttons.less +++ b/customize.dist/src/less2/include/buttons.less @@ -85,6 +85,7 @@ white-space: normal; font-weight: bold; } + &.danger, &.btn-danger { background-color: @colortheme_alertify-red; border-color: @colortheme_alertify-red-border; @@ -94,6 +95,14 @@ } } + &.danger-alt, &.btn-danger-alt { + border-color: @colortheme_alertify-red; + color: @colortheme_alertify-red; + &:hover, &:active { + background-color: lighten(@colortheme_alertify-red, 35%); + } + } + &.safe, &.btn-safe { background-color: @colortheme_alertify-green; border-color: @colortheme_alertify-green-border; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index b5e5aa90a..af1b4f679 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -30,6 +30,13 @@ define([ }); } + UIElements.prettySize = function (bytes) { + var kB = Util.bytesToKilobytes(bytes); + if (kB < 1024) { return kB + Messages.KB; } + var mB = Util.bytesToMegabytes(bytes); + return mB + Messages.MB; + }; + UIElements.updateTags = function (common, href) { var existing, tags; NThen(function(waitFor) { diff --git a/www/common/common-util.js b/www/common/common-util.js index da83b5960..e3ca9d007 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -224,6 +224,7 @@ else if (bytes >= oneMegabyte) { return 'MB'; } }; + // given a path, asynchronously return an arraybuffer Util.fetch = function (src, cb, progress) { var CB = Util.once(cb); diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index c7ca340a6..c1d0b74c0 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -182,13 +182,6 @@ define([ } }; - var prettySize = function (bytes) { - var kB = Util.bytesToKilobytes(bytes); - if (kB < 1024) { return kB + Messages.KB; } - var mB = Util.bytesToMegabytes(bytes); - return mB + Messages.MB; - }; - queue.next = function () { if (queue.queue.length === 0) { clearTimeout(queue.to); @@ -251,7 +244,7 @@ define([ // name $('