From f0b1b74ae452643519cc3a73970136de18851053 Mon Sep 17 00:00:00 2001 From: German Laullon Date: Sun, 2 Jan 2011 22:30:51 -0800 Subject: [PATCH] some history view improvements. --- PBWebHistoryController.m | 4 +- html/views/history/history.css | 68 +++++++++++----------------------- html/views/history/history.js | 4 +- html/views/history/index.html | 2 +- 4 files changed, 26 insertions(+), 52 deletions(-) diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m index 8abe82e..8c06a7f 100644 --- a/PBWebHistoryController.m +++ b/PBWebHistoryController.m @@ -114,9 +114,9 @@ NSString *d=[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff-tree", @"--cc", @"-C90%", @"-M90%", [currentSha string], nil]]; NSString *diffs=[GLFileView parseDiff:d]; - NSString *html=[NSString stringWithFormat:@"%@%@%@",header,fileList,diffs]; + NSString *html=[NSString stringWithFormat:@"%@%@
%@
",header,fileList,diffs]; - [[view windowScriptObject] callWebScriptMethod:@"showDiff" withArguments:[NSArray arrayWithObject:html]]; + [[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]]; #if 1 NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML]; diff --git a/html/views/history/history.css b/html/views/history/history.css index fc30da5..6ac1cda 100644 --- a/html/views/history/history.css +++ b/html/views/history/history.css @@ -24,6 +24,7 @@ /* close commented backslash hack */ body { + background-color: #f2f2f2; font-family: 'Lucida Grande'; margin: 0px; padding: 0px; @@ -188,6 +189,14 @@ a.showdiff { #filelist { font-size: 13px; + white-space: nowrap; + width: 100%; + padding: 10px 20px; + border-collapse: collapse; +} + +#filelist tr td { + border-bottom: 1px solid #ccc; } #filelist a { @@ -216,10 +225,6 @@ a.showdiff { background: url(../../images/renamed.png) no-repeat 0 center; } -#filelist{ - white-space: nowrap; - width: 100%; -} #filelist span.add,#filelist span.rem { display: block; height: 10px; @@ -229,7 +234,7 @@ a.showdiff { clear: both; } -#filelist span.add{ +#filelist span.add { background-color: green; } @@ -300,47 +305,16 @@ a.showdiff { padding-bottom: 5px; } -/* -div.button -{ - color: #666666; - - font-size: 60%; - text-align: center; - - width: 70px; - - margin-right: 10px; - - padding: 2px; - - float: left; - clear: both; - - border: 1px solid; - -webkit-border-radius: 3px; +#diffs { + -webkit-box-shadow: inset 0px 5px 5px #ccc; + width: 100%; + display: block; + padding-top: 20px; + overflow: auto; } -div.created -{ - background-color: #ccffcc; - border-color: #66ff66; -} - -div.changed -{ - background-color: #ffcc99; - border-color: #ff9933; -} - -div.deleted -{ - background-color: #ffcccc; - border-color: #ff6666; -} - -div.renamed -{ - // No colour needed right now. -} -*/ \ No newline at end of file +#diffs table.diff { + -webkit-box-shadow: 5px 5px 5px #ccc; + width: 98%; + margin: auto auto 20px 1%; +} \ No newline at end of file diff --git a/html/views/history/history.js b/html/views/history/history.js index 8fd8c0a..e37baee 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -8,7 +8,7 @@ var showImage = function(element, filename) return false; } -var showDiff = function(data){ - $("diff").innerHTML=data; +var showCommit = function(data){ + $("commit").innerHTML=data; } diff --git a/html/views/history/index.html b/html/views/history/index.html index ac7ad6b..12ae76a 100644 --- a/html/views/history/index.html +++ b/html/views/history/index.html @@ -13,6 +13,6 @@ -
+