Keep log filter

Pre-fill in issue when possible
This commit is contained in:
Ruud committed 2014-05-10 15:53:27 +02:00
1 parent c2eb50a7ee
commit cc10969506
2 files changed
+40 -17

No files matched your search

+35 -13
View File
@@ -81,6 +81,8 @@
font-size: 10px; font-size: 10px;
border-top: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.1);
position: relative; position: relative;
overflow: hidden;
padding: 0 3px;
} }
.page.log .container .time.highlight { .page.log .container .time.highlight {
background: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.1);
@@ -91,12 +93,12 @@
vertical-align: middle; vertical-align: middle;
} }
.page.log [data-filter=INFO] .error, .page.log[data-filter=INFO] .error,
.page.log [data-filter=INFO] .debug, .page.log[data-filter=INFO] .debug,
.page.log [data-filter=ERROR] .debug, .page.log[data-filter=ERROR] .debug,
.page.log [data-filter=ERROR] .info, .page.log[data-filter=ERROR] .info,
.page.log [data-filter=DEBUG] .info, .page.log[data-filter=DEBUG] .info,
.page.log [data-filter=DEBUG] .error { .page.log[data-filter=DEBUG] .error {
display: none; display: none;
} }
@@ -111,7 +113,7 @@
} }
.page.log .container .error { color: #FFA4A4; } .page.log .container .error { color: #FFA4A4; }
.page.log .container .debug span { opacity: .4; } .page.log .container .debug span { opacity: .6; }
.do_report { .do_report {
position: absolute; position: absolute;
@@ -158,22 +160,42 @@
font-size: 12px; font-size: 12px;
} }
.page.log .container ::-webkit-selection { .page.log .container .time:not(.highlight) ::-webkit-selection {
background-color: #000; background-color: #000;
color: #FFF; color: #FFF;
} }
.page.log .container ::-moz-selection { .page.log .container .time:not(.highlight) ::-moz-selection {
background-color: #000; background-color: #000;
color: #FFF; color: #FFF;
} }
.page.log .container ::-ms-selection { .page.log .container .time:not(.highlight) ::-ms-selection {
background-color: #000; background-color: #000;
color: #FFF; color: #FFF;
} }
.page.log .container ::selection { .page.log .container .time.highlight ::selection {
background-color: #000; background-color: transparent;
color: #FFF; color: inherit;
}
.page.log .container .time.highlight ::-webkit-selection {
background-color: transparent;
color: inherit;
}
.page.log .container .time.highlight ::-moz-selection {
background-color: transparent;
color: inherit;
}
.page.log .container .time.highlight ::-ms-selection {
background-color: transparent;
color: inherit;
}
.page.log .container .time.highlight ::selection {
background-color: transparent;
color: inherit;
} }
+5 -4
View File
@@ -65,7 +65,7 @@ Running on: ...\n\
'events': { 'events': {
'change': function () { 'change': function () {
var type_filter = this.getSelected()[0].get('value'); var type_filter = this.getSelected()[0].get('value');
self.log.set('data-filter', type_filter); self.el.set('data-filter', type_filter);
self.scrollToBottom(); self.scrollToBottom();
} }
} }
@@ -197,7 +197,8 @@ Running on: ...\n\
}, },
showReport: function(text){ showReport: function(text){
var self = this; var self = this,
body = self.report_text.replace('{issue}', text);
var overlay = new Element('div.report', { var overlay = new Element('div.report', {
'method': 'post', 'method': 'post',
@@ -231,7 +232,7 @@ Running on: ...\n\
}) })
), ),
new Element('textarea', { new Element('textarea', {
'text': self.report_text.replace('{issue}', text), 'text': body,
'events': { 'events': {
'click': function(){ 'click': function(){
this.select(); this.select();
@@ -241,7 +242,7 @@ 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=Paste the text here' 'href': 'https://github.com/RuudBurger/CouchPotatoServer/issues/new?body=' + (body.length < 2000 ? encodeURIComponent(body) : 'Paste the text here')
}) })
) )
); );