Changeset 351
- Timestamp:
- Apr 19, 2010, 3:56:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/EventController.groovy
r288 r351 18 18 19 19 20 def createForEventDescription = {20 /*def createForEventDescription = { 21 21 if( params["id"]==null) 22 22 { … … 36 36 return [testo:params.clone(), sDate:eventInstance.startTime, eDate:eventInstance.endTime, description:eventInstance.eventDescription] 37 37 } 38 } 38 }*/ 39 39 40 40 … … 204 204 if( !(params['id']=~/^[\d]+$/) ) { 205 205 206 /* Not needed anymore: replace by template check? 207 206 208 def description = new EventDescription() 207 209 description.name = (params['name']==null || params['name'].replaceAll(/\S/,'').size()==0 ) ? '[no Name]' : params['name'] … … 215 217 else { 216 218 description.errors.each{ println it } 217 } 219 }*/ 218 220 219 221 def event = description.isSamplingEvent ? new SamplingEvent() : new Event(); … … 259 261 // save basic changes in event and event description 260 262 263 /* Not needed anymore: replace by template check? 264 261 265 def description = event.eventDescription 262 266 def oldProtocol = description.protocol … … 266 270 description.description = (params['description']==null || params['description'].replaceAll(/\w/,'').size()==0 ) ? '[no description]' : params['description'] 267 271 description.isSamplingEvent = params['isSamplingEvent']=='on' ? true : false 272 273 */ 274 268 275 event.startTime = new Date(params["startTime"]) 269 276 event.endTime = new Date(params["endTime"]) 277 278 279 /* Not needed anymore: replace by template check? 270 280 271 281 … … 290 300 // add all new parameter values 291 301 parseParamsForParameterValues( params, event ) 292 } 302 303 304 } 305 306 */ 293 307 294 308 … … 316 330 } 317 331 318 ((Event)event).eventDescription=description332 //((Event)event).eventDescription=description 319 333 320 334 … … 391 405 def sDate = new Date() 392 406 def eDate = new Date() 393 def description = new EventDescription() 394 return [eventInstance:eventInstance, testo:params.clone(), sDate:sDate, eDate:eDate, description:description, showSample:false, samples:null, createNew:true ] 407 //def description = new EventDescription() 408 return [eventInstance:eventInstance, testo:params.clone(), sDate:sDate, eDate:eDate, 409 //description:description, 410 showSample:false, samples:null, createNew:true ] 395 411 } 396 412 … … 413 429 } 414 430 415 return [eventInstance:eventInstance, testo:params.clone(), sDate:eventInstance.startTime, eDate:eventInstance.endTime, description:eventInstance.eventDescription, showSample:showSample, samples:samples, createNew:false ] 431 return [eventInstance:eventInstance, testo:params.clone(), sDate:eventInstance.startTime, eDate:eventInstance.endTime, 432 // description:eventInstance.eventDescription, 433 showSample:showSample, samples:samples, createNew:false ] 416 434 } 417 435
Note: See TracChangeset
for help on using the changeset viewer.