Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zanata/zanata
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 28, 2011
2 parents 25d2d47 + 1a01172 commit 0f53924
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 22 deletions.
10 changes: 5 additions & 5 deletions copyright.txt
Expand Up @@ -5,11 +5,6 @@ header.
A summary of the individual contributors is given below. Any omission should
be sent to Sean Flanigan <sflaniga@redhat.com>.

Libraries
---------
* Crystal Project Icons http://www.everaldo.com/crystal/ (Copyright (c) 2006-2007 Everaldo Coelho, LGPL)
* TODO

Contributor Name <email@address> Role
------------------------------------------------------------------------------
Asgeir Frimannsson <asgeirf@redhat.com> Project Founder and Lead
Expand All @@ -19,6 +14,11 @@ Ding-Yi Chen <dchen@redhat.com> Project Contributor
Caius Carlos Chance <cchance@redhat.com> Project Contributor
Helen Ding <hding@redhat.com> Project Contributor
Alex Eng <aeng@redhat.com> Project Contributor
David Mason <damason@redhat.com> Project Contributor



Libraries
---------
* Crystal Project Icons http://www.everaldo.com/crystal/ (Copyright (c) 2006-2007 Everaldo Coelho, LGPL)
* TODO
Expand Up @@ -68,19 +68,22 @@ public interface NavigationMessages extends Messages
@DefaultMessage("Esc")
String editCancelShortcut();

@DefaultMessage("Copy")
String editClone();
// @DefaultMessage("Copy")
// String editClone();

// @DefaultMessage("Ctrl+Home")
@DefaultMessage("Clone")
String editCloneShortcut();
// @DefaultMessage("Ctrl+Home")
// @DefaultMessage("Clone")
// String editCloneShortcut();

@DefaultMessage("Clone & Save")
String editCloneAndSave();
// @DefaultMessage("Clone & Save")
// String editCloneAndSave();

// @DefaultMessage("Ctrl+End")
@DefaultMessage("Clone & Save")
String editCloneAndSaveShortcut();
// @DefaultMessage("Ctrl+End")
// @DefaultMessage("Clone & Save")
// String editCloneAndSaveShortcut();

@DefaultMessage("Copy message from source language")
String copySourcetoTarget();

@DefaultMessage("{0} ({1})")
String actionToolTip(String actionName, String shortcut);
Expand Down
Expand Up @@ -29,6 +29,7 @@
import org.zanata.webtrans.shared.model.TransUnit;

import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
Expand All @@ -38,11 +39,13 @@
import com.google.gwt.gen2.table.client.ColumnDefinition;
import com.google.gwt.gen2.table.client.DefaultTableDefinition;
import com.google.gwt.gen2.table.client.RowRenderer;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.ImageBundle;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Image;

public class TableEditorTableDefinition extends DefaultTableDefinition<TransUnit>
{
Expand All @@ -55,6 +58,12 @@ public class TableEditorTableDefinition extends DefaultTableDefinition<TransUnit
private CheckBox toggleFuzzy;
private EventBus eventBus;

public static interface OperationsColumnImages extends ImageBundle
{
@Resource("org/zanata/webtrans/images/crystal_project/16x16/actions/2rightarrow.png")
AbstractImagePrototype copySrcButton();
}

private final RowRenderer<TransUnit> rowRenderer = new RowRenderer<TransUnit>()
{
@Override
Expand Down Expand Up @@ -164,8 +173,9 @@ public void setCellValue(TransUnit rowValue, TransUnit cellValue)
@Override
public void renderRowValue(final TransUnit rowValue, ColumnDefinition<TransUnit, TransUnit> columnDef, AbstractCellView<TransUnit> view)
{
// view.setStyleName("TableEditorCell TableEditorCell-Source");
view.setStyleName("TableEditorCell TableEditorCell-Middle");
VerticalPanel operationsPanel = new VerticalPanel();
operationsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
toggleFuzzy = new CheckBox(messages.fuzzy());
if (rowValue.getStatus() == ContentState.NeedReview)
toggleFuzzy.setValue(true);
Expand All @@ -186,9 +196,11 @@ public void onValueChange(ValueChangeEvent<Boolean> event)
}

});
PushButton copyButton = new PushButton(new Image());
copyButton.setText(messages.editClone());
copyButton.setTitle(messages.editCloneShortcut());
OperationsColumnImages images = GWT.<OperationsColumnImages> create(OperationsColumnImages.class);
Image copyButton = images.copySrcButton().createImage();
copyButton.setStyleName("gwt-Button");
//copyButton.setText(messages.editClone());
copyButton.setTitle(messages.copySourcetoTarget());
copyButton.addClickHandler(new ClickHandler()
{

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -261,6 +261,10 @@ td.TableEditorCell-Source {

}

td.TableEditorCell-Middle {

}

td.TableEditorCell-Target {

}
Expand All @@ -273,6 +277,10 @@ tr.TableEditorRow.highlighted td.TableEditorCell-Source {

}

tr.TableEditorRow.highlighted td.TableEditorCell-Middle {

}

tr.TableEditorRow.highlighted td.TableEditorCell-Target {
cursor: hand;
}
Expand Down Expand Up @@ -301,7 +309,7 @@ tr.TableEditorRow.content-filter-nomatch {
}

tr.TableEditorRow.selected td {
background: #C3D9FF;

}

.TableEditorContent,.TableEditorContent-Edit {
Expand Down

0 comments on commit 0f53924

Please sign in to comment.