| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright (C) 2013 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' |
| xmlns:g='urn:import:com.google.gwt.user.client.ui' |
| xmlns:d='urn:import:com.google.gerrit.client.diff'> |
| <ui:with field='res' type='com.google.gerrit.client.diff.Resources'/> |
| <ui:style gss='false' type='com.google.gerrit.client.diff.UnifiedTable.DiffTableStyle'> |
| @external .CodeMirror, .CodeMirror-selectedtext; |
| @external .CodeMirror-vscrollbar .CodeMirror-scroll; |
| @external .CodeMirror-dialog-bottom; |
| @external .CodeMirror-cursor; |
| |
| @external .dark, .unifiedLineNumber, .noIntraline, .showLineNumbers; |
| |
| .difftable .patchSetNav, |
| .difftable .CodeMirror { |
| -webkit-touch-callout: none; |
| -webkit-user-select: none; |
| -khtml-user-select: none; |
| -moz-user-select: none; |
| -ms-user-select: none; |
| } |
| |
| .difftable .CodeMirror pre { |
| overflow: visible; |
| border-right: 0; |
| width: auto; |
| } |
| |
| /* Preserve space for underscores. If this changes |
| * see ChunkManager.addPadding() and adjust there. |
| */ |
| .difftable .CodeMirror pre, |
| .difftable .CodeMirror pre span { |
| padding-bottom: 1px; |
| } |
| .table { |
| width: 100%; |
| table-layout: fixed; |
| border-spacing: 0; |
| } |
| .table td { padding: 0 } |
| |
| /* Hide scrollbars. */ |
| .difftable .CodeMirror-scroll { padding-right: 0; } |
| .difftable .CodeMirror-vscrollbar { display: none !important; } |
| |
| .diffDelete { background-color: #faa; } |
| .diffInsert { background-color: #9f9; } |
| .intralineDelete { background-color: #fee; } |
| .intralineInsert { background-color: #dfd; } |
| .noIntraline .intralineDelete { background-color: #faa; } |
| .noIntraline .intralineInsert { background-color: #9f9; } |
| |
| .dark .diffDelete { background-color: #400; } |
| .dark .diffInsert { background-color: #444; } |
| .dark .intralineDelete { background-color: #888; } |
| .dark .intralineInsert { background-color: #bbb; } |
| .dark .noIntraline .intralineDelete { background-color: #400; } |
| .dark .noIntraline .intralineInsert { background-color: #444; } |
| |
| .patchSetNav, .diff_header { |
| background-color: #f7f7f7; |
| line-height: 1; |
| } |
| |
| .difftable .CodeMirror-selectedtext { |
| background-color: inherit !important; |
| } |
| .difftable .CodeMirror div.CodeMirror-cursor { |
| border-left: 2px solid black; |
| } |
| .difftable .CodeMirror-dialog-bottom { |
| border-top: 0; |
| border-left: 1px solid #000; |
| border-bottom: 1px solid #000; |
| background-color: #f7f7f7; |
| top: 0; |
| right: 0; |
| bottom: auto; |
| left: auto; |
| } |
| .showLineNumbers .lineNumbersLeft, .showLineNumbers .lineNumbersRight { |
| min-width: 20px; |
| width: 3em; /* TODO: This needs to be set based on number of lines */ |
| } |
| .showLineNumbers .lineNumbersLeft { |
| border-right: 1px solid #ddd; |
| } |
| .unifiedLineNumber { |
| display: none; |
| } |
| .showLineNumbers .unifiedLineNumber { |
| display: block; |
| cursor: pointer; |
| padding: 0 3px 0 5px; |
| min-width: 20px; |
| text-align: right; |
| color: #999; |
| } |
| .unifiedLineNumberEmpty { |
| display: none; |
| } |
| .showLineNumbers .unifiedLineNumberEmpty { |
| display: block; |
| margin-left: 28px; |
| border-left: 2px solid #d64040; |
| padding-bottom: 1px; |
| } |
| </ui:style> |
| <g:HTMLPanel styleName='{style.difftable}'> |
| <table class='{style.table}'> |
| <tr ui:field='patchSetNavRow' class='{style.patchSetNav}'> |
| <td> |
| <table class='{style.table}'> |
| <tr> |
| <td ui:field='patchSetNavCellA'> |
| <d:PatchSetSelectBox ui:field='patchSetSelectBoxA' /> |
| </td> |
| </tr> |
| <tr> |
| <td ui:field='patchSetNavCellB'> |
| <d:PatchSetSelectBox ui:field='patchSetSelectBoxB' /> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr ui:field='diffHeaderRow' class='{res.diffTableStyle.diffHeader}'> |
| <td><pre ui:field='diffHeaderText' /></td> |
| </tr> |
| <tr> |
| <td ui:field='cm'/> |
| </tr> |
| </table> |
| <g:FlowPanel ui:field='widgets' visible='false'/> |
| </g:HTMLPanel> |
| </ui:UiBinder> |