Changeset 733 for trunk/cgi-bin/main.cgi


Ignore:
Timestamp:
05/25/15 18:25:20 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Cleanup while rechecking merge-to-container in UI:

  • Move descriptive strings for merge scopes into a hash in IPDB.pm, so we don't have to update them everywhere every time they might change... now that most of the changes are done, of course.
  • Refiddle listForMerge's freeblock branch to show only direct children, or all free blocks depending on another optional argument.
  • Render previous point pointless due to dropping freeblocks from the return list of merged blocks anyway, because Confusion.
  • Force scope as well as type when merging a master block. Merging any other type in a way that happens to intersect a master remains undefined.
  • Make sure to capture the blocks merged/deleted for return.
  • Fix up some variable names for consistency.
  • Fix stupid typo missed in r732.

See #8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r727 r733  
    12211221  $page->param(typelist => getTypeList($ip_dbh, 'n', $binfo->{type}));  # down the rabbit hole we go...
    12221222
     1223  # Strings for scope;  do this way so we don't have to edit them many places
     1224  $page->param(vis_keepall => $merge_display{keepall});
     1225  $page->param(vis_mergepeer => $merge_display{mergepeer});
     1226  $page->param(vis_clearpeer => $merge_display{clearpeer});
     1227  $page->param(vis_clearall => $merge_display{clearall});
     1228
    12231229  # Tree navigation
    12241230  my $crumbs = getBreadCrumbs($ip_dbh, $binfo->{parent_id});
     
    12651271  $page->param(mergefree => $fb_list);
    12661272
    1267 ##fixme:  push this up the stack somewhere so the labels can be fed to the relevant templates when/as needed
    1268   # scope
    1269   my %merge_friendly = (
    1270         keepall   => "Keep mergeable allocations as suballocations of new block",
    1271         mergepeer => "Keep suballocations of mergeable allocations",
    1272         clearpeer => "Keep only suballocations of $binfo->{block}",
    1273         clearall  => "Clear all suballocations"
    1274     );
    1275   $page->param(vis_scope => $merge_friendly{$webvar{scope}});
     1273  $page->param(vis_scope => $merge_display{$webvar{scope}});
    12761274  $page->param(scope => $webvar{scope});
    12771275} # confMerge()
Note: See TracChangeset for help on using the changeset viewer.