friendica-github/view/templates/msg-header.tpl

65 lines
1.6 KiB
Smarty
Raw Normal View History

2024-08-24 18:23:27 +00:00
{{*
* Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*}}
2013-04-23 11:47:57 +00:00
<script language="javascript" type="text/javascript">
$("#prvmail-text").editor_autocomplete(baseurl + '/search/acl');
2013-04-23 11:47:57 +00:00
</script>
<script type="text/javascript" src="view/js/ajaxupload.js?v={{$VERSION}}"></script>
2013-04-23 11:47:57 +00:00
<script>
$(document).ready(function() {
var uploader = new window.AjaxUpload(
'prvmail-upload',
2022-10-30 04:17:54 +00:00
{ action: 'profile/{{$nickname}}/photos/upload',
2013-04-23 11:47:57 +00:00
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
addeditortext(response);
2013-04-23 11:47:57 +00:00
$('#profile-rotator').hide();
}
2013-04-23 11:47:57 +00:00
}
);
$("#prvmail-text").bbco_autocomplete('bbcode');
2013-04-23 11:47:57 +00:00
});
function jotGetLink() {
reply = prompt("{{$linkurl}}");
if(reply && reply.length) {
$('#profile-rotator').show();
$.get('parseurl?url=' + reply, function(data) {
addeditortext(data);
2013-04-23 11:47:57 +00:00
$('#profile-rotator').hide();
});
}
}
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('parseurl?url=' + reply, function(data) {
addeditortext(data);
2013-04-23 11:47:57 +00:00
$('#profile-rotator').hide();
});
}
}
function addeditortext(data) {
var currentText = $("#prvmail-text").val();
$("#prvmail-text").val(currentText + data);
}
2013-04-23 11:47:57 +00:00
</script>