import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.google.gwt.dom.client.*;
+import com.google.gwt.dom.client.Element;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.ResizeEvent;
return getFromOtherPropertiesOrDefault(key, null);
}
+ private static final boolean SHOW_COPYRIGHT;
+ static {
+ final String valueStr = getFromOtherPropertiesOrDefault("SHOW_COPYRIGHT", "true").trim().toLowerCase();
+ SHOW_COPYRIGHT = "true".equals(valueStr);
+ LOG("SHOW_COPYRIGHT = '", valueStr, "' ==> ", SHOW_COPYRIGHT);
+ }
+
public static final String OTHERPROPS_STORAGE_API_URL = getFromOtherPropertiesOrNull("STORAGE_API_URL");
public static final String OTHERPROPS_USER_CATALOGS_API_URL = getFromOtherPropertiesOrNull("USER_CATALOGS_API_URL");
static {
}
}
+ public static String FAVICON_URL = getFromOtherPropertiesOrNull("FAVICON_URL");
+
public interface Style extends CssResource {
String commandAnchor();
}
private void initialize() {
+ // Inject the dynamically provided favicon
+ if(FAVICON_URL != null) {
+ final Document document = Document.get();
+ final Element head = document.getElementsByTagName("head").getItem(0);
+ final LinkElement link = document.createLinkElement();
+ link.setRel("icon");
+ link.setHref(FAVICON_URL);
+ head.appendChild(link);
+ }
+
userCatalogs.updateWithIDAndName("*", "All Pithos users");
lastModified = new Date(); //Initialize if-modified-since value with now.
this.userID = authSplit[0];
this.userToken = authSplit[1];
- String gotoUrl = Window.Location.getParameter("goto");
- if(gotoUrl != null && gotoUrl.length() > 0) {
- Window.Location.assign(gotoUrl);
- return false;
- }
return true;
}
return STORAGE_VIEW_URL;
}
+ public static boolean isShowCopyrightMessage() {
+ return SHOW_COPYRIGHT;
+ }
+
public static String getUserCatalogsURL() {
return USER_CATALOGS_API_URL;
}
return Pithos.getStorageViewURL() + file.getOwnerID() + file.getUri();
}
+ public static String getVersionedFileViewURL(File file, int version) {
+ return getFileViewURL(file) + "?version=" + version;
+ }
+
/**
* History support for folder navigation
* adds a new browser history entry