- Timestamp:
- Jan 9, 2019, 2:07:49 PM (3 years ago)
- Location:
- trunk/www/filemanager/files
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/filemanager/files/files.js
r7434 r7575 107 107 Events.addEventHandler('mnuMoveToDirectory', 'base-selected', fileManager.moveToDirectory); 108 108 Events.addEventHandler('mnuMoveOffline', 'click', fileManager.moveToLocation); 109 Events.addEventHandler('mnuMoveToPrimary', 'click', fileManager.moveToLocation);110 Events.addEventHandler('mnuMoveToSecondary', 'click', fileManager.moveToLocation);111 109 112 110 Events.addEventHandler('reloadOnNotify', 'base-notify', App.reloadWindow); -
trunk/www/filemanager/files/index.jsp
r6589 r7575 488 488 // 0 = move offline 489 489 f.setLocation(Location.OFFLINE); 490 f.setAction(File.Action.NOTHING);491 numMoved++;492 }493 else if (moveTo == Location.PRIMARY)494 {495 // 1 = move to primary496 f.setAction(current == Location.PRIMARY ? File.Action.NOTHING : File.Action.MOVE_TO_PRIMARY);497 numMoved++;498 }499 else if (moveTo == Location.SECONDARY)500 {501 // 2 = move to secondary502 f.setAction(current == Location.SECONDARY ? File.Action.NOTHING : File.Action.MOVE_TO_SECONDARY);503 490 numMoved++; 504 491 } … … 526 513 // 0 = move offline 527 514 f.setLocation(Location.OFFLINE); 528 f.setAction(File.Action.NOTHING);529 }530 else if (moveTo == Location.PRIMARY)531 {532 // 1 = move to primary533 f.setAction(current == Location.PRIMARY ? File.Action.NOTHING : File.Action.MOVE_TO_PRIMARY);534 }535 else if (moveTo == Location.SECONDARY)536 {537 // 2 = move to secondary538 f.setAction(current == Location.SECONDARY ? File.Action.NOTHING : File.Action.MOVE_TO_SECONDARY);539 515 } 540 516 dc.commit(); -
trunk/www/filemanager/files/list_files.jsp
r7310 r7575 274 274 tooltip="Remove the selected files from the server (immedately)" 275 275 /> 276 <%277 if (Application.hasSecondaryStorage())278 {279 %>280 <m:menuitem281 id="mnuMoveToPrimary"282 data-location="PRIMARY"283 title="To primary location"284 tooltip="Enqueue the selected files to be moved back to primary storage"285 />286 <m:menuitem287 id="mnuMoveToSecondary"288 data-location="SECONDARY"289 title="To secondary location"290 tooltip="Enqueue the selected files to be moved to secondary storage"291 />292 <%293 }294 %>295 276 296 277 </m:menu> … … 465 446 enumeration="<%=locations%>" 466 447 title="Location" 467 sortable="true"468 filterable="true"469 exportable="true"470 />471 <%472 Enumeration<String, String> actions = new Enumeration<String, String>();473 for (File.Action a : File.Action.values())474 {475 actions.add(Integer.toString(a.getValue()), a.toString());476 }477 %>478 <tbl:columndef479 id="action"480 property="action"481 datatype="int"482 enumeration="<%=actions%>"483 title="Action"484 448 sortable="true" 485 449 filterable="true" … … 1000 964 <tbl:cell column="characterSet"><%=HTML.encodeTags(item.getCharacterSet())%></tbl:cell> 1001 965 <tbl:cell column="location"><%=item.getLocation()%></tbl:cell> 1002 <tbl:cell column="action"><%=item.getAction()%></tbl:cell>1003 966 <tbl:cell column="md5"><%=HTML.encodeTags(item.getMd5())%></tbl:cell> 1004 967 <tbl:cell column="owner" -
trunk/www/filemanager/files/view_file.jsp
r7166 r7575 251 251 <td><%=file.isWriteProtected() ? "yes" : "no"%></td> 252 252 </tr> 253 <%254 File.Action action = file.getAction();255 %>256 253 <tr> 257 254 <th>Location</th> 258 <td><%=location%> 259 <% 260 if (action == File.Action.MOVE_TO_PRIMARY) 261 { 262 %> 263 (Wating for move to primary) 264 <% 265 } 266 else if (action == File.Action.MOVE_TO_SECONDARY) 267 { 268 %> 269 (Wating for move to secondary) 270 <% 271 } 272 %> 255 <td><%=location%> 273 256 <% 274 257 if (location.isDownloadable()) … … 296 279 data-location="OFFLINE" 297 280 >move offline</span> 298 <%299 if (action == File.Action.MOVE_TO_SECONDARY)300 {301 %>302 | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=1&item_id=<%=itemId%>">cancel move to secondary303 <%304 }305 else if (Application.hasSecondaryStorage())306 {307 %>308 | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=2&item_id=<%=itemId%>">move to secondary</a>309 <%310 }311 %>312 281 | <span class="link auto-init" 313 282 data-auto-init="upload-file" … … 318 287 ] 319 288 <% 320 } 321 else if (location == Location.SECONDARY) 322 { 323 %> 324 [<span class="link" 325 id="moveOffline" 326 data-file-id="<%=itemId %>" 327 data-location="OFFLINE" 328 >move offline</span> 329 <% 330 if (action == File.Action.MOVE_TO_PRIMARY) 331 { 332 %> 333 | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=2&item_id=<%=itemId%>">cancel move to primary 334 <% 335 } 336 else 337 { 338 %> 339 | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=1&item_id=<%=itemId%>">move to primary</a> 340 <% 341 } 342 %> 343 ] 344 <% 345 } 289 } 346 290 else if (location == Location.OFFLINE) 347 291 {
Note: See TracChangeset
for help on using the changeset viewer.