colors in sahli ascii example now change when changed/loaded
This commit is contained in:
parent
3d7cf11518
commit
1a7bd94ac1
4 changed files with 51 additions and 19 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Generated by CoffeeScript 1.7.1
|
||||
(function() {
|
||||
var Sahli, ansiorascii, arraytocolor, booltoint, colorindex, colortoarray, colortoname, dec2hex, dumpjson, emptyfiledef, hex2dec, inttobool, loadsahli, newsahli, resolvefiletype, statustobool;
|
||||
var Sahli, ansiorascii, arraytocolor, booltoint, colorindex, colortoarray, colortoname, dec2hex, dumpjson, emptyfiledef, hex2dec, inttobool, loadsahli, newsahli, resolvefiletype, sahlicolor, statustobool;
|
||||
|
||||
$(function() {
|
||||
return $("h1").hide().slideDown(500);
|
||||
|
|
@ -46,6 +46,11 @@
|
|||
$(".groupbox p").css({
|
||||
margin: "0 0 .25em 0"
|
||||
});
|
||||
$(".colorbox").change((function(_this) {
|
||||
return function() {
|
||||
return sahlicolor();
|
||||
};
|
||||
})(this));
|
||||
$("#entryfilepick").change(function() {
|
||||
if (this.files[0] != null) {
|
||||
return $("#entryfile").val(this.files[0].name);
|
||||
|
|
@ -313,7 +318,8 @@
|
|||
$("#entryline1").val(data.line1);
|
||||
$("#entryline2").val(data.line2);
|
||||
$("#entrytext").val(data.text);
|
||||
return $("#entryfile").val(data.file);
|
||||
$("#entryfile").val(data.file);
|
||||
return sahlicolor();
|
||||
};
|
||||
|
||||
return Sahli;
|
||||
|
|
@ -453,6 +459,17 @@
|
|||
return names[colorname];
|
||||
};
|
||||
|
||||
sahlicolor = function() {
|
||||
var bg, fg;
|
||||
fg = $('#entrycolor').val();
|
||||
bg = $('#entrybg').val();
|
||||
console.log('sahlicolor', fg, bg);
|
||||
return $('#sahliascii').css({
|
||||
'color': fg,
|
||||
'background': bg
|
||||
});
|
||||
};
|
||||
|
||||
newsahli = function() {
|
||||
var newentry, sahli;
|
||||
sahli = new Sahli;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue