Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurjamain committed Jan 4, 2013
2 parents 1ac0c1c + 53686ae commit 457cfca
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/app.desktop.ios.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.phone.android.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.phone.ios.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.tablet.android.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.tablet.ios.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.tv.samsung.samsungtv.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/app.tv.tv.optimized.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/sleek.js
Expand Up @@ -281,7 +281,7 @@ function (Collection, DynamicContainer, Item, List, CardPanel, FadeInPanel, Fact
*/
setColor: function(color, callback) {
$('#color').remove();
window.Sid.css('css/' + this.deviceFamily + '.' + color + '.css', callback);
window.Sid.css('css/' + this.deviceFamily + '.' + color + '.css', callback, 'afterfirststyle');
},


Expand Down
12 changes: 8 additions & 4 deletions app/sleek.samsung.js
Expand Up @@ -63,16 +63,20 @@ function(Sleek, Collection, UIElement, List, Toolbar, CardPanel, SlidePanel, Ver
if(!this.colorSet) {
this.colorSet = true;
$('#color').remove();
if(typeof sf !== 'undefined' && sf.core) {
if (typeof sf !== 'undefined' && sf.core) {
sf.core.loadCSS('css/' + this.deviceFamily + '.' + color + '.css');
callback();
}
else {
} else {
var style = doc.getElementsByTagName('style')[0];
var linkNode = document.createElement('link');
linkNode.type = 'text/css';
linkNode.rel = 'stylesheet';
linkNode.href = 'css/' + this.deviceFamily + '.' + color + '.css';
document.getElementsByTagName('body')[0].appendChild(linkNode);
if (style && style.nextSibling) {
style.parentNode.insertBefore(linkNode, style.nextSibling);
} else {
document.getElementsByTagName('body')[0].appendChild(linkNode);
}
callback();
}
}
Expand Down
13 changes: 11 additions & 2 deletions app/vendor/sidjs-0.1.js
Expand Up @@ -62,6 +62,7 @@ Assume all versions of IE support readystatechange
proto = 'prototype',
head = doc.getElementsByTagName('head')[0],
body = doc.getElementsByTagName('body')[0],
style = doc.getElementsByTagName('style')[0],
sniff = /*@cc_on!@*/1 + /(?:Gecko|AppleWebKit)\/(\S*)/.test(navigator.userAgent); // 0 - IE, 1 - O, 2 - GK/WK

var createNode = function(tag, attrs) {
Expand All @@ -80,7 +81,9 @@ Assume all versions of IE support readystatechange
}

urls = (typeof urls == 'string' ? [urls] : urls);
scope = (scope ? (scope == 'body' ? body : head) : (type == 'js' ? body : head));
if (scope && scope != 'afterfirststyle') {
scope = (scope ? (scope == 'body' ? body : head) : (type == 'js' ? body : head));
}

this.callback = callback || function() {};
this.queue = [];
Expand All @@ -95,7 +98,13 @@ Assume all versions of IE support readystatechange
else {
node = createNode('script', { type: 'text/javascript', src: urls[i] });
}
scope.appendChild(node);
if (style && scope == 'afterfirststyle') {
if (style.nextSibling) {
style.parentNode.insertBefore(node, style.nextSibling);
}
} else {
scope.appendChild(node);
}

if (sniff) {
if (type == 'css' && sniff == 2) {
Expand Down
Binary file modified tasks/server/public/sleek.zip
Binary file not shown.

0 comments on commit 457cfca

Please sign in to comment.