bugfixes: deletes, moves, adds.
- still have a strange bug when you add, then move. Unsure why, but it doesn't edit properly.
This commit is contained in:
parent
7a2877fb21
commit
c5e51be5ba
4 changed files with 73 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Generated by CoffeeScript 1.7.1
|
||||
(function() {
|
||||
var Sahli, ansiorascii, arraytocolor, booltoint, colorindex, colortoarray, colortoname, dec2hex, dumpjson, hex2dec, inttobool, loadsahli, newsahli, resolvefiletype, statustobool;
|
||||
var Sahli, ansiorascii, arraytocolor, booltoint, colorindex, colortoarray, colortoname, dec2hex, dumpjson, emptyfiledef, hex2dec, inttobool, loadsahli, newsahli, resolvefiletype, statustobool;
|
||||
|
||||
$(function() {
|
||||
return $("h1").hide().slideDown(500);
|
||||
|
|
@ -56,9 +56,30 @@
|
|||
});
|
||||
});
|
||||
|
||||
emptyfiledef = (function() {
|
||||
function emptyfiledef() {
|
||||
this.file = "";
|
||||
this.name = "";
|
||||
this.amiga = true;
|
||||
this.filetype = 'plain';
|
||||
this.width = "";
|
||||
this.author = "";
|
||||
this.font = "Propaz";
|
||||
this.color = [255, 255, 255, 255];
|
||||
this.bg = [0, 0, 0, 0];
|
||||
this.line1 = "";
|
||||
this.line2 = "";
|
||||
this.text = "";
|
||||
}
|
||||
|
||||
return emptyfiledef;
|
||||
|
||||
})();
|
||||
|
||||
Sahli = (function() {
|
||||
function Sahli() {
|
||||
this.emptyfiledef = {
|
||||
this.emptyfiledef = new emptyfiledef;
|
||||
this.bob = {
|
||||
"file": "",
|
||||
"name": "",
|
||||
"amiga": true,
|
||||
|
|
@ -124,13 +145,16 @@
|
|||
return alert('clicked');
|
||||
};
|
||||
})(this));
|
||||
$('#listinsert').button({
|
||||
$('#listappend').button({
|
||||
icons: {
|
||||
primary: "ui-icon-1-n"
|
||||
}
|
||||
}).click((function(_this) {
|
||||
return function() {
|
||||
return alert('clicked');
|
||||
return function(event) {
|
||||
var newentry;
|
||||
newentry = new emptyfiledef;
|
||||
_this.data.filedata.push(newentry);
|
||||
return _this.buildlist(_this.data);
|
||||
};
|
||||
})(this));
|
||||
$('#listdisplay').button({
|
||||
|
|
@ -180,7 +204,7 @@
|
|||
_ref2 = _this.data.filedata;
|
||||
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
||||
name = _ref2[_k];
|
||||
console.log(name.author);
|
||||
console.log(name.author, name.name, name.file);
|
||||
}
|
||||
return console.log('---');
|
||||
};
|
||||
|
|
@ -235,7 +259,8 @@
|
|||
entry.line1 = $("#entryline1").val();
|
||||
entry.line2 = $("#entryline2").val();
|
||||
entry.text = $("#entrytext").val();
|
||||
return entry.file = $("#entryfile").val();
|
||||
entry.file = $("#entryfile").val();
|
||||
return this.buildlist(this.data);
|
||||
};
|
||||
|
||||
Sahli.prototype.editline = function(data, pos) {
|
||||
|
|
@ -262,7 +287,7 @@
|
|||
return function(event) {
|
||||
event.preventDefault();
|
||||
_this.save();
|
||||
return $(this).dialog("close");
|
||||
return event.currentTarget.previousElementSibling.click();
|
||||
};
|
||||
})(this)
|
||||
}
|
||||
|
|
@ -428,10 +453,11 @@
|
|||
};
|
||||
|
||||
newsahli = function() {
|
||||
var sahli;
|
||||
var newentry, sahli;
|
||||
sahli = new Sahli;
|
||||
sahli.data = sahli.empty;
|
||||
sahli.data.filedata.push(sahli.emptyfiledef);
|
||||
newentry = new emptyfiledef;
|
||||
sahli.data.filedata.push(newentry);
|
||||
return sahli.edit();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue