More name/email/subject save/load work.
This commit is contained in:
parent
50ffdb417c
commit
d5df9b0714
@ -1320,6 +1320,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_Class.prototype.load = function() {
|
_Class.prototype.load = function() {
|
||||||
|
var data;
|
||||||
|
for (data in this) {
|
||||||
|
if (data !== 'file') $("[name=" + data + "]", qr.el).value = this[data];
|
||||||
|
}
|
||||||
return log(this);
|
return log(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1329,7 +1333,7 @@
|
|||||||
|
|
||||||
})(),
|
})(),
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var mimeTypes, thread, threads, _i, _len, _ref;
|
var input, mimeTypes, thread, threads, _i, _j, _len, _len2, _ref, _ref2;
|
||||||
if (!g.REPLY) {
|
if (!g.REPLY) {
|
||||||
threads = '<option value=new>New thread</option>';
|
threads = '<option value=new>New thread</option>';
|
||||||
_ref = $$('.op');
|
_ref = $$('.op');
|
||||||
@ -1364,6 +1368,11 @@
|
|||||||
$.on($('form', qr.el), 'submit', qr.submit);
|
$.on($('form', qr.el), 'submit', qr.submit);
|
||||||
$.on($('[type=file]', qr.el), 'change', qr.fileInput);
|
$.on($('[type=file]', qr.el), 'change', qr.fileInput);
|
||||||
new qr.reply().load();
|
new qr.reply().load();
|
||||||
|
_ref2 = ['name', 'email', 'sub', 'com'];
|
||||||
|
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
|
||||||
|
input = _ref2[_j];
|
||||||
|
$.on($("[name=" + input + "]", qr.el), 'change', function() {});
|
||||||
|
}
|
||||||
return $.add(d.body, qr.el);
|
return $.add(d.body, qr.el);
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
|
|||||||
@ -980,14 +980,15 @@ qr =
|
|||||||
]
|
]
|
||||||
else
|
else
|
||||||
[
|
[
|
||||||
$.get("qr_name", null),
|
$.get("qr_name", null),
|
||||||
$.get("qr_email", null),
|
$.get("qr_email", null),
|
||||||
if conf['Remember Subject'] then $.get("qr_sub", null) else null
|
if conf['Remember Subject'] then $.get("qr_sub", null) else null
|
||||||
]
|
]
|
||||||
@com = null
|
@com = null
|
||||||
qr.replies.push @
|
qr.replies.push @
|
||||||
load: ->
|
load: ->
|
||||||
# load reply's data in the QR dialog
|
for data of @
|
||||||
|
$("[name=#{data}]", qr.el).value = @[data] unless data is 'file'
|
||||||
# visual feedback in the list
|
# visual feedback in the list
|
||||||
log @
|
log @
|
||||||
rm: ->
|
rm: ->
|
||||||
@ -1121,7 +1122,9 @@ textarea.field {
|
|||||||
$.on $('[type=file]', qr.el), 'change', qr.fileInput
|
$.on $('[type=file]', qr.el), 'change', qr.fileInput
|
||||||
|
|
||||||
new qr.reply().load()
|
new qr.reply().load()
|
||||||
#onchange this reply =
|
for input in ['name', 'email', 'sub', 'com']
|
||||||
|
# save this reply's data
|
||||||
|
$.on $("[name=#{input}]", qr.el), 'change', -> # (getReply?)[@name] = @value
|
||||||
# sync between tabs
|
# sync between tabs
|
||||||
# $.on window, 'storage', (e) ->
|
# $.on window, 'storage', (e) ->
|
||||||
# if match = e.key.match /qr_(.+)$/
|
# if match = e.key.match /qr_(.+)$/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user