静 黎 has uploaded a new change for review. Change subject: UI: expose CSS class defined in LoginPopupView.ui.xml ......................................................................
UI: expose CSS class defined in LoginPopupView.ui.xml this patch expose all CSS class defined in LoginPopupView.ui.xml and rename the CSS class to use loginPopupView_ prefix and mark it as @external, then move them to common.css. Change-Id: I80dcacf8d62f9bb051747e530f0d24e692388ce7 Signed-off-by: lijing <lij...@cloud-times.com> --- M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml M packaging/branding/ovirt.brand/common.css 4 files changed, 201 insertions(+), 181 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/56/18156/1 diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java index fd2d1ae..41ea209 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.java @@ -158,7 +158,7 @@ private void initUserMessageOfTheDayToolTip(final ApplicationTemplates templates) { tooltipPanel = new SimplePopupPanel(); - tooltipPanel.setStyleName(style.motd()); + tooltipPanel.setStyleName(style.loginPopupView_motd()); tooltipPanel.hide(); tooltip = new HTML(); @@ -268,7 +268,7 @@ public interface Style extends CssResource { - String motd(); + String loginPopupView_motd(); } } diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml index 0d5d943..9d7363b 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/login/view/LoginPopupView.ui.xml @@ -7,110 +7,59 @@ <ui:with field='resources' type='org.ovirt.engine.ui.userportal.ApplicationResources' /> <ui:style type="org.ovirt.engine.ui.userportal.section.login.view.LoginPopupView.Style"> - .loginForm { - padding-top: 40px; - background-color: #FFFFFF; - height: 100%; + + @external loginPopupView_loginForm; + .loginPopupView_loginForm { } - .loginFormTable { - margin: auto; + @external loginPopupView_loginFormTable; + .loginPopupView_loginFormTable { } - .formWidget { - color: #333333; - font-size: 13px; - padding: 0 5px; - font-family: Verdana,sans-serif; - line-height: 30px; - text-align: left; + @external loginPopupView_formWidget; + .loginPopupView_formWidget { } - .localizationLabel { - font-size: 11px; + @external loginPopupView_localizationLabel; + .loginPopupView_localizationLabel { } - .errorMessagePanel { - position: relative; - height: 50px; - width: 100%; + @external loginPopupView_errorMessagePanel; + .loginPopupView_errorMessagePanel { } - .errorMessage { - color: red; - font-style: italic; - text-align: center; - vertical-align: middle; + @external loginPopupView_errorMessage; + .loginPopupView_errorMessage { } - .buttonBar { - padding-bottom: 10px; + @external loginPopupView_buttonBar; + .loginPopupView_buttonBar { } - .button { - float: right; - font-size: 12px; + @external loginPopupView_button; + .loginPopupView_button { } - .localeBox { - font-size: 11px; - border-width: 0; - color: gray; - background: none repeat scroll 0 0 transparent; - opacity:0; - position:fixed; - width: 150px; + @external loginPopupView_localeBox; + .loginPopupView_localeBox { } - .localeBox option{ - text-align:right; + @external loginPopupView_localePanel; + .loginPopupView_localePanel { } - .localePanel { - float: right; - overflow: hidden; - background: url(images/triangle_down_gray.gif) no-repeat right white; - margin-right:25px; - margin-left:270px; - margin-top:10px; + @external loginPopupView_localeSelect; + .loginPopupView_localeSelect { } - .localeSelect { - padding-right: 15px; - text-align: right; - color:gray; - font-size: 11px; - width: 130px; - } - - .motd { - border-top-style:none; - border-right-style:solid; - border-bottom-style:solid; - border-left-style:solid; - border-color: #ff9933; - -webkit-border-bottom-right-radius: 12px; - -webkit-border-bottom-left-radius: 12px; - -moz-border-radius-bottomright: 12px; - -moz-border-radius-bottomleft: 12px; - border-bottom-right-radius: 12px; - border-bottom-left-radius: 12px; - padding:2px; - font-size:13px; - color: black; - background-color: white; - width: 300px; - -webkit-box-shadow: 0px 2px 2px 2px rgba(0, 0, 0, .3); - box-shadow: 0px 2px 2px 2px rgba(0, 0, 0, .3); + @external loginPopupView_motd; + .loginPopupView_motd { } </ui:style> <ui:style field='loginPopupStyle'> - .loginPopupHeader { - position: absolute; - top: 5px; - right: 5px; - left: 5px; + @external loginPopupView_loginPopupHeader; + .loginPopupView_loginPopupHeader { } @external obrand_loginPopupHeaderCenter; @@ -125,38 +74,36 @@ .obrand_loginPopupHeaderImage { } - .headerLabelStyle { - font-weight: bold; - color: white; - width: 250px; + @external loginPopupView_headerLabelStyle; + .loginPopupView_headerLabelStyle { } </ui:style> <d:SimplePopupPanel ui:field="popup" width="480px"> <d:header> - <g:HorizontalPanel styleName="{loginPopupStyle.loginPopupHeader}"> + <g:HorizontalPanel styleName="{loginPopupStyle.loginPopupView_loginPopupHeader}"> <g:Image styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" /> <g:HTMLPanel styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}"> - <g:Label ui:field="headerLabel" addStyleNames="{loginPopupStyle.headerLabelStyle}"/> + <g:Label ui:field="headerLabel" addStyleNames="{loginPopupStyle.loginPopupView_headerLabelStyle}"/> </g:HTMLPanel> <g:Image styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" /> </g:HorizontalPanel> </d:header> <d:content> - <g:HTMLPanel addStyleNames="{style.loginForm}"> - <table class="{style.loginFormTable}"> + <g:HTMLPanel addStyleNames="{style.loginPopupView_loginForm}"> + <table class="{style.loginPopupView_loginFormTable}"> <tr> <td> - <g:Label ui:field="userNameLabel" addStyleNames="{style.formWidget}" /> - <g:Label ui:field="passwordLabel" addStyleNames="{style.formWidget}" /> - <g:Label ui:field="domainLabel" addStyleNames="{style.formWidget}" /> + <g:Label ui:field="userNameLabel" addStyleNames="{style.loginPopupView_formWidget}" /> + <g:Label ui:field="passwordLabel" addStyleNames="{style.loginPopupView_formWidget}" /> + <g:Label ui:field="domainLabel" addStyleNames="{style.loginPopupView_formWidget}" /> </td> <td> - <e:EntityModelTextBoxEditor ui:field="userNameEditor" addStyleNames="{style.formWidget}" /> - <e:EntityModelPasswordBoxEditor ui:field="passwordEditor" addStyleNames="{style.formWidget}" /> - <e:ListModelListBoxEditor ui:field="domainEditor" addStyleNames="{style.formWidget}" /> + <e:EntityModelTextBoxEditor ui:field="userNameEditor" addStyleNames="{style.loginPopupView_formWidget}" /> + <e:EntityModelPasswordBoxEditor ui:field="passwordEditor" addStyleNames="{style.loginPopupView_formWidget}" /> + <e:ListModelListBoxEditor ui:field="domainEditor" addStyleNames="{style.loginPopupView_formWidget}" /> </td> </tr> <tr> @@ -166,20 +113,20 @@ </tr> <tr> <td height="20" colspan="2"> - <g:HTMLPanel addStyleNames="{style.buttonBar}"> - <w:UiCommandButton ui:field="loginButton" addStyleNames="{style.button}" /> + <g:HTMLPanel addStyleNames="{style.loginPopupView_buttonBar}"> + <w:UiCommandButton ui:field="loginButton" addStyleNames="{style.loginPopupView_button}" /> <div style="clear: both;" /> </g:HTMLPanel> </td> </tr> </table> <g:VerticalPanel> - <g:VerticalPanel ui:field="errorMessagePanel" verticalAlignment="middle" addStyleNames="{style.errorMessagePanel}"> - <g:Label ui:field="errorMessage" addStyleNames="{style.errorMessage}" /> + <g:VerticalPanel ui:field="errorMessagePanel" verticalAlignment="middle" addStyleNames="{style.loginPopupView_errorMessagePanel}"> + <g:Label ui:field="errorMessage" addStyleNames="{style.loginPopupView_errorMessage}" /> </g:VerticalPanel> - <g:HTMLPanel addStyleNames="{style.localePanel}"> - <g:ListBox ui:field="localeBox" addStyleNames="{style.localeBox}"/> - <g:Label ui:field="selectedLocale" addStyleNames="{style.localeSelect}"></g:Label> + <g:HTMLPanel addStyleNames="{style.loginPopupView_localePanel}"> + <g:ListBox ui:field="localeBox" addStyleNames="{style.loginPopupView_localeBox}"/> + <g:Label ui:field="selectedLocale" addStyleNames="{style.loginPopupView_localeSelect}"></g:Label> </g:HTMLPanel> </g:VerticalPanel> </g:HTMLPanel> diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml index ce77bae..873e8b7 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/login/view/LoginPopupView.ui.xml @@ -7,93 +7,55 @@ <ui:with field='resources' type='org.ovirt.engine.ui.webadmin.ApplicationResources' /> <ui:style> - .loginForm { - padding-top: 40px; - background-color: #FFFFFF; - height: 100%; + @external loginPopupView_loginForm; + .loginPopupView_loginForm { } - .loginFormTable { - margin: auto; + @external loginPopupView_loginFormTable; + .loginPopupView_loginFormTable { } - .formWidget { - color: #333333; - font-size: 13px; - padding: 0 5px; - font-family: Verdana,sans-serif; - line-height: 30px; - text-align: left; + @external loginPopupView_formWidget; + .loginPopupView_formWidget { } - .errorMessagePanel { - position: relative; - height: 50px; - width: 100%; + @external loginPopupView_errorMessagePanel; + .loginPopupView_errorMessagePanel { } - .errorMessage { - color: red; - font-style: italic; - text-align: center; - vertical-align: middle; + @external loginPopupView_errorMessage; + .loginPopupView_errorMessage { } - .buttonBar { - padding-top: 10px; - padding-bottom: 10px; + @external loginPopupView_buttonBar; + .loginPopupView_buttonBar { } - .button { - float: right; - font-size: 12px; + @external loginPopupView_button; + .loginPopupView_button { } - .localeBox { - font-size: 11px; - border-width: 0; - color: gray; - background: none repeat scroll 0 0 transparent; - opacity:0; - position:fixed; - width: 150px; + @external loginPopupView_localeBox; + .loginPopupView_localeBox { } - .localeBox option{ - text-align:right; + @external loginPopupView_localePanel; + .loginPopupView_localePanel { } - .localePanel { - float: right; - overflow: hidden; - background: url(images/triangle_down_gray.gif) no-repeat right white; - margin-right:25px; - margin-left:270px; - margin-top:10px; - } - - .localeSelect { - padding-right: 15px; - text-align: right; - color:gray; - font-size: 11px; - width: 130px; + @external loginPopupView_localeSelect; + .loginPopupView_localeSelect { } - .headerLabelStyle { - font-weight: bold; - color: white; - width: 250px; + @external loginPopupView_headerLabelStyle; + .loginPopupView_headerLabelStyle { } </ui:style> <ui:style field='loginPopupStyle'> - .loginPopupHeader { - position: absolute; - top: 5px; - right: 5px; - left: 5px; + @external loginPopupView_loginPopupHeader; + .loginPopupView_loginPopupHeader{ } @external obrand_loginPopupHeaderLogoImage; @@ -111,49 +73,49 @@ <d:SimplePopupPanel ui:field="popup" width="480px"> <d:header> - <g:HorizontalPanel styleName="{loginPopupStyle.loginPopupHeader}"> + <g:HorizontalPanel styleName="{loginPopupStyle.loginPopupView_loginPopupHeader}"> <g:Image styleName="obrand_loginPopupHeaderLogoImage" url="clear.cache.gif" /> <g:HTMLPanel styleName="{loginPopupStyle.obrand_loginPopupHeaderCenter}"> - <g:Label ui:field="headerLabel" addStyleNames="{style.headerLabelStyle}"/> + <g:Label ui:field="headerLabel" addStyleNames="{style.loginPopupView_headerLabelStyle}"/> </g:HTMLPanel> <g:Image styleName="obrand_loginPopupHeaderImage" url="clear.cache.gif" /> </g:HorizontalPanel> </d:header> <d:content> - <g:HTMLPanel addStyleNames="{style.loginForm}"> - <table class="{style.loginFormTable}"> + <g:HTMLPanel addStyleNames="{style.loginPopupView_loginForm}"> + <table class="{style.loginPopupView_loginFormTable}"> <tr> <td> - <g:Label ui:field="userNameLabel" addStyleNames="{style.formWidget}" /> - <g:Label ui:field="passwordLabel" addStyleNames="{style.formWidget}" /> - <g:Label ui:field="domainLabel" addStyleNames="{style.formWidget}" /> + <g:Label ui:field="userNameLabel" addStyleNames="{style.loginPopupView_formWidget}" /> + <g:Label ui:field="passwordLabel" addStyleNames="{style.loginPopupView_formWidget}" /> + <g:Label ui:field="domainLabel" addStyleNames="{style.loginPopupView_formWidget}" /> </td> <td> - <e:EntityModelTextBoxEditor ui:field="userNameEditor" addStyleNames="{style.formWidget}" /> - <e:EntityModelPasswordBoxEditor ui:field="passwordEditor" addStyleNames="{style.formWidget}" /> - <e:ListModelListBoxEditor ui:field="domainEditor" addStyleNames="{style.formWidget}" /> + <e:EntityModelTextBoxEditor ui:field="userNameEditor" addStyleNames="{style.loginPopupView_formWidget}" /> + <e:EntityModelPasswordBoxEditor ui:field="passwordEditor" addStyleNames="{style.loginPopupView_formWidget}" /> + <e:ListModelListBoxEditor ui:field="domainEditor" addStyleNames="{style.loginPopupView_formWidget}" /> </td> </tr> <tr> <td /> <td height="20"> - <g:HTMLPanel addStyleNames="{style.buttonBar}"> - <w:UiCommandButton ui:field="loginButton" addStyleNames="{style.button}" /> + <g:HTMLPanel addStyleNames="{style.loginPopupView_buttonBar}"> + <w:UiCommandButton ui:field="loginButton" addStyleNames="{style.loginPopupView_button}" /> <div style="clear: both;" /> </g:HTMLPanel> </td> </tr> </table> <g:VerticalPanel> - <g:VerticalPanel ui:field="errorMessagePanel" verticalAlignment="middle" addStyleNames="{style.errorMessagePanel}"> - <g:Label ui:field="errorMessage" addStyleNames="{style.errorMessage}" /> - <g:Label ui:field="footerWarningMessage" addStyleNames="{style.errorMessage}" /> + <g:VerticalPanel ui:field="errorMessagePanel" verticalAlignment="middle" addStyleNames="{style.loginPopupView_errorMessagePanel}"> + <g:Label ui:field="errorMessage" addStyleNames="{style.loginPopupView_errorMessage}" /> + <g:Label ui:field="footerWarningMessage" addStyleNames="{style.loginPopupView_errorMessage}" /> </g:VerticalPanel> - <g:HTMLPanel addStyleNames="{style.localePanel}"> - <g:ListBox ui:field="localeBox" addStyleNames="{style.localeBox}"/> - <g:Label ui:field="selectedLocale" addStyleNames="{style.localeSelect}"></g:Label> + <g:HTMLPanel addStyleNames="{style.loginPopupView_localePanel}"> + <g:ListBox ui:field="localeBox" addStyleNames="{style.loginPopupView_localeBox}"/> + <g:Label ui:field="selectedLocale" addStyleNames="{style.loginPopupView_localeSelect}"></g:Label> </g:HTMLPanel> </g:VerticalPanel> diff --git a/packaging/branding/ovirt.brand/common.css b/packaging/branding/ovirt.brand/common.css index 7c98855..32498cb 100644 --- a/packaging/branding/ovirt.brand/common.css +++ b/packaging/branding/ovirt.brand/common.css @@ -30,6 +30,117 @@ display: block; } +/* other styles */ +.loginPopupView_loginPopupHeader{ + position: absolute; + top: 5px; + right: 5px; + left: 5px; +} + +.loginPopupView_headerLabelStyle{ + font-weight: bold; + color: white; + width: 250px; +} + +.loginPopupView_loginForm { + padding-top: 40px; + background-color: #FFFFFF; + height: 100%; +} + +.loginPopupView_loginFormTable { + margin: auto; +} + +.loginPopupView_formWidget { + color: #333333; + font-size: 13px; + padding: 0 5px; + font-family: Verdana,sans-serif; + line-height: 30px; + text-align: left; +} + +.loginPopupView_localizationLabel { + font-size: 11px; +} + +.loginPopupView_errorMessagePanel { + position: relative; + height: 50px; + width: 100%; +} + +.loginPopupView_errorMessage { + color: red; + font-style: italic; + text-align: center; + vertical-align: middle; +} + +.loginPopupView_buttonBar { + padding-bottom: 10px; +} + +.loginPopupView_button { + float: right; + font-size: 12px; +} + +.loginPopupView_localeBox { + font-size: 11px; + border-width: 0; + color: gray; + background: none repeat scroll 0 0 transparent; + opacity:0; + position:fixed; + width: 150px; +} + +.loginPopupView_localeBox option{ + text-align:right; +} + +.loginPopupView_localePanel { + float: right; + overflow: hidden; + background: url(images/triangle_down_gray.gif) no-repeat right white; + margin-right:25px; + margin-left:270px; + margin-top:10px; +} + +.loginPopupView_localeSelect { + padding-right: 15px; + text-align: right; + color:gray; + font-size: 11px; + width: 130px; +} + +.loginPopupView_motd { + border-top-style:none; + border-right-style:solid; + border-bottom-style:solid; + border-left-style:solid; + border-color: #ff9933; + -webkit-border-bottom-right-radius: 12px; + -webkit-border-bottom-left-radius: 12px; + -moz-border-radius-bottomright: 12px; + -moz-border-radius-bottomleft: 12px; + border-bottom-right-radius: 12px; + border-bottom-left-radius: 12px; + padding:2px; + font-size:13px; + color: black; + background-color: white; + width: 300px; + -webkit-box-shadow: 0px 2px 2px 2px rgba(0, 0, 0, .3); + box-shadow: 0px 2px 2px 2px rgba(0, 0, 0, .3); +} + /* SimpleDialogPanel: These classes allow you to modify the header of all the popup windows in the user portal and web admin. The border is defined in gwt-common.css */ -- To view, visit http://gerrit.ovirt.org/18156 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80dcacf8d62f9bb051747e530f0d24e692388ce7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: 静 黎 <mobi...@gmail.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches