Skip to content

Commit 1d91278

Browse files
author
Lionel Laské
committed
Cache colorized icon, fix Firefox compatibility
1 parent 6010e5a commit 1d91278

File tree

12 files changed

+56
-34
lines changed
  • activities
    • Clock.activity/lib/sugar-web/graphics
    • ConnecttheDots.activity/lib/sugar-web/graphics
    • Gears.activity/lib/sugar-web/graphics
    • GetThingsDone.activity/lib/sugar-web/graphics
    • LastOneLoses.activity/lib/sugar-web/graphics
    • Markdown.activity/lib/sugar-web/graphics
    • Memorize.activity/lib/sugar-web/graphics
    • Paint.activity/lib/sugar-web/graphics
    • Stopwatch.activity/lib/sugar-web/graphics
    • WelcomeWeb.activity/lib/sugar-web/graphics
  • js
  • lib/sugar-web/graphics

12 files changed

+56
-34
lines changed

activities/Clock.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/ConnecttheDots.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/Gears.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/GetThingsDone.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/LastOneLoses.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/Markdown.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/Memorize.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/Paint.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/Stopwatch.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

activities/WelcomeWeb.activity/lib/sugar-web/graphics/icon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ define(function () {
4646
var newData = changeColors(iconData, fillColor, strokeColor);
4747
callback(dataHeader + escape(newData));
4848
};
49-
50-
client.open("GET", source);
49+
50+
client.open("GET", source.replace(/"/g,""));
5151
client.send();
5252
};
5353

@@ -66,7 +66,7 @@ define(function () {
6666
"uri": getBackgroundURL(elem),
6767
"strokeColor": colors.stroke,
6868
"fillColor": colors.fill
69-
};
69+
};
7070

7171
icon.load(iconInfo, function (url) {
7272
setBackgroundURL(elem, url);

0 commit comments

Comments
 (0)