%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
.text(v[0]));
});
- $("style#sitecss").text($('#user_css').val());
+ function update_sitecss(text) {
+ if (!text)
+ text = $('#user_css').val();
+
+ // IE 8 doesn't let us update the innerHTML of <style> tags (with jQuery.text())
+ // see: http://stackoverflow.com/questions/2692770/style-style-textcss-appendtohead-does-not-work-in-ie/2692861#2692861
+ $("style#sitecss").remove();
+ $("<style id='sitecss' type='text/css' media='all'>" + text + "</style>").appendTo('head');
+ }
+
+ update_sitecss();
$('#try').click(function() {
- $("style#sitecss").text($('#user_css').val());
+ update_sitecss();
});
$('#reset').click(function() {
setTimeout(function() {
- $("style#sitecss").text($('#user_css').val());
+ update_sitecss();
}, 1000);
});
}
}
$('#user_css').val(css);
- $("style#sitecss").text(css);
+ update_sitecss(css);
}
$('#color-picker').farbtastic(function(color){ change_color(color, this.hsl[2] > <% $text_threshold %> ? '#000' : '#fff') });
my @top5 = grep { defined and $_->{'l'} and $_->{'c'} }
(sort { $b->{rank} <=> $a->{rank} } values %$color)[0..5];
if ((scalar uniq map {$_->{rank}} @top5) == 1) {
- warn "bad";
+ $RT::Logger->info("Only one color found in logo image");
}
return \@top5;
}