1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-11 21:15:09 +02:00

TinyMce emoticons popup - work in progress.

This commit is contained in:
Cameron
2013-02-28 06:30:44 -08:00
parent 2feaade4ce
commit aa26b0ba36
5 changed files with 72 additions and 3 deletions

View File

@@ -37,6 +37,13 @@
title : 'emoticons.desc',
onclick: function(){
// $("div.modal-body").html('hi there');
$('div.modal-body').load(url + "/emoticons.php");
$('#uiModal').modal('show');
/*
$.colorbox({
href: url + "/emoticons.php",
iframe: true,
@@ -46,6 +53,7 @@
opacity: 0.3,
scrolling: false
});
*/
},
//cmd : 'mceEmotion',
image : url + '/images/emoticons.png'

View File

@@ -48,7 +48,7 @@ require_once(HEADERF);
$value = ($value2 ? $value2 : $value);
// $str .= "\n<a href='javascript:void(0);' onmousedown=\"javascript:insertEmotion('$key')\"><img src=\"".e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/$key\" style=\"border:0; padding-top:2px;\" alt=\"\" /></a> ";
$str .= "\n<img class='selectEmote' src=\"".e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/$key\" style=\"border:0; padding-top:2px;\" alt=\"\" />";
$str .= "\n<img class='tinyInsertEmote' src=\"".e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/$key\" style=\"border:0; padding-top:2px;\" alt=\"\" />";
}
@@ -58,6 +58,9 @@ require_once(HEADERF);
echo $str;
function headerjs(){
return;
global $pref;
// $js = "<script type='text/javascript' src='../../tiny_mce_popup.js'></script>";
$js .= " <script type='text/javascript'>
@@ -68,8 +71,10 @@ function headerjs(){
function insertEmotion(file_name, title) {
var html = '<img src=\'".e_IMAGE_ABS."emotes/".$pref['emotepack']."/' + file_name + '\' alt=\'' + file_name + '\' />';
tinyMCE.execCommand('mceInsertContent', false, html);
tinyMCEPopup.close();
tinyMCE.selectedInstance.execCommand('mceInsertContent',0,html);
//tinyMCE.execCommand('mceInsertContent', false, html);
//tinyMCEPopup.close();
}
";

View File

@@ -37,6 +37,10 @@
title : 'ibrowser.desc',
// cmd : 'mceibrowser',
onclick: function() {
// $('div.modal-body').load(url + "/ibrowser.php");
// $('#uiModal').modal('show');
$.colorbox({
href: url + "/ibrowser.php",
iframe: true,