aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/jot-header.tpl37
-rw-r--r--view/jot.tpl4
2 files changed, 23 insertions, 18 deletions
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index 34837d075..fc05a40be 100644
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -1,7 +1,6 @@
-<script language="javascript" type="text/javascript"
- src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
- <script language="javascript" type="text/javascript">
+<script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
+<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
@@ -18,6 +17,7 @@ tinyMCE.init({
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
+ convert_urls: false,
content_css: "$baseurl/view/custom_tinymce.css"
});
@@ -31,7 +31,7 @@ tinyMCE.init({
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
- tinyMCE.execCommand('mceInsertRawHTML',false,response);
+alert(response); tinyMCE.execCommand('mceInsertRawHTML',false,response);
$('#profile-rotator').hide();
}
}
@@ -39,7 +39,6 @@ tinyMCE.init({
});
-
function jotGetLink() {
reply = prompt("Please enter a link URL:");
if(reply && reply.length) {
@@ -51,18 +50,24 @@ tinyMCE.init({
}
}
+ function linkdropper(event) {
+ var linkFound = event.dataTransfer.types.contains("text/uri-list");
+ if(linkFound)
+ event.preventDefault();
+ }
-
+ 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();
+ });
+ }
+ }
</script>
-<!--
-
- relative_urls: false,
- document_base_url : "$baseurl/",
- external_image_list_url : "$baseurl/include/imagelist-js.php",
- content_css : "$baseurl/view/tiny.css"
-
-});
-</script>
---> \ No newline at end of file
diff --git a/view/jot.tpl b/view/jot.tpl
index 24b6babcb..9e9ab6468 100644
--- a/view/jot.tpl
+++ b/view/jot.tpl
@@ -16,8 +16,8 @@ What's on your mind?
<div id="profile-upload-wrapper" style="display: $visitor;" >
<div id="wall-image-upload-div" ><img id="wall-image-upload" src="images/camera-icon.gif" alt="Upload Photo" title="Upload Photo" /></div>
</div>
- <div id="profile-link-wrapper" style="display: $visitor;" >
- <img id="profile-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" onclick="jotGetLink();" />
+ <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >
+ <img id="profile-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink();" />
</div>
<div id="profile-rotator-wrapper" style="display: $visitor;" >
<img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" />