Skip to content

Commit

Permalink
Style fixes in metadata widget for pfly migration
Browse files Browse the repository at this point in the history
  • Loading branch information
csadilek committed Sep 14, 2015
1 parent 399f5ec commit 7c5445c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,8 @@

package org.kie.workbench.common.widgets.metadata.client.widget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.Widget;
import static org.uberfire.commons.validation.PortablePreconditions.checkNotNull;

import org.guvnor.common.services.shared.metadata.model.Metadata;
import org.gwtbootstrap3.client.ui.FormControlStatic;
import org.gwtbootstrap3.client.ui.TextBox;
Expand All @@ -39,7 +29,17 @@
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup;
import org.uberfire.mvp.Command;

import static org.uberfire.commons.validation.PortablePreconditions.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.Widget;

/**
* This displays the metadata for a versionable artifact. It also captures
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Binder
@UiField
TextBox source;
@UiField
InlineLabel lockedBy;
FormControlStatic lockedBy;
@UiField
PushButton unlock;

Expand Down Expand Up @@ -154,7 +154,8 @@ private void setLockStatus() {
Image unlockImage = new Image( ImageResources.INSTANCE.unlock() );
unlock.setHTML( "<span>" + unlockImage.toString() + " " + unlock.getText() + "</span>" );
unlock.getElement().setAttribute( "data-uf-lock", "false" );
unlock.setEnabled( lockInfo.isLocked() );
unlock.setVisible( lockInfo.isLocked() );
unlock.setEnabled( true );
}

@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
<ui:with field="i18n" type="org.kie.workbench.common.widgets.metadata.client.resources.i18n.MetadataConstants"/>

<ui:style>

.firstColumn {
float: left;
width: 120px;
}

.forceUnlock {
display: inline-block;
padding-right: 5px;
}
</ui:style>

Expand Down Expand Up @@ -86,8 +86,8 @@
<b:FormGroup>
<b:FormLabel text="{i18n.LockMetaData}" addStyleNames="col-md-2"/>
<b:Column size="MD_5">
<gwt:InlineLabel ui:field="lockedBy" text='{i18n.LockedByHint}'/>
<gwt:PushButton addStyleNames="{style.forceUnlock}" ui:field="unlock" text='{i18n.ForceUnlockCaption}'/>
<b:FormControlStatic addStyleNames="{style.forceUnlock}" ui:field="lockedBy" />
<gwt:PushButton addStyleNames="btn btn-default {style.forceUnlock}" ui:field="unlock" text='{i18n.ForceUnlockCaption}'/>
</b:Column>
</b:FormGroup>
</b:FieldSet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@

<ui:with field="i18n" type="org.kie.workbench.common.widgets.metadata.client.resources.i18n.MetadataConstants"/>

<ui:style>
.newTag {
margin-right: 5px;
}
</ui:style>

<gwt:FlowPanel>
<gwt:HorizontalPanel ui:field="tags">
</gwt:HorizontalPanel>
<b:Form type="HORIZONTAL">
<b:TextBox name="newTags" ui:field="newTags"/>
<b:Button ui:field="addTags" type="PRIMARY" text="{i18n.AddNewTag}"></b:Button>
<b:Form type="INLINE">
<b:TextBox name="newTags" ui:field="newTags" addStyleNames="{style.newTag}" />
<b:Button ui:field="addTags" text="{i18n.AddNewTag}"></b:Button>
</b:Form>
</gwt:FlowPanel>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ LockMetaData=Lock status:
LockedByHint=Locked by
UnlockedHint=Not locked
ForceUnlockCaption=Force unlock asset
TagsMetaData=Tags
AddNewTag=Add a new tag/s
TagsMetaData=Tags:
AddNewTag=Add new tag(s)
RemoveThisTag=Remove this tag
ForceUnlockConfirmationTitle=Confirmation
ForceUnlockConfirmationText=Are you sure you want to release the lock of this asset? This might cause {0} to lose unsaved changes!

0 comments on commit 7c5445c

Please sign in to comment.