Changeset 2112
- Timestamp:
- Oct 30, 2013, 11:31:42 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/flowcell_protocol2.jsp
r2107 r2112 66 66 67 67 <script language="JavaScript"> 68 var debug = false;68 var debug = 0; 69 69 var currentStep = 1; 70 71 var COLORS = ['blue', 'green', 'yellow', 'red']; 72 var nextColor = 0; 70 73 71 74 function init() … … 117 120 var flowCellNo = -1; 118 121 var flowCellNameList = ''; 122 var poolColors = []; 123 var useDarker = false; 124 var numPools = 0; 125 var poolsRow = document.getElementById('all-pools'); 119 126 for (var index in flowCellInfoArray) 120 127 { … … 135 142 for (laneKey in flowCellLanes) 136 143 { 137 var poolId = flowCellLanes[laneKey]; 144 var poolName = flowCellLanes[laneKey]; 145 var color = poolColors[poolName]; 146 if (!color) 147 { 148 numPools++; 149 color = COLORS[nextColor] + (useDarker ? ' darker' : ''); 150 poolColors[poolName] = color; 151 var td = document.createElement('td'); 152 td.className = 'pool-legend ' + color; 153 td.innerHTML = poolName; 154 poolsRow.appendChild(td); 155 nextColor++; 156 if (nextColor == COLORS.length) 157 { 158 nextColor = 0; 159 useDarker = !useDarker; 160 } 161 } 138 162 var row = laneKey - 1; 139 163 var idSuffix = flowCellNo + '.' + row; 140 setInnerHTML('fcPoolName.'+idSuffix, poolId); 164 Main.addClass(document.getElementById('fcPoolName.'+idSuffix), color); 165 setInnerHTML('fcPoolName.'+idSuffix, poolName); 141 166 } 142 167 } 168 169 if (numPools <= 6) 170 { 171 var td = document.createElement('td'); 172 td.innerHTML = ''; 173 poolsRow.appendChild(td); 174 } 175 143 176 var pageTitle = 'Lab protocol for ' + flowCellNameList; 144 177 setInnerHTML('pageTitle', pageTitle); … … 161 194 margin-bottom: 1em; 162 195 border-collapse: collapse; 196 } 197 198 table.flowcell 199 { 163 200 min-height: 20em; 164 201 height: 20em; … … 245 282 { 246 283 width: 8em; 247 } 284 text-align: center; 285 } 286 287 .pool-legend 288 { 289 width: 8em; 290 text-align: center !important; 291 } 292 293 .green 294 { 295 background-color: #D8F8D8; 296 } 297 .green.darker 298 { 299 background-color: #A0F8A0; 300 } 301 302 .blue 303 { 304 background-color: #D8E8FF; 305 } 306 .blue.darker 307 { 308 background-color: #B8B8FF; 309 } 310 311 .yellow 312 { 313 background-color: #FFFFD8; 314 } 315 .yellow.darker 316 { 317 background-color: #FFFFA0; 318 } 319 320 .red 321 { 322 background-color: #FFC8C8; 323 } 324 .red.darker 325 { 326 background-color: #F8A0A0; 327 } 328 248 329 249 330 </style> … … 270 351 <div id="listviewcontainer" style="display: none;"> 271 352 353 <table class="protocolheader"> 354 <tr id="all-pools"> 355 <th style="width: 15%;">Used pools</th> 356 </tr> 357 </table> 272 358 273 359 <h2>1. Clustering</h2> 274 275 360 <% 276 361 // Note: Variable 'c' here indicates a flow cell, not a table column … … 279 364 { 280 365 %> 281 <table style="width: 100%;" class="protocolheader ">366 <table style="width: 100%;" class="protocolheader flowcell"> 282 367 <tr> 283 368 <th style="width: 15%;">Flow cell</th> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java
r2111 r2112 213 213 for (BioMaterialEventSource eventSource : physBA.getCreationEvent().getEventSources().list(dc)) 214 214 { 215 Extract pool = (Extract)eventSource.getBioMaterial(); 215 Extract poolAliquot = (Extract)eventSource.getBioMaterial(); 216 Extract pool = (Extract)poolAliquot.getParent(); 216 217 jsonFlowCellLanes.put(eventSource.getPosition(), pool.getName()); 217 218 }
Note: See TracChangeset
for help on using the changeset viewer.