Commit a54fdf46 authored by Kulya's avatar Kulya 😊

n_public_assets2

parent 197178b6
Pipeline #19 canceled with stages
<svg height='26px' width='26px' fill="#fff" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g><path fill="#fff" d="M51.038,31.111c-6.315,0-11.452,5.137-11.452,11.452s5.137,11.452,11.452,11.452 s11.453-5.137,11.453-11.452S57.353,31.111,51.038,31.111z M80.805,51.072v-25.95c0-2.218-1.815-4.032-4.032-4.032H64.564 l-2.795-6.164c-0.458-1.01-1.74-1.836-2.849-1.836H43.158c-1.109,0-2.391,0.826-2.849,1.836l-2.795,6.164H25.305 c-2.218,0-4.032,1.815-4.032,4.032v26.066c-8.43,2.278-15.324,6.066-15.324,12.393c0,10.331,18.35,13.913,31.805,15.157 l-0.178,3.389l9.579-4.878l-9.015-5.856l-0.142,2.699c-15.914-1.508-27.362-5.638-27.362-10.512c0-2.891,4.039-5.52,10.637-7.498 v3.961c0,2.218,1.815,4.032,4.032,4.032h51.467c2.218,0,4.032-1.815,4.032-4.032V55.97c6.84,1.99,11.07,4.661,11.07,7.611 c0,4.945-14.119,9.131-30.398,10.582v4.665c13.521-1.164,35.085-4.677,35.085-15.246C96.562,57.147,89.43,53.337,80.805,51.072z M51.038,57.039c-7.982,0-14.476-6.494-14.476-14.476s6.494-14.476,14.476-14.476s14.477,6.494,14.477,14.476 S59.021,57.039,51.038,57.039z"></path></g></svg>
\ No newline at end of file
<svg class="lds-spinner" width="200px" height="200px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" style="background: none;"><g transform="rotate(0 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1.8333333333333333s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(30 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1.6666666666666667s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(60 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1.5s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(90 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1.3333333333333333s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(120 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1.1666666666666667s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(150 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-1s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(180 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(210 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(240 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-0.5s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(270 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(300 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(330 50 50)">
<rect x="47" y="24" rx="9.4" ry="4.8" width="6" height="12" fill="#93dbe9">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="2s" begin="0s" repeatCount="indefinite"></animate>
</rect>
</g></svg>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Last time updated on June 08, 2018
// Latest file can be found here: https://cdn.webrtc-experiment.com/getScreenId.js
// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// Documentation - https://github.com/muaz-khan/getScreenId.
// ______________
// getScreenId.js
/*
getScreenId(function (error, sourceId, screen_constraints) {
// error == null || 'permission-denied' || 'not-installed' || 'installed-disabled' || 'not-chrome'
// sourceId == null || 'string' || 'firefox'
if(microsoftEdge) {
navigator.getDisplayMedia(screen_constraints).then(onSuccess, onFailure);
}
else {
navigator.mediaDevices.getUserMedia(screen_constraints).then(onSuccess)catch(onFailure);
}
}, 'pass second parameter only if you want system audio');
*/
(function() {
window.getScreenId = function(callback, custom_parameter) {
if(navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob)) {
// microsoft edge => navigator.getDisplayMedia(screen_constraints).then(onSuccess, onFailure);
callback({
video: true
});
return;
}
// for Firefox:
// sourceId == 'firefox'
// screen_constraints = {...}
if (!!navigator.mozGetUserMedia) {
callback(null, 'firefox', {
video: {
mozMediaSource: 'window',
mediaSource: 'window'
}
});
return;
}
window.addEventListener('message', onIFrameCallback);
function onIFrameCallback(event) {
if (!event.data) return;
if (event.data.chromeMediaSourceId) {
if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {
callback('permission-denied');
} else {
callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId, event.data.canRequestAudioTrack));
}
// this event listener is no more needed
window.removeEventListener('message', onIFrameCallback);
}
if (event.data.chromeExtensionStatus) {
callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));
// this event listener is no more needed
window.removeEventListener('message', onIFrameCallback);
}
}
if(!custom_parameter) {
setTimeout(postGetSourceIdMessage, 100);
}
else {
setTimeout(function() {
postGetSourceIdMessage(custom_parameter);
}, 100);
}
};
function getScreenConstraints(error, sourceId, canRequestAudioTrack) {
var screen_constraints = {
audio: false,
video: {
mandatory: {
chromeMediaSource: error ? 'screen' : 'desktop',
maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,
maxHeight: window.screen.height > 1080 ? window.screen.height : 1080
},
optional: []
}
};
if(!!canRequestAudioTrack) {
screen_constraints.audio = {
mandatory: {
chromeMediaSource: error ? 'screen' : 'desktop',
// echoCancellation: true
},
optional: []
};
}
if (sourceId) {
screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;
if(screen_constraints.audio && screen_constraints.audio.mandatory) {
screen_constraints.audio.mandatory.chromeMediaSourceId = sourceId;
}
}
return screen_constraints;
}
function postGetSourceIdMessage(custom_parameter) {
if (!iframe) {
loadIFrame(function() {
postGetSourceIdMessage(custom_parameter);
});
return;
}
if (!iframe.isLoaded) {
setTimeout(function() {
postGetSourceIdMessage(custom_parameter);
}, 100);
return;
}
if(!custom_parameter) {
iframe.contentWindow.postMessage({
captureSourceId: true
}, '*');
}
else if(!!custom_parameter.forEach) {
iframe.contentWindow.postMessage({
captureCustomSourceId: custom_parameter
}, '*');
}
else {
iframe.contentWindow.postMessage({
captureSourceIdWithAudio: true
}, '*');
}
}
var iframe;
// this function is used in RTCMultiConnection v3
window.getScreenConstraints = function(callback) {
loadIFrame(function() {
getScreenId(function(error, sourceId, screen_constraints) {
if(!screen_constraints) {
screen_constraints = {
video: true
};
}
callback(error, screen_constraints.video);
});
});
};
function loadIFrame(loadCallback) {
if (iframe) {
loadCallback();
return;
}
iframe = document.createElement('iframe');
iframe.onload = function() {
iframe.isLoaded = true;
loadCallback();
};
iframe.src = 'https://www.webrtc-experiment.com/getSourceId/'; // https://wwww.yourdomain.com/getScreenId.html
iframe.style.display = 'none';
(document.body || document.documentElement).appendChild(iframe);
}
window.getChromeExtensionStatus = function(callback) {
// for Firefox:
if (!!navigator.mozGetUserMedia) {
callback('installed-enabled');
return;
}
window.addEventListener('message', onIFrameCallback);
function onIFrameCallback(event) {
if (!event.data) return;
if (event.data.chromeExtensionStatus) {
callback(event.data.chromeExtensionStatus);
// this event listener is no more needed
window.removeEventListener('message', onIFrameCallback);
}
}
setTimeout(postGetChromeExtensionStatusMessage, 100);
};
function postGetChromeExtensionStatusMessage() {
if (!iframe) {
loadIFrame(postGetChromeExtensionStatusMessage);
return;
}
if (!iframe.isLoaded) {
setTimeout(postGetChromeExtensionStatusMessage, 100);
return;
}
iframe.contentWindow.postMessage({
getChromeExtensionStatus: true
}, '*');
}
})();
// Last time updated: 2019-01-12 7:02:57 AM UTC
// ________________________
// MultiStreamsMixer v1.0.7
// Open-Sourced: https://github.com/muaz-khan/MultiStreamsMixer
// --------------------------------------------------
// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// --------------------------------------------------
function MultiStreamsMixer(arrayOfMediaStreams){function setSrcObject(stream,element){"srcObject"in element?element.srcObject=stream:"mozSrcObject"in element?element.mozSrcObject=stream:element.srcObject=stream}function drawVideosToCanvas(){if(!isStopDrawingFrames){var videosLength=videos.length,fullcanvas=!1,remaining=[];if(videos.forEach(function(video){video.stream||(video.stream={}),video.stream.fullcanvas?fullcanvas=video:remaining.push(video)}),fullcanvas)canvas.width=fullcanvas.stream.width,canvas.height=fullcanvas.stream.height;else if(remaining.length){canvas.width=videosLength>1?2*remaining[0].width:remaining[0].width;var height=1;3!==videosLength&&4!==videosLength||(height=2),5!==videosLength&&6!==videosLength||(height=3),7!==videosLength&&8!==videosLength||(height=4),9!==videosLength&&10!==videosLength||(height=5),canvas.height=remaining[0].height*height}else canvas.width=self.width||360,canvas.height=self.height||240;fullcanvas&&fullcanvas instanceof HTMLVideoElement&&drawImage(fullcanvas),remaining.forEach(function(video,idx){drawImage(video,idx)}),setTimeout(drawVideosToCanvas,self.frameInterval)}}function drawImage(video,idx){if(!isStopDrawingFrames){var x=0,y=0,width=video.width,height=video.height;1===idx&&(x=video.width),2===idx&&(y=video.height),3===idx&&(x=video.width,y=video.height),4===idx&&(y=2*video.height),5===idx&&(x=video.width,y=2*video.height),6===idx&&(y=3*video.height),7===idx&&(x=video.width,y=3*video.height),"undefined"!=typeof video.stream.left&&(x=video.stream.left),"undefined"!=typeof video.stream.top&&(y=video.stream.top),"undefined"!=typeof video.stream.width&&(width=video.stream.width),"undefined"!=typeof video.stream.height&&(height=video.stream.height),context.drawImage(video,x,y,width,height),"function"==typeof video.stream.onRender&&video.stream.onRender(context,x,y,width,height,idx)}}function getMixedStream(){isStopDrawingFrames=!1;var mixedVideoStream=getMixedVideoStream(),mixedAudioStream=getMixedAudioStream();mixedAudioStream&&mixedAudioStream.getTracks().filter(function(t){return"audio"===t.kind}).forEach(function(track){mixedVideoStream.addTrack(track)});var fullcanvas;return arrayOfMediaStreams.forEach(function(stream){stream.fullcanvas&&(fullcanvas=!0)}),mixedVideoStream}function getMixedVideoStream(){resetVideoStreams();var capturedStream;"captureStream"in canvas?capturedStream=canvas.captureStream():"mozCaptureStream"in canvas?capturedStream=canvas.mozCaptureStream():self.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var videoStream=new MediaStream;return capturedStream.getTracks().filter(function(t){return"video"===t.kind}).forEach(function(track){videoStream.addTrack(track)}),canvas.stream=videoStream,videoStream}function getMixedAudioStream(){Storage.AudioContextConstructor||(Storage.AudioContextConstructor=new Storage.AudioContext),self.audioContext=Storage.AudioContextConstructor,self.audioSources=[],self.useGainNode===!0&&(self.gainNode=self.audioContext.createGain(),self.gainNode.connect(self.audioContext.destination),self.gainNode.gain.value=0);var audioTracksLength=0;if(arrayOfMediaStreams.forEach(function(stream){if(stream.getTracks().filter(function(t){return"audio"===t.kind}).length){audioTracksLength++;var audioSource=self.audioContext.createMediaStreamSource(stream);self.useGainNode===!0&&audioSource.connect(self.gainNode),self.audioSources.push(audioSource)}}),audioTracksLength)return self.audioDestination=self.audioContext.createMediaStreamDestination(),self.audioSources.forEach(function(audioSource){audioSource.connect(self.audioDestination)}),self.audioDestination.stream}function getVideo(stream){var video=document.createElement("video");return setSrcObject(stream,video),video.muted=!0,video.volume=0,video.width=stream.width||self.width||360,video.height=stream.height||self.height||240,video.play(),video}function resetVideoStreams(streams){videos=[],streams=streams||arrayOfMediaStreams,streams.forEach(function(stream){if(stream.getTracks().filter(function(t){return"video"===t.kind}).length){var video=getVideo(stream);video.stream=stream,videos.push(video)}})}var videos=[],isStopDrawingFrames=!1,canvas=document.createElement("canvas"),context=canvas.getContext("2d");canvas.style="opacity:0;position:absolute;z-index:-1;top: -100000000;left:-1000000000; margin-top:-1000000000;margin-left:-1000000000;",(document.body||document.documentElement).appendChild(canvas),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var self=this,AudioContext=window.AudioContext;"undefined"==typeof AudioContext&&("undefined"!=typeof webkitAudioContext&&(AudioContext=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(AudioContext=mozAudioContext));var URL=window.URL;"undefined"==typeof URL&&"undefined"!=typeof webkitURL&&(URL=webkitURL),"undefined"!=typeof navigator&&"undefined"==typeof navigator.getUserMedia&&("undefined"!=typeof navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),"undefined"!=typeof navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var MediaStream=window.MediaStream;"undefined"==typeof MediaStream&&"undefined"!=typeof webkitMediaStream&&(MediaStream=webkitMediaStream),"undefined"!=typeof MediaStream&&"undefined"==typeof MediaStream.prototype.stop&&(MediaStream.prototype.stop=function(){this.getTracks().forEach(function(track){track.stop()})});var Storage={};"undefined"!=typeof AudioContext?Storage.AudioContext=AudioContext:"undefined"!=typeof webkitAudioContext&&(Storage.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){drawVideosToCanvas()},this.appendStreams=function(streams){if(!streams)throw"First parameter is required.";streams instanceof Array||(streams=[streams]),arrayOfMediaStreams.concat(streams),streams.forEach(function(stream){if(stream.getTracks().filter(function(t){return"video"===t.kind}).length){var video=getVideo(stream);video.stream=stream,videos.push(video)}if(stream.getTracks().filter(function(t){return"audio"===t.kind}).length&&self.audioContext){var audioSource=self.audioContext.createMediaStreamSource(stream);audioSource.connect(self.audioDestination),self.audioSources.push(audioSource)}})},this.releaseStreams=function(){videos=[],isStopDrawingFrames=!0,self.gainNode&&(self.gainNode.disconnect(),self.gainNode=null),self.audioSources.length&&(self.audioSources.forEach(function(source){source.disconnect()}),self.audioSources=[]),self.audioDestination&&(self.audioDestination.disconnect(),self.audioDestination=null),self.audioContext&&self.audioContext.close(),self.audioContext=null,context.clearRect(0,0,canvas.width,canvas.height),canvas.stream&&(canvas.stream.stop(),canvas.stream=null)},this.resetVideoStreams=function(streams){!streams||streams instanceof Array||(streams=[streams]),resetVideoStreams(streams)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=getMixedStream}
\ No newline at end of file
function editUsers (){
let users = [
{
id:'0',
name:'Kulya',
password:'123654',
status:'admin'
},
{
id:'1',
name:'Rusya',
password:'123654',
status:'user'
},
{
id:'2',
name:'Daniil',
password:'mteam',
status:'guest'
},
]
/*
users.forEach(function(user){
console.log(user.id);
})
*/
let tableHtml = '<table class="users-admin-table">'
+'<thead>'
+'<tr>'
+'<td>№</td>'
+'<td>Имя</td>'
+'<td>Пароль</td>'
+'<td>Статус</td>'
+'<td>Действия</td>'
+'</tr>'
+'<tbody>'
+'</tbody>'
+'</thead>';
let containerTableHtml = document.createElement('div');
let wrapTableHtml = document.createElement('div');
containerTableHtml.className = 'container-table-users-admin';
wrapTableHtml.className = 'wrap-table-users-admin';
$('body').css({
'margin':'0',
'padding':'0'
})
$('body').append(containerTableHtml);
$('.container-table-users-admin').append(wrapTableHtml);
$('.container-table-users-admin').append('<span class="fa fa-times close-modal-user-admin" ></span>');
$('.wrap-table-users-admin').append(tableHtml)
users.forEach(function(user){
$('table.users-admin-table').append('<tr><td data-id="'+user.id+'">'+user.id+'</td><td data-name="'+user.name+'">'+user.name+'</td><td data-password="'+user.password+'">'+user.password+'</td><td data-status="'+user.status+'">'+user.status+'</td><td class="fa fa-edit change_pass_ti_user" style="cursor:pointer"></td></tr>')
})
$('.container-table-users-admin').css({
'height':'100vh',
'width':'100%',
'position':'fixed',
'left':'0',
'background':'rgba(0,0,0,.35)'
})
$('.wrap-table-users-admin').css({
'padding':'10px',
'top':'40%',
'position':'absolute',
'left':'50%',
'z-index':'10',
'transform':'translate(-50%,-40%)',
'background':'rgb(60,64,67)',
'border-radius':'5px'
})
$('.close-modal-user-admin').css({
'top':'15px',
'position':'absolute',
'color':'white',
'right':'30px',
'z-index':'15',
'font-size':'2em',
'cursor':'pointer'
})
$('table.users-admin-table').css({
'width':'100%',
'border-collapse':'collapse',
'color':'white',
'font-size':'1.25em'
})
$('table.users-admin-table thead tr').css({
'border-bottom':'1px solid #f6f6f6',
'text-align':'center'
})
$('table.users-admin-table thead tr td').css({
'padding':'7px 15px'
})
$('table.users-admin-table tbody tr td').css({
'padding':'7px 15px'
})
/*EVEEENTS*/
$('.close-modal-user-admin').click(function(){
$('.container-table-users-admin').remove();
})
$('.change_pass_ti_user').click(function(){
let status = $(this).prev().attr('data-status');
let password = $(this).prev().prev().attr('data-password');
let name = $(this).prev().prev().prev().attr('data-name');
$('.wrap-table-users-admin').remove();
let selectStatusHtml;
if(status === 'admin'){
selectStatusHtml = '<select class="status-select"><option disabled selected>Выберете статус:</option><option value="Пользователь">Пользователь</option><option value="Гость">Гость</option></select>'
}else if(status === 'guest'){
selectStatusHtml = '<select class="status-select"><option disabled selected>Выберете статус:</option><option value="Админ">Админ</option><option value="Гость">Админ</option></select>'
}
else{
selectStatusHtml = '<select class="status-select"><option disabled selected>Выберете статус:</option><option value="Админ">Админ</option><option value="Пользователь">Пользователь</option></select>'
}
$('.container-table-users-admin').append('<div class="personal-user-info"><label class="label-personal-info">Пользователь: '+name+'</label><input type="password" placeholder="Введите новый пароль" class="password-input"/><input type="password" placeholder="Повторите пароль" class="confirm-password">'+selectStatusHtml+'<select class="time-select"><option selected disabled>Выберете время действия пароля:</option><option>1 час</option><option>2 часа</option><option>3 часа</option><option>6 часов</option><option>12 часов</option><option>24 часа</option><option>Навсегда</option></select><button class="send-personal-info">Изменить</button></div>')
/* VALIIIIDATEEEE */
$('.send-personal-info').click(function(){
let userData = {};
if( $('input.password-input').val() !=='' && $('input.confirm-password').val() ==='' ){
$('input.password-input').val('');
$('input.confirm-password').val('');
}else if( !$('input.confirm-passwor').val() !== '' && $('input.password-input').val() ==='' ){
$('input.password-input').val('');
$('input.confirm-password').val('');
}else if( ($('input.password-input').val() !=='' && $('input.confirm-password').val() !=='') && ($('input.password-input').val() === $('input.confirm-password').val()) ){
userData.pass = $('input.password-input').val();
$('input.password-input').val('');
$('input.confirm-password').val('');
}
/* VALIIIIDATEEEE */
})
$('.personal-user-info').css({
'width':'32em',
'padding':'1.25em',
'top':'50%',
'position':'absolute',
'left':'50%',
'z-index':'10',
'transform':'translate(-50%,-50%)',
'background': 'rgba(0,0,0,.5)',
'display':'flex',
'flex-direction':'column',
'border-radius':'.3125em'
})
$('.label-personal-info').css({
'color':'white',
'text-align':'center',
'padding':'10px',
'font-size':'1.875em',
'font-weight':'500'
})
$('.personal-user-info select').css({
'width': '100%',
'transition': 'border-color .3s,box-shadow .3s',
'border': '1px solid #d9d9d9',
'border-radius':'.1875em',
'font-size': '1.125em',
'box-shadow': 'inset 0 1px 1px rgba(0,0,0,.06)',
'box-sizing': 'border-box',
'margin':'10px 0',
'padding':'.75em',
'height':'2.725em'
})
$('.personal-user-info input').css({
'width': '100%',
'transition': 'border-color .3s,box-shadow .3s',
'border': '1px solid #d9d9d9',
'border-radius':'.1875em',
'font-size': '1.125em',
'box-shadow': 'inset 0 1px 1px rgba(0,0,0,.06)',
'box-sizing': 'border-box',
'margin':'10px 0',
'padding':'.75em',
'height':'2.625em'
})
$('.send-personal-info').css({
'width':'200px',
'background':'#F7941D',
'font-size':'1.0625em',
'margin':'10px auto',
'cursor':'pointer',
'outline':'none',
'border':'none',
'color':'white',
'cursor':'pointer',
'padding':'.75em',
'height':'2.625em',
'border-radius':'.25em'
})
})
}
'use strict';
var cur_call = null;
var share_call = null;
var myConfMan = null;
var vertoHandle;
var ringing = false;
var autocall = false;
var chatting_with = false;
var vid_width = 320;
var vid_height = 180;
var local_vid_width = 320;
var local_vid_height = 180;
var is_full_screen = false;
var outgoingBandwidth;
var incomingBandwidth;
var vqual;
var sessid = null;
var master = null;
var canvas_id = null;
var second_screen = null;
var save_settings = true;
var vertoHandle = null;
var is_moderator = false;
var myCanvasID = 0;
var canvasData = [];
var rcmd = false;
var video_screen = "webcam"
var destination_number = $("#room_number").val(); //"7777";
var adm_login = "888888";
var adm_pass = "f12070c20cf77e9103b88f8cc3ac8f80";
var adm_host = location.host; //'test.vmajlis.uz';
var ws_url = 'wss://'+adm_host+':8682'
var sessid = $.verto.genUUID();
// sessid
function docall() {
if (cur_call) {
return;
}
cur_call = vertoHandle.newCall({
destination_number: destination_number,
caller_id_name: "Admin",
caller_id_number: adm_login,
outgoingBandwidth: 0,
incomingBandwidth: 1024,
useVideo: true,
useStereo: true,
useCamera: "none",
useMic: "none",
useSpeak: "any",
dedEnc: false,
mirrorInput: false,
userVariables: {avatar: '',email: '' },
});
}
var callbacks = {
//docall();
onEvent: function(v, e) {
console.debug("GOT EVENT", e, v);
},
onWSLogin: function(v,e){
console.log("For do Call");
docall();
},
onMessage: function(verto, dialog, msg, data){
console.log(" ");
console.log("************************ meet.js MESSAGE ******************************");
console.log(" ");
console.log(" Incoming Message: verto:", verto);
console.log(" Incoming Message: Data:", data);
console.log(" Incoming Message: msg:", msg);
console.log(" Incoming Message: dialog:", dialog);
if( typeof data !== 'undefined' && typeof data.pvtData !== 'undefined' ){
rcmd = function(cmdobj){
//.modCommand("list-videoLayouts", null, null);
//primer cmdobj: {"application": "conf-control","command": cmd,"id": id,"value": value}
var vdata = (typeof cmdobj !== 'undefined') ? cmdobj : {"application": "conf-control","command": "canvasInfo","id": null,"value": null};
verto.rpcClient.call("verto.broadcast", {
"eventChannel": data.pvtData.modChannel,
"data": vdata
});
}
}
}
}
function vmajlisVertoInit() {
//"minFrameRate": 15,
//"vertoBestFrameRate": 30
vertoHandle = new $.verto({
login: adm_login + "@" + adm_host,
passwd: adm_pass,
socketUrl: ws_url,
tag: video_screen,
//localTag: $("#local_video").is(':checked') ? "local_webcam" : null,
ringFile: "",
sessid: sessid,
videoParams: {
"minWidth": vid_width,
"minHeight": vid_height,
"maxWidth": vid_width,
"maxHeight": vid_height,
"minFrameRate": 5,
"vertoBestFrameRate": 5
},
deviceParams: {
useCamera: "none",
useMic: "none",
useSpeak: "none"
},
audioParams: {
googAutoGainControl: false,
googNoiseSuppression: false,
googHighpassFilter: false
},
iceServers: false
},callbacks);
setTimeout( vertoHandle.login(), 2000);
}
//$(window).load(function() {
//vmajlisVertoInit();
setTimeout(function() {
$.verto.initv({skipPermCheck: true}, vmajlisVertoInit);
}, 1000);
//});
$(function(){
/*
$.ajax({
url: '/ajax',
dataType: 'json',
data:{
func:'enterToMyLastWebinar',
wid:weid
},
type:'post',
success:function(r){
location.reload();
}
})
*/
$('#add_new_admin').click(function(){
addNewAdmin();
})
});
function addNewAdmin(){
swal({
title:"Пожалуйста введите данные:",
html:'<div class="wrap_data_users">'
+'<input required id="num_new_user" type="text" onkeypress="checkDigit(this)" placeholder="Введите номер">'
+'</div>',
showCancelButton:true,
cancelButtonText:'Отмена',
showCloseButton: true,
onOpen: () => { $('#num_new_user').focus(); }
}).then((result)=> {
if(result.value){
var num = $('#num_new_user').val();
$.ajax({
method:'POST',
url:'/ajax',
dataType:'json',
data:{
func:'isFreeNumber',
number:num
},success:function(result){
if(result.result == 'ok'){
$.ajax({
method:'POST',
url:'/ajax',
dataType: "json",
data:{
func:'getAllRooms',
room:$("#room_number").val()
},
success: function(result){
var roomsList = '<select id="room_new_user">';
$.each(result,function(key,val){
roomsList += '<option value="'+val['number']+'">'+val['name']+' ('+val['number']+')</option>';
});
roomsList += '</select>';
// sWAL beGIN
swal({
title:'Заполните данные ('+ num + ')',
showCancelButton:true,
cancelButtonText:'Отмена',
showCloseButton:true,
html:'<div class="wrap_data_users">'
+'<select class="choice_type">'
+'<option value="webrtc">WebRTC</option>'
+'<option value="sip">SIP</option>'
+'</select>'
+'<input required value="" id="login_new_user" value="" type="text" placeholder="Введите логин для WebRTC">'
+'<input required value="" id="name_new_user" value="" type="text" placeholder="Введите имя">'
+'<input required value="" id="pass_new_user" type="password" placeholder="Введите пароль">'
+ roomsList
+'<input required value="" id="new_ptz_url" value="" type="text" placeholder="Ptz url">'
+'</div>',
onOpen: function(){
/*TODOOOO EMIL*/
var value ='';
$('input[type=text]').val("");
document.getElementById("name_new_user").reset;
document.getElementById("login_new_user").reset;
$('input#login_new_user').attr('autocomplete',false);
$('input#name_new_user').attr('autocomplete',false);
$('input#pass_new_user').attr('autocomplete',false);
$('input#pass_new_user').val('');
$('input#new_ptz_url').val('');
$( "select.choice_type" ).change(function () {
value = $(this).val();
//value = $( "select.choice_type option:selected" ).text();
console.log("typeUser: ",value);
if(value == 'webrtc'){
$("#login_new_user").show();
}else{
$("#login_new_user").hide();
}
});
/*TODOO EMIL*/
}
}).then((result)=> {
if(num==''){
swal({
type:'error',
title:'Логин неверный',
text:'Попробуйте еще раз'
})
return false;
}
if(result.value){
var password = $('#pass_new_user').val();
var name = $('#name_new_user').val();
var room = $('#room_new_user').val();
var login = $('#login_new_user').val();
var type = $( "select.choice_type" ).val();
//var type = $( "select.choice_type option:selected" ).text();
$.ajax({
method:'POST',
url:'/ajax',
dataType:'json',
data:{
func:'saveUserData',
num:num,
login:login,
password:password,
name:name,
room:room,
type:type
},success:function(result){
console.log('success added users');
getUserInfo();
console.log(result);
/*var last_row = $('.info_row_user').last();
var current_id = parseInt(last_row.find('td#number_id').text());
current_id = current_id + 1;
$('table.table_users_list tbody').append('<tr class="info_row_user"><td id="number_id">'+current_id+'</td><td id="number_u">'+num+'</td><td id="name_u">'+name+'</td><td id="room_u">'+room+'</td><td><div class="actions"><a class="action_user" value="save" href="#"><i class="fa fa-floppy-o"></i></a><a class="action_user" value="del" href="#"><i class="fa fa-trash-o"></i></a><a class="action_user" value="edit" href="#"><i class="fa fa-pencil"></i></a></div></td></tr>');
*/
}
})
}
})
}
});
}
}
})
}
})
}
\ No newline at end of file
This diff is collapsed.
html,body{
padding:0;
margin:0;
}
img{
max-width:100%;
}
.overlay-body{
background:rgba(0,0,0,.45);
position:absolute;
z-index:10;
width:100%;
height:100vh;
display:none;
}
.main_wrap_menu{
position:absolute;
left:0;
width:360px;
height:100vh;
background:white;
box-shadow: 5px 0 5px darkslategrey;
top:0;
z-index:9999;
display:none;
}
.header-menu-burger{
position:relative;
width:100%;
height:18vh;
background-image:url('patterns/bg_header.jpg');
background-size:cover;
background-position:center;
}
.profile-info{
width: 100%;
padding:0 10px;
display: flex;
height: 100%;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
.avatar{
padding:2.5% 0;
}
.profile-info span{
color:white;
font-weight:bold;
font-size:1em;
padding:0 10px;
text-transform:uppercase;
}
.profile-info img{
border:4px solid white;
border-radius:50%;
}
.wrap-menu-links{
width:100%;
height:70vh;
position:relative;
}
.wrap-menu-links ul{
width: 100%;
}
.wrap-menu-links ul li{
display: flex;
justify-content:space-between;
width: 97%;
margin: 0 auto;
padding: 5%;
border-bottom:1px solid #f6f6f6
}
.wrap-menu-links ul li i{
font-size:1.25em;color: #535353;
}
#close-menu{
color:white;
position:absolute;
right:15px;
top:10px;
cursor:pointer;
}
.wrap-menu-links ul li a{
color: #535353;
font-weight:bold;
font-size:1em;
text-transform:uppercase;
}
.wrap-menu-links ul li a:hover{
text-decoration:none;
}
\ No newline at end of file
/*
Plugin for adding aside menu
///TODO
SIZE (HEIGHT * WIDTH);
FONT-COLOR;
TYPE-MENU: VERTICAL/HORIZONTAL
EXAMPLE OBJECT
menuObj = {
idMenu:'', //ID MENU
header:{ // HAVE HEADER OR NOT
imgSrc:'', // PROFILE IMAGE
name:'', // NAME OF PROFILE
subTitle:'', //ANY NOTE - SUBTITLE
backgroundSrc:'' // BACKGROUND HEADER
},
listLinks:[
{icon:'',title:'',link:'',onClick:()} // LIST OF LINKS IN MENU
]
}
*/
var createMenu = function(menuObj) {
var path_to_stylesheet = '/assets/js/burger_menu/burger_menu.css';
var overlay = document.createElement('div');
overlay.setAttribute('class','overlay-body');
var newLink = document.createElement('link');
newLink.setAttribute('rel','stylesheet');
newLink.setAttribute('href',path_to_stylesheet);
newLink.setAttribute('type',"text/css");
document.head.appendChild(newLink);
var headerHtml;
var listLinksNav;
if((typeof menuObj !== 'object')){
return false;
}
var menu = menuObj;
if((typeof menu.header !== 'undefined') && (typeof menu.header.name !== 'undefined')){
var bgSrc = (menu.header.backgroundSrc) ? menu.header.backgroundSrc : '/assets/js/burger_menu/patterns/bg_header.jpg';
var subtitle = (menu.header.subTitle) ? menu.header.subTitle : 'Заголовок';
var imgProfile = (menu.header.imgSrc) ? menu.header.imgSrc : '/assets/js/burger_menu/patterns/ava.jpg';
var closeWindow = document.createElement('i');
closeWindow.setAttribute('class','fa fa-times');
closeWindow.setAttribute('id','close-menu');
var subtitleObj = document.createElement('span');
subtitleObj.setAttribute('class','id');
subtitleObj.innerHTML = subtitle ;
var nameObject = document.createElement('span');
nameObject.setAttribute('class','name');
nameObject.innerHTML = menu.header.name;
var imgObject = document.createElement('img');
imgObject.setAttribute('src',imgProfile);
imgObject.setAttribute('width','75px');
imgObject.setAttribute('height','75px');
var divAvatar = document.createElement('div');
divAvatar.setAttribute('class','avatar');
divAvatar.appendChild(imgObject);
var wrapContInfo = document.createElement('div');
wrapContInfo.setAttribute('class','profile-info');
wrapContInfo.appendChild(divAvatar);
wrapContInfo.appendChild(nameObject);
wrapContInfo.appendChild(subtitleObj);
headerHtml = document.createElement('div');
headerHtml.setAttribute('class','header-menu-burger');
headerHtml.setAttribute('style','background-image:url("'+bgSrc+'")');
headerHtml.appendChild(closeWindow);
headerHtml.appendChild(wrapContInfo);
}
var menuHtml = document.createElement('div')
menuHtml.setAttribute('class','main_wrap_menu');
menuHtml.setAttribute('id',menu.idMenu);
if( (menu.bgColor != '') || (typeof menu.bgColor !== 'undefined') ){
menuHtml.style.backgroundColor = menu.bgColor ;
}else{
menuHtml.style.backgroundColor = '#f6f6f6' ;
}
var menuLiWrap = document.createElement('div');
menuLiWrap.setAttribute('class','wrap-menu-links');
if( typeof menu.listLinks !== 'undefined'){
var arrayLinks = menu.listLinks;
var ulListLinks = document.createElement('ul');
ulListLinks.setAttribute('id','em-plugin-menu-burger');
arrayLinks.forEach(function(element) {
var menuItemLi = document.createElement('li');
var menuItem = document.createElement('a');
var menuIcon = document.createElement('i');
menuIcon.setAttribute('class',element.iconClass);
if( (menu.fontColor != '') || (typeof menu.fontColor !== 'undefined') ){
menuIcon.style.color = menu.fontColor;
menuItem.style.color = menu.fontColor;
}else{
menuIcon.style.color = '#535353';
menuItem.style.color = '#535353';
}
menuItem.innerHTML = element.title;
if( ( typeof element.link !== 'undefined') && (element.link != '') ){
menuItem.setAttribute("href",element.link);
}else{
menuItem.setAttribute("href",'#');
menuItem.addEventListener('click', function(e){
e.preventDefault();
});
}
if( typeof element.onClick !== 'undefined' ){
menuItem.onclick = element.onClick;
}
menuItemLi.appendChild(menuIcon);
menuItemLi.appendChild(menuItem);
ulListLinks.appendChild(menuItemLi);
});
menuLiWrap.appendChild(ulListLinks);
menuHtml.appendChild(headerHtml);
menuHtml.appendChild(menuLiWrap);
}
if( (!menu.show) || (typeof menu.show === 'undefined') || (menu.show == '') ){
openedMenu = false;
menuHtml.style.display = 'none';
overlay.style.display = 'none';
}else{
openedMenu = true;
menuHtml.style.display = 'block';
overlay.style.display = 'block';
}
document.body.appendChild(overlay);
document.body.appendChild(menuHtml);
document.getElementById('close-menu').addEventListener('click',function(){
var m = document.querySelector('.main_wrap_menu');
var o = document.querySelector('.overlay-body');
m.style.display = 'none';
o.style.display = 'none';
})
};
This diff is collapsed.
This diff is collapsed.
$(function(){
createMenu({
idMenu:'webinar-menu',
show:false,
bgColor:'white',
fontColor:'',
header:{
name:'Username',
subTitle:'Webinar',
},
listLinks:[
{iconClass:'fa fa-cog', title:'Архив', link:'/settings'},
{iconClass:'fa fa-plus', title:'Создать вебинар', onClick:function(){
createWebinar();
}},
{iconClass:'fa fa-user', title:'Личный кабинет', link:'/cabinet'},
{iconClass:'fa fa-file',title:'Файлы'},
{iconClass:'fa fa-sign-out-alt',title:'Выход',link:'/logout'}
]
});
$('#settings').click(function(){
$('.main_wrap_menu').show(100);
$('.overlay-body').show(100);
})
$('.change-avatar-btn').click(function(){
$('#avatar').click();
var uid = $('#uid').val();
$('input#avatar').on('change',function(){
var file_data = $('input#avatar').prop('files')[0];
var form_data = new FormData();
form_data.append('picture', file_data);
form_data.append('func','pictureupload');
form_data.append('uid', uid);
form_data.append('desc','avatar');
$.ajax({
url: '/ajax',
dataType: 'json',
cache: false,
contentType: false,
processData: false,
data: form_data,
type: 'post',
success: function(response){
console.log('AVATAR',response);
var src = '/files/' + response.fid;
$('.img-avatar').attr('src',src);
}
});
})
})
$('.change-brand-btn').click(function(){
$('#logo').click();
var uid = $('#uid').val();
$('input#logo').on('change',function(){
var file_data = $('input#logo').prop('files')[0];
var form_data = new FormData();
form_data.append('picture', file_data);
form_data.append('func','pictureupload');
form_data.append('uid', uid);
form_data.append('desc','logo');
$.ajax({
url: '/ajax',
dataType: 'json',
cache: false,
contentType: false,
processData: false,
data: form_data,
type: 'post',
success: function(response){
console.log('LOGO',response);
var src = '/files/' + response.fid;
$('.img-brand').attr('src',src);
}
});
})
})
$('#save_changes').click(function(){
var pass = $('#new_pass').val();
var confirmPass = $('#confirm_new_pass').val();
if(( pass !== "" && confirmPass ==="") || ( pass === "" && confirmPass !=="" )){
$('.status_pass').text('Одно из полей не заполнено');
$('.status_pass').show();
}else{
if(( pass !== '' && confirmPass !== '' ) && (typeof pass !== 'undefined' && typeof confirmPass !== 'undefined') ){
if( ($('#confirm_new_pass').val()) !== ($('#new_pass').val()) ){
$('.status_pass').text('Пароли не совпадают');
$('.status_pass').show();
}else{
$('.status_pass').hide();
$('#confirm_new_pass').val('');
$('#new_pass').val('');
}
}
}
})
})
\ No newline at end of file
// _______________
// Canvas-Designer
// Open-Sourced: https://github.com/muaz-khan/Canvas-Designer
// --------------------------------------------------
// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// --------------------------------------------------
function CanvasDesigner() {
var designer = this;
designer.iframe = null;
var tools = {
line: true,
arrow: true,
pencil: true,
dragSingle: true,
dragMultiple: true,
eraser: true,
rectangle: true,
arc: true,
bezier: true,
quadratic: true,
text: true,
image: true,
pdf: true,
marker: true,
zoom: true,
lineWidth: true,
colorsPicker: true,
extraOptions: true,
code: true
};
designer.icons = {
line: null,
arrow: null,
pencil: null,
dragSingle: null,
dragMultiple: null,
eraser: null,
rectangle: null,
arc: null,
bezier: null,
quadratic: null,
text: null,
image: null,
pdf: null,
pdf_next: null,
pdf_prev: null,
pdf_close: null,
marker: null,
zoom: null,
lineWidth: null,
colorsPicker: null,
extraOptions: null,
code: null
};
var selectedIcon = 'pencil';
function syncData(data) {
if (!designer.iframe) return;
designer.postMessage({
canvasDesignerSyncData: data
});
}
var syncDataListener = function(data) {};
var dataURLListener = function(dataURL) {};
var captureStreamCallback = function() {};
function onMessage(event) {
if (!event.data || event.data.uid !== designer.uid) return;
if(!!event.data.sdp) {
webrtcHandler.createAnswer(event.data, function(response) {
if(response.sdp) {
designer.postMessage(response);
return;
}
captureStreamCallback(response.stream);
});
return;
}
if (!!event.data.canvasDesignerSyncData) {
designer.pointsLength = event.data.canvasDesignerSyncData.points.length;
syncDataListener(event.data.canvasDesignerSyncData);
return;
}
if (!!event.data.dataURL) {
dataURLListener(event.data.dataURL);
return;
}
}
function getRandomString() {
if (window.crypto && window.crypto.getRandomValues && navigator.userAgent.indexOf('Safari') === -1) {
var a = window.crypto.getRandomValues(new Uint32Array(3)),
token = '';
for (var i = 0, l = a.length; i < l; i++) {
token += a[i].toString(36);
}
return token;
} else {
return (Math.random() * new Date().getTime()).toString(36).replace(/\./g, '');
}
}
designer.uid = getRandomString();
designer.appendTo = function(parentNode, callback) {
callback = callback || function() {};
designer.iframe = document.createElement('iframe');
// designer load callback
designer.iframe.onload = function() {
callback();
callback = null;
};
designer.iframe.src = designer.widgetHtmlURL + '?widgetJsURL=' + designer.widgetJsURL + '&tools=' + JSON.stringify(tools) + '&selectedIcon=' + selectedIcon + '&icons=' + JSON.stringify(designer.icons);
designer.iframe.style.width = '100%';
designer.iframe.style.height = '100%';
designer.iframe.style.border = 0;
window.removeEventListener('message', onMessage);
window.addEventListener('message', onMessage, false);
parentNode.appendChild(designer.iframe);
};
designer.destroy = function() {
if (designer.iframe) {
designer.iframe.parentNode.removeChild(designer.iframe);
designer.iframe = null;
}
window.removeEventListener('message', onMessage);
};
designer.addSyncListener = function(callback) {
syncDataListener = callback;
};
designer.syncData = syncData;
designer.setTools = function(_tools) {
tools = _tools;
};
designer.setSelected = function(icon) {
if (typeof tools[icon] !== 'undefined') {
selectedIcon = icon;
}
};
designer.toDataURL = function(format, callback) {
dataURLListener = callback;
if (!designer.iframe) return;
designer.postMessage({
genDataURL: true,
format: format
});
};
designer.sync = function() {
if (!designer.iframe) return;
designer.postMessage({
syncPoints: true
});
};
designer.pointsLength = 0;
designer.undo = function(index) {
if (!designer.iframe) return;
designer.postMessage({
undo: true,
index: index || designer.pointsLength - 1 || -1
});
};
designer.postMessage = function(message) {
if (!designer.iframe) return;
message.uid = designer.uid;
designer.iframe.contentWindow.postMessage(message, '*');
};
designer.captureStream = function(callback) {
if (!designer.iframe) return;
captureStreamCallback = callback;
designer.postMessage({
captureStream: true
});
};
designer.clearCanvas = function () {
if (!designer.iframe) return;
designer.postMessage({
clearCanvas: true
});
};
designer.renderStream = function() {
if (!designer.iframe) return;
designer.postMessage({
renderStream: true
});
};
designer.widgetHtmlURL = 'widget.html';
designer.widgetJsURL = 'widget.min.js';
}
'use strict';
$(function(){
$('.close').click(function(){
$('.container-chat').slideUp(300);
})
})
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
$(function(){
getAllRooms();
$('#add_room').click(function(){
swal({
title:'Добавление конференции',
html:'<input id="room_name" type="text" class="swal2-input" placeholder="Введите название">'
+'<input id="room_number" type="text" onclick="checkDigit(this)"class="swal2-input" placeholder="Введите номер комнаты">',
showCancelButton: true,
confirmButtonText: 'Добавить',
cancelButtonText:'Отмена',
showCloseButton:true
}).then((result) => {
var nameroom = $('#room_name').val();
var number_room = $('#room_number').val();
if (result.value) {
$.ajax({
url:'/ajax',
method:'POST',
data:{
name:nameroom,
number:number_room,
func:'saveRoom',
},
dataType:'json',
success:function(result){
if(result['result']==="ok"){
location.href = '/';
}
}
});
}
})
});
});
function getAllRooms(){
$.ajax({
method:'POST',
url:'/ajax',
dataType: "json",
data:{
func:'getAllRooms',
room:$("#room_number").val()
},
success: function(result){
if(typeof result === 'undefined' ){ return; }
$('.all_room').empty();
$.each(result,function(key,val){
var name_room = val['name'];
var number_room = val['number'];
var user_count = val['userscount'];
var users = val['users'];
var arusers = val['arusers'];
var rusernames = val['usernames'];
var rusernamescnt = Object.keys(rusernames).length;
var rUsrHtml = '<div class="uslists">';
var rusrtr = 1;
$.each(rusernames,function(rukey,ruval){
rUsrHtml += '<span title="'+rukey+'">'+ruval+'</span>';
if(rusrtr !== rusernamescnt){
console.log("Check: ",rusrtr, rusernamescnt);
rUsrHtml += ', ';
}
rusrtr++;
});
rUsrHtml += '</div>';
var line_for_add = '<tr id="info_row_room" data-roomname="'+name_room+'" data-roomnumber="'+number_room+'" data-users="'+users+'">'
+'<!--td><label class="m-checkbox m-checkbox--solid m-checkbox--single m-checkbox--brand"><input type="checkbox"><span></span></label></td-->'
+'<td style="width:15%;"><a class="btn btn-brand m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air" href="/room/'+number_room+'">'+ name_room +'</a><span class="m-widget11__title"></span></td>'
+'<td style="width:10%;" id="numb_room">'+number_room+'</td>'
+'<td style="width:7%;">'+rUsrHtml+'</td>' //'+user_count+'
+'<td style="width:8%;"><div class="actions"><a class="action_room" value="del" href="#"><i class="fa fa-trash"></i></a><a class="action_room" value="edit" href="#"><i class="fa fa-pencil-alt"></i></a></div></td>'
+'</tr>';
if( name_room.substr(0, 15) == "vMajlis_Webinar" ){
$('.webinar_rooms').append(line_for_add);
} else {
$('.all_room').append(line_for_add);
}
})
$('a.action_room').click(function(event){
event.preventDefault();
var val = $(this).attr('value');
var row_info_room = $(this).parents('tr#info_row_room');
//var number = row_info_room.find('td#numb_room').html();
var number = $(row_info_room).attr("data-roomnumber");
var name = $(row_info_room).attr("data-roomname");
var tUsers = $(row_info_room).attr("data-users");
if(val === 'del'){
number = number.replace(/[^-0-9]/gim,'');
swal({
type: 'error',
title: 'Внимание',
text: 'Конференция будет удалена!',
showCloseButton: true,
showCancelButton: true,
confirmButtonText:'Удалить',
cancelButtonText:'Отмена'
}).then((result) => {
if (result.value) {
row_info_room.remove();
$.ajax({
method:'POST',
url:'/ajax',
dataType:'json',
data:{
func:'remove_room_file',
number:number
},success:function(result){
}
})
}
})
}else if(val === 'edit'){
var number_room = row_info_room.find('td#numb_room').html();
number_room = number_room.replace(/[^-0-9]/gim,'');
var winHTML = $("#clientsList").html();
$("#clientsList").empty();
swal({
title:'Изменить название ('+number_room+')',
html:'<input id="room_name" type="text" class="swal2-input" placeholder="Название" value="'+name+'"><br>'+winHTML,
showCancelButton: true,
confirmButtonText: 'Сохранить',
cancelButtonText:'Отмена',
showCloseButton:true,
allowOutsideClick:false,
onOpen: () => {
if( tUsers.length > 0 ){
$('#m_select_userslist').val(tUsers.split(","));
}
$('#m_select_userslist').select2({
placeholder: 'Выберите участников',
closeOnSelect: false,
});
}
}).then((result) => {
var nameroom = $('#room_name').val();
var roomusers = $('#m_select_userslist').val();
$("#clientsList").html(winHTML);
if (result.value){
$.ajax({
url:'/ajax',
method:'POST',
data:{
name:nameroom,
number:number_room,
roomusers:roomusers,
func:'saveRoom',
},
dataType:'json',
success:function(result){
if(result['result']==="ok"){
$('tbody.all_room').empty();
getAllRooms();
}
}
});
}
})
}
});
}
})
}
function load_dashboard_stats(){
$.ajax({
url:'/ajax',
method:'POST',
data:{
func:'getSysInfo'
},
dataType:'json',
success:function(result){
var cpu = Math.round(result['cpu']),
memory = Math.round(result['memory']),
disk = Math.round(result['disk']),
calls = result['calls'];
var cpu_count = 0,
memory_count = 0,
disk_count = 0,
calls_count = 0;
$('span.cpu-span').text(cpu+'%');
$('span.memory-span').text(memory+'%');
$('span.disk-span').text(disk+'%');
$('span.calls-span').text(calls);
/*
$('#percent-value-cpu').text(cpu);
$('#percent-value-memory').text(memory);
$('#percent-value-disk').text(disk);
$('#percent-value-calls').text(calls);
*/
while(cpu_count <= cpu){
$('#cpu-progress-bar').css('width', cpu_count + '%');
cpu_count++;
}
while(memory_count <= memory){
$('#memory-progress-bar').css('width', memory_count + '%');
memory_count++;
}
while(disk_count <= disk){
$('#disk-progress-bar').css('width', disk_count + '%');
disk_count++;
}
while(calls_count <= calls){
$('#calls-progress-bar').css('width', calls_count + '%');
calls_count++;
}
},
error: function (error) {
console.log('error; ' + eval(error));
}
});
}
setInterval(load_dashboard_stats,2000);
setInterval(getAllRooms,60000);
This diff is collapsed.
$(function(){
/*DIV NAMED LOGO APPEAR*/
$('.logo').animate({
opacity:1},1000,function(){
$('#enter_webinar').animate({
opacity:1
},500);
}
);
/*ENTER TO WEBINAR*/
/*CHECK WEBCODE*/
function checkWebCode(){
var url = 'https://webinar.vmajlis.uz/';
var code = $('input#web_code').val();
if(code != ''){
var final_url = url + code;
window.location.href = final_url;
}else{
window.location.reload();
}
}
$('#check_webcode').click(function(){
checkWebCode();
})
/*CHECKWEBCODE*/
$('#web_code').on('focus',function(e){
console.log(e);
})
$("#enter_webinar").click(function(e){
e.preventDefault();
var pre_login_client = '';
var load_msg_client = '';
var cck_uid = $.cookie("vmj_uid") || false;
var cck_mdp = $.cookie("vmj_mdp") || false;
if( (cck_uid) && (cck_mdp)){
$.ajax({
url: '/ajax',
dataType: 'json',
data: {func:'checkWrtcMdpUidEnter', uid:cck_uid, mdp:cck_mdp },
type: 'post',
success: function(r){
console.log("CHECK PASS DATSSSSSSSSSSSSSSS", r);
if ( (!r.result) || (r.result != "ok") ) {
throw new Error( r.msg );
} else {
location.href = '/meet';
}
}
});
return;
}
console.log("Creds: ", cck_uid, cck_mdp);
var pre_uid = false;
swal({
title: 'Введите логин', //Для авторизации по жалуйста введите номер телефона
html: '<font style="font-size:16px;">для входа в систему вебинаров</font>',
input: 'text',
inputAttributes: {
autocapitalize: 'off',
minlength: 3
},
showCancelButton: true,
confirmButtonText: 'Ок',
confirmButtonColor: '#f7941d',
cancelButtonText: 'Нет',
footer:'<a href="#" id="registration">Регистрация</a>',
allowOutsideClick:false,
onOpen: function addEvent(){/*START EMILIO*/
$('a#registration').click(function(e){
e.preventDefault();
$('.swal2-modal').hide();
swal({
title:'Регистрация',
html:'<div class="reg_block">'
+'<p id="alert_line" style="font-size:10px;font-weight:bold;">Логин должен содержать от 5 до 20 символов</p>'
+'<input type="text" autocomplete="off" id="reg_login" placeholder="Введите логин">'
+'<input type="password" autocomplete="off" readonly disabled="disabled" id="reg_pass" placeholder="Введите пароль">'
+'<input type="password" autocomplete="off" readonly disabled="disabled" id="reg_pass_repeat" placeholder="Повторите пароль">'
+'<p id="pass_string"></p>'
+'</div>',
allowOutsideClick:false,
showCancelButton: true,
cancelButtonText: 'Назад',
onOpen: function checkLoginReg(){
$('.swal2-cancel').click(function(){
$('#enter_webinar').click();
})
$('.swal2-confirm').attr('disabled','disabled');
$('.swal2-confirm').attr('id','reg_user');
$('#reg_login').keyup(function(){
var reg_log = $(this).val();
console.log(reg_log);
if(reg_log.length >= 5){
return fetch('/ajax',{
method:'post',
body:'func=checkLoginForRegister&login='+reg_log,
headers:{'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'
},
}).then(response => {console.log("CHECK AJAX", response);
if (!response.ok) {
throw new Error(response.statusText);
}
return response.json();
/*STYLE HAS class="error"*/
}).then(data=>{
if(data.result=='ok'){
$('#reg_login').addClass('error');
$('#alert_line').html('Пользователь с таким логином уже существует');
$('#reg_pass').attr('disabled','disabled');
$('#reg_pass').attr('readonly');
}else{
$('#reg_login').removeClass('error');
$('#alert_line').html('Логин свободен');
$('#reg_pass').removeAttr('disabled');
$('#reg_pass').removeAttr('readonly');
$('#reg_pass').keyup(function(){
var pass_value = $(this).val();
if(pass_value.length > 0){
$('#reg_pass_repeat').removeAttr('disabled');
$('#reg_pass_repeat').removeAttr('readonly');
$('#reg_pass_repeat').keyup(function(){
if(($('#reg_pass_repeat').val()) != pass_value ){
$('#reg_pass_repeat').addClass('error');
$('#pass_string').html('Пароли не совпадают');
$('.swal2-confirm').attr('disabled','disabled');
}else{
$(this).removeClass('error');
$('#pass_string').html('Пароли совпадают');
$('.swal2-confirm').removeAttr('disabled');
}
});
}else{
$('#reg_pass_repeat').attr('disabled','disabled');
$('#reg_pass_repeat').attr('readonly');
$('#reg_pass_repeat').val('');
$('#reg_pass_repeat').removeClass('error');
}
})
}
})
}else{
$('#alert_line').html('Логин должен содержать от 5 до 20 символов');
$('#pass_string').html('');
$('#reg_pass').val('');
$('.swal2-confirm').attr('disabled','disabled');
$('#reg_pass_repeat').val('');
$('#reg_login').removeClass('error');
$('#reg_pass').attr('disabled','disabled');
$('#reg_pass').attr('readonly');
$('#reg_pass_repeat').attr('disabled','disabled');
$('#reg_pass_repeat').attr('readonly');
$('#reg_pass_repeat').removeClass('error');
}
})
},
}).then((result) => {
console.log("Login result:",result);
var reg_login = $('#reg_login').val();
var reg_pass = $('#reg_pass').val();
$.ajax({
url: '/ajax',
dataType: 'json',
data: {func:'checkLoginAndRegister', login:reg_login, password:reg_pass },
type: 'post',
success: function(r){
console.log("CHECK PASS DATSSSSSSSSSSSSSSS", r);
//location.href('');
}
});
});
})
},/*END EMILIO*/
showLoaderOnConfirm: true,
preConfirm: (login) => {
return fetch("/ajax", { method: 'post', body: 'func=checkWebinarLogin&login='+login,
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
})
.then(response => {
console.log("CHECK AJAX", response);
if (!response.ok) {
throw new Error(response.statusText )
}
return response.json();
}).then(datas => {
console.log("CHECK LOGIN RESULTSSS", datas);
if(datas.result=='ok'){
return datas.uid;
} else {
//load_msg = datas.msg;
throw new Error(datas.msg)
}
}).catch(error => {
//console.log("CHECK login", login);
//console.log("CHECK ERROR", load_msg);
$('.swal2-validationerror').css("flex-direction","column");
swal.showValidationError(
`${error} `
)
});
},
//allowOutsideClick: () => !swal.isLoading()
}).then((result) => {
console.log("Login result:",result);
if( typeof result.value !== 'undefined'){
var id_login = result.value;
swal({
title: 'Введите пароль', //Для авторизации по жалуйста введите номер телефона
input: 'password',
inputAttributes: {
autocapitalize: 'off',
minlength: 3,
id:'password-for-webinar'
},
showCancelButton: true,
confirmButtonText: 'Войти',
confirmButtonColor: '#f7941d',
cancelButtonText: 'Отмена',
}).then((result) => {
var pass = $('#password-for-webinar').val();
$.ajax({
url: '/ajax',
dataType: 'json',
data: {func:'checkWebinarPassAndEnter', uid:id_login, password:pass },
type: 'post',
success: function(r){
console.log("CHECK PASS DATAS", r);
document.location.href = '/';
}
});
});
} else {
return false;
}
});
});
/*END ENTER TO WEBINAR*/
});
\ No newline at end of file
/*Function receives input object, and name of function at the backend side*/
function upldFiles(data){
var filePath = data.filename;
}
var uploadFilesToServer = function(arrFiles,backEndFunc,cbk){
var room = document.getElementById('wroom').value;
for(var i=0; i < arrFiles.length;i++){
var value = arrFiles[i];
var formFiles = new FormData();
formFiles.append('file',value);
formFiles.append('func',backEndFunc);
formFiles.append('room',room);
formFiles.append('avatar',room);
formFiles.append('logo',room);
$.ajax({
url: '/ajax',
type: 'post',
data:formFiles,
processData:false,
contentType:false,
dataType: 'json',
async:false,
success: function(response){
upldFiles(response);
cbk();
}
})
}
}
var isCtrl = false;
$(document).keyup(function (e) {
if(e.which == 17) isCtrl=false;
}).keydown(function (e) {
if(e.which == 17) isCtrl=true;
if(e.which == 85 && isCtrl == true) {
$(".list_files").click();
return false;
//alert("Вы нажали Ctrl+U");
}
});
/* full-screen-helper.js 1.0.2 | Copyright (c) 2017 Guilherme Nascimento (brcontainer@yahoo.com.br) | Released under the MIT license */
!function(e,n,t,l){"use strict";function r(e,n){if("function"==typeof e){if(!n)return void K.push(e);if(!n)return void K.push(e);for(var t=[],l=0,r=K.length;r>l;l++)K[l]!==e&&t.push(e);K=t,t=null}}function c(t){return t===l||t===e?e.body:(!n.HTMLElement||t&&t instanceof n.HTMLElement&&t.ownerDocument===e)&&t&&1===t.nodeType&&t.ownerDocument===e?t:!1}function i(e,n,t){e.addEventListener?e.addEventListener(n,t):e.attachEvent("on"+n,t)}function u(){return d()&&(n.outerWidth||n.innerWidth||g.clientWidth)==n.screen.width}function s(){var n=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement;return n?(n!==k&&(k=n),!0):!1}function f(){if(y)return y;if(N===!1||n.ActiveXObject===l)N=!1;else if(N===l)try{N=new n.ActiveXObject("WScript.Shell"),y=!0,i(n,"resize",m)}catch(e){N=!1}return y}function o(e){e=e||n.event,27==(e.wich||e.keyCode)&&E()}function a(){F(y?u():s())}function m(e){clearTimeout(x),x=setTimeout(a,y?100:10)}function d(){return g?!0:(S=e.body,g=e.documentElement||S&&S.parentNode,!!g)}function h(n){return z||(z=!0,i(e,"keydown",o)),f()?void(u()||(k=n,F(!0),N.SendKeys("{F11}"))):(C=T,void(C&&v(n)))}function F(e){if(q!==e&&k){if(!d())return void(k=null);e?(j.test(g.className)||(g.className+=" fsh-infullscreen"),D.test(k.className)||(k.className+=" full-screen-helper")):(g.className=g.className.replace(j," "),k.className=k.className.replace(D," "),k=null),q=e,setTimeout(w,1)}}function w(){for(var e=0;e<K.length;e++)K[e]()}function p(){return X||f()}function v(e){if(e=c(e),!k&&e!==!1){if(L)e.requestFullscreen();else if(H)e.mozRequestFullScreen();else if(W)e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else if(R)e.msRequestFullscreen();else if(!C)return void h(e);k=e,F(!0)}}function E(){if(L)e.exitFullscreen();else if(H)e.mozCancelFullScreen();else if(O)e.webkitExitFullscreen();else if(A)e.webkitCancelFullScreen();else if(R)e.msExitFullscreen();else if(!C)return void(u()&&y&&(F(!1),N.SendKeys("{F11}")));F(!1)}function b(e){k===e?E():v(e)}var g,S,k,x,N,y=!1,z=!1,C=!1,T=!0,q=!1,L=!!e.exitFullscreen,H=!!e.mozCancelFullScreen,W=!(!e.webkitExitFullscreen&&!e.webkitCancelFullScreen),A=!!e.webkitCancelFullScreen,O=!!e.webkitExitFullscreen,R=!!e.msExitFullscreen,j=/(^|\s+)fsh-infullscreen($|\s+)/i,D=/(^|\s+)full-screen-helper($|\s+)/i,K=[],M=["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"],X=L||H||W||R;if(X){for(var $=M.length-1;$>=0;$--)i(e,M[$],m);i(n,"resize",m)}if(n.FullScreenHelper={supported:p,request:v,toggle:b,exit:E,current:function(){return k},state:function(){return q},viewport:function(e){T=!!e},on:function(e){r(e)},off:function(e){r(e,!0)}},t&&t.extend&&t.expr&&(t.fn.fullScreenHelper=function(e){var n=this[0];if(n)switch(e){case"toggle":b(n);break;case"request":case l:v(n)}},t.fullScreenHelper=function(e){switch(e){case"exit":E();break;case"supported":return p();case"state":return q}},t.expr[":"].fullscreen=function(e){return D.test(e.className)},!("onfullscreenchange"in e))){var _=t(e);r(function(){_.trigger("fullscreenchange")})}}(document,window,window.jQuery);
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
import 'polyfills/promise';
import { loadFrom } from './utils/playerutils';
import instances from './api/players';
import GlobalApi from 'api/global-api';
import { registerPlugin } from 'plugins/plugins';
import { version } from './version';
import Api from 'api/api';
import ApiSettings from 'api/api-settings';
/* global __webpack_public_path__:true*/
/* eslint camelcase: 0 */
__webpack_public_path__ = loadFrom();
/**
* Return an instance of {@link Api the JW Player API} matching an element on the page or an existing player.
* @global
* @param {string|number|HTMLElement} [query] - This can be an element id, player index or DOM element.
* When left out, this method attempts to return the first available player.
* @returns {Api|object} - Returns a player instance if one matches the provided query.
* Otherwise, returns an object containing the `registerPlugin` method.
*/
const jwplayer = function(query) {
let player;
let domElement;
// prioritize getting a player over querying an element
if (!query) {
player = instances[0];
} else if (typeof query === 'string') {
player = playerById(query);
if (!player) {
domElement = document.getElementById(query);
}
} else if (typeof query === 'number') {
player = instances[query];
} else if (query.nodeType) {
domElement = query;
player = playerById(domElement.id || domElement.getAttribute('data-jwplayer-id'));
}
// found player
if (player) {
return player;
}
// create player
if (domElement) {
const api = new Api(domElement);
instances.push(api);
return api;
}
// invalid query
return {
registerPlugin: registerPlugin
};
};
function playerById(id) {
for (let p = 0; p < instances.length; p++) {
if (instances[p].id === id) {
return instances[p];
}
}
return null;
}
Object.defineProperties(jwplayer, {
api: {
get() {
return GlobalApi;
},
set() {}
},
version: {
get() {
return version;
},
set() {}
},
debug: {
get() {
return ApiSettings.debug;
},
set(value) {
ApiSettings.debug = !!value;
}
}
});
export default jwplayer;
$(function(){
//layouts
get_all_layouts(function(rest){
console.log("----------============ All layouts ==========----------- ");
console.log("Layouts: ",rest);
if( typeof rest.result !== 'undefined' && rest.result == 'ok'){
if( typeof rest.layouts !== 'undefined'){
for( var i=0; i<rest.layouts.length; i++ ){
var ni = i+1;
var nLyt = $('<tr />')
.append( $('<td class="lytline" />').text(ni))
.append( $('<td class="lytline" />').html('<a onClick="chLayout(\''+rest.layouts[i]+'\');">'+rest.layouts[i]+'</a>'))
.append( $('<td class="lytline" />').text(""))
.append( $('<td class="lytline" />').html('<i class="fa fa-trash" onClick="delLayout(\''+rest.layouts[i]+'\');"></i> <i class="fa fa-cog" onClick="editLayout(\''+rest.layouts[i]+'\');"></i>'));
$("#all_layouts_list").append(nLyt);
}
}
}
});
$( window ).resize(function() {
var bHgt = $(document).height();
bHgt = (bHgt/100)*80;
$('#bigEditBox').height(bHgt)
});
});
function editLayout(lyt){
var bHgt = $(document).height();
bHgt = (bHgt/100)*80;
var editHTML = $('<div id="bigEditBox" />').height(bHgt)
//.append($('<h2 style="height:5%;width:100%;" />').html('Редактирования разбиения - '+lyt))
.append($('<div id="toptools" style="background:yellow;height:5%;width:100%;" />')
/*.append( $("#reslist").selectmenu({}).selectmenu("enable").empty()
.append(new Option("1920x1080", "1920x1080"))
.append(new Option("1280x720", "1280x720"))
.append(new Option("640x480", "640x480"))
)*/
.append('<i class="fa fa-disk"/>')
.append('<i class="fa fa-plus"/>')
.append('<i class="fa fa-pencil-alt"/>')
.append('<i class="fa fa-trash"/>')
)
.append( $('<div id="gridbox" style="background:green; height:95%;width:100%;position: relative;" />'));
swal({
title: 'Редактирования сетки - '+lyt,
confirmButtonText: 'Сохранить',
showCancelButton: false,
showCloseButton: true,
background: '#fff',
grow: 'center',
width: '90%',
height: '90%',
html: editHTML,
onOpen: () => {
swal.showLoading()
getOneLayoutData(lyt,function(res){
swal.hideLoading()
console.log("Loaded layout datas: ",res);
var bgimg = ( typeof res.layout !== 'undefined' && typeof res.layout.bgimg !== 'undefined') ? res.layout.bgimg : false;
var video_layouts = ( typeof res.layout !== 'undefined' && typeof res.layout.layout.image !== 'undefined') ? res.layout.layout.image : false;
$('#gridbox').empty();
var main_width = $('#gridbox').width();
var main_height = $('#gridbox').height();
var cnt = 1;
$.each(video_layouts, function(key,val){
console.log("Each layout: ",val);
var pr_gr_height = (parseInt(val['hscale'])/360)*100;
var pr_gr_width = (parseInt(val['scale'])/360)*100;
var pr_gr_left = (parseInt(val['x'])/360)*100;
var pr_gr_top = (parseInt(val['y'])/360)*100;
var gr_top = parseInt((main_height/100)*pr_gr_top);
var gr_left = parseInt((main_width/100)*pr_gr_left);
var gr_width = parseInt((main_width/100)*pr_gr_width);
var gr_height = parseInt((main_height/100)*pr_gr_height);
$('#gridbox').append('<div class="bgrid-item" id="bgrid-'+cnt+'" data-uid="" data-x="'+pr_gr_left+'" data-y="'+pr_gr_top+'" data-w="'+pr_gr_width+'" data-h="'+pr_gr_height+'"><span style="font-size:25px;color:aliceblue;" class="block_info">'+cnt+'</span></div>');
$('#bgrid-'+cnt).width(pr_gr_width+'%').height(pr_gr_height+'%').css({'position':'absolute','left':pr_gr_left+'%', 'top':pr_gr_top+'%'});
cnt++;
});
});
},
onClose:() => {
console.log("Saving layout changes.................");
}
});
}
function delLayout(lyt){
}
function chLayout(lyt){
}
function getOneLayoutData(name,cb){
if(!name){ return false; }
$.ajax({
method:'POST',
url:'/ajax',
dataType: "json",
data:{
func:'get_one_layout',
layout:name
},
success:function(result){
cb(result);
}
});
}
function get_all_layouts(cb){
$.ajax({
method:'POST',
url:'/ajax',
dataType: "json",
data:{
func:'get_all_layouts'
},
success:function(result){
cb(result);
}
});
}
/* START ADDING NEW GRID*/
function add_layouts(){
var documentHeight = $(document).height();
documentHeight = (documentHeight/100)*80;
var inputsHtml = '<div class="wrap-for-params"><label class="grid-label">Сетка:</label><div class="wrap-for-inp"><input maxlength="2" id="row" type="text"/><b>x</b><input maxlength="2" id="column" type="text"/></div></div>';
var addHTML = $('<div id="bigAddingBox" />').height(documentHeight)
.append( $('<div id="new_gridbox" style="background:green; height:88%;width:100%;position: relative;" />'));
swal({
title: 'Добавление новой сетки',
confirmButtonText: '<i class="fa fa-check"></i>',
showCancelButton: false,
showCloseButton: true,
background: '#fff',
grow: 'center',
width: '90%',
height: '90%',
html: addHTML,
onOpen: function(){
$('#bigAddingBox').append(inputsHtml);
}
}).then((result) => {
if(result.value) {
var count_row = $('input#row').val();
var count_column = $('input#column').val();
console.log('COUNT-ROW:',count_row);
console.log('COUNT-COLUMN:',count_column);
}
})
}
/* END ADDING NEW GRID*/
// Last time updated at Sep 07, 2014, 08:32:23
// Latest file can be found here: https://cdn.webrtc-experiment.com/getScreenId.js
// Muaz Khan - www.MuazKhan.com
// MIT License - www.WebRTC-Experiment.com/licence
// Documentation - https://github.com/muaz-khan/WebRTC-Experiment/tree/master/getScreenId.js
// ______________
// getScreenId.js
/*
getScreenId(function (error, sourceId, screen_constraints) {
// error == null || 'permission-denied' || 'not-installed' || 'installed-disabled' || 'not-chrome'
// sourceId == null || 'string' || 'firefox'
if(sourceId == 'firefox') {
navigator.mozGetUserMedia(screen_constraints, onSuccess, onFailure);
}
else navigator.webkitGetUserMedia(screen_constraints, onSuccess, onFailure);
});
*/
(function() {
window.getScreenId = function(callback) {
// for Firefox:
// sourceId == 'firefox'
// screen_constraints = {...}
if (!!navigator.mozGetUserMedia) {
callback(null, 'firefox', {
video: {
mozMediaSource: 'window',
mediaSource: 'window'
}
});
return;
}
postMessage();
window.addEventListener('message', onIFrameCallback);
function onIFrameCallback(event) {
if (!event.data) return;
if (event.data.chromeMediaSourceId) {
if (event.data.chromeMediaSourceId === 'PermissionDeniedError') {
callback('permission-denied');
} else callback(null, event.data.chromeMediaSourceId, getScreenConstraints(null, event.data.chromeMediaSourceId));
}
if (event.data.chromeExtensionStatus) {
callback(event.data.chromeExtensionStatus, null, getScreenConstraints(event.data.chromeExtensionStatus));
}
// this event listener is no more needed
window.removeEventListener('message', onIFrameCallback);
}
};
function getScreenConstraints(error, sourceId) {
var screen_constraints = {
audio: false,
video: {
mandatory: {
chromeMediaSource: error ? 'screen' : 'desktop',
maxWidth: window.screen.width > 1920 ? window.screen.width : 1920,
maxHeight: window.screen.height > 1080 ? window.screen.height : 1080
},
optional: []
}
};
if (sourceId) {
screen_constraints.video.mandatory.chromeMediaSourceId = sourceId;
}
return screen_constraints;
}
function postMessage() {
if (!iframe.isLoaded) {
setTimeout(postMessage, 100);
return;
}
iframe.contentWindow.postMessage({
captureSourceId: true
}, '*');
}
var iframe = document.createElement('iframe');
iframe.onload = function() {
iframe.isLoaded = true;
};
iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';
//iframe.src = '/getSourceId';
iframe.style.display = 'none';
(document.body || document.documentElement).appendChild(iframe);
})();
This diff is collapsed.
This diff is collapsed.
/*!
* jQuery Cookie Plugin v1.3.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
(function ($, document, undefined) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return unRfc2068(decodeURIComponent(s.replace(pluses, ' ')));
}
function unRfc2068(value) {
if (value.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape
value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
return value;
}
function fromJSON(value) {
return config.json ? JSON.parse(value) : value;
}
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = config.json ? JSON.stringify(value) : String(value);
return (document.cookie = [
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// read
var decode = config.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
var result = key ? null : {};
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = decode(parts.join('='));
if (key && key === name) {
result = fromJSON(cookie);
break;
}
if (!key) {
result[name] = fromJSON(cookie);
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) !== null) {
$.cookie(key, null, options);
return true;
}
return false;
};
})(jQuery, document);
This diff is collapsed.
This diff is collapsed.
/*! jQuery JSON plugin 2.4.0 | code.google.com/p/jquery-json */
(function($){'use strict';var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
var pairs,k,name,val,type=$.type(o);if(type==='undefined'){return undefined;}
if(type==='number'||type==='boolean'){return String(o);}
if(type==='string'){return $.quoteString(o);}
if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON());}
if(type==='date'){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month='0'+month;}
if(day<10){day='0'+day;}
if(hours<10){hours='0'+hours;}
if(minutes<10){minutes='0'+minutes;}
if(seconds<10){seconds='0'+seconds;}
if(milli<100){milli='0'+milli;}
if(milli<10){milli='0'+milli;}
return'"'+year+'-'+month+'-'+day+'T'+
hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
pairs=[];if($.isArray(o)){for(k=0;k<o.length;k++){pairs.push($.toJSON(o[k])||'null');}
return'['+pairs.join(',')+']';}
if(typeof o==='object'){for(k in o){if(hasOwn.call(o,k)){type=typeof k;if(type==='number'){name='"'+k+'"';}else if(type==='string'){name=$.quoteString(k);}else{continue;}
type=typeof o[k];if(type!=='function'&&type!=='undefined'){val=$.toJSON(o[k]);pairs.push(name+':'+val);}}}
return'{'+pairs.join(',')+'}';}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){return eval('('+str+')');};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+str+')');}
throw new SyntaxError('Error parsing JSON, source is not valid.');};$.quoteString=function(str){if(str.match(escape)){return'"'+str.replace(escape,function(a){var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
return'"'+str+'"';};}(jQuery));
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*!
* jQuery Mousewheel 3.1.13
*
* Copyright 2015 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
\ No newline at end of file
!function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"function"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment