Use textarea value for log posting
This commit is contained in:
1 parent
84a7cfe07d
commit
ba65700aad
1 file changed
+14
-3
@@ -210,7 +210,8 @@ Running on: ...\n\
|
|||||||
version = Updater.getInfo(),
|
version = Updater.getInfo(),
|
||||||
body = self.report_text
|
body = self.report_text
|
||||||
.replace('{issue}', text)
|
.replace('{issue}', text)
|
||||||
.replace('{version}', version ? version.version.repr : '...');
|
.replace('{version}', version ? version.version.repr : '...'),
|
||||||
|
textarea;
|
||||||
|
|
||||||
var overlay = new Element('div.report', {
|
var overlay = new Element('div.report', {
|
||||||
'method': 'post',
|
'method': 'post',
|
||||||
@@ -243,7 +244,7 @@ Running on: ...\n\
|
|||||||
'text': ' before posting, then copy the text below'
|
'text': ' before posting, then copy the text below'
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
new Element('textarea', {
|
textarea = new Element('textarea', {
|
||||||
'text': body,
|
'text': body,
|
||||||
'events': {
|
'events': {
|
||||||
'click': function(){
|
'click': function(){
|
||||||
@@ -254,7 +255,17 @@ Running on: ...\n\
|
|||||||
new Element('a.button', {
|
new Element('a.button', {
|
||||||
'target': '_blank',
|
'target': '_blank',
|
||||||
'text': 'Create a new issue on GitHub with the text above',
|
'text': 'Create a new issue on GitHub with the text above',
|
||||||
'href': 'https://github.com/RuudBurger/CouchPotatoServer/issues/new?body=' + (body.length < 2000 ? encodeURIComponent(body) : 'Paste the text here')
|
'href': 'https://github.com/RuudBurger/CouchPotatoServer/issues/new',
|
||||||
|
'events': {
|
||||||
|
'click': function(e){
|
||||||
|
(e).stop();
|
||||||
|
|
||||||
|
var body = textarea.get('value'),
|
||||||
|
bdy = '?body=' + (body.length < 2000 ? encodeURIComponent(body) : 'Paste the text here'),
|
||||||
|
win = window.open(e.target.get('href') + bdy, '_blank');
|
||||||
|
win.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user