Merge pull request #926 from dawnbreak/master
Fix JavaScript problems on channels where you are not allowed to upload ...
This commit is contained in:
commit
fc84c81f64
@ -1,6 +1,6 @@
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var editor=false;
|
||||
var editor = false;
|
||||
var textlen = 0;
|
||||
var plaintext = '{{$editselect}}';
|
||||
|
||||
@ -75,7 +75,6 @@ function initEditor(cb){
|
||||
else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
@ -89,7 +88,6 @@ function initEditor(cb){
|
||||
});
|
||||
|
||||
editor = true;
|
||||
|
||||
} else {
|
||||
if (typeof cb!="undefined") cb();
|
||||
}
|
||||
@ -100,22 +98,19 @@ function enableOnUser(){
|
||||
$(this).val("");
|
||||
initEditor();
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js" ></script>
|
||||
<script>
|
||||
var ispublic = '{{$ispublic}}';
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
/* enable tinymce on focus and click */
|
||||
$("#profile-jot-text").focus(enableOnUser);
|
||||
$("#profile-jot-text").click(enableOnUser);
|
||||
var upload_title = $('#wall-image-upload').attr('title');
|
||||
var attach_title = $('#wall-file-upload').attr('title');
|
||||
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
try {
|
||||
var uploader = new window.AjaxUpload('wall-image-upload',
|
||||
{ action: '{{$baseurl}}/wall_upload/{{$nickname}}',
|
||||
name: 'userfile',
|
||||
title: upload_title,
|
||||
@ -125,10 +120,11 @@ function enableOnUser(){
|
||||
$('#jot-media').val($('#jot-media').val() + response);
|
||||
$('#profile-rotator').spin(false);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
);
|
||||
var uploader_sub = new window.AjaxUpload(
|
||||
'wall-image-upload-sub',
|
||||
try {
|
||||
var uploader_sub = new window.AjaxUpload('wall-image-upload-sub',
|
||||
{ action: '{{$baseurl}}/wall_upload/{{$nickname}}',
|
||||
name: 'userfile',
|
||||
title: upload_title,
|
||||
@ -138,11 +134,11 @@ function enableOnUser(){
|
||||
$('#jot-media').val($('#jot-media').val() + response);
|
||||
$('#profile-rotator').spin(false);
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
}
|
||||
);
|
||||
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
try {
|
||||
var file_uploader = new window.AjaxUpload('wall-file-upload',
|
||||
{ action: '{{$baseurl}}/wall_attach/{{$nickname}}',
|
||||
name: 'userfile',
|
||||
title: attach_title,
|
||||
@ -152,10 +148,11 @@ function enableOnUser(){
|
||||
$('#jot-media').val($('#jot-media').val() + response);
|
||||
$('#profile-rotator').spin(false);
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
}
|
||||
);
|
||||
var file_uploader_sub = new window.AjaxUpload(
|
||||
'wall-file-upload-sub',
|
||||
try {
|
||||
var file_uploader_sub = new window.AjaxUpload('wall-file-upload-sub',
|
||||
{ action: '{{$baseurl}}/wall_attach/{{$nickname}}',
|
||||
name: 'userfile',
|
||||
title: attach_title,
|
||||
@ -165,10 +162,9 @@ function enableOnUser(){
|
||||
$('#jot-media').val($('#jot-media').val() + response);
|
||||
$('#profile-rotator').spin(false);
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
});
|
||||
|
||||
function deleteCheckedItems() {
|
||||
@ -231,9 +227,7 @@ function enableOnUser(){
|
||||
$('#jot-expire').val(reply);
|
||||
$('#expiryModal').modal('hide');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function jotShare(id) {
|
||||
@ -247,7 +241,6 @@ function enableOnUser(){
|
||||
$('#like-rotator-' + id).spin(false);
|
||||
$(window).scrollTop(0);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -352,8 +345,6 @@ function enableOnUser(){
|
||||
$('#profile-nolocation-wrapper').attr('disabled', true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
{{$geotag}}
|
||||
|
||||
</script>
|
||||
@ -366,12 +357,11 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
|
||||
e.preventDefault();
|
||||
bootbox.confirm("<h4>{{$confirmdelete}}</h4>",function(result) {
|
||||
if (result) {
|
||||
document.location.href = link;}
|
||||
});}
|
||||
else {
|
||||
return confirm("{{$confirmdelete}}");
|
||||
document.location.href = link;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return confirm("{{$confirmdelete}}");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user