Mistpark/view/jot-header.tpl

74 lines
2.1 KiB
Smarty
Raw Normal View History

2010-07-25 08:20:20 +02:00
2010-08-03 04:06:36 +02:00
<script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">
2010-07-02 01:48:07 +02:00
tinyMCE.init({
theme : "advanced",
2010-07-06 14:07:28 +02:00
mode : "specific_textareas",
2010-07-30 15:09:20 +02:00
editor_selector: /(profile-jot-text|prvmail-text)/,
2010-07-02 01:48:07 +02:00
plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle",
content_css : "bbcode.css",
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
2010-08-03 04:06:36 +02:00
convert_urls: false,
2010-07-02 01:48:07 +02:00
content_css: "$baseurl/view/custom_tinymce.css"
});
2010-07-23 05:22:03 +02:00
</script>
<script type="text/javascript" src="include/ajaxupload.js" ></script>
<script>
$(document).ready(function() {
var uploader = new window.AjaxUpload(
'wall-image-upload',
{ action: 'wall_upload',
2010-07-23 07:41:45 +02:00
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
2010-08-03 04:06:36 +02:00
alert(response); tinyMCE.execCommand('mceInsertRawHTML',false,response);
2010-07-23 07:41:45 +02:00
$('#profile-rotator').hide();
}
2010-07-23 05:22:03 +02:00
}
);
});
2010-07-23 07:41:45 +02:00
function jotGetLink() {
reply = prompt("Please enter a link URL:");
2010-07-23 08:21:40 +02:00
if(reply && reply.length) {
$('#profile-rotator').show();
$.get('parse_url?url=' + reply, function(data) {
tinyMCE.execCommand('mceInsertRawHTML',false,data);
$('#profile-rotator').hide();
});
}
2010-07-23 07:41:45 +02:00
}
2010-08-03 04:06:36 +02:00
function linkdropper(event) {
var linkFound = event.dataTransfer.types.contains("text/uri-list");
if(linkFound)
event.preventDefault();
}
2010-07-24 15:56:02 +02:00
2010-08-03 04:06:36 +02:00
function linkdrop(event) {
var reply = event.dataTransfer.getData("text/uri-list");
event.target.textContent = reply;
event.preventDefault();
if(reply && reply.length) {
$('#profile-rotator').show();
$.get('parse_url?url=' + reply, function(data) {
tinyMCE.execCommand('mceInsertRawHTML',false,data);
$('#profile-rotator').hide();
});
}
}
2010-07-23 07:41:45 +02:00
2010-07-02 01:48:07 +02:00
</script>