Changeset 204
- Timestamp:
- Feb 18, 2010, 10:41:10 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r195 r204 87 87 researchQuestion: "", 88 88 description: "", 89 startDate: new Date() .format("d/M/yyyy")89 startDate: new Date() 90 90 ) 91 91 } 92 /* 93 flow.study.getProperties().constraints.each() { key, value -> 94 println key 95 value.getProperties().each() { 96 println it 97 } 98 } 99 */ 92 100 93 // assign template to study 101 94 flow.study.template = Template.findByName(params.get('template')); -
trunk/grails-app/views/wizard/pages/_groups.gsp
r180 r204 22 22 </g:each> 23 23 </div> 24 <div class="middle"> 25 <div class="actions"> 26 <div class="add"></div> 27 <div class="remove"></div> 28 </div> 29 </div> 24 30 <div class="right"> 25 31 <div class="form"> … … 32 38 <div class="label">${group.name}</div> 33 39 <div class="subjects"> 34 <div class="subject">test subject 1</div>35 <div class="subject">test subject 2</div>36 <div class="subject">test subject 3</div>37 40 </div> 38 41 </div> -
trunk/web-app/css/wizard.css
r192 r204 234 234 height: 14px; 235 235 } 236 .wizard .grouping .middle { 237 display: inline-block; 238 float: left; 239 } 240 .wizard .grouping .add { 241 background: url(../images/wizard/add.png) no-repeat left top; 242 width: 149px; 243 height: 29px; 244 margin-top: 10px; 245 margin-left: 14px; 246 } 247 .wizard .grouping .add-hover { 248 background: url(../images/wizard/add-hover.png) no-repeat left top; 249 } 250 .wizard .grouping .remove { 251 background: url(../images/wizard/remove.png) no-repeat left top; 252 width: 149px; 253 height: 29px; 254 margin-top: 10px; 255 } 256 .wizard .grouping .remove-hover { 257 background: url(../images/wizard/remove-hover.png) no-repeat left top; 258 } 236 259 .wizard .grouping .right { 237 260 display: inline-block; … … 245 268 border: 1px solid black; 246 269 height: auto; 270 } 271 .wizard .grouping .ui-selected { 272 border: 4px solid red; 247 273 } 248 274 .wizard .grouping .group .label { -
trunk/web-app/js/grouping.js
r192 r204 19 19 groupsIdentifier: null, 20 20 groupIdentifier: null, 21 22 init: function(itemsIdentifier, itemIdentifier, groupsIdentifier, groupIdentifier) { 21 addIdentifier: null, 22 removeIdentifier: null, 23 24 init: function(itemsIdentifier, itemIdentifier, groupsIdentifier, groupIdentifier, addIdentifier, removeIdentifier) { 23 25 var that = this; 24 26 … … 27 29 this.groupsIdentifier = groupsIdentifier; 28 30 this.groupIdentifier = groupIdentifier; 29 31 this.addIdentifier = addIdentifier; 32 this.removeIdentifier = removeIdentifier; 33 34 this.initAdd(); 35 this.initRemove(); 30 36 this.initItems(); 31 37 this.initGroupItems(); … … 36 42 }, 37 43 44 initAdd: function() { 45 var that = this; 46 var add = $(this.addIdentifier); 47 48 add.bind('mouseenter mouseleave',function() { 49 $(this).toggleClass('add-hover'); 50 }) 51 52 add.bind('click',function() { 53 that.addSelectedItemsToSelectedGroup(); 54 }); 55 }, 56 57 addSelectedItemsToSelectedGroup: function() { 58 var that = this; 59 var groups = $(this.groupIdentifier, $(this.groupsIdentifier)) 60 var group = $('.ui-selected', groups) 61 console.log(groups) 62 console.log(group) 63 }, 64 65 initRemove: function() { 66 var that = this; 67 var remove = $(this.removeIdentifier); 68 69 remove.bind('mouseenter mouseleave',function() { 70 $(this).toggleClass('remove-hover'); 71 }) 72 73 remove.bind('click',function() { 74 console.log('removveeeee!!!!'); 75 }) 76 }, 77 38 78 initItems: function() { 39 79 var that = this; 40 80 console.log($(this.itemsIdentifier).first()); 41 81 //$(this.itemsIdentifier). 42 82 $(this.itemsIdentifier).first().selectable({ … … 50 90 51 91 initGroups: function() { 92 var that = this; 93 94 // init group items 52 95 this.initGroupItems(); 96 97 // init groups 98 $(this.itemsIdentifier).first().selectable({ 99 filter: that.groupIdentifier, 100 stop: function() { 101 102 } 103 }) 53 104 }, 54 105 … … 57 108 58 109 $(this.groupsIdentifier).selectable({ 59 filter: that. itemIdentifier110 filter: that.groupIdentifier 60 111 }) 61 112 } … … 182 233 } 183 234 */ 184 185 // for debugging purposes this is here186 // TODO: to be be migrated to wizard.js....187 $(document).ready(function() {188 new Grouping().init('div.subjects', 'div.subject', 'div.groups', 'div.group');189 }); -
trunk/web-app/js/wizard.js
r192 r204 43 43 44 44 // GROUPING PAGE 45 //new Grouping().init('div.subjects', 'div.subject', 'div.groups', 'div.group');45 new Grouping().init('div.subjects', 'div.subject', 'div.groups', 'div.group','div.add','div.remove'); 46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.