File tree 4 files changed +44
-17
lines changed
4 files changed +44
-17
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ The client side API implements:
28
28
* browsing the object graph
29
29
* creating HTML object diffs
30
30
31
-
32
31
Usage
33
32
-----
34
33
Original file line number Diff line number Diff line change 3
3
< html lang ="en ">
4
4
< head >
5
5
< meta charset ="utf-8 " />
6
+ < title > git.js Repo Viewer</ title >
6
7
< script src ="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js "> </ script >
7
8
< script src ="/git.min.js "> </ script >
8
9
< script src ="repo-viewer.js "> </ script >
@@ -75,6 +76,8 @@ <h3>git.js</h3>
75
76
</ div >
76
77
< div id ="diff-view ">
77
78
< div id ="diff-view-window ">
79
+ < div id ="diff ">
80
+ </ div >
78
81
</ div >
79
82
</ div >
80
83
</ div >
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ RepoViewer = {
193
193
str += "<hr>"
194
194
str += "<pre class='message'>" + commit . message + "</pre>"
195
195
196
- $ ( "#diff-view-window " ) . html ( str )
196
+ $ ( "#diff" ) . html ( str )
197
197
} ,
198
198
199
199
treeAsHash : function ( tree ) {
@@ -223,7 +223,7 @@ RepoViewer = {
223
223
} )
224
224
str . push ( "</table>" )
225
225
str . push ( "<hr>" )
226
- $ ( "#diff-view-window " ) . append ( str . join ( "\n" ) )
226
+ $ ( "#diff" ) . append ( str . join ( "\n" ) )
227
227
228
228
var str = [ ]
229
229
_ ( changes ) . each ( function ( change ) {
@@ -233,7 +233,7 @@ RepoViewer = {
233
233
str . push ( diff . toHtml ( ) )
234
234
str . push ( "</div>" )
235
235
} )
236
- $ ( "#diff-view-window " ) . append ( str . join ( "\n" ) )
236
+ $ ( "#diff" ) . append ( str . join ( "\n" ) )
237
237
} )
238
238
treeDiffGenerator . generate ( )
239
239
} )
@@ -242,7 +242,7 @@ RepoViewer = {
242
242
displayCommitDiff : function ( commit ) {
243
243
RepoViewer . displayCommitDiffInfo ( commit )
244
244
if ( commit . parents . length > 1 ) {
245
- $ ( "#diff-view-window " ) . append ( "Multiple parents." )
245
+ $ ( "#diff" ) . append ( "Multiple parents." )
246
246
}
247
247
else {
248
248
RepoViewer . displayCommitDiffDiff ( commit )
Original file line number Diff line number Diff line change @@ -55,18 +55,46 @@ table#main td {
55
55
vertical-align : top;
56
56
}
57
57
58
+ # tree-view {
59
+ width : 100% ;
60
+ height : 100% ;
61
+ }
62
+
63
+ # top-directory {
64
+ overflow : scroll;
65
+ width : 25% ;
66
+ height : 100% ;
67
+ float : left;
68
+ }
69
+
70
+ # top-directory ul {
71
+ margin : 0 ;
72
+ padding : 0 ;
73
+ padding-left : 10px ;
74
+ list-style-type : none;
75
+ }
76
+
77
+ # top-directory li {
78
+ margin : 0 ;
79
+ padding : 0 ;
80
+ padding-left : 10px ;
81
+ list-style-type : none;
82
+ }
83
+
84
+ # file-main {
85
+ width : 75% ;
86
+ height : 100% ;
87
+ float : left;
88
+ }
58
89
59
90
# file-view {
60
91
overflow : scroll;
61
- width : 800 px ;
62
- height : 400 px ;
92
+ width : 100 % ;
93
+ height : 100 % ;
63
94
font-size : 0.8em ;
64
95
}
65
96
66
97
# file-view .syntaxhighlighter {
67
- overflow : scroll;
68
- width : 800px !important ;
69
- height : 400px ;
70
98
}
71
99
72
100
# view-select a {
@@ -86,12 +114,6 @@ table#main td {
86
114
margin-top : 10px ;
87
115
}
88
116
89
- # top-directory {
90
- overflow : scroll;
91
- width : 250px ;
92
- height : 400px ;
93
- }
94
-
95
117
# jsgit-errors {
96
118
color : red;
97
119
}
@@ -118,7 +140,6 @@ table#main td {
118
140
119
141
# diff-view {
120
142
height : 100% ;
121
- padding : 10px ;
122
143
}
123
144
124
145
# diff-view-window {
@@ -128,6 +149,10 @@ table#main td {
128
149
font-size : 0.8em ;
129
150
}
130
151
152
+ # diff-view-window # diff {
153
+ padding : 10px ;
154
+ }
155
+
131
156
# diff-view-window .gravatar {
132
157
padding : 3px ;
133
158
padding-bottom : 0px ;
You can’t perform that action at this time.
0 commit comments