Changeset 5496
- Timestamp:
- 07/29/14 07:59:27 (10 years ago)
- Location:
- VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$ResourcesStep$MoveItemPanel.html
r5495 r5496 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4 4 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/"> 5 <head /> 6 <body> 7 <wicket:panel> 8 <a wicket:id="move" href="#" class="move" title="Move reference"><span>â</span></a> 9 <a wicket:id="target" href="#" class="target" title="Drop reference here"><span>â</span></a> 10 </wicket:panel> 11 </body> 5 <head /> 6 <body> 7 <wicket:panel> 8 <a wicket:id="move" href="#" class="move" title="Move reference"><span>[move]</span></a> 9 <a wicket:id="cancel" href="#" class="cancelmove" title="Cancel move"><span>[cancel]</span></a> 10 <a wicket:id="target" href="#" class="target" title="Drop reference here"><span>[insert]</span></a> 11 </wicket:panel> 12 </body> 12 13 </html> -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard.java
r5495 r5496 405 405 @Override 406 406 public void onClick(AjaxRequestTarget target) { 407 if (movingResource.getObject() == null) {408 // start moving this resource409 407 movingResource.setObject(model.getObject()); 410 } else {411 // already moving, cancel412 movingResource.setObject(null);413 }414 408 target.addComponent(resourcesContainer); 415 409 } … … 418 412 protected void onConfigure() { 419 413 // only allow to start moving when not moving 420 setVisible(movingResource.getObject() == null 421 || model.getObject().equals(movingResource.getObject()) 422 ); 414 setVisible(movingResource.getObject() == null); 423 415 } 424 416 425 417 }; 426 418 add(moveLink); 419 420 final AjaxLink<Resource> cancelLink 421 = new AjaxLink<Resource>("cancel") { 422 423 @Override 424 public void onClick(AjaxRequestTarget target) { 425 movingResource.setObject(null); 426 target.addComponent(resourcesContainer); 427 } 428 429 @Override 430 protected void onConfigure() { 431 // only allow cancelling resource being moved 432 setVisible(model.getObject().equals(movingResource.getObject()) 433 ); 434 } 435 436 }; 437 add(cancelLink); 438 427 439 final AjaxLink<Resource> targetLink 428 440 = new AjaxLink<Resource>("target") { … … 634 646 private IColumn<Resource>[] createColumns() { 635 647 final IColumn<?>[] columns = new IColumn<?>[]{ 636 new AbstractColumn<Resource>(Model.of("\u2195")) {637 638 @Override639 public void populateItem(Item<ICellPopulator<Resource>> item, String componentId, IModel<Resource> model) {640 item.add(new MoveItemPanel(componentId, model));641 }642 643 @Override644 public String getCssClass() {645 return "move";646 }647 648 },649 648 new AbstractColumn<Resource>(new Model<String>("Type")) { 650 649 @Override … … 688 687 return "action"; 689 688 } 689 }, 690 new HeaderlessColumn<Resource>() { 691 692 @Override 693 public void populateItem(Item<ICellPopulator<Resource>> item, String componentId, IModel<Resource> model) { 694 item.add(new MoveItemPanel(componentId, model)); 695 } 696 697 @Override 698 public String getCssClass() { 699 return "move"; 700 } 701 690 702 } 691 703 }; -
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/webapp/css/vcr.css
r5495 r5496 598 598 599 599 table td.action { 600 width: 98px;600 width: 8em; 601 601 text-align: right; 602 602 } 603 603 604 table.resourcesTable tr td.move { 605 width: 2em; 606 } 607 608 table.resourcesTable tr td.move a { 609 display: none; 610 } 611 612 table.resourcesTable th.move { 613 text-align: center; 614 } 615 616 table.resourcesTable tr:hover td.move a, table.resourcesTable tr.moving td.move a { 617 display: inline-block; 618 width: 100%; 619 text-align: center; 604 table.resourcesTable td.move { 605 width: 5em; 620 606 } 621 607 622 608 table.resourcesTable tr.moving { 623 609 background: #ccc; 610 } 611 612 table.moving tr:hover td { 613 border-top: 6px solid #ccc; 614 } 615 616 table.moving tr.moving:hover td { 617 border-top: 0px; 624 618 } 625 619 … … 665 659 table.resourcesTable { 666 660 width: 805px; 667 }668 669 table.moving tr:hover td {670 border-top: 2px solid;671 661 } 672 662
Note: See TracChangeset
for help on using the changeset viewer.