[kune-commits] r1507 - in kune-sandbox: src/cc/kune/sandbox/client war
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Fri Sep 2 03:01:24 CEST 2011
Author: vjrj_
Date: 2011-09-02 03:01:24 +0200 (Fri, 02 Sep 2011)
New Revision: 1507
Modified:
kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java
kune-sandbox/war/kune-message.css
Log:
NEW - # 81: Minor CSS issues in chrommium
http://kune.ourproject.org/issues/ticket/81
Modified: kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java
===================================================================
--- kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java 2011-09-02 01:00:47 UTC (rev 1506)
+++ kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java 2011-09-02 01:01:24 UTC (rev 1507)
@@ -2,7 +2,6 @@
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.common.client.tooltip.Tooltip;
-import cc.kune.common.client.ui.BasicThumb;
import cc.kune.common.client.ui.MaskWidget;
import cc.kune.common.client.ui.PopupBottomPanel;
import cc.kune.common.client.ui.PopupTopPanel;
@@ -10,9 +9,8 @@
import cc.kune.common.client.ui.dialogs.PromptTopDialog;
import cc.kune.common.client.ui.dialogs.PromptTopDialog.Builder;
import cc.kune.common.client.utils.TextUtils;
-import cc.kune.core.client.avatar.AvatarDecorator;
-import cc.kune.core.client.resources.CoreResources;
import cc.kune.gspace.client.GSpaceArmorImpl;
+import cc.kune.gspace.client.i18n.I18nTranslatorForm;
import cc.kune.gspace.client.tool.selector.ToolSelectorItemPanel;
import cc.kune.gspace.client.tool.selector.ToolSelectorPanel;
import cc.kune.msgs.client.CloseCallback;
@@ -21,9 +19,12 @@
import cc.kune.msgs.client.UserMessagesPresenter;
import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.BlurEvent;
+import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyPressEvent;
+import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
@@ -40,203 +41,226 @@
*/
public class KuneSandboxEntryPoint implements EntryPoint {
- private PopupBottomPanel pop;
+ private PopupBottomPanel pop;
- /**
- * This is the entry point method.
- */
- @Override
- public void onModuleLoad() {
- // testUserMessages();
- // testDialogs();
- // testToolpanel();
- // toolSelector.addWidget(new Label("Test"));
- // testTooltips();
- //testBarButtons();
+ /**
+ * This is the entry point method.
+ */
+ @Override
+ public void onModuleLoad() {
+ testUserMessages();
+ // testDialogs();
+ // testToolpanel();
+ // toolSelector.addWidget(new Label("Test"));
+ // testTooltips();
+ // testBarButtons();
- //testPromptDialog();
+ // testPromptDialog();
- //testAvatarDecorators();
- }
+ // testAvatarDecorators();
+ //testI18nForm();
+ }
- private void testAvatarDecorators() {
-// BasicThumb thumb = new BasicThumb("http://kune.beta.iepala.es/others/unknown.jpg", 50, "kk", 50, false, new ClickHandler() {
-// @Override
-// public void onClick(ClickEvent event) {
-// }
-// });
-// CoreResources res = GWT.create(CoreResources.class);
-// AvatarDecorator avatarDecorator = new AvatarDecorator(res, thumb);
-// avatarDecorator.setBusy();
-// RootPanel.get().add(avatarDecorator);
- }
+ private void testI18nForm() {
+ I18nTranslatorForm form = new I18nTranslatorForm();
+ form.setInfo("Translate this ñalsk fañ añlkds añslkdjfa ajalda ", "Take care of puntuation as ñlkasjd", "test");
+ form.getBlurTraslation().addBlurHandler(new BlurHandler() {
- private void testPromptDialog() {
- Builder builder = new PromptTopDialog.Builder("kkj-kk", "Some ask text?", false, true);
- builder.width("200px").height("200px").firstButtonTitle("Create").sndButtonTitle("Cancel");
- builder.regex(TextUtils.UNIX_NAME).regexText("The name must contain only characters, numbers and dashes");
- PromptTopDialog diag = builder.build();
- diag.showCentered();
- diag.focusOnTextBox();
- diag.getFirstBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onBlur(BlurEvent event) {
- @Override
- public void onClick(ClickEvent event) {
- Window.alert("ok");
- }
- });
- }
+ }
+ });
+ form.getKeysTraslation().addKeyPressHandler(new KeyPressHandler() {
- private void testBarButtons() {
- Button btn1 = new Button("Btn 1");
- Button btn2 = new Button("Btn 2");
- Button btn3 = new Button("Btn 3");
- btn1.addStyleName("k-button");
- btn1.addStyleName("k-button-left");
- btn2.addStyleName("k-button");
- btn2.addStyleName("k-button-center");
- btn3.addStyleName("k-button");
- btn3.addStyleName("k-button-right");
- btn1.addStyleName("kune-Margin-Large-t");
- btn2.addStyleName("kune-Margin-Large-t");
- btn3.addStyleName("kune-Margin-Large-t");
- btn1.addStyleName("k-fl");
- btn2.addStyleName("k-fl");
- btn3.addStyleName("k-fl");
- FlowPanel vp = new FlowPanel();
- vp.add(btn1);
- vp.add(btn2);
- vp.add(btn3);
- RootPanel.get().add(vp);
- }
+ @Override
+ public void onKeyPress(KeyPressEvent event) {
- private void testTooltips() {
- final AbsolutePanel panel = new AbsolutePanel();
- final Button button = new Button("Btn 1");
- final Button button2 = new Button("Btn 2");
- final Button button3 = new Button("Btn 3");
- final Button button4 = new Button("Btn 4");
- int clientWidth = Window.getClientWidth();
- int clientHeight = Window.getClientHeight();
- panel.setSize(String.valueOf(clientWidth - 10) + "px", String.valueOf(clientHeight - 10) + "px");
- panel.add(button, 5, 5);
- panel.add(button2, clientWidth - 60, 5);
- panel.add(button3, 5, clientHeight - 40);
- panel.add(button4, clientWidth - 60, clientHeight - 40);
- Tooltip.to(button, "Some tooltip");
- Tooltip.to(button2, "Some tooltip");
- Tooltip.to(button3, "Some tooltip");
- Tooltip.to(button4, "Some tooltip");
- // DOM.setElementProperty(button2.getElement(), "position", "relative");
- RootPanel.get().add(panel);
- }
+ }
+ });
+ RootPanel.get().add(form);
+ }
- private void testToolpanel() {
- ToolSelectorPanel toolSelector = new ToolSelectorPanel(new GSpaceArmorImpl(null), null);
- ToolSelectorItemPanel toolItem1 = new ToolSelectorItemPanel();
- toolItem1.getLabel().setText("documents");
- ToolSelectorItemPanel toolItem2 = new ToolSelectorItemPanel();
- toolItem2.getLabel().setText("something very longgggggg");
- ToolSelectorItemPanel toolItem3 = new ToolSelectorItemPanel();
- toolItem3.getLabel().setText("media");
- toolSelector.addItem(toolItem1);
- toolSelector.addItem(toolItem2);
- toolSelector.addItem(toolItem3);
- toolItem1.setSelected(true);
- toolItem2.setSelected(false);
- toolItem3.setSelected(false);
- toolSelector.asWidget().setWidth("200px");
- RootPanel.get().add(toolSelector.asWidget());
- }
+ private void testAvatarDecorators() {
+ // BasicThumb thumb = new
+ // BasicThumb("http://kune.beta.iepala.es/others/unknown.jpg", 50, "kk",
+ // 50, false, new ClickHandler() {
+ // @Override
+ // public void onClick(ClickEvent event) {
+ // }
+ // });
+ // CoreResources res = GWT.create(CoreResources.class);
+ // AvatarDecorator avatarDecorator = new AvatarDecorator(res, thumb);
+ // avatarDecorator.setBusy();
+ // RootPanel.get().add(avatarDecorator);
+ }
- private void postAdd(final PopupBottomPanel pop) {
- pop.setCenterPosition();
- }
+ private void testPromptDialog() {
+ Builder builder = new PromptTopDialog.Builder("kkj-kk", "Some ask text?", false, true);
+ builder.width("200px").height("200px").firstButtonTitle("Create").sndButtonTitle("Cancel");
+ builder.regex(TextUtils.UNIX_NAME).regexText("The name must contain only characters, numbers and dashes");
+ PromptTopDialog diag = builder.build();
+ diag.showCentered();
+ diag.focusOnTextBox();
+ diag.getFirstBtn().addClickHandler(new ClickHandler() {
- private void postAdd(final PopupTopPanel pop) {
- pop.setCenterPosition();
- }
+ @Override
+ public void onClick(ClickEvent event) {
+ Window.alert("ok");
+ }
+ });
+ }
- private void testDialogs() {
- final PopupTopPanel pop2 = new PopupTopPanel(false, true);
- pop2.setGlassEnabled(true);
- final BasicDialog dialog = new BasicDialog();
- pop2.add(dialog);
+ private void testBarButtons() {
+ Button btn1 = new Button("Btn 1");
+ Button btn2 = new Button("Btn 2");
+ Button btn3 = new Button("Btn 3");
+ btn1.addStyleName("k-button");
+ btn1.addStyleName("k-button-left");
+ btn2.addStyleName("k-button");
+ btn2.addStyleName("k-button-center");
+ btn3.addStyleName("k-button");
+ btn3.addStyleName("k-button-right");
+ btn1.addStyleName("kune-Margin-Large-t");
+ btn2.addStyleName("kune-Margin-Large-t");
+ btn3.addStyleName("kune-Margin-Large-t");
+ btn1.addStyleName("k-fl");
+ btn2.addStyleName("k-fl");
+ btn3.addStyleName("k-fl");
+ FlowPanel vp = new FlowPanel();
+ vp.add(btn1);
+ vp.add(btn2);
+ vp.add(btn3);
+ RootPanel.get().add(vp);
+ }
- dialog.getTitleText().setText("Title");
- dialog.setFirstBtnText("Accept");
- dialog.setSecondBtnText("Cancel");
- dialog.setFirstBtnTabIndex(2);
- dialog.setSecondBtnTabIndex(3);
- final VerticalPanel sPanel = new VerticalPanel();
- sPanel.add(new Label("lo que sea"));
- final Button btn = new Button("lo que sea");
- btn.setTabIndex(1);
- btn.setFocus(true);
- sPanel.add(btn);
- sPanel.setSize("300px", "150px");
- dialog.getInnerPanel().add((IsWidget) sPanel);
- final Label label = new Label("Test label");
- // final NotifyLevelImages levelImg =
- // GWT.create(NotifyLevelImages.class);
- // dialog.getBottomPanel().add(new MessagePanel(levelImg, "kk"));
- final MaskWidget mask = new MaskWidget();
+ private void testTooltips() {
+ final AbsolutePanel panel = new AbsolutePanel();
+ final Button button = new Button("Btn 1");
+ final Button button2 = new Button("Btn 2");
+ final Button button3 = new Button("Btn 3");
+ final Button button4 = new Button("Btn 4");
+ int clientWidth = Window.getClientWidth();
+ int clientHeight = Window.getClientHeight();
+ panel.setSize(String.valueOf(clientWidth - 10) + "px", String.valueOf(clientHeight - 10) + "px");
+ panel.add(button, 5, 5);
+ panel.add(button2, clientWidth - 60, 5);
+ panel.add(button3, 5, clientHeight - 40);
+ panel.add(button4, clientWidth - 60, clientHeight - 40);
+ Tooltip.to(button, "Some tooltip");
+ Tooltip.to(button2, "Some tooltip");
+ Tooltip.to(button3, "Some tooltip");
+ Tooltip.to(button4, "Some tooltip");
+ // DOM.setElementProperty(button2.getElement(), "position", "relative");
+ RootPanel.get().add(panel);
+ }
- RootPanel.get().add(label);
- pop2.showNear(label);
- // final String zIndex = DOM.getStyleAttribute(pop2.getElement(),
- // "zIndex");
- DOM.setStyleAttribute(pop.getElement(), "zIndex", "10000");
- mask.mask(pop2, "JAarrrrr!");
- }
+ private void testToolpanel() {
+ ToolSelectorPanel toolSelector = new ToolSelectorPanel(new GSpaceArmorImpl(null), null);
+ ToolSelectorItemPanel toolItem1 = new ToolSelectorItemPanel();
+ toolItem1.getLabel().setText("documents");
+ ToolSelectorItemPanel toolItem2 = new ToolSelectorItemPanel();
+ toolItem2.getLabel().setText("something very longgggggg");
+ ToolSelectorItemPanel toolItem3 = new ToolSelectorItemPanel();
+ toolItem3.getLabel().setText("media");
+ toolSelector.addItem(toolItem1);
+ toolSelector.addItem(toolItem2);
+ toolSelector.addItem(toolItem3);
+ toolItem1.setSelected(true);
+ toolItem2.setSelected(false);
+ toolItem3.setSelected(false);
+ toolSelector.asWidget().setWidth("200px");
+ RootPanel.get().add(toolSelector.asWidget());
+ }
- private void testUserMessages() {
- final UserMessagesPanel panel = new UserMessagesPanel();
- UserMessage.setFadeMills(3000);
- UserMessage.setCloseTitle("Close message");
- panel.setWidth("422px");
- final UserMessagesPresenter presenter = new UserMessagesPresenter();
- presenter.init(panel);
+ private void postAdd(final PopupBottomPanel pop) {
+ pop.setCenterPosition();
+ }
- pop = new PopupBottomPanel();
- final CloseCallback closeCalback = new CloseCallback() {
- @Override
- public void onClose() {
+ private void postAdd(final PopupTopPanel pop) {
pop.setCenterPosition();
- }
- };
- presenter.add(NotifyLevel.info, "Title", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit",
- "", false, closeCalback);
- postAdd(pop);
- presenter.add(NotifyLevel.error, "Title",
- "Lorem ipsum dolor sit amet, consectetuer adipiscing elit", "", false, closeCalback);
- pop.add(panel);
+ }
- postAdd(pop);
+ private void testDialogs() {
+ final PopupTopPanel pop2 = new PopupTopPanel(false, true);
+ pop2.setGlassEnabled(true);
+ final BasicDialog dialog = new BasicDialog();
+ pop2.add(dialog);
- final Timer time = new Timer() {
- @Override
- public void run() {
- presenter.add(
- NotifyLevel.error,
- "",
- "Lorem <a href='/'>ipsum</a> dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit",
- "", true, closeCalback);
+ dialog.getTitleText().setText("Title");
+ dialog.setFirstBtnText("Accept");
+ dialog.setSecondBtnText("Cancel");
+ dialog.setFirstBtnTabIndex(2);
+ dialog.setSecondBtnTabIndex(3);
+ final VerticalPanel sPanel = new VerticalPanel();
+ sPanel.add(new Label("lo que sea"));
+ final Button btn = new Button("lo que sea");
+ btn.setTabIndex(1);
+ btn.setFocus(true);
+ sPanel.add(btn);
+ sPanel.setSize("300px", "150px");
+ dialog.getInnerPanel().add((IsWidget) sPanel);
+ final Label label = new Label("Test label");
+ // final NotifyLevelImages levelImg =
+ // GWT.create(NotifyLevelImages.class);
+ // dialog.getBottomPanel().add(new MessagePanel(levelImg, "kk"));
+ final MaskWidget mask = new MaskWidget();
+
+ RootPanel.get().add(label);
+ pop2.showNear(label);
+ // final String zIndex = DOM.getStyleAttribute(pop2.getElement(),
+ // "zIndex");
+ DOM.setStyleAttribute(pop.getElement(), "zIndex", "10000");
+ mask.mask(pop2, "JAarrrrr!");
+ }
+
+ private void testUserMessages() {
+ final UserMessagesPanel panel = new UserMessagesPanel();
+ UserMessage.setFadeMills(3000);
+ UserMessage.setCloseTitle("Close message");
+ panel.setWidth("422px");
+ final UserMessagesPresenter presenter = new UserMessagesPresenter();
+ presenter.init(panel);
+
+ pop = new PopupBottomPanel();
+ final CloseCallback closeCalback = new CloseCallback() {
+ @Override
+ public void onClose() {
+ pop.setCenterPosition();
+ }
+ };
+ presenter.add(NotifyLevel.info, "Title", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit", "", false,
+ closeCalback);
postAdd(pop);
- }
- };
- final Timer time2 = new Timer() {
- @Override
- public void run() {
- presenter.add(NotifyLevel.important, "", "Lorem ", "", false, closeCalback);
+ presenter.add(NotifyLevel.error, "Title", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit", "",
+ false, closeCalback);
+ pop.add(panel);
+
postAdd(pop);
- presenter.add(NotifyLevel.important, "Title", "Lorem ", "", true, closeCalback);
- postAdd(pop);
- }
- };
- time.schedule(1000);
- time2.schedule(2000);
- pop.show();
- }
+ final Timer time = new Timer() {
+ @Override
+ public void run() {
+ presenter.add(
+ NotifyLevel.error,
+ "",
+ "Lorem <a href='/'>ipsum</a> dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit",
+ "", true, closeCalback);
+ postAdd(pop);
+ }
+ };
+ final Timer time2 = new Timer() {
+ @Override
+ public void run() {
+ presenter.add(NotifyLevel.important, "", "Lorem ", "", false, closeCalback);
+ postAdd(pop);
+ presenter.add(NotifyLevel.important, "Title", "Lorem ", "", true, closeCalback);
+ postAdd(pop);
+ }
+ };
+ time.schedule(1000);
+ time2.schedule(5000);
+ pop.show();
+
+ }
}
Modified: kune-sandbox/war/kune-message.css
===================================================================
--- kune-sandbox/war/kune-message.css 2011-09-02 01:00:47 UTC (rev 1506)
+++ kune-sandbox/war/kune-message.css 2011-09-02 01:01:24 UTC (rev 1507)
@@ -1,33 +1,38 @@
.k-msg-panel {
- background-color: #892c00;
- border-collapse: separate;
- border-spacing: 15px 8px;
+ background-color: #892c00;
+ border-collapse: separate !important;
}
-.k-msg-panel-title {
- color: #ffe9da;
- font-weight: bold;
- margin-bottom: 10px;
+.k-msg-panel table {
}
+.k-msg-panel-bottom {
+ margin-bottom: 8px;
+}
+
.k-msg {
- border: solid 1px #F2F2F2;
- background: #fff0e6;
- color: #280b0b;
- border-collapse: separate;
- border-spacing: 0px;
+ border: solid 1px #F2F2F2;
+ background: #fff0e6;
+ color: #280b0b;
+ margin: 8px 8px 0;
+ width: 0;
}
+.k-msg-title {
+ font-weight: bold;
+ margin-bottom: 8px;
+}
+
.k-msg-close {
- position: relative;
- right: -14px;
- top: 0px;
+ position: relative;
+ right: -14px;
+ top: 0px;
}
.k-msg-icon {
- padding: 10px 10px 5px;
+ padding: 10px 10px 5px;
}
.k-msg-label {
- font-size: 17px;
+ font-size: 16px;
}
\ No newline at end of file
More information about the kune-commits
mailing list