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