ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 6702


Ignore:
Timestamp:
Apr 22, 2008, 5:18:12 PM (12 years ago)
Author:
ebihara
Message:

#2271:アルバム小窓・アルバム写真小窓をプレビューモードのエディタへ貼れるようにした

Location:
OpenPNE/trunk/webapp/modules/pc/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/pc/templates/h_album_image_insert_dialog.tpl

    r6700 r6702  
    77<meta http-equiv="Content-Script-Type" content="text/javascript" />
    88<script type="text/javascript" src="./js/Selection.js"></script>
     9<script type="text/javascript" src="./js/tiny_mce/tiny_mce_popup.js"></script>
    910<title>({$INC_HEADER_title})</title>
    1011<link rel="stylesheet" href="./xhtml_style.php?r=6665" type="text/css" />
     
    1213function insertAlbumImageURLToTextarea(album_image_id, album_id) {
    1314    var albumURLBase = "({t_url _absolute=1 _html=0 m=pc a=page_fh_album_image_show})";
     15    var replace = " " + albumURLBase + "&target_c_album_image_id=" + album_image_id + "&target_c_album_id=" + album_id + " ";
    1416
    1517    var elm = window.opener.document.getElementById('mce_editor_textarea');
    16     var selection = new Selection(elm);
    1718
    18     var pos = selection.create();
     19    if (elm.style.display == "none") {
     20        tinyMCEPopup.execCommand('mceInsertContent', false, replace);
     21    } else {
     22        var selection = new Selection(elm);
    1923
    20     var replace = albumURLBase + "&target_c_album_image_id=" + album_image_id + "&target_c_album_id=" + album_id;
    21     var head = elm.value.substring(0, pos.start);
    22     var tail = elm.value.substring(pos.end, elm.value.length);
    23     elm.value =  head + replace + tail;
     24        var pos = selection.create();
     25
     26        var head = elm.value.substring(0, pos.start);
     27        var tail = elm.value.substring(pos.end, elm.value.length);
     28        elm.value =  head + replace + tail;
     29    }
    2430}
    2531</script>
  • OpenPNE/trunk/webapp/modules/pc/templates/h_album_insert_dialog.tpl

    r6697 r6702  
    77<meta http-equiv="Content-Script-Type" content="text/javascript" />
    88<script type="text/javascript" src="./js/Selection.js"></script>
     9<script type="text/javascript" src="./js/tiny_mce/tiny_mce_popup.js"></script>
    910<title>({$INC_HEADER_title})</title>
    1011<link rel="stylesheet" href="./xhtml_style.php?r=6665" type="text/css" />
     
    1213function insertAlbumURLToTextarea(album_id) {
    1314    var albumURLBase = "({t_url _absolute=1 _html=0 m=pc a=page_fh_album})";
     15    var replace = " " + albumURLBase + "&target_c_album_id=" + album_id + " ";
    1416
    1517    var elm = window.opener.document.getElementById('mce_editor_textarea');
    16     var selection = new Selection(elm);
    1718
    18     var pos = selection.create();
     19    if (elm.style.display == "none") {
     20        tinyMCEPopup.execCommand('mceInsertContent', false, replace);
     21    } else {
     22        var selection = new Selection(elm);
    1923
    20     var replace = albumURLBase + "&target_c_album_id=" + album_id;
    21     var head = elm.value.substring(0, pos.start);
    22     var tail = elm.value.substring(pos.end, elm.value.length);
    23     elm.value =  head + replace + tail;
     24        var pos = selection.create();
     25
     26        var head = elm.value.substring(0, pos.start);
     27        var tail = elm.value.substring(pos.end, elm.value.length);
     28        elm.value =  head + replace + tail;
     29    }
    2430}
    2531</script>
Note: See TracChangeset for help on using the changeset viewer.