diff gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java @ 8313:e3a63d9c5bb1

Updated the client to build a default artifact for sq relations. * Removed code for special sq relation artifact * Updated MeasurementListGrid in info panel to create a new project * Updated i18n
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 24 Sep 2014 12:02:05 +0200
parents 519023ce3500
children 5e38e2924c07
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java	Wed Sep 24 11:59:49 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java	Wed Sep 24 12:02:05 2014 +0200
@@ -496,60 +496,6 @@
     }
 
 
-    public void newSQRelation(String river, int measurementStation) {
-        Config config = Config.getInstance();
-
-        final String locale = config.getLocale();
-        final String riv = river;
-        final int mStation = measurementStation;
-        final FLYS   flys = this;
-
-        User user = getCurrentUser();
-
-        if (user == null) {
-            SC.warn(MSG.error_not_logged_in());
-            return;
-        }
-
-        collectionService.create(locale, user.identifier(),
-            new AsyncCallback<Collection>() {
-                @Override
-                public void onFailure(Throwable caught) {
-                    GWT.log("Could not create new collection.");
-                    SC.warn(getExceptionString(MSG, caught));
-                }
-
-                @Override
-                public void onSuccess(Collection collection) {
-                    GWT.log("Successfully created a new collection.");
-                    final Collection col = collection;
-                    artifactService.createSQRelationArtifact(
-                        col, locale, riv, mStation,
-                        new AsyncCallback<Artifact>() {
-                            @Override
-                            public void onFailure(Throwable caught) {
-                                GWT.log("Could not create the new artifact.");
-                                SC.warn(getExceptionString(MSG, caught));
-                            }
-
-                            @Override
-                            public void onSuccess(Artifact artifact) {
-                                GWT.log("Successfully created a new artifact.");
-                                CollectionView view = new CollectionView(flys,
-                                    col, artifact);
-                                workspace.addView(col.identifier(), view);
-
-                                view.addCollectionChangeHandler(getProjectList());
-                                view.addCloseClickHandler(
-                                    new CloseCollectionViewHandler(
-                                        FLYS.this, col.identifier()));
-                                projectList.updateUserCollections();
-                            }
-                    });
-                }
-            });
-    }
-
     @Override
     public void onCollectionChange(CollectionChangeEvent event) {
         Collection oldC = event.getOldValue();

http://dive4elements.wald.intevation.org