Changeset 1565 for trunk/grails-app
- Timestamp:
- Feb 25, 2011, 2:27:48 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/PublicationController.groovy
r1430 r1565 31 31 pubMedID: params.get( 'publication-pubMedID' ), 32 32 DOI: params.get( 'publication-doi' ) 33 ) 33 ); 34 35 // Check whether the autorsList is not too long. If it is, split it 36 println "authors length: " + publication.authorsList.size() 37 if( publication.authorsList.size() > 255 ) { 38 def postfix = " et al."; 39 def split = publication.authorsList[ 0..255 - postfix.size()].lastIndexOf( ", " ); 40 publication.authorsList = publication.authorsList[ 0..split-1] + postfix; 41 42 println "new authors list: " + publication.authorsList.size() + " - " + publication.authorsList 43 } 34 44 35 45 def message; … … 160 170 pubMedID: params.get( 'publication-pubMedID' ), 161 171 DOI: params.get( 'publication-doi' ) 162 ).save(flush:true); 172 ); 173 174 // Check whether the autorsList is not too long. If it is, split it 175 println "authors length: " + publication.authorsList.size() 176 if( publication.authorsList.size() > 255 ) { 177 def postfix = " et al."; 178 def split = publication.authorsList[ 0..255 - postfix.size()].lastIndexOf( ", " ); 179 publication.authorsList = publication.authorsList[ 0..split-1] + postfix; 180 181 println "new authors list: " + publication.authorsList.size() + " - " + publication.authorsList 182 } 183 184 publication.save(flush:true); 163 185 } 164 186 -
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r1548 r1565 107 107 body 108 108 ) 109 110 attrs.description = '';111 112 // render 'Add publication button'113 baseElement.call(114 '_publicationAddButton',115 attrs,116 body117 )118 109 } 119 110 … … 183 174 } 184 175 out << '<input type="hidden" name="' + attrs.name + '_ids" value="' + ids + '" id="' + attrs.name + '_ids">'; 176 177 out << _publicationAddButton( attrs, body ); 185 178 } 186 179 … … 194 187 } 195 188 196 out << '<input type="button" onClick="openPublicationDialog(\'' + attrs.name + '\' );" value="Add Publication">';189 out << '<input class="addButton" type="button" onClick="openPublicationDialog(\'' + attrs.name + '\' );" value="Add Publication">'; 197 190 } 198 191 … … 353 346 baseElement.call( 354 347 '_userList', 355 attrs,356 body357 )358 359 attrs.description = '';360 361 // render 'Add user button'362 baseElement.call(363 '_userAddButton',364 348 attrs, 365 349 body … … 429 413 } 430 414 out << '<input type="hidden" name="' + attrs.name + '_ids" value="' + ids + '" id="' + attrs.name + '_ids">'; 415 416 out << _userAddButton( attrs, body ); 431 417 } 432 418 … … 439 425 } 440 426 441 out << '<input type="button" onClick="openUserDialog(\'' + attrs.name + '\' );" value="Add User">';427 out << '<input class="addButton" type="button" onClick="openUserDialog(\'' + attrs.name + '\' );" value="Add User">'; 442 428 } 443 429 -
trunk/grails-app/views/simpleWizard/study.gsp
r1553 r1565 44 44 <h2>Publications</h2> 45 45 <div class="content"> 46 <af:publicationSelectElement noForm= truename="publication" value="${study?.publications}"/>46 <af:publicationSelectElement noForm="true" name="publication" value="${study?.publications}"/> 47 47 </div> 48 48 </div>
Note: See TracChangeset
for help on using the changeset viewer.