edit location field + saving location field
This commit is contained in:
parent
4224cc3066
commit
d1e2b9d1bf
4 changed files with 33 additions and 18 deletions
|
|
@ -62,6 +62,7 @@
|
|||
"file": "",
|
||||
"name": "",
|
||||
"amiga": true,
|
||||
"filetype": 'plain',
|
||||
"width": "",
|
||||
"author": "",
|
||||
"font": "Propaz",
|
||||
|
|
@ -77,6 +78,7 @@
|
|||
"css": ""
|
||||
};
|
||||
this.empty = {
|
||||
"location": "",
|
||||
"slides": this.emptyslidesdef,
|
||||
"filedata": []
|
||||
};
|
||||
|
|
@ -97,6 +99,11 @@
|
|||
|
||||
Sahli.prototype.edit = function() {
|
||||
$('#buttonbox').hide();
|
||||
$('#dirlocation').change((function(_this) {
|
||||
return function(event) {
|
||||
return _this.data.location = event.target.value;
|
||||
};
|
||||
})(this));
|
||||
$('#listsave').button({
|
||||
icons: {
|
||||
primary: "ui-icon-disk"
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ a html template, and a css file.
|
|||
"file": "",
|
||||
"name": "",
|
||||
"amiga": true,
|
||||
"filetype": 'plain',
|
||||
"width": "",
|
||||
"author": "",
|
||||
"font": "Propaz",
|
||||
|
|
@ -102,6 +103,7 @@ a html template, and a css file.
|
|||
"css": ""
|
||||
}
|
||||
@empty = {
|
||||
"location": "",
|
||||
"slides": @emptyslidesdef,
|
||||
"filedata": [ ]
|
||||
}
|
||||
|
|
@ -122,6 +124,8 @@ edit button.
|
|||
|
||||
edit: ->
|
||||
$('#buttonbox').hide()
|
||||
$('#dirlocation').change (event) =>
|
||||
@.data.location = event.target.value
|
||||
$('#listsave').button {icons: {primary:"ui-icon-disk"}}
|
||||
.click =>
|
||||
console.log dumpjson @.data
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
</div>
|
||||
|
||||
<div class='hidden' id='list'>
|
||||
<label>Location of Files:<input type="text" id='dirlocation' name="location" value=""></label>
|
||||
<ol id='sortlist'>
|
||||
</ol>
|
||||
<p id='listsave'>Save</p>
|
||||
|
|
|
|||
7
sahli.js
7
sahli.js
|
|
@ -35,7 +35,7 @@ var Sahli = function() {
|
|||
|
||||
this.loadpic = function (picdata, inserthere) {
|
||||
var jumptable = {
|
||||
'plain':this.loadplain(),
|
||||
'plain':this.loadplain(picdata,inserthere),
|
||||
'xbin':this.loadxbin(),
|
||||
'ice':this.loadice(),
|
||||
'avatar':this.loadavatar(),
|
||||
|
|
@ -46,7 +46,8 @@ var Sahli = function() {
|
|||
'adf':this.loadadf(),
|
||||
'tundra':this.loadtundra()
|
||||
}
|
||||
jumptable[picdata.filetype](picdata,inserthere);
|
||||
console.log('here');
|
||||
jumptable[picdata.filetype];
|
||||
}
|
||||
|
||||
this.loadplain = function(picdata, inserthere) {
|
||||
|
|
@ -84,6 +85,7 @@ var Sahli = function() {
|
|||
};
|
||||
req.open('GET', fname , true);
|
||||
req.send(null);
|
||||
}
|
||||
|
||||
this.loadansi = function(picdata,inserthere) {
|
||||
this.image = new ImageTextModeANSI();
|
||||
|
|
@ -99,6 +101,7 @@ var Sahli = function() {
|
|||
// fix, then deal with.
|
||||
sahli.loaderror(inserthere,fname,'Not found',404);
|
||||
}
|
||||
}
|
||||
|
||||
this.loadxbin = function(picdata,inserthere){
|
||||
alert('xbin');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue