|
@@ -8,24 +8,10 @@
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
<!-- Font Awesome -->
|
|
|
<link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/fontawesome-free/css/all.min.css">
|
|
|
- <!-- Ionicons -->
|
|
|
- <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
|
|
- <!-- Tempusdominus Bbootstrap 4 -->
|
|
|
- <link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
|
|
- <!-- iCheck -->
|
|
|
- <link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
|
|
|
- <!-- JQVMap -->
|
|
|
- <link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/jqvmap/jqvmap.min.css">
|
|
|
<!-- Theme style -->
|
|
|
<link rel="stylesheet" href="/AdminLTE-3.0.5/dist/css/adminlte.min.css">
|
|
|
<!-- overlayScrollbars -->
|
|
|
<link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
|
|
|
- <!-- Daterange picker -->
|
|
|
- <link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/daterangepicker/daterangepicker.css">
|
|
|
- <!-- summernote -->
|
|
|
- <link rel="stylesheet" href="/AdminLTE-3.0.5/plugins/summernote/summernote-bs4.css">
|
|
|
- <!-- Google Font: Source Sans Pro -->
|
|
|
- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
|
|
</head>
|
|
|
<body class="hold-transition sidebar-mini layout-fixed">
|
|
|
<div class="wrapper">
|
|
@@ -81,7 +67,7 @@
|
|
|
|
|
|
<!-- Sidebar Menu -->
|
|
|
<nav class="mt-2">
|
|
|
- <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
|
|
+ <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false" id="main-sidenav">
|
|
|
<li class="nav-item">
|
|
|
<a href="/dashboard" class="nav-link {{ request()->route()->getActionName() === 'App\Http\Controllers\ProController@dashboard' ? 'active' : '' }}">
|
|
|
<i class="nav-icon fa fa-palette"></i>
|
|
@@ -105,7 +91,7 @@
|
|
|
<section class="content">
|
|
|
<div class="container-fluid py-3">
|
|
|
<div class="row mb-2">
|
|
|
- <div class="col-12">
|
|
|
+ <div class="col-12" id="main-content">
|
|
|
@yield('content')
|
|
|
</div>
|
|
|
</div>
|
|
@@ -114,155 +100,48 @@
|
|
|
<!-- /.content -->
|
|
|
</div>
|
|
|
|
|
|
- <div class="modal" id="incomingCallModal" tabindex="-1" role="dialog">
|
|
|
- <div class="modal-dialog" role="document">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title">Incoming Call</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <p>Click <b>Accept</b> to join the call.</p>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-success px-4" onclick="joinCall()">Answer</button>
|
|
|
- <button type="button" class="btn btn-secondary px-4" data-dismiss="modal">Reject</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <script src="{{asset('js/moe.js')}}"></script>
|
|
|
-
|
|
|
- <script>
|
|
|
- var stompClient = null;
|
|
|
-
|
|
|
- function setConnected(connected) {
|
|
|
- console.log("User is connected");
|
|
|
- $("#connect").prop("disabled", connected);
|
|
|
- $("#disconnect").prop("disabled", !connected);
|
|
|
- if (connected) {
|
|
|
- $("#conversation").show();
|
|
|
- }
|
|
|
- else {
|
|
|
- $("#conversation").hide();
|
|
|
- }
|
|
|
- $("#greetings").html("");
|
|
|
- }
|
|
|
-
|
|
|
- function connect() {
|
|
|
- console.log("connecting...");
|
|
|
- var socket = new SockJS('http://localhost:8080/ws');
|
|
|
- stompClient = Stomp.over(socket);
|
|
|
- stompClient.connect({}, function (frame) {
|
|
|
- console.log("Connected");
|
|
|
- setConnected(true);
|
|
|
- console.log('Connected: ' + frame);
|
|
|
-
|
|
|
- // stompClient.send("/app/update-participant-status", {}, JSON.stringify({meetingUid:"mymeetinguid", status:'mystatus'}));
|
|
|
-
|
|
|
- // stompClient.subscribe('/user/topic/on-participant-status-change', function (message) {
|
|
|
- // console.log("Participant status changed: ", message);
|
|
|
- // });
|
|
|
-
|
|
|
- stompClient.subscribe("/user/topic/on-pro-incoming-call", function(message){
|
|
|
- console.log("incoming call:", message);
|
|
|
-
|
|
|
- message = JSON.parse(message.body);
|
|
|
- console.log(message.meetingUid);
|
|
|
-
|
|
|
- $('#incomingCallModal')
|
|
|
- .data('meetingUid', message.meetingUid)
|
|
|
- .modal('show');
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
- // connect
|
|
|
- stompClient.send("/app/pro-connect", {}, JSON.stringify({sessionKey: "<?= request()->cookie('sessionKey') ?>"}));
|
|
|
-
|
|
|
- console.log('Pro connected')
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- connect();
|
|
|
-
|
|
|
- function joinCall() {
|
|
|
- var modal = $('#incomingCallModal');
|
|
|
- window.location.href = '/pro/meeting/' +
|
|
|
- modal.data('meetingUid');
|
|
|
- }
|
|
|
-
|
|
|
- function disconnect() {
|
|
|
- if (stompClient !== null) {
|
|
|
- stompClient.disconnect();
|
|
|
- }
|
|
|
- setConnected(false);
|
|
|
- console.log("Disconnected");
|
|
|
- }
|
|
|
-
|
|
|
- function sendName() {
|
|
|
- stompClient.send("/app/hello", {}, JSON.stringify({'name': $("#name").val()}));
|
|
|
- }
|
|
|
-
|
|
|
- function showGreeting(message) {
|
|
|
- $("#greetings").append("<tr><td>" + message + "</td></tr>");
|
|
|
- }
|
|
|
-
|
|
|
- $(function () {
|
|
|
- $("form").on('submit', function (e) {
|
|
|
- e.preventDefault();
|
|
|
- });
|
|
|
- $( "#connect" ).click(function() { connect(); });
|
|
|
- $( "#disconnect" ).click(function() { disconnect(); });
|
|
|
- $( "#send" ).click(function() { sendName(); });
|
|
|
- });
|
|
|
- </script>
|
|
|
-
|
|
|
</div>
|
|
|
<!-- ./wrapper -->
|
|
|
|
|
|
+<!-- Google Font: Source Sans Pro -->
|
|
|
+<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
|
|
+
|
|
|
<!-- jQuery -->
|
|
|
<script src="/AdminLTE-3.0.5/plugins/jquery/jquery.min.js"></script>
|
|
|
-<!-- jQuery UI 1.11.4 -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/jquery-ui/jquery-ui.min.js"></script>
|
|
|
-<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
|
|
-<script>
|
|
|
- $.widget.bridge('uibutton', $.ui.button)
|
|
|
-</script>
|
|
|
-<!-- Bootstrap 4 -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
|
-<!-- ChartJS -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/chart.js/Chart.min.js"></script>
|
|
|
-<!-- Sparkline -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/sparklines/sparkline.js"></script>
|
|
|
-<!-- JQVMap -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/jqvmap/jquery.vmap.min.js"></script>
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
|
|
|
-<!-- jQuery Knob Chart -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/jquery-knob/jquery.knob.min.js"></script>
|
|
|
-<!-- daterangepicker -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/moment/moment.min.js"></script>
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/daterangepicker/daterangepicker.js"></script>
|
|
|
-<!-- Tempusdominus Bootstrap 4 -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
|
|
-<!-- Summernote -->
|
|
|
-<script src="/AdminLTE-3.0.5/plugins/summernote/summernote-bs4.min.js"></script>
|
|
|
<!-- overlayScrollbars -->
|
|
|
<script src="/AdminLTE-3.0.5/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
|
|
|
<!-- AdminLTE App -->
|
|
|
<script src="/AdminLTE-3.0.5/dist/js/adminlte.js"></script>
|
|
|
-<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
|
|
-<script src="/AdminLTE-3.0.5/dist/js/pages/dashboard.js"></script>
|
|
|
-<!-- AdminLTE for demo purposes -->
|
|
|
-<script src="/AdminLTE-3.0.5/dist/js/demo.js"></script>
|
|
|
|
|
|
<script>
|
|
|
- // if(window === window.top) {
|
|
|
- // window.location.href = '/mc?page=' + window.location.pathname;
|
|
|
- // }
|
|
|
+ if(window === window.top) {
|
|
|
+ window.location.href = '/mc?page=' + window.location.pathname;
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // Prevent variables from being global
|
|
|
+ $(document).ready(function () {
|
|
|
+ $(document).on('click', 'a:not([href="#"])', function() {
|
|
|
+ $.get(this.href, function(_data) {
|
|
|
+ var received = $(_data);
|
|
|
+ // $('#main-sidenav').replaceWith($(_data).find('#main-sidenav'));
|
|
|
+ var activeHref = $(_data).find('#main-sidenav').find('.nav-link.active').attr('href');
|
|
|
+ $('#main-sidenav a.nav-link.active').removeClass('active');
|
|
|
+ $('#main-sidenav a[href="' + activeHref + '"]').addClass('active');
|
|
|
+ $('#main-content').replaceWith($(_data).find('#main-content'));
|
|
|
+ $(window).scrollTop(0);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ $(document).on('submit', 'form[action="/post-to-api"]', function() {
|
|
|
+ $.post(this.action, $(this).serialize(), function(_data) {
|
|
|
+ $('#main-content').replaceWith($(_data).find('#main-content'));
|
|
|
+ $(window).scrollTop(0);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
</body>
|