Changeset 894

Show
Ignore:
Timestamp:
12/13/06 00:13:50 (2 years ago)
Author:
bchoate
Message:

Added support for inserting into extended entry textarea.

Files:

Legend:

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

    r888 r894  
    986986                blog_name => $blog->name, 
    987987                edit_blog_id => $blog_id, 
     988                edit_field => $app->param('edit_field'), 
    988989                dialog_view => $app->param('dialog_view') ? 1 : 0, 
    989990            ) : ()), 
     
    10041005    my $param = { 
    10051006        asset_html => $asset->as_html(class => $app->param('class') || ''), 
    1006         magic_token => $app->param('magic_token'), 
     1007        edit_field => $app->param('edit_field'), 
    10071008    }; 
    10081009    $app->build_page('asset_insert.tmpl', $param); 
  • branches/wheeljack/tmpl/cms/asset_insert.tmpl

    r870 r894  
    11<TMPL_INCLUDE NAME=header-dialog.tmpl> 
    22<script type="text/javascript"> 
    3 var str = getByID('text', window.parent.document); 
    4 setSelection(str, '<TMPL_VAR NAME=ASSET_HTML>'); 
     3<!-- 
     4var str = getByID('<TMPL_VAR NAME=EDIT_FIELD>', window.parent.document); 
     5setSelection(str, '<TMPL_VAR NAME=ASSET_HTML ESCAPE=JS>'); 
    56closeDialog(); 
     7//--> 
    68</script> 
    79<TMPL_INCLUDE NAME=footer-dialog.tmpl> 
  • branches/wheeljack/tmpl/cms/dialog_list_assets.tmpl

    r893 r894  
    122122    if (!data) { 
    123123        closeDialog(); 
     124        return; 
    124125    } 
    125126    // user made a selection and clicked insert... 
     
    140141        panel.parent = dlg; 
    141142        dlg.open({}, dialogClose); 
    142         //tableSelect = new TC.TableSelect( "selector" ); 
    143         //tableSelect.rowSelect = true; 
    144143} 
    145144TC.attachLoadEvent( init ); 
     
    178177<input type="hidden" name="blog_id" value="<TMPL_VAR NAME=EDIT_BLOG_ID>" /> 
    179178<input type="hidden" name="id" value="" /> 
     179<input type="hidden" name="edit_field" value="<TMPL_VAR NAME=EDIT_FIELD>" /> 
    180180</TMPL_IF> 
    181181</form> 
  • branches/wheeljack/tmpl/cms/edit_entry.tmpl

    r884 r894  
    541541        write('<img title="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" onclick="return insertLink(document.entry_form.text, 1)" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/email.gif" alt="<MT_TRANS phrase="Insert Email Link" escape="singlequotes">" width="26" height="19" />'); 
    542542        write('<img title="<MT_TRANS phrase="Quote" escape="singlequotes">" onclick="return formatStr(document.entry_form.text, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote" escape="singlequotes">" width="26" height="19" />'); 
    543         write('<img title="<MT_TRANS phrase="Insert Image" escape="singlequotes">" onclick="return openDialog(document.entry_form, \'list_assets\', \'__type=asset&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;dialog_view=1&amp;filter=class&amp;filter_val=image&amp;return_args=<TMPL_VAR NAME=RETURN_ARGS ESCAPE=URL>\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/add_image.gif" alt="<MT_TRANS phrase="Insert Link" escape="singlequotes">" width="26" height="19" />'); 
     543        write('<img title="<MT_TRANS phrase="Insert Image" escape="singlequotes">" onclick="return openDialog(document.entry_form, \'list_assets\', \'_type=asset&amp;edit_field=text&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;dialog_view=1&amp;filter=class&amp;filter_val=image&amp;return_args=<TMPL_VAR NAME=RETURN_ARGS ESCAPE=URL>\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/add_image.gif" alt="<MT_TRANS phrase="Insert Image" escape="singlequotes">" width="26" height="19" />'); 
    544544    } 
    545545} 
     
    584584        write('<img title="<MT_TRANS phrase="Insert Email Link">" onclick="return insertLink(document.entry_form.text_more, 1)" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/email.gif" alt="<MT_TRANS phrase="Insert Email Link">" width="26" height="19" />'); 
    585585        write('<img title="<MT_TRANS phrase="Quote">" onclick="return formatStr(document.entry_form.text_more, \'blockquote\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/quote.gif" alt="<MT_TRANS phrase="Quote">" width="26" height="19" />'); 
     586        write('<img title="<MT_TRANS phrase="Insert Image" escape="singlequotes">" onclick="return openDialog(document.entry_form, \'list_assets\', \'_type=asset&amp;edit_field=text_more&amp;blog_id=<TMPL_VAR NAME=BLOG_ID>&amp;dialog_view=1&amp;filter=class&amp;filter_val=image&amp;return_args=<TMPL_VAR NAME=RETURN_ARGS ESCAPE=URL>\')" src="<TMPL_VAR NAME=STATIC_URI>images/formatting-icons/add_image.gif" alt="<MT_TRANS phrase="Insert Image" escape="singlequotes">" width="26" height="19" />'); 
    586587    } 
    587588}