selectionModels.add(otherSharedTreeSelectionModel);
otherSharedTreeViewModel = new OtherSharedTreeViewModel(Pithos.this, otherSharedTreeSelectionModel);
// #3784 We show it empty...
- otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
+ otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel, true);
trees.insert(otherSharedTreeView, 1);
LOG("Pithos::createOtherSharedTree(), initializing otherSharedTreeViewModel with a callback");
// #3784 ... then remove the empty stuff and add a new view with the populated model
trees.remove(otherSharedTreeView);
- otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel);
+ otherSharedTreeView = new OtherSharedTreeView(otherSharedTreeViewModel, false);
trees.insert(otherSharedTreeView, 1);
treeViews.add(otherSharedTreeView);
scheduleResfresh();
@Source("downArrow.png")
ImageResource closed();
+
+ @Source("gr/grnet/pithos/resources/ajax-loader.gif")
+ ImageResource ajaxLoader();
}
DisclosurePanel panel;
Resources resources;
-
- public PithosDisclosurePanel(final Resources _resources, final String title, boolean open) {
+
+ final boolean ajaxLoader;
+
+ public PithosDisclosurePanel(final Resources _resources, final String title, boolean open) {
+ this(_resources, title, open, false);
+ }
+
+ public PithosDisclosurePanel(final Resources _resources, final String title, boolean open, boolean ajaxLoader) {
+ this.ajaxLoader = ajaxLoader;
+
resources = _resources;
resources.pithosDisclosurePanelCss().ensureInjected();
panel = new DisclosurePanel();
Image img = new Image(resources.icon());
header.add(img);
+ if(ajaxLoader) {
+ final Image alImg = new Image(resources.ajaxLoader());
+ header.add(alImg);
+ }
header.setCellVerticalAlignment(img, HasVerticalAlignment.ALIGN_MIDDLE);
header.setCellWidth(img, "32px");
HTML titleHtml = new HTML(title);
private CellTree tree;
- public OtherSharedTreeView(OtherSharedTreeViewModel viewModel) {
+ public OtherSharedTreeView(OtherSharedTreeViewModel viewModel, boolean ajaxLoader) {
this.model = viewModel;
- PithosDisclosurePanel panel = new PithosDisclosurePanel((Resources) GWT.create(Resources.class), Const.TXT_SHARED_WITH_ME, false);
+ PithosDisclosurePanel panel = new PithosDisclosurePanel((Resources) GWT.create(Resources.class), Const.TXT_SHARED_WITH_ME, false, ajaxLoader);
/*
* Create the tree using the model. We use <code>null</code> as the default
* value of the root node. The default value will be passed to