Priyadarshan Kulkarni
Member Since: June 20, 2022
December 9, 1964
0
Videos
2
Albums
0
Music
0
Groups
602
Views
1
Followers
0
Likes
terrible
poor
average
very good
excellent
click to rate
Rating Details
sesJqueryObject('#sesusercoverphoto_main_photo_reposition').click(function(){
sesJqueryObject('.sesusercoverphoto_cover_reposition_btn').show();
sesJqueryObject('.sesusercoverphoto_cover_fade').hide();
sesJqueryObject('#sesusercoverphoto_cover_change').hide();
sesJqueryObject('.sesusercoverphoto_cover_inner').hide();
sesJqueryUIMin('#sesusercoverphoto_cover_id').dragncrop({instruction: true,instructionText:'Drag to Reposition'});
});
sesJqueryObject('#cancelreposition').click(function(){
sesJqueryObject('.sesusercoverphoto_cover_reposition_btn').hide();
sesJqueryObject('#sesusercoverphoto_cover_id').css('top',previousPositionOfCover);
sesJqueryObject('.sesusercoverphoto_cover_fade').show();
sesJqueryObject('#sesusercoverphoto_cover_change').show();
sesJqueryObject('.sesusercoverphoto_cover_inner').show();
sesJqueryUIMin("#sesusercoverphoto_cover_id").dragncrop('destroy');
});
sesJqueryObject('#savereposition').click(function(){
var sendposition = sesJqueryObject('#sesusercoverphoto_cover_id').css('top');
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').show();
var uploadURL = en4.core.staticBaseUrl+'sesusercoverphoto/index/reposition-cover/user_id/92252';
var formData = new FormData();
formData.append('position', sendposition);
var jqXHR=sesJqueryObject.ajax({
url: uploadURL,
type: "POST",
contentType:false,
processData: false,
data: formData,
cache: false,
success: function(response){
response = sesJqueryObject.parseJSON(response);
if(response.status == 1){
previousPositionOfCover = sendposition;
sesJqueryObject('.sesusercoverphoto_cover_reposition_btn').hide();
sesJqueryUIMin("#sesusercoverphoto_cover_id").dragncrop('destroy');
sesJqueryObject('.sesusercoverphoto_cover_fade').show();
sesJqueryObject('#sesusercoverphoto_cover_change').show();
sesJqueryObject('.sesusercoverphoto_cover_inner').show();
}else{
alert('Something went wrong, please try again later.');
}
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').hide();
//silence
}
});
});
function uploadFileToServerMain(files){
sesJqueryObject('.sesusercoverphoto_cover_main_photo').append('
');
var formData = new FormData();
formData.append('webcam', files);
uploadURL = en4.core.staticBaseUrl+'sesusercoverphoto/index/upload-main/user_id/92252';
var jqXHR=sesJqueryObject.ajax({
url: uploadURL,
type: "POST",
contentType:false,
processData: false,
cache: false,
data: formData,
success: function(response){
response = sesJqueryObject.parseJSON(response);
sesJqueryObject('#uploadFileMainCoverPhoto').val('');
sesJqueryObject('#sesusercoverphoto_cover_loading_main').remove();
sesJqueryObject('.sesusercoverphoto_cover_image_main').attr('src', response.src);
sesJqueryObject('#change_main_cvr_pht').html('
'+en4.core.language.translate('Change Cover Photo'));
sesJqueryObject('#sesusercoverphoto_main_photo_i').css('display','block !important');
}
});
}
sesJqueryObject('#sesusercoverphoto_main_photo_i').click(function(){
sesJqueryObject('.sesusercoverphoto_cover_main_photo').append('
');
var user_id = '92252';
uploadURL = en4.core.staticBaseUrl+'sesusercoverphoto/index/remove-main/user_id/'+user_id;
var jqXHR=sesJqueryObject.ajax({
url: uploadURL,
type: "POST",
contentType:false,
processData: false,
cache: false,
success: function(response){
sesJqueryObject('#change_main_cvr_pht').html('
'+en4.core.language.translate('Add User Photo'));
response = sesJqueryObject.parseJSON(response);
sesJqueryObject('.sesusercoverphoto_cover_image_main').attr('src', response.src);
sesJqueryObject('#sesusercoverphoto_cover_loading_main').remove();
sesJqueryObject('#sesusercoverphoto_main_photo_i').hide();
//silence
}
});
});
function uploadFileMainCoverPhoto(input){
var url = input.value;
var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
if (input.files && input.files[0] && (ext == "png" || ext == "jpeg" || ext == "jpg" || ext == 'PNG' || ext == 'JPEG' || ext == 'JPG' || ext == 'gif' || ext == 'GIF')){
uploadFileToServerMain(input.files[0]);
}else{
//Silence
}
}
sesJqueryObject(document).on('click','#change_main_cvr_pht',function(){
document.getElementById('uploadFileMainCoverPhoto').click();
});
sesJqueryObject('').appendTo('body');
sesJqueryObject(document).on('click','#uploadCoverPhoto',function(){
document.getElementById('uploadFilesesUserCoverPhoto').click();
});
function readCoverPhotoImageUrl(input){
var url = input.files[0].name;
var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
if((ext == "png" || ext == "jpeg" || ext == "jpg" || ext == 'PNG' || ext == 'JPEG' || ext == 'JPG' || ext == 'gif' || ext == 'GIF')){
var formData = new FormData();
formData.append('webcam', input.files[0]);
formData.append('user_id', '92252');
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').show();
sesJqueryObject.ajax({
xhr: function() {
var xhrobj = sesJqueryObject.ajaxSettings.xhr();
if (xhrobj.upload) {
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total;
if (event.lengthComputable) {
percent = Math.ceil(position / total * 100);
}
//Set progress
}, false);
}
return xhrobj;
},
url: en4.core.staticBaseUrl+'sesusercoverphoto/index/edit-coverphoto/',
type: "POST",
contentType:false,
processData: false,
cache: false,
data: formData,
success: function(response){
text = JSON.parse(response);
if(text.status == 'true'){
if(text.src != ''){
if(sesJqueryObject('#sesusercoverphoto_cover_video_id').length)
sesJqueryObject('#sesusercoverphoto_cover_video_id').hide();
sesJqueryObject('#sesusercoverphoto_cover_id').show();
sesJqueryObject('#sesusercoverphoto_cover_id').attr('src', text.src );
}
sesJqueryObject('#sesusercoverphoto_cover_default').hide();
sesJqueryObject('#uploadCoverPhoto').html('
'+en4.core.language.translate('Change Cover Photo'));
sesJqueryObject('#removeCover').css('display','block');
sesJqueryObject('#sesusercoverphoto_main_photo_reposition').css('display','block');
}
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').hide();
sesJqueryObject('#uploadFilesesUserCoverPhoto').val('');
}
});
}
}
sesJqueryObject(document).on('click','#uploadCoverPhotoWebCamPhoto',function(){
sesJqueryObject('#coverphoto_popup_cam_upload').show();
Webcam.set({
width: 320,
height: 240,
image_format:'jpeg',
jpeg_quality: 90
});
Webcam.attach('#coverphoto_camera');
});
function take_coverphotosnapshot() {
// take snapshot and get image data
Webcam.snap(function(data_uri) {
Webcam.reset();
sesJqueryObject('#coverphoto_popup_cam_upload').hide();
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').show();
// upload results
Webcam.upload( data_uri, en4.core.staticBaseUrl+'sesusercoverphoto/index/edit-coverphoto/user_id/92252' , function(code, text) {
text = JSON.parse(text);
if(text.status == 'true'){
if(text.src != ''){
if(sesJqueryObject('#sesusercoverphoto_cover_video_id').length)
sesJqueryObject('#sesusercoverphoto_cover_video_id').hide();
sesJqueryObject('#sesusercoverphoto_cover_id').show();
sesJqueryObject('#sesusercoverphoto_cover_id').attr('src', text.src );
sesJqueryObject('#sesusercoverphoto_cover_default').hide();
sesJqueryObject('#uploadCoverPhoto').html('
'+en4.core.language.translate('Change Cover Photo'));
sesJqueryObject('#removeCover').css('display','block');
sesJqueryObject('#sesusercoverphoto_main_photo_reposition').css('display','block');
}
}
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').hide();
} );
});
}
function removeCoverPhoto(){
sesJqueryObject('#removeCover').css('display','none');
//sesJqueryObject('#sesusercoverphoto_cover_id').attr('src', '' );
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').show();
//sesJqueryObject('#sesusercoverphoto_cover_default').show();
var user_id = '92252';
uploadURL = en4.core.staticBaseUrl+'sesusercoverphoto/index/remove-cover/user_id/'+user_id;
var jqXHR=sesJqueryObject.ajax({
url: uploadURL,
type: "POST",
contentType:false,
processData: false,
cache: false,
success: function(response){
var response = sesJqueryObject.parseJSON(response);
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').hide();
sesJqueryObject('#uploadCoverPhoto').html('
'+en4.core.language.translate('Add Cover Photo'));
sesJqueryObject('#sesusercoverphoto_main_photo_reposition').css('display','none');
sesJqueryObject('#sesusercoverphoto_cover_id').css('top','0');
//update defaultphoto if available from admin.
if(response.src) {
sesJqueryObject('#sesusercovevideo_cover_video_id').hide();
sesJqueryObject('#sesusercoverphoto_cover_id').show();
sesJqueryObject('#sesusercoverphoto_cover_id').attr('src',response.src);
}
}
});
};
function hideCoverPhotoUpload(){
if(typeof Webcam != 'undefined')
Webcam.reset();
canPaginatePageNumber = 1;
sesJqueryObject('#coverphoto_popup_cam_upload').hide();
sesJqueryObject('#coverphoto_popup_existing_upload').hide();
if(typeof Webcam != 'undefined'){
sesJqueryObject('.slimScrollDiv').remove();
sesJqueryObject('.sesusercoverphoto_photo_update_popup_content').html('
');
}
}
sesJqueryObject(document).click(function(event){
if(event.target.id == 'change_coverphoto_profile_txt' || event.target.id == 'cover_change_btn_i' || event.target.id == 'cover_change_btn'){
sesJqueryObject('#sesusercoverphoto_cover_option_main_id').removeClass('active')
if(sesJqueryObject('#sesusercoverphoto_cover_change').hasClass('active'))
sesJqueryObject('#sesusercoverphoto_cover_change').removeClass('active');
else
sesJqueryObject('#sesusercoverphoto_cover_change').addClass('active');
}else if(event.target.id == 'change_main_txt' || event.target.id == 'change_main_btn' || event.target.id == 'change_main_i'){console.log('tyes');
sesJqueryObject('#sesusercoverphoto_cover_change').removeClass('active');
if(sesJqueryObject('#sesusercoverphoto_cover_option_main_id').hasClass('active'))
sesJqueryObject('#sesusercoverphoto_cover_option_main_id').removeClass('active');
else
sesJqueryObject('#sesusercoverphoto_cover_option_main_id').addClass('active');
}else{
sesJqueryObject('#sesusercoverphoto_cover_change').removeClass('active')
sesJqueryObject('#sesusercoverphoto_cover_option_main_id').removeClass('active')
}
});
sesJqueryObject(document).on('click','#fromCoverPhotoExistingAlbum',function(){
sesJqueryObject('#coverphoto_popup_existing_upload').show();
existingCoverPhotosGet();
});
var canPaginatePageNumber = 1;
function existingCoverPhotosGet(){
sesJqueryObject('#coverphoto_profile_existing_img').show();
var URL = en4.core.staticBaseUrl+'sesusercoverphoto/index/existing-photos/';
(new Request.HTML({
method: 'post',
'url': URL ,
'data': {
format: 'html',
cover: 'cover',
page: canPaginatePageNumber,
is_ajax: 1
},
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
document.getElementById('coverphoto_existing_data').innerHTML = document.getElementById('coverphoto_existing_data').innerHTML + responseHTML;
sesJqueryObject('#coverphoto_existing_data').slimscroll({
height: 'auto',
alwaysVisible :true,
color :'#000',
railOpacity :'0.5',
disableFadeOut :true,
});
sesJqueryObject('#coverphoto_existing_data').slimScroll().bind('slimscroll', function(event, pos){
if(canPaginateExistingPhotos == '1' && pos == 'bottom' && sesJqueryObject('#coverphoto_profile_existing_img').css('display') != 'block'){
sesJqueryObject('#coverphoto_profile_existing_img').css('position','absolute').css('width','100%').css('bottom','5px');
existingCoverPhotosGet();
}
});
sesJqueryObject('#coverphoto_profile_existing_img').hide();
}
})).send();
}
sesJqueryObject(document).on('click','a[id^="sesusercoverphoto_cover_existing_album_see_more_"]',function(event){
event.preventDefault();
var thatObject = this;
sesJqueryObject(thatObject).parent().hide();
var id = sesJqueryObject(this).attr('id').match(/\d+/)[0];
var pageNum = parseInt(sesJqueryObject(this).attr('data-src'),10);
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_loading_'+id).show();
if(pageNum == 0){
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_page_'+id).remove();
return;
}
var URL = en4.core.staticBaseUrl+'sesusercoverphoto/index/existing-albumphotos/';
(new Request.HTML({
method: 'post',
'url': URL ,
'data': {
format: 'html',
page: pageNum+1,
id: id,
cover: 'cover',
},
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
document.getElementById('sesusercoverphoto_photo_content_'+id).innerHTML = document.getElementById('sesusercoverphoto_photo_content_'+id).innerHTML + responseHTML;
var dataSrc = sesJqueryObject('#sesusercoverphoto_existing_album_see_more_page_'+id).html();
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_'+id).attr('data-src',dataSrc);
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_page_'+id).remove();
if(dataSrc == 0)
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_'+id).parent().remove();
else
sesJqueryObject(thatObject).parent().show();
sesJqueryObject('#sesusercoverphoto_existing_album_see_more_loading_'+id).hide();
}
})).send();
});
sesJqueryObject(document).on('click','a[id^="sesusercoverphoto_cover_upload_existing_photos_"]',function(event){
event.preventDefault();
var id = sesJqueryObject(this).attr('id').match(/\d+/)[0];
if(!id)
return;
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').show();
hideCoverPhotoUpload();
var URL = en4.core.staticBaseUrl+'sesusercoverphoto/index/uploadexistingcoverphoto/';
(new Request.HTML({
method: 'post',
'url': URL ,
'data': {
format: 'html',
id: id,
cover: 'cover',
user_id:'92252'
},
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
text = JSON.parse(responseHTML);
if(text.status == 'true'){
if(text.src != ''){
if(sesJqueryObject('#sesusercoverphoto_cover_video_id').length)
sesJqueryObject('#sesusercoverphoto_cover_video_id').hide();
sesJqueryObject('#sesusercoverphoto_cover_id').show();
sesJqueryObject('#sesusercoverphoto_cover_id').attr('src', text.src );
}
sesJqueryObject('#sesusercoverphoto_cover_default').hide();
sesJqueryObject('#uploadCoverPhoto').html('
'+en4.core.language.translate('Change Cover Photo'));
sesJqueryObject('#removeCover').css('display','block');
sesJqueryObject('#sesusercoverphoto_main_photo_reposition').css('display','block');
}
sesJqueryObject('#sesusercoverphoto_cover_photo_loading').hide();
sesJqueryObject('#uploadFilesesUserCoverPhoto').val('');
}
})).send();
});
-->