Changeset 6564
- Timestamp:
- Oct 15, 2014, 8:05:21 AM (9 years ago)
- Location:
- branches/3.3-stable/www
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-stable/www/biomaterials/extracts/extracts.js
r6484 r6564 481 481 event.detail.name += ' [-]'; 482 482 Link.addItem('extracts', 'EXTRACT', event.detail); 483 frm.parentType[0].checked = false; 484 frm.parentType[1].checked = true; 485 extracts.parentTypeOnClick(); 483 if (event.detail.remaining == 0) 484 { 485 frm.parentType[0].checked = false; 486 frm.parentType[1].checked = true; 487 extracts.parentTypeOnClick(); 488 } 486 489 } 487 490 -
branches/3.3-stable/www/biomaterials/samples/samples.js
r6484 r6564 411 411 event.detail.name += ' [-]'; 412 412 Link.addItem('samples', 'SAMPLE', event.detail); 413 frm.parentType[0].checked = false; 414 frm.parentType[1].checked = true; 415 samples.parentTypeOnClick(); 413 if (event.detail.remaining == 0) 414 { 415 frm.parentType[0].checked = false; 416 frm.parentType[1].checked = true; 417 samples.parentTypeOnClick(); 418 } 416 419 } 417 420 -
branches/3.3-stable/www/common/share/share.js
r6412 r6564 144 144 145 145 Link.addItem('members', 'USER', event.detail); 146 share.membersOnChange(); 146 if (event.detail.remaining == 0) 147 { 148 share.membersOnChange(); 149 } 147 150 } 148 151 … … 174 177 175 178 Link.addItem('members', 'GROUP', event.detail); 176 share.membersOnChange(); 179 if (event.detail.remaining == 0) 180 { 181 share.membersOnChange(); 182 } 177 183 } 178 184 … … 199 205 200 206 Link.addItem('members', 'PROJECT', event.detail); 201 share.membersOnChange(); 207 if (event.detail.remaining == 0) 208 { 209 share.membersOnChange(); 210 } 202 211 } 203 212 … … 218 227 { 219 228 Link.addItem('members', 'PERMISSIONTEMPLATE', event.detail); 220 share.membersOnChange(); 229 if (event.detail.remaining == 0) 230 { 231 share.membersOnChange(); 232 } 221 233 } 222 234 -
branches/3.3-stable/www/filemanager/select_file.js
r6400 r6564 35 35 selectFile.setSelectedFile = function(fileId, path) 36 36 { 37 selected[0] = {'id': fileId, ' path': path};37 selected[0] = {'id': fileId, 'name': path}; 38 38 selectFile.updatePath(); 39 39 } … … 46 46 if (selectFile.getSelectedFileIndex(fileId) == -1) 47 47 { 48 selected[selected.length] = {'id': fileId, ' path': path};48 selected[selected.length] = {'id': fileId, 'name': path}; 49 49 } 50 50 selectFile.updatePath(); … … 73 73 { 74 74 if (path != '') path += ', '; 75 path += selected[i]. path;75 path += selected[i].name; 76 76 } 77 77 Doc.element('files').innerHTML = path; … … 84 84 var callbackMethod = window.opener[callback]; 85 85 86 var remaining = selected.length-1; 86 87 for (var i = 0; i < selected.length; i++) 87 88 { 89 var s = selected[i]; 90 s.remaining = remaining--; 88 91 if (notifyTarget) 89 92 { 90 93 // Send event to the target in the opener window 91 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': selected[i].id, 'name': selected[i].path});94 Events.sendCustomEvent(notifyTarget, 'base-selected', s); 92 95 } 93 96 else if (callbackMethod) 94 97 { 95 98 // Call the callback method in the opener window 96 callbackMethod.call(null, s elected[i].id, selected[i].path);99 callbackMethod.call(null, s.id, s.path); 97 100 } 98 101 } -
branches/3.3-stable/www/include/scripts/table.js
r6556 r6564 736 736 } 737 737 738 var numSelected = 0;738 var selected = []; 739 739 if (frm.item_id) 740 740 { … … 744 744 { 745 745 var id = element.value.match(/^\d+$/) ? parseInt(element.value) : element.value; 746 if (notifyTarget) 747 { 748 // Send event to the target in the opener window 749 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': id, 'name': element.title, 'itemType': itemType}); 750 } 751 else if (callbackMethod) 752 { 753 // Call the callback method in the opener window 754 callbackMethod.call(null, id, element.title); 755 } 756 numSelected = 1; 746 selected[selected.length] = {'id': id, 'name': element.title, 'itemType': itemType}; 757 747 } 758 748 } … … 766 756 { 767 757 var id = element.value.match(/^\d+$/) ? parseInt(element.value) : element.value; 768 if (notifyTarget) 769 { 770 // Send event to the target in the opener window 771 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': id, 'name': element.title, 'itemType': itemType}); 772 } 773 else if (callbackMethod) 774 { 775 // Call the callback method in the opener window 776 callbackMethod.call(null, id, element.title); 777 } 778 numSelected++; 758 selected[selected.length] = {'id': id, 'name': element.title, 'itemType': itemType}; 779 759 } 780 760 } 781 761 } 782 return numSelected; 762 763 var remaining = selected.length-1; 764 for (var i = 0; i < selected.length; i++) 765 { 766 var s = selected[i]; 767 s.remaining = remaining--; 768 if (notifyTarget) 769 { 770 // Send event to the target in the opener window 771 Events.sendCustomEvent(notifyTarget, 'base-selected', s); 772 } 773 else if (callbackMethod) 774 { 775 // Call the callback method in the opener window 776 callbackMethod.call(null, s.id, s.name); 777 } 778 } 779 780 return selected.length; 783 781 } 784 782 -
branches/3.3-stable/www/views/physicalbioassays/bioassays.js
r6400 r6564 353 353 event.detail.value = ':1'; 354 354 Link.addItem('extracts', 'EXTRACT', event.detail); 355 bioassays.extractsOnChange(); 355 if (event.detail.remaining == 0) 356 { 357 bioassays.extractsOnChange(); 358 } 356 359 } 357 360
Note: See TracChangeset
for help on using the changeset viewer.