From a0ee5e2416f9317ce55ed855fcd153ba9581c6e1 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Tue, 2 Feb 2016 11:42:40 +0000 Subject: [PATCH] 2099: Workspace Explorer enhancements: create a new folder Task-Url: https://support.d4science.org/issues/2099 Completed form to create a new folder git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@122723 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 12 +-- .../client/WorkspaceExplorerController.java | 1 + .../wsexplorer/client/resources/baseIcons.css | 3 + .../wsexplorer/client/resources/home.png | Bin 329 -> 403 bytes .../client/resources/new_folder.png | Bin 339 -> 581 bytes .../client/resources/vre_folder.png | Bin 430 -> 1396 bytes .../client/view/CreateFolderForm.java | 69 ++++++++++++----- .../client/view/CreateFolderForm.ui.xml | 22 ++---- .../wsexplorer/client/view/Navigation.java | 3 +- .../wsexplorer/client/view/Navigation.ui.xml | 3 - .../client/view/WorkspaceExplorer.java | 7 +- .../view/grid/AbstractItemsCellTable.java | 58 +++++++------- .../client/view/grid/ItemsTable.java | 22 ++---- .../wsexplorer/public/workspaceExplorer.css | 58 +------------- .../resources/css/bootstrap.min.css | 49 +++++++++++- .../resources/css/gwt-bootstrap.css | 73 +++++++++++++----- .../server/WorkspaceExplorerServiceImpl.java | 2 +- 17 files changed, 209 insertions(+), 173 deletions(-) diff --git a/pom.xml b/pom.xml index 633f62d..e9deabb 100644 --- a/pom.xml +++ b/pom.xml @@ -54,12 +54,12 @@ - - - - - - + + + + + + diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/WorkspaceExplorerController.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/WorkspaceExplorerController.java index 899061d..1d1c5ca 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/WorkspaceExplorerController.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/WorkspaceExplorerController.java @@ -222,6 +222,7 @@ public class WorkspaceExplorerController implements EventHandler { }; workspaceExplorerPanel.getSouthPanel().add(createFolder); + createFolder.getTextBoxFolderName().setFocus(true); } }); diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/baseIcons.css b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/baseIcons.css index 01d29b1..c21077a 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/baseIcons.css +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/baseIcons.css @@ -11,6 +11,7 @@ display: inline-block; vertical-align: middle; margin-bottom: 3px; + margin-right: 2px; } /* Our sample icon */ @@ -19,6 +20,7 @@ display: inline-block; vertical-align: middle; margin-bottom: 3px; + margin-right: 2px; } @sprite .myBaseIcon_new_folder { @@ -26,4 +28,5 @@ display: inline-block; vertical-align: middle; margin-bottom: 3px; + margin-right: 2px; } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/home.png b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/resources/home.png index eb93f5bcb6ee7f336b9a995a7225da74e0883540..d19e34de44fda4eabdcb6e85fd060e5d39100df4 100644 GIT binary patch delta 351 zcmX@fG?{sVBnLAC1A~SxfAB;@jr#BapAc7HUtd2zzqq)#sHmvu=;)M`l;q^()YR0p zw6xgR*ucO*A0MCa@bHk3ki^8qprD|zu&{uDfQX2Q(9qDNq@?)xcz=KY$jHdx;NXOW zgqWC^|Ns93?FgPUM-)iOmIV0)14XcbdaxivWZUyBpvsk=E{-7;w`}?%`Hm>?IL9t{ z&5+ve@V@?>r~Bn!%3kwyj_=3{x8=^hyy?vAZI0JhUD4Apj-2W6I-puyNqDKrdFeTq z9koo|_Sv59dJ)4>y1^*&+kqo5zDVdhW*heHFIv{JdF#in6OS^^+LVjCeE3(RyVob( zN%LP#!<*lIkNzI4F0pynHe=bz&w1|_oMQ3uvivc450J{Tnd=*Xifm){ZO1hssR&#cs>vdKrx8jPmBQ|#pi)IAIeXJVh|{R$_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JX^7i#JhUafSVU;vB z*2k%ln}dyE?S_pEEW)Bv3^#AyWFQBC^fEC}2v|Twe6R;untvCr-2pM+*2~XW6>QtS z7fgG3I^%Z%EUvcg*bk;XJscSxJ$lN($OQ2rh<)YC4KUveD2HJHGt`Lx|Ng=yz*_$! z*sLtf48Q;WgR4a`fDK6g`t_SZRY?{up{69m@apwz21Z5*`|;x^3_Lts3=IE%gXP)S zSP=%WurM)f+JA9`;qPCFl_00yxpSX^i3Or)#o8?lE)G@Ep9|df6`S`muyb(2`K-Kr3@6T9Vu%fNLvjAbT?ZLhxPHH7U}0rJk%$R$Cn_2_ zf4!kXLi)xk%&>OrUh;IaiGbteKP4^z2rvLlnqG1Pa}F6<00000NkvXXu0mjf?hdi; diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.java index 6e292b5..851afa3 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.java @@ -5,20 +5,20 @@ package org.gcube.portlets.widgets.wsexplorer.client.view; import com.github.gwtbootstrap.client.ui.Alert; import com.github.gwtbootstrap.client.ui.Button; -import com.github.gwtbootstrap.client.ui.ControlGroup; +import com.github.gwtbootstrap.client.ui.ControlLabel; import com.github.gwtbootstrap.client.ui.FluidRow; import com.github.gwtbootstrap.client.ui.Form; import com.github.gwtbootstrap.client.ui.TextBox; import com.github.gwtbootstrap.client.ui.constants.AlertType; -import com.github.gwtbootstrap.client.ui.constants.ControlGroupType; 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.dom.client.KeyCodes; +import com.google.gwt.event.dom.client.KeyDownEvent; +import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.HasHorizontalAlignment; -import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Widget; @@ -36,6 +36,9 @@ public abstract class CreateFolderForm extends Composite { @UiField Button close_dialog; + @UiField + ControlLabel control_label; + @UiField Button submit_create_folder; @@ -45,12 +48,6 @@ public abstract class CreateFolderForm extends Composite { @UiField Form form_create_folder; - @UiField - ControlGroup input_folder_name_group; - - @UiField - HorizontalPanel hp_form_actions; - private Alert alertError = new Alert("Required Field"); private Alert alertSubmitResult = new Alert(""); @@ -86,6 +83,11 @@ public abstract class CreateFolderForm extends Composite { */ public CreateFolderForm() { initWidget(uiBinder.createAndBindUi(this)); + control_label.addStyleName("margin-right-5px"); + input_folder_name.addStyleName("margin-right-5px"); + input_folder_name.addStyleName("gwt-TextBox-personal"); + submit_create_folder.addStyleName("margin-right-5px"); + // setSize(width+"px", "200px"); // input_folder_name.setWidth(width-10+"px"); @@ -102,6 +104,19 @@ public abstract class CreateFolderForm extends Composite { } }); + input_folder_name.addKeyDownHandler(new KeyDownHandler() { + + @Override + public void onKeyDown(KeyDownEvent event) { + + if(event.getNativeKeyCode() == KeyCodes.KEY_ENTER){ + if(validateForm()){ + subtmitHandler(input_folder_name.getValue()); + } + } + } + }); + submit_create_folder.addClickHandler(new ClickHandler() { @Override @@ -124,7 +139,7 @@ public abstract class CreateFolderForm extends Composite { alertSubmitResult.setVisible(false); alertSubmitResult.setClose(false); - hp_form_actions.setCellHorizontalAlignment(close_dialog, HasHorizontalAlignment.ALIGN_RIGHT); +// hp_form_actions.setCellHorizontalAlignment(close_dialog, HasHorizontalAlignment.ALIGN_RIGHT); showAlertSubmitResult(false, ""); form_create_folder.add(alertSubmitResult); @@ -139,12 +154,18 @@ public abstract class CreateFolderForm extends Composite { boolean valid = true; // input_layer_name.setType(ControlGroupType.NONE); - input_folder_name_group.setType(ControlGroupType.NONE); +// input_folder_name_group.setType(ControlGroupType.NONE); + +// ControlGroup ct = new ControlGroup(); +// ct.setType(ControlGroupType.NONE); +// input_folder_name.setControlGroup(ct); if(input_folder_name.getValue()==null || input_folder_name.getValue().isEmpty()){ - input_folder_name.setControlGroup(input_folder_name_group); - input_folder_name_group.setType(ControlGroupType.ERROR); - + input_folder_name.setPlaceholder("Required Field!!!"); +// ControlGroup ct2 = new ControlGroup(); +// ct.setType(ControlGroupType.ERROR); +// input_folder_name.setControlGroup(ct); +// input_folder_name.setErrorLabel(new Label("Required Field")); valid = false; } @@ -164,12 +185,13 @@ public abstract class CreateFolderForm extends Composite { alertSubmitResult.setVisible(visible); } + /** - * Gets the submit_button. + * Gets the submit button. * - * @return the submit_button + * @return the submit button */ - public Button getSubmit_button() { + public Button getSubmitButton() { return submit_create_folder; } @@ -209,4 +231,15 @@ public abstract class CreateFolderForm extends Composite { alertError.setVisible(bool); } + + /** + * Gets the text box folder name. + * + * @return the input_folder_name + */ + public TextBox getTextBoxFolderName() { + + return input_folder_name; + } + } diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.ui.xml index 3a61079..212e43d 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/CreateFolderForm.ui.xml @@ -3,21 +3,11 @@ xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"> - - - New Folder - - - - - - - - Create - - Close - - + New Folder + + Create + Close + \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.java index afebe3e..8530de1 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.java @@ -13,7 +13,6 @@ import org.gcube.portlets.widgets.wsexplorer.shared.ItemCategory; import com.github.gwtbootstrap.client.ui.NavWidget; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.shared.HandlerManager; @@ -63,7 +62,7 @@ public class Navigation extends Composite{ public Navigation(HandlerManager eventBus) { initWidget(uiBinder.createAndBindUi(this)); this.eventBus = eventBus; - getElement().getStyle().setMarginLeft(5.0, Unit.PX); +// getElement().getStyle().setMarginLeft(5.0, Unit.PX); home.setActive(true); WorkspaceExplorerConstants.workspaceNavigatorService.getItemByCategory(ItemCategory.HOME, new AsyncCallback() { diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.ui.xml b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.ui.xml index c488d96..6b19468 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/Navigation.ui.xml @@ -8,8 +8,5 @@ - - - \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/WorkspaceExplorer.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/WorkspaceExplorer.java index 3b9a97b..e16c1f6 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/WorkspaceExplorer.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/WorkspaceExplorer.java @@ -242,7 +242,7 @@ public class WorkspaceExplorer implements ShowableTypes, SelectableTypes{ GWT.log("workspace explorer updating.."); explorerPanel.clear(); // itTables = new ItemsTable(true, displayFields); - itTables.addItems(items); + itTables.updateItems(items, true); explorerPanel.add(itTables.getCellTable()); GWT.log("workspace explorer updated"); } @@ -256,9 +256,10 @@ public class WorkspaceExplorer implements ShowableTypes, SelectableTypes{ public void addItemToExplorer(Item item){ GWT.log("workspace explorer add item.."+item); // itTables = new ItemsTable(true, displayFields); +// explorerPanel.clear(); itTables.addItems(Arrays.asList(item)); - explorerPanel.add(itTables.getCellTable()); - GWT.log("workspace explorer updated"); +// explorerPanel.add(itTables.getCellTable()); + GWT.log("added item: "+item.getName() +", to Explorer"); } /** diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/AbstractItemsCellTable.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/AbstractItemsCellTable.java index 0c87466..dfd5e18 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/AbstractItemsCellTable.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/AbstractItemsCellTable.java @@ -55,8 +55,6 @@ public abstract class AbstractItemsCellTable { public abstract void initTable(AbstractCellTable ItemTable, final SimplePager pager, final Pagination pagination); - - /** * Instantiates a new abstract items cell table. * @@ -74,7 +72,7 @@ public abstract class AbstractItemsCellTable { dataProvider.addDataDisplay(cellTable); // initTable(cellTable, null, null); cellTable.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); - + ssm = new SingleSelectionModel(); cellTable.setSelectionModel(ssm); ssm.addSelectionChangeHandler(new Handler() { @@ -90,7 +88,7 @@ public abstract class AbstractItemsCellTable { } } }); - + cellTable.addDomHandler(new DoubleClickHandler() { @Override @@ -101,12 +99,12 @@ public abstract class AbstractItemsCellTable { AbstractItemsCellTable.this.eventBus.fireEvent(new org.gcube.portlets.widgets.wsexplorer.client.event.LoadFolderEvent(selected)); } } - }, + }, DoubleClickEvent.getType()); /* cellTable.addCellPreviewHandler(new CellPreviewEvent.Handler () { long lastClick=-1000; - + @Override public void onCellPreview(CellPreviewEvent event) { long clictAt = System.currentTimeMillis(); @@ -119,20 +117,20 @@ public abstract class AbstractItemsCellTable { } lastClick = System.currentTimeMillis(); } - - } + + } }); */ - - + + MenuBar options = new MenuBar(true); ScheduledCommand openCommand = new ScheduledCommand() { - + @Override public void execute() { AbstractItemsCellTable.this.eventBus.fireEvent(new org.gcube.portlets.widgets.wsexplorer.client.event.LoadFolderEvent(itemContextMenu)); } }; - + MenuItem openItem = new MenuItem("Open", openCommand); options.addItem(openItem); final DialogBox menuWrapper = new DialogBox(true); @@ -140,7 +138,7 @@ public abstract class AbstractItemsCellTable { menuWrapper.getElement().getStyle().setZIndex(10000); menuWrapper.add(options); cellTable.sinkEvents(Event.ONCONTEXTMENU); - + cellTable.addHandler(new ContextMenuHandler() { @Override public void onContextMenu(ContextMenuEvent event) { @@ -156,7 +154,7 @@ public abstract class AbstractItemsCellTable { }*/ } }, ContextMenuEvent.getType()); - + // ssm.addSelectionChangeHandler(new SelectionChangeEvent.Handler() { // // @Override @@ -166,36 +164,34 @@ public abstract class AbstractItemsCellTable { // // } // }); - + } + /** - * Adds the Items. + * Update items. * - * @param Items - * the Items + * @param items the items + * @param removeOldItems the remove old items */ - public void addItems(List Items) { - dataProvider.getList().clear(); + public void updateItems(List items, boolean removeOldItems) { - for (Item pckg : Items) - addItem(pckg); + if(removeOldItems) + dataProvider.getList().clear(); - cellTable.setPageSize(Items.size() + 1); + dataProvider.getList().addAll(items); + dataProvider.flush(); + dataProvider.refresh(); + + cellTable.setPageSize(items.size()+1); cellTable.redraw(); } - /** - * Adds the Item. - * - * @param pckg - * the pckg - */ - private void addItem(Item pckg) { + /*private void addItem(Item pckg) { dataProvider.getList().add(pckg); dataProvider.flush(); dataProvider.refresh(); - } + }*/ /** * Gets the cell tables. diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/ItemsTable.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/ItemsTable.java index fce4026..a59469a 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/ItemsTable.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/client/view/grid/ItemsTable.java @@ -67,28 +67,20 @@ public class ItemsTable extends AbstractItemsCellTable implements SelectionItem{ /* (non-Javadoc) - * @see org.gcube.portlets.widgets.wsexplorer.client.view.grid.AbstractItemsCellTable#addItems(java.util.List) + * @see org.gcube.portlets.widgets.wsexplorer.client.view.grid.AbstractItemsCellTable#updateItems(java.util.List, boolean) */ - public void addItems(List packages) { - dataProvider.getList().clear(); - - for (Item pckg : packages) - addItem(pckg); - - cellTable.setPageSize(packages.size()+1); - cellTable.redraw(); + public void updateItems(List items, boolean removeOldItems) { + super.updateItems(items, removeOldItems); } /** - * Adds the item. + * Adds the items. * - * @param pckg the pckg + * @param packages the packages */ - private void addItem(Item pckg) { - dataProvider.getList().add(pckg); - dataProvider.flush(); - dataProvider.refresh(); + public void addItems(List packages) { + dataProvider.getList().addAll(packages); } /* (non-Javadoc) diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/public/workspaceExplorer.css b/src/main/java/org/gcube/portlets/widgets/wsexplorer/public/workspaceExplorer.css index 642574a..007058f 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/public/workspaceExplorer.css +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/public/workspaceExplorer.css @@ -3,59 +3,5 @@ * SPECIFIC CSS FOR WORKSPACE EXPLORER * * -* Added to: /src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css -**************************************************/ - - -/* .margin-auto { */ -/* margin: 0 auto; */ -/* /* width: 50%; */ */ -/* } */ - -/* .table-overflow td, th { */ -/* overflow: hidden !important; */ -/* } */ - -/* .table-overflow th{ */ -/* text-align: center !important; */ -/* } */ - -/* .breadcrumbs-navigator .breadcrumb { */ -/* margin-bottom: 5px !important; */ -/* margin-left: 0px !important; */ -/* } */ - -/* .moreinfo{ */ -/* margin-top: 60%; */ -/* } */ - -/* .alert-custom { */ -/* margin-top: 10px; */ -/* margin-bottom: 0 !important; */ -/* padding: 4px !important; */ -/* } */ - -/* .fileNameTextBox{ */ -/* vertical-align: top !important; */ -/* margin-right: 10px; */ -/* margin-left: 5px; */ -/* width: 550px; */ -/* font-size: 12px !important; */ -/* } */ - -/* .footerHP{ */ -/* margin-top: 20px !important; */ -/* float: right; */ -/* } */ - -/* .htmlSaveName { */ -/* display: inline; */ -/* font-size: 14px; */ -/* margin-right: 5px; */ -/* vertical-align: middle; */ -/* } */ - -/* .savePanel{ */ -/* border: 1px solid; */ -/* padding-left: 25px; */ -/* } */ \ No newline at end of file +* See: /src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css +**************************************************/ \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css b/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css index abf8313..a3a5213 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/bootstrap.min.css @@ -1282,4 +1282,51 @@ a:hover, a:focus { .savePanel{ /*border: 1px solid;*/ padding-left: 25px; -} \ No newline at end of file +} + + +.well { + background-color: #F5F5F5; + border: 1px solid #E3E3E3; + border-radius: 4px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset; + margin-bottom: 20px; + min-height: 20px; + padding: 19px; +} +.well blockquote { + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + border-radius: 6px; + padding: 24px; +} +.well-small { + border-radius: 3px; + padding: 9px; +} + +.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, .form-inline .hide, .form-horizontal .hide { + display: none; +} +.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox { + margin-bottom: 0; + padding-left: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { + float: left; + margin-left: 0; + margin-right: 3px; +} diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/gwt-bootstrap.css b/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/gwt-bootstrap.css index f512205..a6671d2 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/gwt-bootstrap.css +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/resources/css/gwt-bootstrap.css @@ -3,7 +3,6 @@ * GWT-BOOTSTRAP MINIMAL CSS FOR WORKSPACE EXPLORE * **************************************************/ - /* body { */ /* padding-top: 50px; */ /* } */ @@ -13,37 +12,69 @@ /* div.input-append > input, div.input-append > textarea, div.input-append > select, div.input-append > .uneditable-input { */ /* margin-bottom: 0; */ /* } */ - .gwt-PopupPanel .gwt-DatePicker { - width: 200px; + width: 200px; } + .gwt-SuggestBoxPopup { - z-index: 2100; + z-index: 2100; } + .gwt-SuggestBoxPopup .suggestPopupTop { - background-color: #FFFFFF; + background-color: #FFFFFF; } + .gwt-SuggestBoxPopup .suggestPopupMiddle { - background-color: #FFFFFF; + background-color: #FFFFFF; } + .gwt-SuggestBoxPopup .suggestPopupBottomCenter { - background-color: #FFFFFF; + background-color: #FFFFFF; } + .gwt-SuggestBoxPopup .item { - clear: both; - color: #333333; - cursor: pointer; - font-size: 110%; - font-weight: normal; - line-height: 20px; - padding: 3px 9px; - white-space: nowrap; + clear: both; + color: #333333; + cursor: pointer; + font-size: 110%; + font-weight: normal; + line-height: 20px; + padding: 3px 9px; + white-space: nowrap; } + .gwt-SuggestBoxPopup .item-selected { - background-color: #0081C2; - background-image: linear-gradient(to bottom, #0088CC, #0077B3); - background-repeat: repeat-x; - color: #FFFFFF; - outline: 0 none; - text-decoration: none; + background-color: #0081C2; + background-image: linear-gradient(to bottom, #0088CC, #0077B3); + background-repeat: repeat-x; + color: #FFFFFF; + outline: 0 none; + text-decoration: none; } + +.gwt-TextBox-personal { + background-color: #FFFFFF; + border: 1px solid #CCCCCC; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; + transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; + border-radius: 4px; + color: #555555; + display: inline-block; + font-size: 14px; + height: 20px; + line-height: 20px; + margin-bottom: 10px; + padding: 4px 6px; + vertical-align: middle; +} + +.form-inline input:FOCUS{ + border-color: rgba(82, 168, 236, 0.8); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px + rgba(82, 168, 236, 0.6); + outline: 0 none +} + +.margin-right-5px { + margin-right: 5px; +} \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/wsexplorer/server/WorkspaceExplorerServiceImpl.java b/src/main/java/org/gcube/portlets/widgets/wsexplorer/server/WorkspaceExplorerServiceImpl.java index 8bd1895..614284c 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsexplorer/server/WorkspaceExplorerServiceImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/wsexplorer/server/WorkspaceExplorerServiceImpl.java @@ -602,7 +602,7 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement @Override public Item createFolder(String nameFolder, String description, String parentId) throws Exception { - _log.trace("creating folder: "+nameFolder +" parent is null?"+parentId); + _log.debug("creating folder: "+nameFolder +", parent id: "+parentId); try {