Alona Kaplan has uploaded a new change for review.

Change subject: webadmin: [ja] Edit pool- prestarted vms string is broken into 
two lines
......................................................................

webadmin: [ja] Edit pool- prestarted vms string is broken into two lines

In 'ja' locale the text of prestarted vms is too long for 230px.
Changed all the right column widgets to be 250px.

The change applies only on EditPool.

Change-Id: Iaf34f3adbde08bb34d8db7db3508ba3cf4c31f92
Signed-off-by: Alona Kaplan <[email protected]>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
3 files changed, 42 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/14443/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
index d8f1acc..f8369c9 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
@@ -9,12 +9,12 @@
 import org.ovirt.engine.core.common.businessentities.DiskImage;
 import org.ovirt.engine.core.common.businessentities.ImageStatus;
 import org.ovirt.engine.core.common.businessentities.Quota;
+import org.ovirt.engine.core.common.businessentities.StoragePool;
 import org.ovirt.engine.core.common.businessentities.UsbPolicy;
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VDSGroup;
 import org.ovirt.engine.core.common.businessentities.VmTemplate;
 import org.ovirt.engine.core.common.businessentities.VmType;
-import org.ovirt.engine.core.common.businessentities.StoragePool;
 import org.ovirt.engine.core.common.queries.ConfigurationValues;
 import org.ovirt.engine.ui.common.CommonApplicationConstants;
 import org.ovirt.engine.ui.common.CommonApplicationMessages;
@@ -92,6 +92,8 @@
         String assignedVmsLabel();
 
         String labelDisabled();
+
+        String generalTabExtendedRightWidgetWidth();
     }
 
     @UiField
@@ -217,9 +219,14 @@
     public FlowPanel editPoolEditVmsPanel;
 
     @UiField
+    public FlowPanel editIncreaseVmsPanel;
+
+    @UiField
     @Ignore
     public FlowPanel editPoolIncraseNumOfVmsPanel;
 
+    @UiField
+    public FlowPanel editPrestartedVmsPanel;
     @UiField
     @Ignore
     public Label editPrestartedVmsLabel;
@@ -771,7 +778,7 @@
         kernel_parametersEditor.setLabel(constants.kernelParamsVmPopup());
     }
 
-    private void applyStyles() {
+    protected void applyStyles() {
         hostCpuEditor.addContentWidgetStyleName(style.longCheckboxContent());
         
allowConsoleReconnectEditor.addContentWidgetStyleName(style.longCheckboxContent());
         
provisioningEditor.addContentWidgetStyleName(style.provisioningEditorContent());
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
index a0c5ecd..dc407c2 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
@@ -203,6 +203,10 @@
                .migrationSelect {
                        margin-right: 174px;
                }
+
+               .generalTabExtendedRightWidgetWidth {
+                       width: 250px !important;
+        }
         
        </ui:style>
 
@@ -242,7 +246,7 @@
                                                                        
<g:Label ui:field="editPrestartedVmsLabel" 
addStyleNames="{style.prestartedLabel}" />
                                                                        
<d:InfoIcon ui:field="editPoolPrestartedVmsIcon" 
addStyleNames="{style.prestartedVmsIcon}" />
                                                                </g:FlowPanel>
-                                                               <g:FlowPanel 
addStyleNames="{style.editPrestartedVms}">
+                                                               <g:FlowPanel 
ui:field="editPrestartedVmsPanel" addStyleNames="{style.editPrestartedVms}">
                                                                        
<e:EntityModelTextBoxOnlyEditor ui:field="editPrestartedVmsEditor" 
addStyleNames="{style.editPrestartedVmsEditor}" 
contentWidgetStyleName="{style.textBox}" />
                                                                        
<g:ValueLabel ui:field="outOfxInPool" />
                                                                </g:FlowPanel>
@@ -250,7 +254,7 @@
                             
                             <g:FlowPanel 
ui:field="editPoolIncraseNumOfVmsPanel" addStyleNames="{style.poolEditVms}">
                                                                <g:Label 
text="{constants.increaseNumberOfVMsInPoolBy}" 
addStyleNames="{style.increasePrestartedLabel}" />
-                                                               <g:FlowPanel 
addStyleNames="{style.editIncreaseVms}">
+                                                               <g:FlowPanel 
ui:field="editIncreaseVmsPanel" addStyleNames="{style.editIncreaseVms}">
                                                                        
<e:EntityModelTextBoxOnlyEditor ui:field="incraseNumOfVmsEditor" 
addStyleNames="{style.editPrestartedVmsEditor}" 
contentWidgetStyleName="{style.textBox}" />
                                                                        
<g:Label text="{constants.vms}" addStyleNames="{style.increaseVmsInPoolVms}" />
                                                                </g:FlowPanel>
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
index 2a27c80..8183984 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/pool/PoolEditPopupWidget.java
@@ -42,7 +42,7 @@
         object.getPropertyChangedEvent().addListener(new IEventListener() {
             @Override
             public void eventRaised(Event ev, Object sender, EventArgs args) {
-                if (object.getProgress() == null) { //$NON-NLS-1$
+                if (object.getProgress() == null) {
                     disableAllTabs();
                     enableEditPoolFields();
                 }
@@ -80,6 +80,32 @@
         incraseNumOfVmsEditor.setEnabled(true);
     }
 
+    @Override
+    protected void applyStyles() {
+        super.applyStyles();
+
+        // In 'ja' locale the text of prestarted vms is too long for 230px.
+        // Changed all the right column widgets width to 250px.
+        
dataCenterEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
clusterEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
quotaEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
descriptionEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
templateEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
memSizeEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
totalvCPUsEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
corePerSocketEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
numOfSocketsEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
oSTypeEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
isStatelessEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
isRunAndPauseEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
isDeleteProtectedEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+        
editIncreaseVmsPanel.addStyleName(style.generalTabExtendedRightWidgetWidth());
+        
editPrestartedVmsPanel.addStyleName(style.generalTabExtendedRightWidgetWidth());
+        nameEditor.addStyleName(style.generalTabExtendedRightWidgetWidth());
+        
nameEditor.addContentWidgetStyleName(style.generalTabExtendedRightWidgetWidth());
+
+    }
+
     private void disableAllTabs() {
         generalTab.disableContent();
         poolTab.disableContent();


--
To view, visit http://gerrit.ovirt.org/14443
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf34f3adbde08bb34d8db7db3508ba3cf4c31f92
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to