Enable buttons on CommentBox.

Add click handlers to buttons for making REST API calls.

Fixed bugs in CommentApi. The callbacks were parameterized with
incorrect types.

Change-Id: If1f7ccee37c68434fdf29df63ad904453322139b
This commit is contained in:
Michael Zhou
2013-06-24 11:30:16 -07:00
parent 41d9278253
commit 19c8230231
11 changed files with 476 additions and 124 deletions

View File

@@ -26,29 +26,33 @@ limitations under the License.
.view .editArea {
display: none;
}
.newDraft .cancel {
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}'>
<g:Button ui:field='save' styleName='{draftStyle.editArea}'>
<ui:msg>Save</ui:msg>
</button>
<button ui:field='cancel' class='{draftStyle.editArea}'>
</g:Button>
<g:Button ui:field='cancel'
styleName='{draftStyle.editArea} {draftStyle.cancel}'>
<ui:msg>Cancel</ui:msg>
</button>
<button ui:field='discard' class='{draftStyle.editArea}'>
</g:Button>
<g:Button ui:field='discard' styleName='{draftStyle.editArea}'>
<ui:msg>Discard</ui:msg>
</button>
</g: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}'>
<g:Button ui:field='edit' styleName='{draftStyle.messagePanel}'>
<ui:msg>Edit</ui:msg>
</button>
</g:Button>
</div>
</g:HTMLPanel>
</ui:UiBinder>