Removed dependency on Google Gears to allow it to work on safari. Fixed issues with opacity on IE. There are still some issues with viewing on IE.
This commit is contained in:
parent
7d5244dcbb
commit
e12efbc9b3
@ -1,4 +1,4 @@
|
||||
#Thu Feb 11 15:27:06 NZDT 2010
|
||||
#Wed Mar 17 15:58:06 NZDT 2010
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=gwt-servlet.jar
|
||||
|
@ -9,8 +9,8 @@
|
||||
<entry-point class='com.gloopics.g3viewer.client.G3Viewer'/><inherits
|
||||
name="com.allen_sauer.gwt.dnd.gwt-dnd" /><inherits name="com.google.gwt.gears.Gears" />
|
||||
|
||||
<replace-with class="com.gloopics.g3viewer.client.NoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.G3Viewer"/>
|
||||
<replace-with class="com.gloopics.g3viewer.client.UploadControlNoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.UploadControl"/>
|
||||
<when-property-is name="gears.installed" value="false"/>
|
||||
</replace-with>
|
||||
|
||||
@ -29,5 +29,10 @@
|
||||
<when-property-is name="user.agent" value="ie8" />
|
||||
</any>
|
||||
</replace-with>
|
||||
|
||||
<replace-with class="com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactoryNoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactory"/>
|
||||
<when-property-is name="gears.installed" value="false"/>
|
||||
</replace-with>
|
||||
|
||||
</module>
|
||||
|
@ -30,458 +30,437 @@ import com.google.gwt.user.client.ui.TreeItem;
|
||||
|
||||
/**
|
||||
* encapsulates an album
|
||||
*
|
||||
* @author User
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Album extends TreeItem {
|
||||
|
||||
|
||||
private final int m_ID;
|
||||
|
||||
|
||||
private String m_Title;
|
||||
|
||||
|
||||
|
||||
private final G3Viewer m_Container;
|
||||
|
||||
private final View m_View;
|
||||
|
||||
|
||||
private final View m_View;
|
||||
|
||||
private final Label m_Label;
|
||||
|
||||
|
||||
private String m_Sort;
|
||||
|
||||
|
||||
private final List<Item> m_Items = new ArrayList<Item>();
|
||||
|
||||
|
||||
private final Map<Integer, Item> m_IDtoItem = new HashMap<Integer, Item>();
|
||||
|
||||
private final Map<Integer, Album> m_IDtoAlbum = new HashMap<Integer, Album>();
|
||||
|
||||
|
||||
private final Set<UploadFile> m_AllUploads = new HashSet<UploadFile>();
|
||||
|
||||
|
||||
private final AlbumTreeDropController m_DropController;
|
||||
|
||||
|
||||
private final UploadControl m_UploadControl;
|
||||
|
||||
public Album(JSONObject jsonObject, G3Viewer a_Container)
|
||||
{
|
||||
|
||||
public Album(JSONObject jsonObject, G3Viewer a_Container) {
|
||||
m_UploadControl = a_Container.getUploadControl();
|
||||
m_ID = Utils.extractId(jsonObject.get("id"));
|
||||
m_Title = ((JSONString)jsonObject.get("title")).stringValue();
|
||||
m_Sort = ((JSONString)jsonObject.get("sort")).stringValue();
|
||||
|
||||
m_Title = ((JSONString) jsonObject.get("title")).stringValue();
|
||||
m_Sort = ((JSONString) jsonObject.get("sort")).stringValue();
|
||||
|
||||
m_Container = a_Container;
|
||||
m_View = a_Container.getView();
|
||||
m_DropController = new AlbumTreeDropController(this);
|
||||
m_DropController = new AlbumTreeDropController(this);
|
||||
m_Label = initComponents();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Album(G3Viewer a_Container)
|
||||
{
|
||||
public Album(G3Viewer a_Container) {
|
||||
m_UploadControl = a_Container.getUploadControl();
|
||||
m_ID = 1;
|
||||
m_Title = "Root";
|
||||
m_Container = a_Container;
|
||||
m_View = a_Container.getView();
|
||||
m_Sort = "Unknown";
|
||||
m_DropController = new AlbumTreeDropController(this);
|
||||
m_DropController = new AlbumTreeDropController(this);
|
||||
m_Label = initComponents();
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void updateValues(JSONValue a_Jso){
|
||||
|
||||
public void updateValues(JSONValue a_Jso) {
|
||||
JSONObject jso = a_Jso.isObject();
|
||||
if (jso != null){
|
||||
m_Title = ((JSONString)jso.get("title")).stringValue();
|
||||
if (jso != null) {
|
||||
m_Title = ((JSONString) jso.get("title")).stringValue();
|
||||
String oldSort = m_Sort;
|
||||
m_Sort = ((JSONString)jso.get("sort")).stringValue();
|
||||
if (!oldSort.equals(m_Sort)){
|
||||
if (m_View.getCurrentAlbum() == this)
|
||||
{
|
||||
m_Sort = ((JSONString) jso.get("sort")).stringValue();
|
||||
if (!oldSort.equals(m_Sort)) {
|
||||
if (m_View.getCurrentAlbum() == this) {
|
||||
select();
|
||||
}
|
||||
}
|
||||
m_Label.setText(m_Title);
|
||||
}
|
||||
}
|
||||
|
||||
public void refresh(){
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getId(),
|
||||
|
||||
public void refresh() {
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_ITEM_URL + getId(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
updateValues(aValue);
|
||||
}
|
||||
},false,true);
|
||||
}, false, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void showPopupMenu(Event event){
|
||||
|
||||
public void showPopupMenu(Event event) {
|
||||
m_Label.addStyleName("popped");
|
||||
final PopupPanel popupPanel = new PopupPanel(true);
|
||||
final PopupPanel popupPanel = new PopupPanel(true);
|
||||
popupPanel.setAnimationEnabled(true);
|
||||
MenuBar popupMenuBar = new MenuBar(true);
|
||||
|
||||
MenuItem editItem = new MenuItem("Edit Album", true, new Command() {
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
m_Container.doDialog("index.php/form/edit/albums/" + m_ID, new HttpDialogHandler() {
|
||||
@Override
|
||||
public void success(String aResult) {
|
||||
refresh();
|
||||
|
||||
}
|
||||
});
|
||||
m_Container.doDialog("index.php/form/edit/albums/" + m_ID,
|
||||
new HttpDialogHandler() {
|
||||
@Override
|
||||
public void success(String aResult) {
|
||||
refresh();
|
||||
|
||||
}
|
||||
});
|
||||
popupPanel.hide();
|
||||
|
||||
}
|
||||
});
|
||||
MenuItem uploadPhotos = new MenuItem("Upload Photos", true, new Command() {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
uploadFiles();
|
||||
popupPanel.hide();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem addAlbum = new MenuItem("Add Album", true, new Command() {
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
m_Container.doDialog("index.php/form/add/albums/" + m_ID + "?type=album", new HttpDialogHandler() {
|
||||
m_Container.doDialog("index.php/form/add/albums/" + m_ID
|
||||
+ "?type=album", new HttpDialogHandler() {
|
||||
@Override
|
||||
public void success(String aResult) {
|
||||
expand();
|
||||
m_View.getCurrentAlbum().select();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
popupPanel.hide();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem userPermissions = new MenuItem("User Permissions", true, new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
m_Container.doDialog("index.php/permissions/browse/" + m_ID , new HttpDialogHandler() {
|
||||
|
||||
MenuItem userPermissions = new MenuItem("User Permissions", true,
|
||||
new Command() {
|
||||
@Override
|
||||
public void success(String aResult) {
|
||||
public void execute() {
|
||||
m_Container.doDialog("index.php/permissions/browse/"
|
||||
+ m_ID, new HttpDialogHandler() {
|
||||
@Override
|
||||
public void success(String aResult) {
|
||||
}
|
||||
});
|
||||
|
||||
popupPanel.hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
popupPanel.hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
popupPanel.setStyleName("popup");
|
||||
editItem.addStyleName("popup-item");
|
||||
addAlbum.addStyleName("popup-item");
|
||||
uploadPhotos.addStyleName("popup-item");
|
||||
userPermissions.addStyleName("popup-item");
|
||||
|
||||
|
||||
popupMenuBar.addItem(uploadPhotos);
|
||||
|
||||
if (m_Container.isUploadEnabled()) {
|
||||
MenuItem uploadPhotos = new MenuItem("Upload Photos", true,
|
||||
new Command() {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
uploadFiles();
|
||||
popupPanel.hide();
|
||||
|
||||
}
|
||||
});
|
||||
uploadPhotos.addStyleName("popup-item");
|
||||
popupMenuBar.addItem(uploadPhotos);
|
||||
}
|
||||
|
||||
popupMenuBar.addItem(editItem);
|
||||
popupMenuBar.addItem(addAlbum);
|
||||
popupMenuBar.addItem(userPermissions);
|
||||
|
||||
|
||||
|
||||
popupMenuBar.setVisible(true);
|
||||
popupPanel.add(popupMenuBar);
|
||||
|
||||
|
||||
int x = DOM.eventGetClientX(event);
|
||||
int y = DOM.eventGetClientY(event);
|
||||
popupPanel.setPopupPosition(x, y);
|
||||
popupPanel.addCloseHandler(new CloseHandler<PopupPanel>() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClose(CloseEvent<PopupPanel> event) {
|
||||
|
||||
|
||||
m_Label.removeStyleName("popped");
|
||||
}
|
||||
});
|
||||
|
||||
popupPanel.show();
|
||||
|
||||
popupPanel.show();
|
||||
}
|
||||
|
||||
private Label initComponents()
|
||||
{
|
||||
|
||||
private Label initComponents() {
|
||||
Label toReturn = new Label(m_Title);
|
||||
toReturn.addStyleName("Tree-Album");
|
||||
setWidget(toReturn);
|
||||
m_Container.getDragController().registerDropController(m_DropController);
|
||||
m_Container.getDragController()
|
||||
.registerDropController(m_DropController);
|
||||
expand();
|
||||
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
{
|
||||
|
||||
public int getId() {
|
||||
return m_ID;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Adds the albums in the json response
|
||||
* TreeItem.
|
||||
* Adds the albums in the json response TreeItem.
|
||||
*/
|
||||
private void addAlbums(JSONValue jsonValue)
|
||||
{
|
||||
JSONArray jsonArray = (JSONArray)jsonValue;
|
||||
Set<Integer> allAlbums = new HashSet<Integer>(m_IDtoAlbum.keySet());
|
||||
for (int i = 0; i < jsonArray.size(); ++i)
|
||||
{
|
||||
JSONObject jso = (JSONObject)jsonArray.get(i);
|
||||
|
||||
|
||||
int id = Utils.extractId(jso.get("id"));
|
||||
|
||||
if (m_IDtoAlbum.containsKey(id))
|
||||
{
|
||||
private void addAlbums(JSONValue jsonValue) {
|
||||
JSONArray jsonArray = (JSONArray) jsonValue;
|
||||
Set<Integer> allAlbums = new HashSet<Integer>(m_IDtoAlbum.keySet());
|
||||
for (int i = 0; i < jsonArray.size(); ++i) {
|
||||
JSONObject jso = (JSONObject) jsonArray.get(i);
|
||||
|
||||
int id = Utils.extractId(jso.get("id"));
|
||||
|
||||
if (m_IDtoAlbum.containsKey(id)) {
|
||||
m_IDtoAlbum.get(id).updateValues(jso);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Album album = new Album(jso, m_Container);
|
||||
m_IDtoAlbum.put(id, album);
|
||||
addItem(album);
|
||||
}
|
||||
allAlbums.remove(id);
|
||||
}
|
||||
for (Integer id : allAlbums){
|
||||
Album a = m_IDtoAlbum.remove(id);
|
||||
a.cleanup();
|
||||
|
||||
|
||||
removeItem(a);
|
||||
}
|
||||
}
|
||||
for (Integer id : allAlbums) {
|
||||
Album a = m_IDtoAlbum.remove(id);
|
||||
a.cleanup();
|
||||
|
||||
removeItem(a);
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanup()
|
||||
{
|
||||
m_Container.getDragController().unregisterDropController(m_DropController);
|
||||
for (int i = 0; i < getChildCount(); i++){
|
||||
|
||||
public void cleanup() {
|
||||
m_Container.getDragController().unregisterDropController(
|
||||
m_DropController);
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
((Album) getChild(i)).cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* moves the given array of ids to this album
|
||||
*/
|
||||
public void moveTo(JSONArray a_Ids){
|
||||
public void moveTo(JSONArray a_Ids) {
|
||||
Loading.getInstance().loading("Moving Items..");
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.MOVE_TO_ALBUM_URL + getId() + "?sourceids=" + a_Ids.toString(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
expand();
|
||||
m_View.getCurrentAlbum().expand();
|
||||
m_View.getCurrentAlbum().select();
|
||||
}
|
||||
},true,true);
|
||||
m_Container.doJSONRequest(G3Viewer.MOVE_TO_ALBUM_URL + getId()
|
||||
+ "?sourceids=" + a_Ids.toString(), new HttpSuccessHandler() {
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
expand();
|
||||
m_View.getCurrentAlbum().expand();
|
||||
m_View.getCurrentAlbum().select();
|
||||
}
|
||||
}, true, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* rearranges the albums
|
||||
*/
|
||||
|
||||
public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before){
|
||||
public void rearrangeTo(JSONArray a_Ids, Item m_CompareTo, boolean m_Before) {
|
||||
Loading.getInstance().loading("Re-arranging..");
|
||||
String bora = m_Before?"before":"after";
|
||||
String bora = m_Before ? "before" : "after";
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.REARRANGE_URL + m_CompareTo.getID() + "/" + bora
|
||||
+ "?sourceids=" + a_Ids.toString(),
|
||||
m_Container.doJSONRequest(G3Viewer.REARRANGE_URL + m_CompareTo.getID()
|
||||
+ "/" + bora + "?sourceids=" + a_Ids.toString(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
m_View.getCurrentAlbum().select();
|
||||
}
|
||||
},true,true);
|
||||
}, true, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* returns the album with the given id
|
||||
*/
|
||||
public void selectSubAlbum(int a_Id){
|
||||
for (int i = 0; i < getChildCount(); i++)
|
||||
{
|
||||
public void selectSubAlbum(int a_Id) {
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
Album ab = ((Album) getChild(i));
|
||||
if (ab.m_ID == a_Id)
|
||||
{
|
||||
if (ab.m_ID == a_Id) {
|
||||
ab.select();
|
||||
m_Container.getTree().ensureSelected(ab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fetch the requested URL.
|
||||
*/
|
||||
public void expand() {
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_ALBUM_URL + getId(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
addAlbums(aValue);
|
||||
}
|
||||
},false,true);
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_ALBUM_URL + getId(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
addAlbums(aValue);
|
||||
}
|
||||
}, false, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void select() {
|
||||
Loading.getInstance().loading("Loading Contents..");
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_CHILDREN_URL + getId(),
|
||||
m_Container.doJSONRequest(G3Viewer.VIEW_CHILDREN_URL + getId(),
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void success(JSONValue aValue) {
|
||||
viewAlbum(aValue);
|
||||
}
|
||||
},false,true);
|
||||
}, false, true);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* view Album contents
|
||||
*/
|
||||
private void viewAlbum(JSONValue a_Value){
|
||||
|
||||
JSONArray jsonArray = (JSONArray)a_Value;
|
||||
|
||||
Item item = null;
|
||||
int id;
|
||||
JSONObject jso;
|
||||
|
||||
m_Items.clear();
|
||||
|
||||
for (int i = 0; i < jsonArray.size(); ++i)
|
||||
{
|
||||
jso = (JSONObject)jsonArray.get(i);
|
||||
id = Utils.extractId(jso.get("id"));
|
||||
|
||||
if (m_IDtoItem.containsKey(id)){
|
||||
item = m_IDtoItem.get(id);
|
||||
item.updateValues(jso);
|
||||
}
|
||||
else
|
||||
{
|
||||
item =new Item(this, jso, m_Container);
|
||||
m_IDtoItem.put(id, item);
|
||||
|
||||
if (item.isAlbum()){
|
||||
linkAlbum(item);
|
||||
}
|
||||
}
|
||||
m_Items.add(item);
|
||||
|
||||
}
|
||||
/*
|
||||
* view Album contents
|
||||
*/
|
||||
private void viewAlbum(JSONValue a_Value) {
|
||||
|
||||
m_View.setAlbum(this);
|
||||
addPendingDownloads();
|
||||
}
|
||||
JSONArray jsonArray = (JSONArray) a_Value;
|
||||
|
||||
public List<Item> getItems()
|
||||
{
|
||||
return m_Items;
|
||||
}
|
||||
|
||||
public void linkAlbum(Item a_Item){
|
||||
// link album
|
||||
int id = a_Item.getID();
|
||||
Album child;
|
||||
for (int j = 0 ; j < getChildCount(); j++){
|
||||
child = (Album) getChild(j);
|
||||
if (child.m_ID == id){
|
||||
a_Item.setLinkedAlbum(child);
|
||||
j = getChildCount();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isManualSort(){
|
||||
return m_Sort.equalsIgnoreCase("weight");
|
||||
}
|
||||
Item item = null;
|
||||
int id;
|
||||
JSONObject jso;
|
||||
|
||||
m_Items.clear();
|
||||
|
||||
for (int i = 0; i < jsonArray.size(); ++i) {
|
||||
jso = (JSONObject) jsonArray.get(i);
|
||||
id = Utils.extractId(jso.get("id"));
|
||||
|
||||
if (m_IDtoItem.containsKey(id)) {
|
||||
item = m_IDtoItem.get(id);
|
||||
item.updateValues(jso);
|
||||
} else {
|
||||
item = new Item(this, jso, m_Container);
|
||||
m_IDtoItem.put(id, item);
|
||||
|
||||
if (item.isAlbum()) {
|
||||
linkAlbum(item);
|
||||
}
|
||||
}
|
||||
m_Items.add(item);
|
||||
|
||||
}
|
||||
|
||||
m_View.setAlbum(this);
|
||||
addPendingDownloads();
|
||||
}
|
||||
|
||||
public List<Item> getItems() {
|
||||
return m_Items;
|
||||
}
|
||||
|
||||
public void linkAlbum(Item a_Item) {
|
||||
// link album
|
||||
int id = a_Item.getID();
|
||||
Album child;
|
||||
for (int j = 0; j < getChildCount(); j++) {
|
||||
child = (Album) getChild(j);
|
||||
if (child.m_ID == id) {
|
||||
a_Item.setLinkedAlbum(child);
|
||||
j = getChildCount();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isManualSort() {
|
||||
return m_Sort.equalsIgnoreCase("weight");
|
||||
}
|
||||
|
||||
public void uploadFiles() {
|
||||
Desktop desktop = Factory.getInstance().createDesktop();
|
||||
|
||||
desktop.openFiles(new OpenFilesHandler() {
|
||||
|
||||
public void onOpenFiles(OpenFilesEvent event) {
|
||||
uploadFiles(event.getFiles());
|
||||
}
|
||||
}, false);
|
||||
|
||||
}
|
||||
|
||||
public void uploadFiles(final File[] files){
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.RESIZE_DETAILS_URL, new HttpSuccessHandler() {
|
||||
|
||||
public void success(JSONValue a_Value) {
|
||||
JSONObject jso = a_Value.isObject();
|
||||
if (jso != null) {
|
||||
|
||||
ResizeOptions ro = new ResizeOptions(jso);
|
||||
UploadFile uf;
|
||||
for (File file : files){
|
||||
uf = m_UploadControl.createUploadFile(Album.this, file, ro);
|
||||
m_AllUploads.add(uf);
|
||||
m_View.addToView(uf);
|
||||
}
|
||||
m_Container.updateInformation();
|
||||
}
|
||||
desktop.openFiles(new OpenFilesHandler() {
|
||||
|
||||
public void onOpenFiles(OpenFilesEvent event) {
|
||||
uploadFiles(event.getFiles());
|
||||
}
|
||||
},false,true);
|
||||
|
||||
|
||||
}, false);
|
||||
|
||||
}
|
||||
|
||||
public void removeUpload(UploadFile a_Uf)
|
||||
{
|
||||
|
||||
public void uploadFiles(final File[] files) {
|
||||
|
||||
m_Container.doJSONRequest(G3Viewer.RESIZE_DETAILS_URL,
|
||||
new HttpSuccessHandler() {
|
||||
|
||||
public void success(JSONValue a_Value) {
|
||||
JSONObject jso = a_Value.isObject();
|
||||
if (jso != null) {
|
||||
|
||||
ResizeOptions ro = new ResizeOptions(jso);
|
||||
UploadFile uf;
|
||||
for (File file : files) {
|
||||
uf = m_UploadControl.createUploadFile(
|
||||
Album.this, file, ro);
|
||||
m_AllUploads.add(uf);
|
||||
m_View.addToView(uf);
|
||||
}
|
||||
m_Container.updateInformation();
|
||||
}
|
||||
}
|
||||
}, false, true);
|
||||
|
||||
}
|
||||
|
||||
public void removeUpload(UploadFile a_Uf) {
|
||||
m_AllUploads.remove(a_Uf);
|
||||
}
|
||||
|
||||
public void replaceUpload(UploadFile a_Uf, JSONValue a_Return)
|
||||
{
|
||||
public void replaceUpload(UploadFile a_Uf, JSONValue a_Return) {
|
||||
m_AllUploads.remove(a_Uf);
|
||||
|
||||
|
||||
JSONObject jo = a_Return.isObject();
|
||||
|
||||
if (jo != null){
|
||||
Item item = new Item(this,jo,m_Container);
|
||||
if (jo != null) {
|
||||
Item item = new Item(this, jo, m_Container);
|
||||
m_IDtoItem.put(item.getID(), item);
|
||||
m_Items.add(item);
|
||||
|
||||
if (m_View.getCurrentAlbum() == this){
|
||||
|
||||
if (m_View.getCurrentAlbum() == this) {
|
||||
m_View.replaceInView(a_Uf, item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_View.getCurrentAlbum() == this){
|
||||
} else {
|
||||
if (m_View.getCurrentAlbum() == this) {
|
||||
m_View.removeFromView(a_Uf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addPendingDownloads()
|
||||
{
|
||||
for (UploadFile uf: m_AllUploads)
|
||||
{
|
||||
|
||||
public void addPendingDownloads() {
|
||||
for (UploadFile uf : m_AllUploads) {
|
||||
m_View.addToView(uf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,9 +17,9 @@ package com.gloopics.g3viewer.client;
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.dnd.client.PickupDragController;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.InputElement;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.http.client.RequestBuilder;
|
||||
@ -239,7 +239,8 @@ public class G3Viewer {
|
||||
m_DragController.setBehaviorMultipleSelection(true);
|
||||
m_DragController.setBehaviorDragStartSensitivity(5);
|
||||
m_DragController.setBehaviorDragProxy(true);
|
||||
m_UploadControl = new UploadControl(this);
|
||||
m_UploadControl = (UploadControl)GWT.create(UploadControl.class);
|
||||
m_UploadControl.init(this);
|
||||
m_InfoBar = new InformationBar(this, m_UploadControl);
|
||||
m_Tree = new AlbumTree(this);
|
||||
|
||||
@ -252,6 +253,11 @@ public class G3Viewer {
|
||||
return m_UploadControl;
|
||||
}
|
||||
|
||||
public boolean isUploadEnabled()
|
||||
{
|
||||
return m_UploadControl.isUploadEnabled();
|
||||
}
|
||||
|
||||
public static String getCSRF()
|
||||
{
|
||||
return m_CSRF;
|
||||
|
@ -8,6 +8,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
|
||||
public class InformationBar extends FlowPanel{
|
||||
@ -26,7 +27,10 @@ public class InformationBar extends FlowPanel{
|
||||
}
|
||||
|
||||
public void initializeForm(){
|
||||
if (m_UploadControl.isUploadEnabled())
|
||||
{
|
||||
Anchor button = new Anchor("Upload Options");
|
||||
button.addStyleName("up-options");
|
||||
button.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
@ -45,6 +49,11 @@ public class InformationBar extends FlowPanel{
|
||||
|
||||
updateInformation();
|
||||
add(m_Label);
|
||||
}
|
||||
else
|
||||
{
|
||||
add(new HTML("Please install <a href=\"http://gears.google.com\">Google Gears</a> to allow upload"));
|
||||
}
|
||||
}
|
||||
|
||||
public void updateInformation()
|
||||
|
@ -126,7 +126,10 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
||||
|
||||
if (m_IsAlbum)
|
||||
{
|
||||
((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this);
|
||||
if (m_Container.isUploadEnabled())
|
||||
{
|
||||
((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
package com.gloopics.g3viewer.client;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
|
||||
public class NoGears implements EntryPoint {
|
||||
public void onModuleLoad() {
|
||||
RootPanel rootPanel = RootPanel.get("main");
|
||||
rootPanel.add(new HTML(
|
||||
"<font color=\"red\">This application requires Google Gears. To install please visit <a href=\"http://gears.google.com/\">gears.google.com</a> and follow the installation instructions.</font>"));
|
||||
}
|
||||
}
|
@ -17,9 +17,10 @@ public class UploadControl {
|
||||
private boolean m_Running = false;
|
||||
private boolean m_PrepareRunning = false;
|
||||
|
||||
private final G3Viewer m_Container;
|
||||
private G3Viewer m_Container;
|
||||
|
||||
public UploadControl(G3Viewer a_Container){
|
||||
public void init(G3Viewer a_Container)
|
||||
{
|
||||
m_Container = a_Container;
|
||||
}
|
||||
|
||||
@ -104,4 +105,8 @@ public class UploadControl {
|
||||
|
||||
}
|
||||
|
||||
public boolean isUploadEnabled(){
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.gloopics.g3viewer.client;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.gears.client.desktop.File;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
|
||||
public class UploadControlNoGears extends UploadControl{
|
||||
public UploadFile createUploadFile(Album a_Album, File a_File, ResizeOptions a_ResizeOptions)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void init(G3Viewer a_Container)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void cleanupUpload(UploadFile uf)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int size()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void finishedUploadWithError(UploadFile uf)
|
||||
{
|
||||
}
|
||||
|
||||
public void finishedUpload(UploadFile uf)
|
||||
{
|
||||
}
|
||||
|
||||
private void next()
|
||||
{
|
||||
}
|
||||
|
||||
private void prepareNext()
|
||||
{
|
||||
}
|
||||
|
||||
public void finishedPrepare(UploadFile a_UploadFile)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public boolean isUploadEnabled(){
|
||||
return false;
|
||||
}
|
||||
}
|
@ -42,7 +42,10 @@ public class View extends FlowPanel implements DesktopDroppableWidget{
|
||||
|
||||
public View(G3Viewer a_Container){
|
||||
m_Container = a_Container;
|
||||
((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this);
|
||||
if (m_Container.isUploadEnabled())
|
||||
{
|
||||
((DndDesktopFactory)GWT.create(DndDesktopFactory.class)).getInstance(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
public interface DesktopDrop {
|
||||
|
||||
}
|
@ -6,7 +6,7 @@ import com.google.gwt.gears.client.desktop.Desktop;
|
||||
import com.google.gwt.gears.client.desktop.File;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public abstract class DesktopDropBase {
|
||||
public abstract class DesktopDropBase implements DesktopDrop{
|
||||
private final DesktopDroppableWidget m_DropFile;
|
||||
protected final Widget m_Widget;
|
||||
private final Desktop m_Desktop;
|
||||
|
@ -1,19 +1,12 @@
|
||||
package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.gears.client.Factory;
|
||||
import com.google.gwt.gears.client.desktop.Desktop;
|
||||
import com.google.gwt.gears.client.desktop.File;
|
||||
import com.google.gwt.user.client.Window.Navigator;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class DesktopDropFile extends DesktopDropBase{
|
||||
|
||||
public DesktopDropFile(DesktopDroppableWidget a_Widget){
|
||||
super(a_Widget);
|
||||
String nav = Navigator.getUserAgent().toLowerCase();
|
||||
|
||||
addDropEvents(m_Widget.getElement());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
|
||||
public class DesktopDropFileIE extends DesktopDropBase{
|
||||
|
@ -2,7 +2,7 @@ package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
public class DndDesktopFactory {
|
||||
|
||||
public DesktopDropBase getInstance(DesktopDroppableWidget a_Widget)
|
||||
public DesktopDrop getInstance(DesktopDroppableWidget a_Widget)
|
||||
{
|
||||
return new DesktopDropFile(a_Widget);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
public class DndDesktopFactoryIE extends DndDesktopFactory{
|
||||
|
||||
public DesktopDropBase getInstance(DesktopDroppableWidget a_Widget)
|
||||
public DesktopDrop getInstance(DesktopDroppableWidget a_Widget)
|
||||
{
|
||||
return new DesktopDropFileIE(a_Widget);
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.gloopics.g3viewer.client.dnddesktop;
|
||||
|
||||
public class DndDesktopFactoryNoGears extends DndDesktopFactory{
|
||||
public DesktopDrop getInstance(DesktopDroppableWidget a_Widget)
|
||||
{
|
||||
return new DesktopDrop(){};
|
||||
}
|
||||
}
|
@ -15,8 +15,8 @@
|
||||
.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid;
|
||||
border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;}
|
||||
.infobar div {float:right; }
|
||||
.infobar a {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity = 70);}
|
||||
.infobar .up-options {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);}
|
||||
.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;}
|
||||
.loading-image{z-index:10;}
|
||||
.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;}
|
||||
@ -24,6 +24,8 @@
|
||||
.Tree-Album:hover{text-decoration:underline;}
|
||||
.drop-target{background-color: #91c0ef; color: #000;}
|
||||
|
||||
.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;}
|
||||
|
||||
.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF}
|
||||
|
||||
.dialog fieldset{ border: none; padding: 0px; margin: 0px;}
|
||||
|
9
modules/gwtorganise/war/.htaccess
Normal file
9
modules/gwtorganise/war/.htaccess
Normal file
@ -0,0 +1,9 @@
|
||||
<IfModule mod_expires.c>
|
||||
<Files *.nocache.*>
|
||||
ExpiresDefault "access"
|
||||
</Files>
|
||||
|
||||
<Files *.cache.*>
|
||||
ExpiresDefault "now plus 1 year"
|
||||
</Files>
|
||||
</IfModule>
|
@ -9,8 +9,8 @@
|
||||
<entry-point class='com.gloopics.g3viewer.client.G3Viewer'/><inherits
|
||||
name="com.allen_sauer.gwt.dnd.gwt-dnd" /><inherits name="com.google.gwt.gears.Gears" />
|
||||
|
||||
<replace-with class="com.gloopics.g3viewer.client.NoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.G3Viewer"/>
|
||||
<replace-with class="com.gloopics.g3viewer.client.UploadControlNoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.UploadControl"/>
|
||||
<when-property-is name="gears.installed" value="false"/>
|
||||
</replace-with>
|
||||
|
||||
@ -29,5 +29,10 @@
|
||||
<when-property-is name="user.agent" value="ie8" />
|
||||
</any>
|
||||
</replace-with>
|
||||
|
||||
<replace-with class="com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactoryNoGears">
|
||||
<when-type-is class="com.gloopics.g3viewer.client.dnddesktop.DndDesktopFactory"/>
|
||||
<when-property-is name="gears.installed" value="false"/>
|
||||
</replace-with>
|
||||
|
||||
</module>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15,8 +15,8 @@
|
||||
.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid;
|
||||
border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;}
|
||||
.infobar div {float:right; }
|
||||
.infobar a {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity = 70);}
|
||||
.infobar .up-options {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);}
|
||||
.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;}
|
||||
.loading-image{z-index:10;}
|
||||
.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;}
|
||||
@ -24,6 +24,8 @@
|
||||
.Tree-Album:hover{text-decoration:underline;}
|
||||
.drop-target{background-color: #91c0ef; color: #000;}
|
||||
|
||||
.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;}
|
||||
|
||||
.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF}
|
||||
|
||||
.dialog fieldset{ border: none; padding: 0px; margin: 0px;}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -15,8 +15,8 @@
|
||||
.infobar {background-color: #fff; position: absolute; bottom:0px; border-width: 4px 4px 0 4px; border-style: solid;
|
||||
border-color: #d2e1f6; height: 15px; width: 240px; right: 50px; font-size:10px; padding: 2px 5px 1px 5px;}
|
||||
.infobar div {float:right; }
|
||||
.infobar a {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity = 70);}
|
||||
.infobar .up-options {float:left;}
|
||||
.loading{position:absolute; top:0px; left:0px; width:100%; height: 100%; background-color:#FFF; opacity: 0.7; filter: alpha(opacity=70);}
|
||||
.loading-label{z-index:10; position:absolute; width:100%; left:0px; text-align:center;}
|
||||
.loading-image{z-index:10;}
|
||||
.gwt-TreeItem-selected .Tree-Album {background-color: #333; color: #FFF;}
|
||||
@ -24,6 +24,8 @@
|
||||
.Tree-Album:hover{text-decoration:underline;}
|
||||
.drop-target{background-color: #91c0ef; color: #000;}
|
||||
|
||||
.dragdrop-selected ,.dragdrop-dragging ,.dragdrop-proxy {filter: Alpha(Opacity=30) !important;;}
|
||||
|
||||
.popup {padding: 2px; border: 1px solid #91c0ef;background-color:#FFF}
|
||||
|
||||
.dialog fieldset{ border: none; padding: 0px; margin: 0px;}
|
||||
|
@ -1,7 +0,0 @@
|
||||
function _g(){}
|
||||
function Zg(){}
|
||||
function eh(){}
|
||||
function Yg(){}
|
||||
function bh(){bh=wp;ah=new Zg}
|
||||
function dh(){ah=(bh(),new Yg);dc((ac(),_b),1);!!$stats&&$stats(Fc(Qr,Rr,null,null));ah.m();!!$stats&&$stats(Fc(Qr,Sr,null,null))}
|
||||
var Qr='runCallbacks1';_=Zg.prototype=new O;_.m=_g;_.tI=0;_=Yg.prototype=new Zg;_.m=eh;_.tI=0;var ah;dh();
|
@ -1,7 +0,0 @@
|
||||
function ih(){}
|
||||
function gh(){}
|
||||
function nh(){}
|
||||
function fh(){}
|
||||
function kh(){kh=wp;jh=new gh}
|
||||
function mh(){jh=(kh(),new fh);dc((ac(),_b),2);!!$stats&&$stats(Fc(Tr,Rr,null,null));jh.m();!!$stats&&$stats(Fc(Tr,Sr,null,null))}
|
||||
var Tr='runCallbacks2';_=gh.prototype=new O;_.m=ih;_.tI=0;_=fh.prototype=new gh;_.m=nh;_.tI=0;var jh;mh();
|
@ -1,75 +0,0 @@
|
||||
function $b(){}
|
||||
function lc(){}
|
||||
function uc(){}
|
||||
function xc(){}
|
||||
function Nc(){}
|
||||
function Qk(){}
|
||||
function Pk(){}
|
||||
function Cn(){}
|
||||
function Jn(){}
|
||||
function On(){}
|
||||
function Eo(){}
|
||||
function Po(){}
|
||||
function Yo(){}
|
||||
function kc(){fc(_b)}
|
||||
function fc(a){dc(a,a.c)}
|
||||
function Bc(a){Ac(this,a)}
|
||||
function qc(a){a.b=0;a.c=0}
|
||||
function tc(a){return a.c-a.b}
|
||||
function Vk(){return this.a}
|
||||
function Wk(){return this.a}
|
||||
function Oo(){return this.b}
|
||||
function Xo(){return Vo(this)}
|
||||
function rc(a){return a.a[a.b]}
|
||||
function pc(a,b){a.a[a.c++]=b}
|
||||
function wc(a,b){Hd();return a}
|
||||
function zc(a,b){a.a=b;return a}
|
||||
function Tk(a,b){a.a=b;return a}
|
||||
function Ln(a,b){a.a=b;return a}
|
||||
function Sn(){return Jo(this,0)}
|
||||
function In(){return this.b.a.d}
|
||||
function sc(a){return a.a[a.b++]}
|
||||
function Mn(){return jn(this.a.a)}
|
||||
function Gn(a){return Yl(this.a,a)}
|
||||
function Wo(){return this.b!=this.d.a}
|
||||
function $o(a){a.a=a.b=a;return a}
|
||||
function Pc(a,b,c){a.b=b;a.a=c;return a}
|
||||
function En(a,b,c){a.a=b;a.b=c;return a}
|
||||
function No(a){return _o(new Yo,a,this.a),++this.b,true}
|
||||
function Mo(a){if(a.b==0){throw pp(new np)}}
|
||||
function Go(a){a.a=$o(new Yo);a.b=0;return a}
|
||||
function Io(a,b,c){_o(new Yo,b,c);++a.b}
|
||||
function So(a,b,c,d){a.d=d;a.b=c;a.a=b;return a}
|
||||
function _o(a,b,c){a.c=b;a.a=c;a.b=c.b;c.b.a=a;c.b=a;return a}
|
||||
function oc(a,b){a.a=_f(Cg,0,-1,b,1);return a}
|
||||
function $k(){$k=wp;Zk=_f(Eg,0,12,256,0)}
|
||||
function ac(){ac=wp;_b=cc(new $b,3,ag(Cg,0,-1,[]))}
|
||||
function Ol(a){var b;b=rm(new lm,a);return En(new Cn,a,b)}
|
||||
function Nn(){var a;a=pg(kn(this.a.a),20).D();return a}
|
||||
function Hn(){var a;a=Am(new ym,this.b.a);return Ln(new Jn,a)}
|
||||
function Qn(a,b){var c;c=Jo(this,a);Io(c.d,b,c.b);++c.a;c.c=null}
|
||||
function Ko(a){var b;Mo(a);--a.b;b=a.a.a;b.a.b=b.b;b.b.a=b.a;b.a=b.b=b;return b.c}
|
||||
function Uk(a){return a!=null&&ng(a.tI,12)&&pg(a,12).a==this.a}
|
||||
function nk(b){var a=b;$wnd.setTimeout(function(){a.onreadystatechange=new Function},0)}
|
||||
function tk(c,a){var b=c;c.onreadystatechange=$entry(function(){a.i(b)})}
|
||||
function Xl(e,a){var b=e.e;for(var c in b){if(c.charCodeAt(0)==58){var d=b[c];if(e.B(a,d)){return true}}}return false}
|
||||
function Lc(b,c){function d(a){c.h(a)}
|
||||
return __gwtStartLoadingFragment(b,d)}
|
||||
function Yl(a,b){if(a.c&&qo(a.b,b)){return true}else if(Xl(a,b)){return true}else if(Vl(a,b)){return true}return false}
|
||||
function Vo(a){if(a.b==a.d.a){throw pp(new np)}a.c=a.b;a.b=a.b.a;++a.a;return a.c.c}
|
||||
function cc(a,b,c){ac();a.a=po(new no);a.f=Go(new Eo);a.c=b;a.b=c;a.e=oc(new lc,b+1);return a}
|
||||
function Mc(a,b){var c,d;c=Lc(a,b);if(c==null){return}d=uk();d.open(Xr,c,true);tk(d,Pc(new Nc,d,b));d.send(null)}
|
||||
function dc(a,b){var c;c=b==a.c?Ur:Vr+b;hc(c,Sr,Xk(b),null);if(ec(a,b)){sc(a.d);gm(a.a,Xk(b));jc(a)}}
|
||||
function Jo(a,b){var c,d;(b<0||b>a.b)&&cn(b,a.b);if(b>=a.b>>1){d=a.a;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c<b;++c){d=d.a}}return So(new Po,b,d,a)}
|
||||
function Rn(b){var a,d;d=Jo(this,b);try{return Vo(d)}catch(a){a=Og(a);if(sg(a,23)){throw Ok(new Lk,$r+b)}else throw a}}
|
||||
function hc(a,b,c,d){!!$stats&&$stats(Fc(a,b,c,d))}
|
||||
function Xk(a){var b,c;if(a>-129&&a<128){b=a+128;c=($k(),Zk)[b];!c&&(c=Zk[b]=Tk(new Pk,a));return c}return Tk(new Pk,a)}
|
||||
function Vl(i,a){var b=i.a;for(var c in b){if(c==parseInt(c)){var d=b[c];for(var e=0,f=d.length;e<f;++e){var g=d[e];var h=g.D();if(i.B(a,h)){return true}}}}return false}
|
||||
function ec(a,b){var c,d,e,f;if(b==a.c){return true}for(d=a.b,e=0,f=d.length;e<f;++e){c=d[e];if(c==b){return true}}return false}
|
||||
function uk(){if($wnd.XMLHttpRequest){return new XMLHttpRequest}else{try{return new ActiveXObject(Yr)}catch(a){return new ActiveXObject(Zr)}}}
|
||||
function Ac(b,c){var a,e,f,g,h,i;h=Wn(new Tn);while(tc(b.a.e)>0){Xn(h,pg(Ko(b.a.f),2));sc(b.a.e)}qc(b.a.e);Zn(h,Ol(b.a.a));Ul(b.a.a);i=null;for(g=hn(new en,h);g.a<g.b.z();){f=pg(kn(g),2);try{Ac(f,c)}catch(a){a=Og(a);if(sg(a,3)){e=a;i=e}else throw a}}if(i){throw i}}
|
||||
function Zn(a,b){if(b.b.a.d==0){return false}Array.prototype.splice.apply(a.a,[a.b,0].concat(Gl(b,_f(Fg,0,0,b.b.a.d,0))));a.b+=b.b.a.d;return true}
|
||||
function Qc(b){var a,d;if(this.b.readyState==4){nk(this.b);if((this.b.status==200||this.b.status==0)&&this.b.responseText!=null&&this.b.responseText.length!=0){try{__gwtInstallCode(this.b.responseText)}catch(a){a=Og(a);if(sg(a,3)){d=a;Ac(this.a,d)}else throw a}}else{Ac(this.a,wc(new uc,this.b.status))}}}
|
||||
function Fc(a,b,c,d){var e={moduleName:$moduleName,sessionId:$sessionId,subSystem:Wr,evtGroup:a,millis:(new Date).getTime(),type:b};c!=null&&(e.fragment=c.w());d!=null&&(e.size=d.w());return e}
|
||||
function jc(a){var b,c,d,e,f,g;if(!a.d){a.d=oc(new lc,a.b.length+1);for(e=a.b,f=0,g=e.length;f<g;++f){d=e[f];pc(a.d,d)}pc(a.d,a.c)}if(a.a.d==0&&a.f.b==0&&tc(a.d)>1){return}if(tc(a.d)>0){c=rc(a.d);hc(c==a.c?Ur:Vr+c,Rr,Xk(c),null);Mc(c,zc(new xc,a));return}while(tc(a.e)>0){c=sc(a.e);b=pg(Ko(a.f),2);hc(c==a.c?Ur:Vr+c,Rr,Xk(c),null);Mc(c,b)}}
|
||||
var $r="Can't get element ",Xr='GET',Yr='MSXML2.XMLHTTP.3.0',Zr='Microsoft.XMLHTTP',Rr='begin',Vr='download',Sr='end',Ur='leftoversDownload',Wr='runAsync';_=$b.prototype=new O;_.tI=0;_.b=null;_.c=0;_.d=null;_.e=null;var _b;_=lc.prototype=new O;_.tI=0;_.a=null;_.b=0;_.c=0;_=uc.prototype=new mb;_.tI=7;_=xc.prototype=new O;_.h=Bc;_.tI=8;_.a=null;_=Nc.prototype=new O;_.i=Qc;_.tI=0;_.a=null;_.b=null;_=Qk.prototype=new O;_.tI=27;_=Pk.prototype=new Qk;_.eQ=Uk;_.hC=Vk;_.w=Wk;_.tI=30;_.a=0;var Zk;_=Cn.prototype=new Dl;_.y=Gn;_.s=Hn;_.z=In;_.tI=0;_.a=null;_.b=null;_=Jn.prototype=new O;_.u=Mn;_.v=Nn;_.tI=0;_.a=null;_=On.prototype=new Wm;_.F=Qn;_.G=Rn;_.s=Sn;_.tI=41;_=Eo.prototype=new On;_.x=No;_.z=Oo;_.tI=45;_.a=null;_.b=0;_=Po.prototype=new O;_.u=Wo;_.v=Xo;_.tI=0;_.a=0;_.b=null;_.c=null;_.d=null;_=Yo.prototype=new O;_.tI=0;_.a=null;_.b=null;_.c=null;var Cg=new Ak,Eg=new Ak;kc();
|
@ -0,0 +1,7 @@
|
||||
function US(){}
|
||||
function eT(){return DP}
|
||||
function iT(){var a;while(ZS){a=ZS;ZS=ZS.c;!ZS&&($S=null);Zv(a.b.b)}}
|
||||
function xv(a,b){Hab(a.f,b);if(!a.e){a.e=true;zv(a)}a.c=false;Av(a)}
|
||||
function Zv(a){var b;a.b.b=a.b.c.blob;(Ev(),Dv).captureBlob(a.b.b,a.b.f,Grb);b=U$(new R$,a.b.f);a.b.d.sb(b);xv(a.b.j,a.b)}
|
||||
function fT(){aT=true;_S=(cT(),new US);Ky((Hy(),Gy),1);!!$stats&&$stats(oz(Hrb,Oib,null,null));_S.Zb();!!$stats&&$stats(oz(Hrb,Irb,null,null))}
|
||||
var Jrb='AsyncLoader1',Grb='image/JPEG',Hrb='runCallbacks1';_=US.prototype=new VS;_.gC=eT;_.Zb=iT;_.tI=0;var DP=f4(wpb,Jrb);fT();
|
@ -0,0 +1,6 @@
|
||||
function qT(){}
|
||||
function CT(){return HP}
|
||||
function GT(){var a;while(vT){a=vT;vT=vT.c;!vT&&(wT=null);ro(a.b)}}
|
||||
function DT(){yT=true;xT=(AT(),new qT);Ky((Hy(),Gy),2);!!$stats&&$stats(oz(Lrb,Oib,null,null));xT.Zb();!!$stats&&$stats(oz(Lrb,Irb,null,null))}
|
||||
function ro(a){var b,c,d,e,f;e=($wnd.google&&$wnd.google.gears&&$wnd.google.gears.factory).create(Krb);e.decode(a.b);d=e.width;c=e.height;f=d/a.c.c;b=c/a.c.b;if(f>b){if(f>1){e.resize(a.c.c,~~Math.max(Math.min(c/f,2147483647),-2147483648));Kv(a.d,e.encode());return}Kv(a.d,a.b)}else{if(b>1){e.resize(~~Math.max(Math.min(d/b,2147483647),-2147483648),a.c.b);Kv(a.d,e.encode());return}Kv(a.d,a.b)}}
|
||||
var Mrb='AsyncLoader2',Krb='beta.canvas',Lrb='runCallbacks2';_=qT.prototype=new rT;_.gC=CT;_.Zb=GT;_.tI=0;var HP=f4(wpb,Mrb);DT();
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user