-<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js"></script>
-<script type="text/javascript" src="{{$baseurl}}/view/js/linkPreview.js"></script>
-<script type="text/javascript" src="{{$baseurl}}/view/theme/frio/js/jot.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
+<script type="text/javascript" src="{{$baseurl}}/view/js/linkPreview.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
+<script type="text/javascript" src="{{$baseurl}}/view/theme/frio/js/jot.js?v={{$smarty.const.FRIENDICA_VERSION}}"></script>
<script type="text/javascript">
var editor = false;
jotTextOpenUI(document.getElementById("profile-jot-text"));
});
-
/* show images / file browser window
*
**/
/* callback */
- $('body').on('fbrowser.image.main', function(e, filename, embedcode, id) {
+ $('body').on('fbrowser.photo.main', function(e, filename, embedcode, id) {
///@todo this part isn't ideal and need to be done in a better way
jotTextOpenUI(document.getElementById("profile-jot-text"));
jotActive();
addeditortext(embedcode);
})
- .on('fbrowser.file.main', function(e, filename, embedcode, id) {
+ .on('fbrowser.attachment.main', function(e, filename, embedcode, id) {
jotTextOpenUI(document.getElementById("profile-jot-text"));
jotActive();
addeditortext(embedcode);
Dialog.doFileBrowser("main");
jotActive();
});
+
+ $('body').on('click', '.p-category .filerm', function(e){
+ e.preventDefault();
+
+ let $href = $(e.target).attr('href');
+ // Prevents arbitrary Ajax requests
+ if ($href.substr(0, 7) === 'filerm/') {
+ $(e.target).parent().removeClass('btn-success btn-danger');
+ $.post($href)
+ .done(function() {
+ liking = 1;
+ force_update = true;
+ })
+ .always(function () {
+ NavUpdate();
+ });
+ }
+ });
});
function deleteCheckedItems() {
}
function jotShare(id) {
- $.get('share/' + id, function(data) {
+ $.get('post/' + id + '/share', function(data) {
// remove the former content of the text input
$("#profile-jot-text").val("");
initEditor(function(){
if (currentText.includes("[attachment") && currentText.includes("[/attachment]")) {
noAttachment = '&noAttachment=1';
}
- $.get('parse_url?binurl=' + reply + noAttachment, function(data) {
+ $.get('parseurl?binurl=' + reply + noAttachment, function(data) {
if (!editor) $("#profile-jot-text").val("");
initEditor(function(){
addeditortext(data);
commentBusy = true;
$('body').css('cursor', 'wait');
- $.get('tagger/' + id + '?term=' + reply);
+ $.post('post/' + id + '/tag/add', {term: reply});
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,3000);
liking = 1;
// if(timer) clearTimeout(timer);
// timer = setTimeout(NavUpdate,3000);
liking = 1;
+ force_update = true;
$.colorbox.close();
} else {
$("#id_term").css("border-color","#FF0000");
return false;
});
});
-
}
function jotClearLocation() {