Changeset 905

Show
Ignore:
Timestamp:
12/14/06 00:29:00 (2 years ago)
Author:
gboggs
Message:

- Re-replaced the ancient show_upload_html mode with asset_insert in MT::App::CMS and upload_complete.tmpl.
- Removed the unused validate() function and changed the form name from the confusing "insert_asset" to "select_asset" in dialog_list_assets.tmpl.
- Removed the unused show_upload_html.tmpl.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/wheeljack/lib/MT/App/CMS.pm

    r903 r905  
    6262        'list_commenters' => \&list_commenters, 
    6363        'list_assets' => \&list_assets, 
     64        'asset_insert' => \&asset_insert, 
    6465        'save_commenter_perm' => \&save_commenter_perm, 
    6566        'trust_commenter' => \&trust_commenter, 
     
    9899        'upload_file' => \&upload_file, 
    99100        'start_upload_entry' => \&start_upload_entry, 
    100         'show_upload_html' => \&show_upload_html, 
    101101        'logout' => \&logout, 
    102102        'start_recover' => \&start_recover, 
     
    54525452} 
    54535453 
    5454 sub show_upload_html
     5454sub asset_insert
    54555455    my $app = shift; 
    54565456    defined(my $text = $app->_process_post_upload) or return; 
    5457     $app->build_page('asset_insert.tmpl', 
    5458         { upload_html => $text, edit_field => $app->param('edit_field'), }, 
     5457    $app->build_page('asset_insert.tmpl', { 
     5458            upload_html => $text, 
     5459            edit_field => $app->param('edit_field'), 
     5460        }, 
    54595461    ); 
    54605462} 
     
    1255712559=item * show_status 
    1255812560 
    12559 =item * show_upload_html 
    12560  
    1256112561=item * start_import 
    1256212562 
     
    1256612566 
    1256712567=item * start_upload 
     12568 
     12569=item * asset_insert 
    1256812570 
    1256912571=item * start_upload_entry 
  • branches/wheeljack/tmpl/cms/dialog_list_assets.tmpl

    r904 r905  
    1111<!-- 
    1212var assets = {}; 
    13  
    14 function validate (f) { 
    15     var x = undefined; 
    16     for (var i = 0; i < f.id.length; i++) { 
    17         if (f.id[i].checked) f.__mode.value = 'show_upload_html'; 
    18     } 
    19     return f['__mode'] ? true : false; 
    20 } 
    2113 
    2214function toggleScrollBar(which) { 
     
    118110    } 
    119111    // user made a selection and clicked insert... 
    120     var f = document.forms['insert_asset']; 
     112    var f = document.forms['select_asset']; 
    121113    var sel = dlg.panel.tableSelect.selected(); 
    122114    f['id'].value = sel[0].value; 
     
    159151</TMPL_UNLESS> 
    160152<TMPL_IF NAME=OBJECT_LOOP><TMPL_UNLESS NAME=JSON> 
    161 <form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" name="insert_asset"> 
     153<form method="post" action="<TMPL_VAR NAME=SCRIPT_URL>" name="select_asset"> 
    162154<input type="hidden" name="__mode" value="asset_insert" /> 
    163155<input type="hidden" name="_type" value="asset" /> 
  • branches/wheeljack/tmpl/cms/upload_complete.tmpl

    r899 r905  
    77    var mode = 'list_assets'; 
    88<TMPL_IF NAME=ENTRY_INSERT> 
    9     mode = 'show_upload_html'; 
     9    mode = 'asset_insert'; 
    1010<TMPL_ELSE> 
    1111<TMPL_IF NAME=CAN_POST>