diff --git a/.classpath b/.classpath index 124c5f9..3e359fe 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -30,5 +30,5 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index 8c6d24a..f34904e 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/Users/massi/Documents/workspace/workspace/target/workspace-6.3.0-SNAPSHOT +lastWarOutDir=/Users/massi/Documents/workspace/workspace/target/workspace-6.4.1-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/pom.xml b/pom.xml index 056b92c..0183abb 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portlets.user workspace war - 6.4.0-SNAPSHOT + 6.4.1-SNAPSHOT gCube Workspace Portlet gcube Workspace Portlet is a portlet for users workspace management diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java index 0f56365..46405a8 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java @@ -373,8 +373,7 @@ public class AppController implements SubscriberInterface { // System.out.println("#############Scopde id " + scope.getId() + " name " + scope.getName()); if(result!=null && result.size()>0){ - wsPortlet.getSearchAndFilterContainer().setListScope(result); - wsPortlet.getSearchAndFilterContainer().selectScopeByIndex(0); //select first scope + } else new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting all scope. No scope available. " +ConstantsExplorer.TRY_AGAIN, null); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java index b3ab04f..b712d54 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java @@ -11,6 +11,7 @@ import com.extjs.gxt.ui.client.event.Events; import com.extjs.gxt.ui.client.event.Listener; import com.extjs.gxt.ui.client.util.Margins; import com.extjs.gxt.ui.client.widget.ContentPanel; +import com.extjs.gxt.ui.client.widget.HorizontalPanel; import com.extjs.gxt.ui.client.widget.layout.BorderLayout; import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData; import com.extjs.gxt.ui.client.widget.layout.FitLayout; @@ -61,7 +62,7 @@ public class GxtBorderLayoutPanel extends ContentPanel { center.setBorders(false); north.setHeaderVisible(false); - west.setHeading(ConstantsPortlet.EXPLORER); + west.setHeaderVisible(false); south.setHeading(ConstantsPortlet.DETAILS); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtSeachAndFilterPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtSeachAndFilterPanel.java index 0845d78..8a0591a 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtSeachAndFilterPanel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtSeachAndFilterPanel.java @@ -1,28 +1,17 @@ package org.gcube.portlets.user.workspace.client.view.panels; -import java.util.List; - import org.gcube.portlets.user.workspace.client.AppController; import org.gcube.portlets.user.workspace.client.ConstantsExplorer; import org.gcube.portlets.user.workspace.client.ConstantsPortlet; import org.gcube.portlets.user.workspace.client.event.SaveSmartFolderEvent; -import org.gcube.portlets.user.workspace.client.event.ScopeChangeEvent; import org.gcube.portlets.user.workspace.client.event.SearchTextEvent; -import org.gcube.portlets.user.workspace.client.model.ScopeModel; -import org.gcube.portlets.user.workspace.client.view.GxtComboBox; -import com.extjs.gxt.ui.client.Style.HorizontalAlignment; -import com.extjs.gxt.ui.client.Style.VerticalAlignment; import com.extjs.gxt.ui.client.event.ComponentEvent; import com.extjs.gxt.ui.client.event.KeyListener; -import com.extjs.gxt.ui.client.event.SelectionChangedEvent; -import com.extjs.gxt.ui.client.event.SelectionChangedListener; import com.extjs.gxt.ui.client.widget.HorizontalPanel; import com.extjs.gxt.ui.client.widget.LayoutContainer; import com.extjs.gxt.ui.client.widget.VerticalPanel; -import com.extjs.gxt.ui.client.widget.form.ComboBox; import com.extjs.gxt.ui.client.widget.form.DateField; -import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; import com.extjs.gxt.ui.client.widget.form.TextField; import com.extjs.gxt.ui.client.widget.layout.FitLayout; import com.google.gwt.dom.client.Style.Unit; @@ -42,8 +31,6 @@ import com.google.gwt.user.client.ui.RootPanel; */ public class GxtSeachAndFilterPanel extends LayoutContainer { - private GxtComboBox comboBoxGxt = null; - private ComboBox cbViewScope = null; // private HTML txtViewScope = new HTML(""+ConstantsPortlet.VIEWSPACE+":"); private final TextField textSearch = new TextField(); private Button bSearch = new Button(ConstantsPortlet.SEARCH); @@ -52,13 +39,11 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { private TextField textFull = new TextField(); private DateField fromDate = new DateField(); private DateField toDate = new DateField(); - private SimpleComboBox cbNameFilter = null; private HorizontalPanel toolbarPathPanel = null; private boolean isSearchActive = false; private VerticalPanel cp = new VerticalPanel(); HorizontalPanel hp = new HorizontalPanel(); - HorizontalPanel hp2 = new HorizontalPanel(); HorizontalPanel hpMain = new HorizontalPanel(); @@ -71,11 +56,6 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { setBorders(true); setId("SearchAndFilter"); - this.comboBoxGxt = new GxtComboBox(); - this.cbViewScope = this.comboBoxGxt.getComboViewScope(); - this.cbNameFilter = this.comboBoxGxt.getComboStringFilter(); - - this.cbViewScope.setWidth(360); // this.cbViewScope.setAutoWidth(true); this.toolbarPathPanel = toolbarContainer; @@ -91,6 +71,7 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { textSearch.setAllowBlank(true); textSearch.setEmptyText(ConstantsPortlet.SEARCHINWORSPACE); textSearch.setWidth(325); + textSearch.setHeight(22); textSearch.setRegex("^[a-zA-Z0-9]+[ a-zA-Z0-9_().-]*"); //alphanumeric textSearch.getMessages().setRegexText(ConstantsExplorer.MESSAGE_SEARCH_FORCE_APHANUMERIC); @@ -111,21 +92,11 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { bSearch.setWidth("70px"); bSave.setWidth("70px"); - hp2.setHorizontalAlign(HorizontalAlignment.RIGHT); - hp2.setVerticalAlign(VerticalAlignment.MIDDLE); - //hp2.add(txtViewScope); - hp2.add(cbViewScope); - - cbViewScope.setStyleAttribute("margin-left", "132px"); - cbViewScope.setStyleAttribute("margin-top", "2px"); + + hpMain.setWidth("100%"); + hp.setWidth("100%"); hpMain.add(hp); - - //SOLUTION FOR SCOPE INVISIBLE - cbViewScope.setVisible(false); - - hpMain.add(hp2); - cp.add(hpMain); this.addListeners(); @@ -152,8 +123,9 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { int rootWidth = Window.getClientWidth() - 2* leftBorder; //- rightScrollBar; //SOLUTION FOR SCOPE INVISIBLE - hp.setWidth(rootWidth); + hpMain.setWidth(rootWidth-10); + hp.setWidth("100%"); // ORIGINAL CODE // hp.setWidth(rootWidth - 500); } @@ -188,16 +160,6 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { }; textSearch.addKeyListener(keyListener); -// -// bCancel.addClickHandler(new ClickHandler() { -// @Override -// public void onClick(ClickEvent event) { -// if(textSearch.getValue()!=null && !textSearch.getValue().isEmpty() && textSearch.isValid()){ -// searchCancel(); -// AppController.getEventBus().fireEvent(new SearchTextEvent(null)); -// } -// } -// }); bSave.addClickHandler(new ClickHandler() { @Override @@ -210,18 +172,7 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { } }); - this.cbViewScope.addSelectionChangedListener(new SelectionChangedListener() { - - @Override - public void selectionChanged(SelectionChangedEvent se) { - - ScopeModel scope = se.getSelectedItem(); - - AppController.getEventBus().fireEvent(new ScopeChangeEvent(scope.getId())); - - } - }); - + } public void resetFields(){ @@ -229,8 +180,6 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { this.textFull.reset(); this.fromDate.reset(); this.toDate.reset(); - this.cbNameFilter.reset(); - } public void seVisibleButtonsCancelSave(boolean flag){ @@ -249,16 +198,6 @@ public class GxtSeachAndFilterPanel extends LayoutContainer { return this.isSearchActive; } - public void setListScope(List listScope){ - - this.comboBoxGxt.setListScope(listScope); - } - - public void selectScopeByIndex(int index){ - - this.cbViewScope.setValue(cbViewScope.getStore().getAt(index)); - } - public void setSearchActive(boolean isSearchActive) { // System.out.println("#################SET SEARCH ACTIVE in GRID " + isSearchActive); this.isSearchActive = isSearchActive; diff --git a/src/main/webapp/images/bg-pattern.png b/src/main/webapp/images/bg-pattern.png new file mode 100644 index 0000000..d9ca94b Binary files /dev/null and b/src/main/webapp/images/bg-pattern.png differ diff --git a/src/main/webapp/images/space.png b/src/main/webapp/images/space.png new file mode 100644 index 0000000..ea50d3d Binary files /dev/null and b/src/main/webapp/images/space.png differ diff --git a/src/main/webapp/newtheme.css b/src/main/webapp/newtheme.css new file mode 100644 index 0000000..0564a25 --- /dev/null +++ b/src/main/webapp/newtheme.css @@ -0,0 +1,49 @@ +.x-menubar { + background: #FFF url(images/bg-pattern.png) repeat; +} + +.x-panel-body-noheader { + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.x-border-layout-ct { + background-color: transparent; + border-color: transparent; +} + +.x-toolbar { + border-color: #226599; + background: #FFF url(images/bg-pattern.png) repeat !important; +} + +.x-panel-header { + background: #FFF url(images/bg-pattern.png) repeat !important; +} + +.x-toolbar .xtb-sep { + background-image: none !important; + background-color: transparent; +} + +.x-accordion-hd { + background-position: 0 0px; +} + +.x-status-text { + color: #226599; + font-weight: bold !important; +} + +.x-status-text-panel { + border-color: transparent; +} + +.x-component { + color: #226599; +} + +.x-btn button { + color: #226599; +} \ No newline at end of file diff --git a/src/main/webapp/workspaceportlet.css b/src/main/webapp/workspaceportlet.css index ecf35ca..52b0c6c 100644 --- a/src/main/webapp/workspaceportlet.css +++ b/src/main/webapp/workspaceportlet.css @@ -1,4 +1,5 @@ @import url(http://fonts.googleapis.com/css?family=Architects+Daughter); +@import url(newtheme.css); .nofeed-message { line-height: 40px; @@ -21,7 +22,7 @@ -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; - background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top; + background: #F2F2F2 url(images/space.png) repeat-x scroll left top; border-color: #BBB; color: #464646; font-size: 12px; @@ -40,7 +41,7 @@ border-color: #BBB; cursor: default; opacity: 1.0; - background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top; + background: #F2F2F2 url(images/space.png) repeat-x scroll left top; } .wizardButton:hover { @@ -50,7 +51,7 @@ } .wizardButton:active { - background: #e3e8f3 url(images/white-grad.png) repeat-x scroll left top; + background: #e3e8f3 url(images/space.png) repeat-x scroll left top; } /** Example rules used by the template application (remove for your app) */ @@ -263,6 +264,14 @@ } +#SearchAndFilter { + background: #FFF url(images/bg-pattern.png) repeat; +} + +.myToolbar { + background-color:transparent !important; +} + .smartButton { -webkit-transition: background-color .5s ease-in-out; -moz-transition: background-color .5s ease-in-out; @@ -279,9 +288,7 @@ top: -4px; !important; } -.myToolbar { - background-color: #D0DEF0 !important; -} + .myWebDavStyle{