256: Workspace explorer
Task-Url: https://support.d4science.org/issues/256 Fixed css to save panel git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@117618 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5c37bc3b80
commit
ebbe65055a
|
@ -115,11 +115,10 @@ public class Util {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void adjustSize(Element el, SimplePanel panel){
|
public static void adjustSize(Element el, SimplePanel panel, int offset){
|
||||||
if(el!=null){
|
if(el!=null){
|
||||||
int heigth = el.getClientHeight();
|
int heigth = el.getClientHeight();
|
||||||
GWT.log("getClientHeight adjustSize el: "+heigth);
|
GWT.log("getClientHeight adjustSize el: "+heigth);
|
||||||
int offset = 85;
|
|
||||||
heigth = (heigth-offset>100)?heigth-offset:0;
|
heigth = (heigth-offset>100)?heigth-offset:0;
|
||||||
if(heigth>0){
|
if(heigth>0){
|
||||||
GWT.log("set new Explorer size: "+heigth);
|
GWT.log("set new Explorer size: "+heigth);
|
||||||
|
|
|
@ -47,9 +47,9 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
private boolean isSave = false;
|
private boolean isSave = false;
|
||||||
private WorkspaceExplorerController controller;
|
private WorkspaceExplorerController controller;
|
||||||
private List<WorskpaceExplorerSaveNotificationListener> listeners = new ArrayList<WorskpaceExplorerSaveNotificationListener>();
|
private List<WorskpaceExplorerSaveNotificationListener> listeners = new ArrayList<WorskpaceExplorerSaveNotificationListener>();
|
||||||
private TextBox fileNameTextBox = new TextBox();
|
private TextBox fileNamePanelTextBox = new TextBox();
|
||||||
private VerticalPanel mainVP = new VerticalPanel();
|
private VerticalPanel mainVP = new VerticalPanel();
|
||||||
private HorizontalPanel footerHP = new HorizontalPanel();
|
private HorizontalPanel footerPanelHP = new HorizontalPanel();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -131,7 +131,7 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
|
|
||||||
private void adjustSize(){
|
private void adjustSize(){
|
||||||
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
||||||
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel());
|
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel(), 120);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,7 +170,7 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
String fileName = getFileName();
|
String fileName = getFileName();
|
||||||
if(fileName==null || fileName.isEmpty()){
|
if(fileName==null || fileName.isEmpty()){
|
||||||
Window.alert("You must insert a valid file name!! It cannot be empty!!");
|
Window.alert("You must insert a valid file name!! It cannot be empty!!");
|
||||||
fileNameTextBox.setFocus(true);
|
fileNamePanelTextBox.setFocus(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,20 +188,20 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
fileNameTextBox.addStyleName("fileNameTextBox");
|
fileNamePanelTextBox.addStyleName("fileNamePanelTextBox");
|
||||||
fileNameTextBox.setAlignment(TextAlignment.LEFT);
|
fileNamePanelTextBox.setAlignment(TextAlignment.LEFT);
|
||||||
setFileName(fileName);
|
setFileName(fileName);
|
||||||
|
|
||||||
HTML name = new HTML("Name:");
|
HTML name = new HTML("Name:");
|
||||||
name.addStyleName("htmlSaveName");
|
name.addStyleName("htmlSaveName");
|
||||||
name.getElement().getStyle().setPaddingTop(7.0, Unit.PX);
|
name.getElement().getStyle().setPaddingTop(7.0, Unit.PX);
|
||||||
footerHP.add(name);
|
footerPanelHP.add(name);
|
||||||
footerHP.add(fileNameTextBox);
|
footerPanelHP.add(fileNamePanelTextBox);
|
||||||
footerHP.add(saveButton);
|
footerPanelHP.add(saveButton);
|
||||||
footerHP.addStyleName("footerHP");
|
footerPanelHP.addStyleName("footerPanelHP");
|
||||||
|
|
||||||
mainVP.add(controller.getWorkspaceExplorerPanel());
|
mainVP.add(controller.getWorkspaceExplorerPanel());
|
||||||
mainVP.add(footerHP);
|
mainVP.add(footerPanelHP);
|
||||||
|
|
||||||
add(mainVP);
|
add(mainVP);
|
||||||
addHandlers();
|
addHandlers();
|
||||||
|
@ -225,8 +225,8 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
|
|
||||||
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand () {
|
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand () {
|
||||||
public void execute () {
|
public void execute () {
|
||||||
fileNameTextBox.selectAll();
|
fileNamePanelTextBox.selectAll();
|
||||||
fileNameTextBox.setFocus(true);
|
fileNamePanelTextBox.setFocus(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
if(txt==null)
|
if(txt==null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fileNameTextBox.setValue(txt);
|
fileNamePanelTextBox.setValue(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ public class WorkspaceExplorerSavePanel extends ScrollPanel implements HasWorskp
|
||||||
* @return the file name
|
* @return the file name
|
||||||
*/
|
*/
|
||||||
private String getFileName(){
|
private String getFileName(){
|
||||||
return fileNameTextBox.getValue();
|
return fileNamePanelTextBox.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
|
||||||
|
|
||||||
private void adjustSize(){
|
private void adjustSize(){
|
||||||
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
if(this.getParent()!=null && this.getParent().getElement()!=null)
|
||||||
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel());
|
Util.adjustSize(this.getParent().getElement(), controller.getWsExplorer().getPanel(), 85);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1258,6 +1258,20 @@ a:hover, a:focus {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fileNamePanelTextBox{
|
||||||
|
vertical-align: top !important;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-left: 5px;
|
||||||
|
width: 570px;
|
||||||
|
font-size: 13px !important;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerPanelHP{
|
||||||
|
margin-top: 5px !important;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.htmlSaveName {
|
.htmlSaveName {
|
||||||
display: inline;
|
display: inline;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -1266,6 +1280,6 @@ a:hover, a:focus {
|
||||||
}
|
}
|
||||||
|
|
||||||
.savePanel{
|
.savePanel{
|
||||||
border: 1px solid;
|
/*border: 1px solid;*/
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
}
|
}
|
Loading…
Reference in New Issue