Refactor CommentBox for drafts and published comments
Add PublishedBox and DraftBox that extend CommentBox. Change-Id: Ibab8b198499d9f7920ef914b3c2ed88e5daa60d4
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?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'
|
||||
xmlns:c='urn:import:com.google.gwtexpui.globalkey.client'>
|
||||
<ui:with field='res' type='com.google.gerrit.client.diff.CommentBoxResources' />
|
||||
<ui:style field='draftStyle' type='com.google.gerrit.client.diff.DraftBox.DraftBoxStyle'>
|
||||
.edit .messagePanel {
|
||||
display: none;
|
||||
}
|
||||
.view .editArea {
|
||||
display: none;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel styleName='{res.style.commentBox}'>
|
||||
<d:CommentBoxHeader ui:field='header' />
|
||||
<div class='{res.style.contentPanel}'>
|
||||
<c:NpTextArea ui:field='editArea' styleName='{draftStyle.editArea}'/>
|
||||
<div>
|
||||
<button ui:field='save' class='{draftStyle.editArea}'>
|
||||
<ui:msg>Save</ui:msg>
|
||||
</button>
|
||||
<button ui:field='cancel' class='{draftStyle.editArea}'>
|
||||
<ui:msg>Cancel</ui:msg>
|
||||
</button>
|
||||
<button ui:field='discard' class='{draftStyle.editArea}'>
|
||||
<ui:msg>Discard</ui:msg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='{res.style.contentPanel}'>
|
||||
<g:HTML ui:field='contentPanelMessage'
|
||||
styleName='{res.style.message} {draftStyle.messagePanel}'></g:HTML>
|
||||
<button ui:field='edit' class='{draftStyle.messagePanel}'>
|
||||
<ui:msg>Edit</ui:msg>
|
||||
</button>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
Reference in New Issue
Block a user