Browse Source

Use textarea value for log posting

pull/3356/head
Ruud 11 years ago
parent
commit
ba65700aad
  1. 17
      couchpotato/core/plugins/log/static/log.js

17
couchpotato/core/plugins/log/static/log.js

@ -210,7 +210,8 @@ Running on: ...\n\
version = Updater.getInfo(),
body = self.report_text
.replace('{issue}', text)
.replace('{version}', version ? version.version.repr : '...');
.replace('{version}', version ? version.version.repr : '...'),
textarea;
var overlay = new Element('div.report', {
'method': 'post',
@ -243,7 +244,7 @@ Running on: ...\n\
'text': ' before posting, then copy the text below'
})
),
new Element('textarea', {
textarea = new Element('textarea', {
'text': body,
'events': {
'click': function(){
@ -254,7 +255,17 @@ Running on: ...\n\
new Element('a.button', {
'target': '_blank',
'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();
}
}
})
)
);

Loading…
Cancel
Save