Project

General

Profile

« Previous | Next » 

Revision 46740

View differences:

modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/server/DataServiceImpl.java
155 155
            throw new Exception("captcha");
156 156

  
157 157
        userManager.register(user);
158
        publisherManager.savePublisher(user.getPublisher());
158 159
    }
159 160

  
160 161
    @Override
......
208 209
        log.debug("type -> " + publication.getType());
209 210
        if(publication.getType().equals(PublicationType.ARTICLE)) {
210 211
            Journal journal = publication.getJournal();
211
            log.debug("journal -> " + journal);
212
            log.debug("journal id ->" + journal.getId());
213 212
            if (journal.getId()==null) {
214 213
                Journal savedJournal = journalManager.generateId(journal);
215 214
                //Journal savedJournal = journalManager.saveJournal(journal);
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/fundingrequest/newrequest/FundingWizardWidget.java
96 96

  
97 97
                                    //save only requests that have completed the publication step
98 98
                                    if (fundingWizardState.getRequest().getPublication() != null) {
99

  
100 99
                                        dataService.saveRequest(fundingWizardState.getRequest(), new AsyncCallback<Request>() {
101 100

  
102 101
                                            @Override
......
107 106

  
108 107
                                            @Override
109 108
                                            public void onSuccess(Request request) {
110

  
109
                                                Window.alert("Success request");
111 110
                                                GoldOAPortal.currentToken = GoldOAPortal.currentToken + request.getId();
112 111

  
113 112
                                                fundingWizardState.setRequest(request);
......
125 124

  
126 125
                                    fundingWizardPanel.addStyleName("loading");
127 126
                                    fundingWizardPanel.add(loadingWheel);
128

  
129 127
                                    dataService.submitRequest(fundingWizardState.getRequest(), new AsyncCallback<Request>() {
130 128

  
131 129
                                        @Override
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/fundingrequest/newrequest/publicationstep/PublicationInfoStep.java
14 14
import com.google.gwt.event.dom.client.ClickHandler;
15 15
import com.google.gwt.event.logical.shared.ValueChangeEvent;
16 16
import com.google.gwt.event.logical.shared.ValueChangeHandler;
17
import com.google.gwt.user.client.Window;
17 18
import com.google.gwt.user.client.ui.FlowPanel;
18 19
import com.google.gwt.user.client.ui.IsWidget;
19 20
import com.google.gwt.user.client.ui.Label;
......
316 317
                    errorLabel.setVisible(true);
317 318

  
318 319
                } else {
319

  
320 320
                    Publication publication = new Publication();
321 321

  
322 322
                    if (!doi.getValue().trim().equals(""))
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/fundingrequest/newrequest/publicationstep/JournalInfoStep.java
105 105
                journal = vocabulary.getJournal();
106 106
                cannotFindJournal.setValue(false);
107 107

  
108
                if (journal == null) {
109
                    journalDisplayInfoPanel.clear();
110
                    JournalDisplayInfo journalDisplayInfo = new JournalDisplayInfo(null);
111
                    journalDisplayInfoPanel.add(journalDisplayInfo.asWidget());
112
                    journalInfoStepPanel.remove(journalInfoPanel);
113
                    journalInfoStepPanel.add(journalDisplayInfoPanel);
114
                }else{
115
                    journalFromAutoComplete = journal;
116

  
117
                    journalDisplayInfoPanel.clear();
118
                    JournalDisplayInfo journalDisplayInfo = new JournalDisplayInfo(journal);
119
                    journalDisplayInfoPanel.add(journalDisplayInfo.asWidget());
120
                    journalInfoStepPanel.remove(journalInfoPanel);
121
                    journalInfoStepPanel.add(journalDisplayInfoPanel);
122
                }
123

  
124

  
108 125
                /*dataService.getJournal(vocabulary.getId(), new AsyncCallback<Journal>() {
109 126

  
110 127
                    @Override
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/fundingrequest/newrequest/publicationstep/PublicationStepWidget.java
158 158
        Request request = fundingWizardState.getRequest();
159 159
        if(savedPublication!=null) {
160 160

  
161
            Window.alert("saved publication");
162 161
            request.setPublication(savedPublication);
163 162
            fundingWizardState.setPublication(savedPublication);
164 163

  
......
260 259

  
261 260
            @Override
262 261
            public void onFailure(Throwable throwable) {
263
                Window.alert("publication save failed");
264 262
                publicationStepPanel.removeStyleName("loading");
265 263
                publicationStepPanel.remove(loadingWheel);
266 264

  
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/widgets/MultipleAuthorsWidget.java
4 4
import com.github.gwtbootstrap.client.ui.constants.IconType;
5 5
import com.google.gwt.event.dom.client.ClickEvent;
6 6
import com.google.gwt.event.dom.client.ClickHandler;
7
import com.google.gwt.user.client.Window;
7 8
import com.google.gwt.user.client.ui.FlowPanel;
8 9
import com.google.gwt.user.client.ui.IsWidget;
9 10
import com.google.gwt.user.client.ui.Widget;
......
78 79
        List<Author> authorsList = new ArrayList<>();
79 80

  
80 81
        for(AuthorInfoWidget authorInfoWidget : authorInfoWidgetList) {
81
            if(authorInfoWidget.getAuthor()!=null)
82
            if(authorInfoWidget.getAuthor()!=null){
82 83
                authorsList.add(authorInfoWidget.getAuthor());
84
            }
85

  
83 86
        }
84 87
        return authorsList;
85 88
    }
......
131 134
    }
132 135

  
133 136
    public boolean hasAtLeastOneEmail() {
134

  
135 137
        boolean hasAtLeastOneEmail = false;
136

  
137 138
        for(AuthorInfoWidget authorInfoWidget : authorInfoWidgetList) {
138 139
            if(authorInfoWidget.hasEmailCompleted())
139 140
                hasAtLeastOneEmail = true;
140

  
141 141
        }
142

  
143 142
        return hasAtLeastOneEmail;
144 143
    }
145 144

  
modules/uoa-goldoa-portal/branches/hibernate/src/main/java/eu/dnetlib/client/widgets/AuthorInfoWidget.java
3 3
import com.github.gwtbootstrap.client.ui.*;
4 4
import com.github.gwtbootstrap.client.ui.constants.AlertType;
5 5
import com.github.gwtbootstrap.client.ui.constants.AlternateSize;
6
import com.google.gwt.user.client.Window;
6 7
import com.google.gwt.user.client.ui.FlowPanel;
7 8
import com.google.gwt.user.client.ui.IsWidget;
8 9
import com.google.gwt.user.client.ui.Widget;
......
99 100
                if (affiliationInfoWidget.getAffiliation().getDepartment() != null && !affiliationInfoWidget.getAffiliation().getDepartment().equals(""))
100 101
                    author.setDepartment(affiliationInfoWidget.getAffiliation().getDepartment());
101 102
            }
102

  
103 103
            return author;
104 104
        }
105 105

  
......
127 127
                emailTextBox.setValue(author.getEmail());
128 128
        }
129 129

  
130
        if(author.getOrganization()!=null) {
130
        if(author != null && author.getOrganization()!=null) {
131 131
            Affiliation affiliation = new Affiliation();
132 132
            affiliation.setOrganization(author.getOrganization());
133 133
            affiliation.setDepartment(author.getDepartment());

Also available in: Unified diff