Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Meiguro committed Sep 8, 2014
2 parents 21c926c + a5e5baa commit 8a33e79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/js/lib/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ var ajax = function(opt, success, failure) {
req.onreadystatechange = function(e) {
if (req.readyState === 4) {
var body = req.responseText;
var okay = req.status === 200;
var okay = req.status >= 200 && req.status < 300 || req.status === 304;

try {
if (opt.type === 'json') {
body = JSON.parse(body);
Expand Down
9 changes: 6 additions & 3 deletions src/js/ui/simply-pebble.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,11 @@ SimplyPebble.windowHide = function(id) {
SimplyPebble.sendPacket(WindowHidePacket.id(id));
};

SimplyPebble.windowProps = function(def) {
SimplyPebble.sendPacket(WindowPropsPacket.prop(def));
SimplyPebble.windowProps = function(def, backgroundColor) {
WindowPropsPacket
.prop(def)
.backgroundColor(backgroundColor);
SimplyPebble.sendPacket(WindowPropsPacket);
};

SimplyPebble.windowButtonConfig = function(def) {
Expand Down Expand Up @@ -746,7 +749,7 @@ SimplyPebble.card = function(def, clear, pushing) {
if (clear !== undefined) {
SimplyPebble.cardClear(clear);
}
SimplyPebble.windowProps(def);
SimplyPebble.windowProps(def, 'white');
if (def.action !== undefined) {
SimplyPebble.windowActionBar(def.action);
}
Expand Down
1 change: 1 addition & 0 deletions src/js/ui/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var defaults = {
backgroundColor: 'clear',
borderColor: 'clear',
color: 'white',
font: 'gothic-24',
};

var Text = function(elementDef) {
Expand Down

0 comments on commit 8a33e79

Please sign in to comment.