Changeset 6729
- Timestamp:
- Feb 13, 2015, 9:44:56 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/AnnotationUtil.java
r6696 r6729 63 63 json.put("id", at.getId()); 64 64 json.put("name", at.getName()); 65 65 if (at.getDisableInheritance()) 66 { 67 json.put("disableInheritance", 1); 68 return json; 69 } 66 70 // Load categories for the annotation type 67 71 ItemQuery<AnnotationTypeCategory> categoryQuery = AnnotationTypeCategory.getQuery(); -
trunk/www/common/annotations/batch_inherit.js
r6696 r6729 29 29 30 30 var selectedAnnotationTypes = []; 31 var allowedAnnotationTypes = []; 31 32 32 33 inherit.initPage = function() … … 56 57 inherit.selectAnnotationTypes = function(event) 57 58 { 58 var url = '&exclude='+selectedAnnotationTypes.join(','); 59 var url = '&resetTemporary=1&tmpfilter:BOOLEAN:disableInheritance=false'; 60 url += '&exclude='+selectedAnnotationTypes.join(','); 59 61 Dialogs.selectItem('ANNOTATIONTYPE', event.currentTarget.id, 1, url); 60 62 } … … 125 127 inherit.addMoreAnnotationTypeInfo = function(item) 126 128 { 129 if (item.disableInheritance) 130 { 131 var frm = document.forms['annotations']; 132 var action = frm['action_'+item.id]; 133 action.length = 0; 134 action[0] = new Option('Inheritance disabled'); 135 action.disabled = true; 136 frm['from_'+item.id].disabled = true; 137 frm['nodup_'+item.id].disabled = true; 138 frm['replace_'+item.id].disabled = true; 139 return; 140 } 127 141 142 allowedAnnotationTypes[allowedAnnotationTypes.length] = item.id; 128 143 var selection = Doc.element('from_'+item.id); 129 144 for (var i = 0; i < item.subtypes.length; i++) … … 142 157 if (selection.selectedIndex == 0) selection.selectedIndex = 1; 143 158 } 144 145 159 } 146 160 … … 161 175 inherit.save = function() 162 176 { 163 if ( selectedAnnotationTypes.length == 0)177 if (allowedAnnotationTypes.length == 0) 164 178 { 165 179 Forms.showNotification('btnSelectAnnotationTypes', 'Please select annotation types to inherit!'); … … 168 182 var frm = document.forms['annotations']; 169 183 frm.cmd.value = 'BatchInherit'; 170 Forms.addHidden(frm, 'annotationTypes', selectedAnnotationTypes.join(','));184 Forms.addHidden(frm, 'annotationTypes', allowedAnnotationTypes.join(',')); 171 185 frm.submit(); 172 186 } -
trunk/www/common/annotations/index.jsp
r6694 r6729 111 111 { 112 112 AnnotationType at = AnnotationType.getById(newDc, atId); 113 if (at.getDisableInheritance()) continue; // Inheritance has been disabled 114 113 115 InheritSpecification spec = new InheritSpecification(at); 114 116 String action = request.getParameter("action_"+atId); … … 131 133 } 132 134 manager.addSpecification(spec); 133 134 //System.out.println("at:" + atId + "; " + action + "; from=" + from + "; noDup="+noDup + "; replace="+replaceExisting);135 135 } 136 136 newDc.commit();
Note: See TracChangeset
for help on using the changeset viewer.