projects
/
pithos-web-client
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2aa9d5c
)
CSS fun
author
Christos Stathis
<chstath@ebs.gr>
Wed, 19 Oct 2011 13:38:46 +0000
(16:38 +0300)
committer
Christos Stathis
<chstath@ebs.gr>
Wed, 19 Oct 2011 13:38:46 +0000
(16:38 +0300)
src/gr/grnet/pithos/web/client/Pithos.java
patch
|
blob
|
history
src/gr/grnet/pithos/web/client/PithosCellTreeBasic.css
patch
|
blob
|
history
src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
patch
|
blob
|
history
src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
patch
|
blob
|
history
src/gr/grnet/pithos/web/client/grouptree/GroupTreeViewModel.java
patch
|
blob
|
history
src/gr/grnet/pithos/web/public/pithos.css
patch
|
blob
|
history
diff --git
a/src/gr/grnet/pithos/web/client/Pithos.java
b/src/gr/grnet/pithos/web/client/Pithos.java
index
3dde305
..
214135e
100644
(file)
--- a/
src/gr/grnet/pithos/web/client/Pithos.java
+++ b/
src/gr/grnet/pithos/web/client/Pithos.java
@@
-91,6
+91,7
@@
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
@@
-244,6
+245,8
@@
public class Pithos implements EntryPoint, ResizeHandler {
protected AccountResource account;
Folder trash;
protected AccountResource account;
Folder trash;
+
+ List<Composite> treeViews = new ArrayList<Composite>();
@SuppressWarnings("rawtypes") List<SingleSelectionModel> selectionModels = new ArrayList<SingleSelectionModel>();
@SuppressWarnings("rawtypes") List<SingleSelectionModel> selectionModels = new ArrayList<SingleSelectionModel>();
@@
-292,6
+295,8
@@
public class Pithos implements EntryPoint, ResizeHandler {
HorizontalPanel header = new HorizontalPanel();
header.addStyleName("pithos-header");
header.setWidth(contentWidth);
HorizontalPanel header = new HorizontalPanel();
header.addStyleName("pithos-header");
header.setWidth(contentWidth);
+ if (bareContent)
+ header.addStyleName("pithos-header-noframe");
HorizontalPanel leftHeader = new HorizontalPanel();
VerticalPanel uploadButtonPanel = new VerticalPanel();
upload = new Button("Upload File", new ClickHandler() {
HorizontalPanel leftHeader = new HorizontalPanel();
VerticalPanel uploadButtonPanel = new VerticalPanel();
upload = new Button("Upload File", new ClickHandler() {
@@
-355,25
+360,24
@@
public class Pithos implements EntryPoint, ResizeHandler {
if (folderTreeSelectionModel.getSelectedObject() != null) {
deselectOthers(folderTreeView, folderTreeSelectionModel);
applyPermissions(folderTreeSelectionModel.getSelectedObject());
if (folderTreeSelectionModel.getSelectedObject() != null) {
deselectOthers(folderTreeView, folderTreeSelectionModel);
applyPermissions(folderTreeSelectionModel.getSelectedObject());
- folderTreeView.addStyleName("cellTreeWidget-selectedTree");
Folder f = folderTreeSelectionModel.getSelectedObject();
showFiles(f);
}
Folder f = folderTreeSelectionModel.getSelectedObject();
showFiles(f);
}
- else
- folderTreeView.removeStyleName("cellTreeWidget-selectedTree");
}
});
selectionModels.add(folderTreeSelectionModel);
folderTreeViewModel = new FolderTreeViewModel(this, folderTreeSelectionModel);
folderTreeView = new FolderTreeView(folderTreeViewModel);
}
});
selectionModels.add(folderTreeSelectionModel);
folderTreeViewModel = new FolderTreeViewModel(this, folderTreeSelectionModel);
folderTreeView = new FolderTreeView(folderTreeViewModel);
-
+ treeViews.add(folderTreeView);
+
fileList = new FileList(this, images, folderTreeView);
inner.add(fileList);
groupTreeViewModel = new GroupTreeViewModel(this);
groupTreeView = new GroupTreeView(groupTreeViewModel);
fileList = new FileList(this, images, folderTreeView);
inner.add(fileList);
groupTreeViewModel = new GroupTreeViewModel(this);
groupTreeView = new GroupTreeView(groupTreeViewModel);
-
+ treeViews.add(groupTreeView);
+
trees = new VerticalPanel();
trees.setWidth("100%");
trees = new VerticalPanel();
trees.setWidth("100%");
@@
-419,6
+423,8
@@
public class Pithos implements EntryPoint, ResizeHandler {
outer.add(statusPanel);
outer.setCellHorizontalAlignment(statusPanel, HasHorizontalAlignment.ALIGN_CENTER);
}
outer.add(statusPanel);
outer.setCellHorizontalAlignment(statusPanel, HasHorizontalAlignment.ALIGN_CENTER);
}
+ else
+ splitPanel.addStyleName("pithos-splitPanel-noframe");
// Hook the window resize event, so that we can adjust the UI.
Window.addResizeHandler(this);
// Hook the window resize event, so that we can adjust the UI.
Window.addResizeHandler(this);
@@
-492,6
+498,13
@@
public class Pithos implements EntryPoint, ResizeHandler {
@SuppressWarnings({ "rawtypes", "unchecked" })
public void deselectOthers(TreeView _selectedTree, SingleSelectionModel model) {
selectedTree = _selectedTree;
@SuppressWarnings({ "rawtypes", "unchecked" })
public void deselectOthers(TreeView _selectedTree, SingleSelectionModel model) {
selectedTree = _selectedTree;
+
+ for (Composite c : treeViews)
+ if (c.equals(selectedTree))
+ c.addStyleName("cellTreeWidget-selectedTree");
+ else
+ c.removeStyleName("cellTreeWidget-selectedTree");
+
for (SingleSelectionModel s : selectionModels)
if (!s.equals(model))
s.setSelected(s.getSelectedObject(), false);
for (SingleSelectionModel s : selectionModels)
if (!s.equals(model))
s.setSelected(s.getSelectedObject(), false);
@@
-710,7
+723,7
@@
public class Pithos implements EntryPoint, ResizeHandler {
protected void onWindowResized(int height) {
// Adjust the split panel to take up the available room in the window.
protected void onWindowResized(int height) {
// Adjust the split panel to take up the available room in the window.
- int newHeight = height - splitPanel.getAbsoluteTop() - 60;
+ int newHeight = height - splitPanel.getAbsoluteTop();
if (newHeight < 1)
newHeight = 1;
splitPanel.setHeight("" + newHeight);
if (newHeight < 1)
newHeight = 1;
splitPanel.setHeight("" + newHeight);
@@
-1116,10
+1129,7
@@
public class Pithos implements EntryPoint, ResizeHandler {
deselectOthers(mysharedTreeView, mysharedTreeSelectionModel);
upload.setEnabled(false);
updateSharedFolder(mysharedTreeSelectionModel.getSelectedObject(), true);
deselectOthers(mysharedTreeView, mysharedTreeSelectionModel);
upload.setEnabled(false);
updateSharedFolder(mysharedTreeSelectionModel.getSelectedObject(), true);
- mysharedTreeView.addStyleName("cellTreeWidget-selectedTree");
}
}
- else
- mysharedTreeView.removeStyleName("cellTreeWidget-selectedTree");
}
});
selectionModels.add(mysharedTreeSelectionModel);
}
});
selectionModels.add(mysharedTreeSelectionModel);
@@
-1129,7
+1139,8
@@
public class Pithos implements EntryPoint, ResizeHandler {
@Override
public void execute() {
mysharedTreeView = new MysharedTreeView(mysharedTreeViewModel);
@Override
public void execute() {
mysharedTreeView = new MysharedTreeView(mysharedTreeViewModel);
- trees.insert(mysharedTreeView, 3);
+ trees.insert(mysharedTreeView, 2);
+ treeViews.add(mysharedTreeView);
createOtherSharedTree();
}
});
createOtherSharedTree();
}
});
@@
-1142,12
+1153,10
@@
public class Pithos implements EntryPoint, ResizeHandler {
public void onSelectionChange(@SuppressWarnings("unused") SelectionChangeEvent event) {
if (otherSharedTreeSelectionModel.getSelectedObject() != null) {
deselectOthers(otherSharedTreeView, otherSharedTreeSelectionModel);
public void onSelectionChange(@SuppressWarnings("unused") SelectionChangeEvent event) {
if (otherSharedTreeSelectionModel.getSelectedObject() != null) {
deselectOthers(otherSharedTreeView, otherSharedTreeSelectionModel);
+ otherSharedTreeView.addStyleName("cellTreeWidget-selectedTree");
applyPermissions(otherSharedTreeSelectionModel.getSelectedObject());
updateOtherSharedFolder(otherSharedTreeSelectionModel.getSelectedObject(), true);
applyPermissions(otherSharedTreeSelectionModel.getSelectedObject());
updateOtherSharedFolder(otherSharedTreeSelectionModel.getSelectedObject(), true);
- otherSharedTreeView.addStyleName("cellTreeWidget-selectedTree");
}
}
- else
- otherSharedTreeView.removeStyleName("cellTreeWidget-selectedTree");
}
});
selectionModels.add(otherSharedTreeSelectionModel);
}
});
selectionModels.add(otherSharedTreeSelectionModel);
@@
-1157,7
+1166,8
@@
public class Pithos implements EntryPoint, ResizeHandler {
@Override
public void execute() {
otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
@Override
public void execute() {
otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
- trees.insert(otherSharedTreeView, 4);
+ trees.insert(otherSharedTreeView, 3);
+ treeViews.add(otherSharedTreeView);
}
});
}
}
});
}
diff --git
a/src/gr/grnet/pithos/web/client/PithosCellTreeBasic.css
b/src/gr/grnet/pithos/web/client/PithosCellTreeBasic.css
index
9f66186
..
c82fce2
100644
(file)
--- a/
src/gr/grnet/pithos/web/client/PithosCellTreeBasic.css
+++ b/
src/gr/grnet/pithos/web/client/PithosCellTreeBasic.css
@@
-44,6
+44,10
@@
outline: none;
}
outline: none;
}
+.cellTreeItemValue img {
+ vertical-align: middle;
+}
+
.cellTreeItem:HOVER {
background-color: #A1C8DB;
}
.cellTreeItem:HOVER {
background-color: #A1C8DB;
}
diff --git
a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
index
9a6cc61
..
72d59fd
100644
(file)
--- a/
src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
+++ b/
src/gr/grnet/pithos/web/client/foldertree/FolderTreeView.java
@@
-145,7
+145,7
@@
public class FolderTreeView extends Composite implements TreeView {
static interface Templates extends SafeHtmlTemplates {
public Templates INSTANCE = GWT.create(Templates.class);
static interface Templates extends SafeHtmlTemplates {
public Templates INSTANCE = GWT.create(Templates.class);
- @Template("<span class='pithos-folderLabel'>{0}</span>")
+ @Template("<span style='vertical-align: middle;'>{0}</span>")
public SafeHtml nameSpan(String name);
@Template("<span class='pithos-folderLabel'>{0}</span>")
public SafeHtml nameSpan(String name);
@Template("<span class='pithos-folderLabel'>{0}</span>")
diff --git
a/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
b/src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
index
085b496
..
abcc81d
100644
(file)
--- a/
src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
+++ b/
src/gr/grnet/pithos/web/client/foldertree/FolderTreeViewModel.java
@@
-59,6
+59,7
@@
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.view.client.AsyncDataProvider;
import com.google.gwt.view.client.HasData;
import com.google.gwt.view.client.ListDataProvider;
import com.google.gwt.view.client.AsyncDataProvider;
import com.google.gwt.view.client.HasData;
import com.google.gwt.view.client.ListDataProvider;
diff --git
a/src/gr/grnet/pithos/web/client/grouptree/GroupTreeViewModel.java
b/src/gr/grnet/pithos/web/client/grouptree/GroupTreeViewModel.java
index
201e46e
..
bf70121
100644
(file)
--- a/
src/gr/grnet/pithos/web/client/grouptree/GroupTreeViewModel.java
+++ b/
src/gr/grnet/pithos/web/client/grouptree/GroupTreeViewModel.java
@@
-140,11
+140,8
@@
public class GroupTreeViewModel implements TreeViewModel {
public void onSelectionChange(SelectionChangeEvent event) {
if (rootSelectionModel.getSelectedObject() != null) {
app.deselectOthers(app.getGroupTreeView(), rootSelectionModel);
public void onSelectionChange(SelectionChangeEvent event) {
if (rootSelectionModel.getSelectedObject() != null) {
app.deselectOthers(app.getGroupTreeView(), rootSelectionModel);
- app.getGroupTreeView().addStyleName("cellTreeWidget-selectedTree");
app.showFiles(new HashSet<File>());
}
app.showFiles(new HashSet<File>());
}
- else
- app.getGroupTreeView().removeStyleName("cellTreeWidget-selectedTree");
}
});
}
});
diff --git
a/src/gr/grnet/pithos/web/public/pithos.css
b/src/gr/grnet/pithos/web/public/pithos.css
index
f26ca67
..
1c2914f
100644
(file)
--- a/
src/gr/grnet/pithos/web/public/pithos.css
+++ b/
src/gr/grnet/pithos/web/public/pithos.css
@@
-4,6
+4,7
@@
body {
font-size: 16px;
margin: 8px;
margin-top: 3px;
font-size: 16px;
margin: 8px;
margin-top: 3px;
+ background-color: transparent;
}
table td {
}
table td {
@@
-343,6
+344,10
@@
table.pithos-permList.props-labels {
margin-bottom: 34px;
}
margin-bottom: 34px;
}
+.pithos-splitPanel-noframe {
+ margin-bottom: 0;
+}
+
/* Use the background color for the splitter. */
.gwt-HorizontalSplitPanel .hsplitter {
cursor: move;
/* Use the background color for the splitter. */
.gwt-HorizontalSplitPanel .hsplitter {
cursor: move;
@@
-405,7
+410,10
@@
table.pithos-permList.props-labels {
margin-top: 34;
}
margin-top: 34;
}
+.pithos-header-noframe {
+ margin-top: 0;
+}
+
.cellTreeWidget-selectedTree {
background-color: #a1c8da;
}
.cellTreeWidget-selectedTree {
background-color: #a1c8da;
}
-