blame cosmetics

save the html for debug and CSS edit
This commit is contained in:
German Laullon
2010-09-24 10:17:04 -07:00
parent cbf7cd3fbf
commit a78a2c238c
4 changed files with 28 additions and 2 deletions
+18 -1
View File
@@ -77,6 +77,12 @@
id script = [view windowScriptObject];
[script callWebScriptMethod:@"showFile" withArguments:[NSArray arrayWithObject:fileTxt]];
}
#ifdef DEBUG
NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML];
NSString *tmpFile=@"~/tmp/test.html";
[dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil];
#endif
}
#pragma mark JavaScript log.js methods
@@ -147,6 +153,7 @@
- (NSString *) parseHTML:(NSString *)txt
{
txt=[txt stringByReplacingOccurrencesOfString:@"&" withString:@"&"];
txt=[txt stringByReplacingOccurrencesOfString:@"<" withString:@"&lt;"];
txt=[txt stringByReplacingOccurrencesOfString:@">" withString:@"&gt;"];
@@ -180,7 +187,16 @@
summary=[line stringByReplacingOccurrencesOfString:@"summary" withString:@""];
}
}
NSString *block=[NSString stringWithFormat:@"<td><p class='author'>%@</p><p class='summary'>%@</p></td>\n<td>\n",author,summary];
NSRange trunc={0,30};
NSString *truncate_a=author;
if([author length]>30){
truncate_a=[author substringWithRange:trunc];
}
NSString *truncate_s=summary;
if([summary length]>30){
truncate_s=[summary substringWithRange:trunc];
}
NSString *block=[NSString stringWithFormat:@"<td><p class='author'>%@</p><p class='summary'>%@</p></td>\n<td>\n",truncate_a,truncate_s];
[headers setObject:block forKey:[header objectAtIndex:0]];
}
[res appendString:[headers objectForKey:[header objectAtIndex:0]]];
@@ -189,6 +205,7 @@
do{
line=[lines objectAtIndex:i++];
}while([line characterAtIndex:0]!='\t');
line=[line substringFromIndex:1];
line=[line stringByReplacingOccurrencesOfString:@"\t" withString:@"&nbsp;&nbsp;&nbsp;&nbsp;"];
[code appendString:line];
[code appendString:@"\n"];
+1
View File
@@ -1590,6 +1590,7 @@
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_ENABLE_OBJC_GC = required;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+2
View File
@@ -38,6 +38,8 @@
}
.syntaxhighlighter .gutter .line {
border-right: 3px solid #6ce26c !important;
display: block !important;
width: 30px !important;
}
.syntaxhighlighter .gutter .line.highlighted {
background-color: #6ce26c !important;
+7 -1
View File
@@ -13,13 +13,19 @@ body,th, td {
background: transparent !important;
}
p.summary {
}
p{
margin: 0 !important;
padding: 0 !important;
font-size: 11px;
font-family: Menlo, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
white-space: nowrap;
}
tr.block.l2 p.summary,
tr.block.l3 p.summary,
tr.block.l2 p.summary,
tr.block.l1 p.summary{
display: none !important;
}