windhamdavid 5 years ago
parent
commit
5faf7d01a5
14 changed files with 1203 additions and 445 deletions
  1. 436 2
      css/front-page.css
  2. 1 1
      css/front.min.css
  3. 42 111
      css/message.css
  4. 1 11
      front-page.php
  5. 3 2
      gruntfile.js
  6. 127 43
      inc/tweaks.php
  7. 263 0
      js/chat.js
  8. 1 0
      js/chat.min.js
  9. 154 0
      js/chat_func.js
  10. 37 1
      js/front-page.min.js
  11. 2 1
      js/front.min.js
  12. 0 1
      js/message.min.js
  13. 0 272
      js/message.js
  14. 136 0
      page-chat.php

+ 436 - 2
css/front-page.css

@@ -1,5 +1,3 @@
-/* @override http://macs.local/david/wp-content/themes/dw/css/front-page.css */
-
 html, body, div, span, object, iframe,
 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
 abbr, address, cite, code,
@@ -177,4 +175,440 @@ to {-webkit-transform: rotate(360deg);}
 	  height:50px;
 	  background: #FFF;
 	}
+}
+ul.messenger.messenger-fixed.messenger-on-top {
+  top: 10px;
+}
+ul.messenger {
+  margin: 0;
+  padding: 0;
+}
+ul.messenger > li {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+ul.messenger.messenger-empty {
+  display: none;
+}
+ul.messenger .messenger-message {
+  overflow: hidden;
+  *zoom: 1;
+}
+ul.messenger .messenger-message.messenger-hidden {
+  display: none;
+}
+ul.messenger .messenger-message .messenger-phrase, ul.messenger .messenger-message .messenger-actions a {
+  padding-right: 5px;
+}
+ul.messenger .messenger-message .messenger-actions {
+  float: right;
+}
+ul.messenger .messenger-message .messenger-actions a {
+  cursor: pointer;
+  text-decoration: underline;
+}
+ul.messenger .messenger-message ul, ul.messenger .messenger-message ol {
+  margin: 10px 18px 0;
+}
+ul.messenger.messenger-fixed {
+  position: fixed;
+  z-index: 10000;
+}
+ul.messenger.messenger-fixed .messenger-message {
+  min-width: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+ul.messenger.messenger-fixed .message .messenger-actions {
+  float: left;
+}
+ul.messenger.messenger-fixed.messenger-on-bottom {
+  bottom: 20px;
+}
+ul.messenger.messenger-fixed.messenger-on-top.messenger-on-left, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-left {
+  left: 20px;
+  margin-left: 0px;
+}
+ul.messenger.messenger-fixed.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-left {
+  width: 350px;
+}
+ul.messenger.messenger-fixed.messenger-on-right .messenger-actions, ul.messenger.messenger-fixed.messenger-on-left .messenger-actions {
+  float: left;
+}
+ul.messenger .messenger-spinner {
+  display: none;
+}
+@-webkit-keyframes ui-spinner-rotate-right {
+  0% {
+    -webkit-transform: rotate(0deg);
+  }
+  25% {
+    -webkit-transform: rotate(180deg);
+  }
+  50% {
+    -webkit-transform: rotate(180deg);
+  }
+  75% {
+    -webkit-transform: rotate(360deg);
+  }
+  100% {
+    -webkit-transform: rotate(360deg);
+  }
+}
+
+@-moz-keyframes ui-spinner-rotate-right {
+  0% {
+    -moz-transform: rotate(0deg);
+  }
+  25% {
+    -moz-transform: rotate(180deg);
+  }
+  50% {
+    -moz-transform: rotate(180deg);
+  }
+  75% {
+    -moz-transform: rotate(360deg);
+  }
+  100% {
+    -moz-transform: rotate(360deg);
+  }
+}
+
+@keyframes ui-spinner-rotate-right {
+  0% {
+    transform: rotate(0deg);
+  }
+  25% {
+    transform: rotate(180deg);
+  }
+  50% {
+    transform: rotate(180deg);
+  }
+  75% {
+    transform: rotate(360deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes ui-spinner-rotate-left {
+  0% {
+    transform: rotate(0deg);
+  }
+  25% {
+    transform: rotate(0deg);
+  }
+  50% {
+    transform: rotate(180deg);
+  }
+  75% {
+    transform: rotate(180deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+@-moz-keyframes ui-spinner-rotate-left {
+  0% {
+    -moz-transform: rotate(0deg);
+  }
+  25% {
+    -moz-transform: rotate(0deg);
+  }
+  50% {
+    -moz-transform: rotate(180deg);
+  }
+  75% {
+    -moz-transform: rotate(180deg);
+  }
+  100% {
+    -moz-transform: rotate(360deg);
+  }
+}
+@-webkit-keyframes ui-spinner-rotate-left {
+  0% {
+    -webkit-transform: rotate(0deg);
+  }
+  25% {
+    -webkit-transform: rotate(0deg);
+  }
+  50% {
+    -webkit-transform: rotate(180deg);
+  }
+  75% {
+    -webkit-transform: rotate(180deg);
+  }
+  100% {
+    -webkit-transform: rotate(360deg);
+  }
+}
+
+.messenger-spinner {
+  position: relative;
+  border-radius: 100%;
+}
+ul.messenger.messenger-spinner-active .messenger-spinner .messenger-spinner {
+  display: block;
+}
+.messenger-spinner .messenger-spinner-side {
+  width: 50%;
+  height: 100%;
+  overflow: hidden;
+  position: absolute;
+}
+.messenger-spinner .messenger-spinner-side .messenger-spinner-fill {
+  border-radius: 999px;
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  -webkit-animation-iteration-count: infinite;
+  -moz-animation-iteration-count: infinite;
+  -ms-animation-iteration-count: infinite;
+  -o-animation-iteration-count: infinite;
+  animation-iteration-count: infinite;
+  -webkit-animation-timing-function: linear;
+  -moz-animation-timing-function: linear;
+  -ms-animation-timing-function: linear;
+  -o-animation-timing-function: linear;
+  animation-timing-function: linear;
+}
+.messenger-spinner .messenger-spinner-side-left {
+  left: 0;
+}
+.messenger-spinner .messenger-spinner-side-left .messenger-spinner-fill {
+  left: 100%;
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+  -webkit-animation-name: ui-spinner-rotate-left;
+  -moz-animation-name: ui-spinner-rotate-left;
+  -ms-animation-name: ui-spinner-rotate-left;
+  -o-animation-name: ui-spinner-rotate-left;
+  animation-name: ui-spinner-rotate-left;
+  -webkit-transform-origin: 0 50%;
+  -moz-transform-origin: 0 50%;
+  -ms-transform-origin: 0 50%;
+  -o-transform-origin: 0 50%;
+  transform-origin: 0 50%;
+}
+.messenger-spinner .messenger-spinner-side-right {
+  left: 50%;
+}
+.messenger-spinner .messenger-spinner-side-right .messenger-spinner-fill {
+  left: -100%;
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+  -webkit-animation-name: ui-spinner-rotate-right;
+  -moz-animation-name: ui-spinner-rotate-right;
+  -ms-animation-name: ui-spinner-rotate-right;
+  -o-animation-name: ui-spinner-rotate-right;
+  animation-name: ui-spinner-rotate-right;
+  -webkit-transform-origin: 100% 50%;
+  -moz-transform-origin: 100% 50%;
+  -ms-transform-origin: 100% 50%;
+  -o-transform-origin: 100% 50%;
+  transform-origin: 100% 50%;
+}
+ul.messenger-theme-flat {
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  -ms-border-radius: 4px;
+  -o-border-radius: 4px;
+  border-radius: 4px;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -o-user-select: none;
+  user-select: none;
+  background: #404040;
+}
+ul.messenger-theme-flat.messenger-empty {
+  display: none;
+}
+ul.messenger-theme-flat .messenger-message {
+  -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+  -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+  box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+  -webkit-border-radius: 0px;
+  -moz-border-radius: 0px;
+  -ms-border-radius: 0px;
+  -o-border-radius: 0px;
+  border-radius: 0px;
+  position: relative;
+  border: 0px;
+  margin-bottom: 0px;
+  font-size: 13px;
+  background: transparent;
+  color: #f0f0f0;
+  font-weight: 500;
+  padding: 10px 30px 13px 65px;
+}
+ul.messenger-theme-flat .messenger-message .messenger-close {
+  position: absolute;
+  top: 0px;
+  right: 0px;
+  color: #888888;
+  opacity: 1;
+  font-weight: bold;
+  display: block;
+  font-size: 20px;
+  line-height: 20px;
+  padding: 8px 10px 7px 7px;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+ul.messenger-theme-flat .messenger-message .messenger-close:hover {
+  color: #bbbbbb;
+}
+ul.messenger-theme-flat .messenger-message .messenger-close:active {
+  color: #777777;
+}
+ul.messenger-theme-flat .messenger-message .messenger-actions {
+  float: none;
+  margin-top: 10px;
+}
+ul.messenger-theme-flat .messenger-message .messenger-actions a {
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  -ms-border-radius: 4px;
+  -o-border-radius: 4px;
+  border-radius: 4px;
+  text-decoration: none;
+  color: #aaaaaa;
+  background: #2e2e2e;
+  display: inline-block;
+  padding: 10px;
+  margin-right: 10px;
+  padding: 4px 11px 6px;
+  text-transform: capitalize;
+}
+ul.messenger-theme-flat .messenger-message .messenger-actions a:hover {
+  color: #f0f0f0;
+  background: #2e2e2e;
+}
+ul.messenger-theme-flat .messenger-message .messenger-actions a:active {
+  background: #292929;
+  color: #aaaaaa;
+}
+ul.messenger-theme-flat .messenger-message .messenger-actions .messenger-phrase {
+  display: none;
+}
+ul.messenger-theme-flat .messenger-message .messenger-message-inner:before {
+  -webkit-border-radius: 50%;
+  -moz-border-radius: 50%;
+  -ms-border-radius: 50%;
+  -o-border-radius: 50%;
+  border-radius: 50%;
+  position: absolute;
+  left: 17px;
+  display: block;
+  content: " ";
+  top: 50%;
+  margin-top: -8px;
+  height: 13px;
+  width: 13px;
+  z-index: 20;
+}
+ul.messenger-theme-flat .messenger-message.alert-success .messenger-message-inner:before {
+  background: #5fca4a;
+}
+ul.messenger-theme-flat .messenger-message.alert-info .messenger-message-inner:before {
+  background: #61c4b8;
+}
+ul.messenger-theme-flat .messenger-message.alert-error .messenger-message-inner:before {
+  background: #dd6a45;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner {
+  width: 32px;
+  height: 32px;
+  background: transparent;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner .messenger-spinner-side .messenger-spinner-fill {
+  background: #dd6a45;
+  -webkit-animation-duration: 20s;
+  -moz-animation-duration: 20s;
+  -ms-animation-duration: 20s;
+  -o-animation-duration: 20s;
+  animation-duration: 20s;
+  opacity: 1;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-soon .messenger-spinner:after {
+  content: "";
+  background: #292929;
+  position: absolute;
+  width: 26px;
+  height: 26px;
+  border-radius: 50%;
+  top: 3px;
+  left: 3px;
+  display: block;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner {
+  width: 32px;
+  height: 32px;
+  background: transparent;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner .messenger-spinner-side .messenger-spinner-fill {
+  background: #dd6a45;
+  -webkit-animation-duration: 600s;
+  -moz-animation-duration: 600s;
+  -ms-animation-duration: 600s;
+  -o-animation-duration: 600s;
+  animation-duration: 600s;
+  opacity: 1;
+}
+ul.messenger-theme-flat .messenger-message.alert-error.messenger-retry-later .messenger-spinner:after {
+  content: "";
+  background: #292929;
+  position: absolute;
+  width: 26px;
+  height: 26px;
+  border-radius: 50%;
+  top: 3px;
+  left: 3px;
+  display: block;
+}
+ul.messenger-theme-flat .messenger-message-slot.messenger-last .messenger-message {
+  -webkit-border-radius: 4px 4px 0px 0px;
+  -moz-border-radius: 4px 4px 0px 0px;
+  -ms-border-radius: 4px 4px 0px 0px;
+  -o-border-radius: 4px 4px 0px 0px;
+  border-radius: 4px 4px 0px 0px;
+  -webkit-box-shadow: inset 48px 0px 0px #292929;
+  -moz-box-shadow: inset 48px 0px 0px #292929;
+  box-shadow: inset 48px 0px 0px #292929;
+}
+ul.messenger-theme-flat .messenger-message-slot.messenger-first .messenger-message {
+  -webkit-border-radius: 0px 0px 4px 4px;
+  -moz-border-radius: 0px 0px 4px 4px;
+  -ms-border-radius: 0px 0px 4px 4px;
+  -o-border-radius: 0px 0px 4px 4px;
+  border-radius: 0px 0px 4px 4px;
+  -webkit-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+  -moz-box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+  box-shadow: inset 0px 1px rgba(255, 255, 255, 0.13), inset 48px 0px 0px #292929;
+}
+ul.messenger-theme-flat .messenger-message-slot.messenger-first.messenger-last .messenger-message {
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  -ms-border-radius: 4px;
+  -o-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 48px 0px 0px #292929;
+  -moz-box-shadow: inset 48px 0px 0px #292929;
+  box-shadow: inset 48px 0px 0px #292929;
+}
+ul.messenger-theme-flat .messenger-spinner {
+  display: block;
+  position: absolute;
+  left: 7px;
+  top: 50%;
+  margin-top: -18px;
+  z-index: 999;
+  height: 32px;
+  width: 32px;
+  z-index: 10;
 }

File diff suppressed because it is too large
+ 1 - 1
css/front.min.css


+ 42 - 111
css/message.css

@@ -1,6 +1,8 @@
 .modal-content.message {
-	width:528;
 	background:000;
+	width:527px;
+	margin: 0 auto;
+	padding:5px 5px 0px;
 }
 .modal-open {
   overflow: hidden;
@@ -37,16 +39,11 @@
 .modal-dialog {
   position: relative;
   width: auto;
-  margin: 10px;
 }
 .modal-content {
   position: relative;
   background-color: #000;
-  -webkit-background-clip: padding-box;
-          background-clip: padding-box;
-  border: 1px solid #999;
   border: 1px solid rgba(0, 0, 0, .2);
-  border-radius: 6px;
   outline: 0;
   -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
           box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
@@ -66,68 +63,19 @@
 }
 .modal-backdrop.in {
   filter: alpha(opacity=50);
-  opacity: .5;
-}
-.modal-header {
-  min-height: 16.42857143px;
-  padding: 15px;
-  border-bottom: 1px solid #e5e5e5;
-}
-.modal-header .close {
-  margin-top: -2px;
-}
-.modal-title {
-  margin: 0;
-  line-height: 1.42857143;
+  opacity: .8;
 }
 .modal-body {
   position: relative;
-  padding: 15px;
-}
-.modal-footer {
-  padding: 15px;
-  text-align: right;
-  border-top: 1px solid #e5e5e5;
-}
-.modal-footer .btn + .btn {
-  margin-bottom: 0;
-  margin-left: 5px;
-}
-.modal-footer .btn-group .btn + .btn {
-  margin-left: -1px;
-}
-.modal-footer .btn-block + .btn-block {
-  margin-left: 0;
-}
-.modal-scrollbar-measure {
-  position: absolute;
-  top: -9999px;
-  width: 50px;
-  height: 50px;
-  overflow: scroll;
-}
-@media (min-width: 768px) {
-  .modal-dialog {
-    width: 600px;
-    margin: 30px auto;
-  }
-  .modal-content {
-    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
-            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
-  }
-  .modal-sm {
-    width: 300px;
-  }
-}
-@media (min-width: 992px) {
-  .modal-lg {
-    width: 900px;
-  }
 }
 
 
-
-
+[data-action="retry"] {
+	display:none;
+}
+ul.messenger.messenger-fixed.messenger-on-top {
+  top: 10px;
+}
 ul.messenger {
   margin: 0;
   padding: 0;
@@ -173,28 +121,9 @@ ul.messenger.messenger-fixed .messenger-message {
 ul.messenger.messenger-fixed .message .messenger-actions {
   float: left;
 }
-ul.messenger.messenger-fixed.messenger-on-top {
-  top: 20px;
-}
 ul.messenger.messenger-fixed.messenger-on-bottom {
   bottom: 20px;
 }
-ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom {
-  left: 50%;
-  width: 800px;
-  margin-left: -400px;
-}
-@media (max-width: 960px) {
-  ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom {
-    left: 10%;
-    width: 80%;
-    margin-left: 0px;
-  }
-}
-ul.messenger.messenger-fixed.messenger-on-top.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-right {
-  right: 20px;
-  left: auto;
-}
 ul.messenger.messenger-fixed.messenger-on-top.messenger-on-left, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-left {
   left: 20px;
   margin-left: 0px;
@@ -225,89 +154,91 @@ ul.messenger .messenger-spinner {
     -webkit-transform: rotate(360deg);
   }
 }
-@-webkit-keyframes ui-spinner-rotate-left {
+
+@-moz-keyframes ui-spinner-rotate-right {
   0% {
-    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
   }
   25% {
-    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(180deg);
   }
   50% {
-    -webkit-transform: rotate(180deg);
+    -moz-transform: rotate(180deg);
   }
   75% {
-    -webkit-transform: rotate(180deg);
+    -moz-transform: rotate(360deg);
   }
   100% {
-    -webkit-transform: rotate(360deg);
+    -moz-transform: rotate(360deg);
   }
 }
-@-moz-keyframes ui-spinner-rotate-right {
+
+@keyframes ui-spinner-rotate-right {
   0% {
-    -moz-transform: rotate(0deg);
+    transform: rotate(0deg);
   }
   25% {
-    -moz-transform: rotate(180deg);
+    transform: rotate(180deg);
   }
   50% {
-    -moz-transform: rotate(180deg);
+    transform: rotate(180deg);
   }
   75% {
-    -moz-transform: rotate(360deg);
+    transform: rotate(360deg);
   }
   100% {
-    -moz-transform: rotate(360deg);
+    transform: rotate(360deg);
   }
 }
-@-moz-keyframes ui-spinner-rotate-left {
+@keyframes ui-spinner-rotate-left {
   0% {
-    -moz-transform: rotate(0deg);
+    transform: rotate(0deg);
   }
   25% {
-    -moz-transform: rotate(0deg);
+    transform: rotate(0deg);
   }
   50% {
-    -moz-transform: rotate(180deg);
+    transform: rotate(180deg);
   }
   75% {
-    -moz-transform: rotate(180deg);
+    transform: rotate(180deg);
   }
   100% {
-    -moz-transform: rotate(360deg);
+    transform: rotate(360deg);
   }
 }
-@keyframes ui-spinner-rotate-right {
+@-moz-keyframes ui-spinner-rotate-left {
   0% {
-    transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
   }
   25% {
-    transform: rotate(180deg);
+    -moz-transform: rotate(0deg);
   }
   50% {
-    transform: rotate(180deg);
+    -moz-transform: rotate(180deg);
   }
   75% {
-    transform: rotate(360deg);
+    -moz-transform: rotate(180deg);
   }
   100% {
-    transform: rotate(360deg);
+    -moz-transform: rotate(360deg);
   }
 }
-@keyframes ui-spinner-rotate-left {
+@-webkit-keyframes ui-spinner-rotate-left {
   0% {
-    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
   }
   25% {
-    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
   }
   50% {
-    transform: rotate(180deg);
+    -webkit-transform: rotate(180deg);
   }
   75% {
-    transform: rotate(180deg);
+    -webkit-transform: rotate(180deg);
   }
   100% {
-    transform: rotate(360deg);
+    -webkit-transform: rotate(360deg);
   }
 }
 .messenger-spinner {

+ 1 - 11
front-page.php

@@ -13,8 +13,7 @@
 <meta name="description" content="David A. Windham - Zeken Woozer Enterprises, Un-Ltd. South Carolina USA" />
 <meta name="author" content="David Windham">
 <link rel='canonical' href='https://davidawindham.com/' />
-<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri();?>/css/front.min.css"/>
-<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri();?>/css/message.css"/>
+<link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri();?>/css/front-page.css"/>
 </head>
 <body>
 <div class="container card">
@@ -117,19 +116,10 @@
 				</div>
 			</div> 
 			<div id="footer" role="contentinfo">
-			<!--<a data-target="#chat" role="button" class="btn" data-toggle="modal">Chat</a>-->
-			<div class="modal fade chat" id="chat" tabindex="-1" role="dialog" aria-labelledby="chat" aria-hidden="true">
-				<div class="modal-dialog modal-lg">
-					<div class="modal-content message">
-						<iframe id="chat" width="528px" height="420px" scrolling="no" frameborder="0"  style="background:#000" /></iframe>
-					</div>
-				</div>
-			</div>
 			</div>
 
 </div> 
 <script type='text/javascript' src='<?php echo get_template_directory_uri();?>/js/front.min.js'></script>
-<script type='text/javascript' src='<?php echo get_template_directory_uri();?>/js/message.js'></script>
 <?php dw_online_get_status(); ?>
 <?php wp_footer(); ?>
 <script type="application/ld+json">{"@context": "http://schema.org","@type": "WebSite","url":"https://davidawindham.com/","potentialAction":{"@type":"SearchAction","target":"https://davidawindham.com/?s={search_term_string}","query-input": "required name=search_term_string"}}

+ 3 - 2
gruntfile.js

@@ -33,7 +33,7 @@ module.exports = function(grunt) {
 				dest: 'js/scripts-o.js',
 			},
 			disto: {
-				src: ['js/jquery-2.1.1.min.js', 'js/svg-morpheus.js', 'js/front-page.js'],
+				src: ['js/jquery-2.1.1.min.js', 'js/svg-morpheus.js', 'js/messenger.min.js', 'js/front-page.js'],
 				dest: 'js/front-page.min.js',
 			}
 		},
@@ -53,7 +53,8 @@ module.exports = function(grunt) {
 				'js/init-o.min.js': ['js/init-o.js'],
 				'js/init.min.js': ['js/init.js'],
 				'js/front.min.js' : ['js/front-page.min.js'], 
-				'js/message.min.js' : ['js/message.js'],  
+				'js/chat.min.js' : ['js/chat.js'],
+				'js/chat_func.min.js' : ['js/chat_func.js'],  
 		      }
 		    }
 		  }

+ 127 - 43
inc/tweaks.php

@@ -99,20 +99,21 @@ function dw_online_get_status() {
 	        Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
 			var msg; msg = Messenger().post({
 				message: 'I am currently online', type: 'success',
-				actions: {retry: {label: 'Connect', phrase: 'Chat & Video', delay: 30,
+				actions: {retry: {label: 'Connect', delay: 30,
 						action: function(){
+							txt_dave();
 							var msg_return; msg_return = Messenger().run({
-							  errorMessage: 'Please wait a moment while I am notified to get connected with you', successMessage: 'Connecting Now!',
-							  action: function(opts) {
-								  msg.hide();
-								  txt_dave();
+							  	errorMessage: 'Please wait a moment while I am texted a message to get connected with you.', 
+								successMessage: 'Connecting Now!',
+							  	action: function(opts) {
+								  msg.hide();		  
 									if (++i < 2) {
 										return opts.error({status: 500,readyState: 0,responseText: 0});	
 									} 
 									else {
-										get_dave()
-										return msg.update({message: 'Connecting Now... Please click the allow camera and microphone access up top', hideAfter: 10, type: 'success', actions: false});
-										window.location.href ="chat";
+										window.location.href = 'contact/chat';		
+										return msg.update({message: 'Redirect to Chat', hideAfter: 20, type: 'success', actions: false});
+										
 									}
 								}
 							});
@@ -127,47 +128,130 @@ function dw_online_get_status() {
 				}
 			});
 		});
-
-
-		function get_dave () {
-		var statusElement = $("#chat");
-		var URLchatAPI = "http://code.davidawindham.com:8080/status";
-			(function poll() {
-				var request = $.ajax({
-				    url: URLchatAPI,
-				    dataType: 'json',
-					cache: false, 
-					success: function (data) {
-						online = data.online;
-						if(online=='yes'){
-							$('.chat').modal('show');
-						};
-					},
-					complete: setTimeout(function() {poll()}, 5000),
-		            timeout: 2000,
-					error: function ( xhr, tStatus, err ) {
-						request.abort();
-						console.log('this is an error');
-					}
-				});
-			})();
-		};
-		
-		function txt_dave () {
+		function txt_dave() {
 			$.ajax({
-			    url: 'http://davidawindham.com/wha/phony/sms.php',
-			    dataType: 'json',
-			    success: function(data){    
-			    },
-			  });
-			}
-		
+				url: 'https://davidawindham.com/wha/phony/sms',
+				dataType: 'json',
+				success: function(data){},
+			});
+		}
 		</script>
 	<?php }
-
 }
 
+function dw_online_get_chat() {
+	$dw_status = get_option('daw_is_online_settings');
+	if( $dw_status['daw_is_online_select_field_0'] == '1' ) { ?>
+		<script type="text/javascript">
+		var i;i = 0;
+		$(function(){
+	        Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+			var msg_return; msg_return = Messenger().run({
+				id: 'one',
+				errorMessage: 'Looking for David...', 
+				action: function(opts) {
+					if (++i < 2) {
+						get_dave();
+						return opts.error({status: 500,readyState: 0,responseText: 0});	
+					} 
+				}
+			});
+		});
+		
+		function get_dave() {
+			$(function poll() {
+				var x = 0;
+				var countTimer = setInterval(function () {
+					if(x > 5){clearInterval(countTimer)}
+					else if(x == 5){dave_not_available()}
+					else{
+						var URLchatAPI = "http://macs.local:8080/status";
+						var request = $.ajax({
+						    url: URLchatAPI,
+						    dataType: 'json',
+							cache: false, 
+							success: function (data) {
+								online = data.online;
+								if(online=='yes'){
+									$('.chat').modal('show');
+									x = x+5;
+								};
+								if(online=='no'){
+									dave_connecting();
+								};
+							},
+							error: function ( xhr, tStatus, err ) {
+								dave_error();
+								x = x+5;
+							}
+						});
+						
+						x++;
+					}
+				}, 5000);
+
+			});
+		}
+
+		function dave_connecting(){
+			Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+			var y;y = 0;
+			var msg_waiting; msg_waiting = Messenger().run({
+				id: 'one',
+				hideAfter: 4,
+				errorMessage: 'Waiting on David...',
+				action: function(opts) {
+					if (++y < 2) {
+						get_dave();
+						return opts.error({status: 500,readyState: 0,responseText: 0});	
+					} 
+				}
+			});
+		}		
 
+		function dave_not_available(){
+			Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+			var msg_error; msg_error = Messenger().post({
+				message: 'Sorry, but I am busy.',
+				type: 'error',
+				id: 'one',
+				showCloseButton: true,
+				actions:{
+					cancel: {
+						label: '<a href="../">Leave me a message</a>',
+						action: function(){
+							window.location.href = '../';	
+						}
+					}	
+				}	
+			});
+		}
+		
+		function dave_error(){
+			Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+			var msg_error; msg_error = Messenger().post({
+				message: 'Oops. Something has gone wrong.',
+				type: 'error',
+				id: 'one',
+				showCloseButton: true,
+				actions:{
+					cancel: {
+						label: '<a href="../">Leave me a message</a>',
+						action: function(){
+							window.location.href = '../';	
+						}
+					}	
+				}
+			});
+		}
+		$(function() {
+		    if (window.location.hash.indexOf("chat") !== -1) {
+		        $('.chat').modal('show');
+		    }
+		});
+		</script>
+	<?php }
+}
 
 
 ?>

+ 263 - 0
js/chat.js

@@ -0,0 +1,263 @@
++function ($) {
+  'use strict';
+
+  var Modal = function (element, options) {
+    this.options        = options
+    this.$body          = $(document.body)
+    this.$element       = $(element)
+    this.$backdrop      =
+    this.isShown        = null
+    this.scrollbarWidth = 0
+
+    if (this.options.remote) {
+      this.$element
+        .find('.modal-content')
+        .load(this.options.remote, $.proxy(function () {
+          this.$element.trigger('loaded.bs.modal')
+        }, this))
+    }
+  }
+
+  Modal.VERSION  = '3.2.0'
+
+  Modal.DEFAULTS = {
+    backdrop: true,
+    keyboard: true,
+    show: true
+  }
+
+  Modal.prototype.toggle = function (_relatedTarget) {
+    return this.isShown ? this.hide() : this.show(_relatedTarget)
+  }
+
+  Modal.prototype.show = function (_relatedTarget) {
+    var that = this
+    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+    this.$element.trigger(e)
+
+    if (this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = true
+
+    this.checkScrollbar()
+    this.$body.addClass('modal-open')
+
+    this.setScrollbar()
+    this.escape()
+
+    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+    this.backdrop(function () {
+      var transition = $.support.transition && that.$element.hasClass('fade')
+
+      if (!that.$element.parent().length) {
+        that.$element.appendTo(that.$body) // don't move modals dom position
+      }
+
+      that.$element
+        .show()
+        .scrollTop(0)
+
+      if (transition) {
+        that.$element[0].offsetWidth // force reflow
+      }
+
+      that.$element
+        .addClass('in')
+        .attr('aria-hidden', false)
+
+      that.enforceFocus()
+
+      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+      transition ?
+        that.$element.find('.modal-dialog') // wait for modal to slide in
+          .one('bsTransitionEnd', function () {
+            that.$element.trigger('focus').trigger(e)
+          })
+          .emulateTransitionEnd(300) :
+        that.$element.trigger('focus').trigger(e)
+    })
+  }
+
+  Modal.prototype.hide = function (e) {
+    if (e) e.preventDefault()
+
+    e = $.Event('hide.bs.modal')
+
+    this.$element.trigger(e)
+
+    if (!this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = false
+
+    this.$body.removeClass('modal-open')
+
+    this.resetScrollbar()
+    this.escape()
+
+    $(document).off('focusin.bs.modal')
+
+    this.$element
+      .removeClass('in')
+      .attr('aria-hidden', true)
+      .off('click.dismiss.bs.modal')
+
+    $.support.transition && this.$element.hasClass('fade') ?
+      this.$element
+        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+        .emulateTransitionEnd(300) :
+      this.hideModal()
+  }
+
+  Modal.prototype.enforceFocus = function () {
+    $(document)
+      .off('focusin.bs.modal') // guard against infinite focus loop
+      .on('focusin.bs.modal', $.proxy(function (e) {
+        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+          this.$element.trigger('focus')
+        }
+      }, this))
+  }
+
+  Modal.prototype.escape = function () {
+    if (this.isShown && this.options.keyboard) {
+      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+        e.which == 27 && this.hide()
+      }, this))
+    } else if (!this.isShown) {
+      this.$element.off('keyup.dismiss.bs.modal')
+    }
+  }
+
+  Modal.prototype.hideModal = function () {
+    var that = this
+    this.$element.hide()
+    this.backdrop(function () {
+      that.$element.trigger('hidden.bs.modal')
+    })
+  }
+
+  Modal.prototype.removeBackdrop = function () {
+    this.$backdrop && this.$backdrop.remove()
+    this.$backdrop = null
+  }
+
+  Modal.prototype.backdrop = function (callback) {
+    var that = this
+    var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+    if (this.isShown && this.options.backdrop) {
+      var doAnimate = $.support.transition && animate
+
+      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+        .appendTo(this.$body)
+
+      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+        if (e.target !== e.currentTarget) return
+        this.options.backdrop == 'static'
+          ? this.$element[0].focus.call(this.$element[0])
+          : this.hide.call(this)
+      }, this))
+
+      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+      this.$backdrop.addClass('in')
+
+      if (!callback) return
+
+      doAnimate ?
+        this.$backdrop
+          .one('bsTransitionEnd', callback)
+          .emulateTransitionEnd(150) :
+        callback()
+
+    } else if (!this.isShown && this.$backdrop) {
+      this.$backdrop.removeClass('in')
+
+      var callbackRemove = function () {
+        that.removeBackdrop()
+        callback && callback()
+      }
+      $.support.transition && this.$element.hasClass('fade') ?
+        this.$backdrop
+          .one('bsTransitionEnd', callbackRemove)
+          .emulateTransitionEnd(150) :
+        callbackRemove()
+
+    } else if (callback) {
+      callback()
+    }
+  }
+
+  Modal.prototype.checkScrollbar = function () {
+    if (document.body.clientWidth >= window.innerWidth) return
+    this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
+  }
+
+  Modal.prototype.setScrollbar = function () {
+    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+    if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+  }
+
+  Modal.prototype.resetScrollbar = function () {
+    this.$body.css('padding-right', '')
+  }
+
+  Modal.prototype.measureScrollbar = function () { // thx walsh
+    var scrollDiv = document.createElement('div')
+    scrollDiv.className = 'modal-scrollbar-measure'
+    this.$body.append(scrollDiv)
+    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+    this.$body[0].removeChild(scrollDiv)
+    return scrollbarWidth
+  }
+
+  function Plugin(option, _relatedTarget) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.modal')
+      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option](_relatedTarget)
+      else if (options.show) data.show(_relatedTarget)
+    })
+  }
+
+  var old = $.fn.modal
+
+  $.fn.modal             = Plugin
+  $.fn.modal.Constructor = Modal
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this   = $(this)
+    var href    = $this.attr('href')
+    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+    if ($this.is('a')) e.preventDefault()
+
+    $target.one('show.bs.modal', function (showEvent) {
+      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+      $target.one('hidden.bs.modal', function () {
+        $this.is(':visible') && $this.trigger('focus')
+      })
+    })
+    Plugin.call($target, option, this)
+  })
+
+}(jQuery);
+
+$('.chat').on('shown.bs.modal', function() {
+    $(this).find('iframe').attr('src','http://code.davidawindham.com:8080')
+}) 
+$('.chat').on('hidden.bs.modal', function() {
+	$(this).find('iframe').attr('src','http://code.davidawindham.com:8080').remove();
+})

File diff suppressed because it is too large
+ 1 - 0
js/chat.min.js


+ 154 - 0
js/chat_func.js

@@ -0,0 +1,154 @@
+/*! Chat Page Stuff */
+
+var i;i = 0;
+$(function(){
+    Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+	var msg_return; msg_return = Messenger().run({
+		id: 'one',
+		errorMessage: 'Looking for David...', 
+		action: function(opts) {
+			if (++i < 2) {
+				get_dave();
+				return opts.error({status: 500,readyState: 0,responseText: 0});	
+			} 
+		}
+	});
+});
+
+function get_dave() {
+	$(function poll() {
+		var x = 0;
+		var countTimer = setInterval(function () {
+			if(x > 5){clearInterval(countTimer)}
+			else if(x == 5){dave_not_available()}
+			else{
+				var URLchatAPI = "http://macs.local:8080/status";
+				var request = $.ajax({
+				    url: URLchatAPI,
+				    dataType: 'json',
+					cache: false, 
+					success: function (data) {
+						online = data.online;
+						if(online=='yes'){
+							$('.chat').modal('show');
+							x = x+5;
+						};
+						if(online=='no'){
+							dave_connecting();
+						};
+					},
+					error: function ( xhr, tStatus, err ) {
+						dave_error();
+						x = x+5;
+					}
+				});
+				
+				x++;
+			}
+		}, 5000);
+
+	});
+}
+
+function dave_connecting(){
+	Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+	var y;y = 0;
+	var msg_waiting; msg_waiting = Messenger().run({
+		id: 'one',
+		hideAfter: 4,
+		errorMessage: 'Waiting on David...',
+		action: function(opts) {
+			if (++y < 2) {
+				get_dave();
+				return opts.error({status: 500,readyState: 0,responseText: 0});	
+			} 
+		}
+	});
+}		
+
+function dave_not_available(){
+	Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+	var msg_error; msg_error = Messenger().post({
+		message: 'Sorry, but I am busy.',
+		type: 'error',
+		id: 'one',
+		showCloseButton: true,
+		actions:{
+			cancel: {
+				label: '<a href="../">Leave me a message</a>',
+				action: function(){
+					window.location.href = '../';	
+				}
+			}	
+		}	
+	});
+}
+
+function dave_error(){
+	Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+	var msg_error; msg_error = Messenger().post({
+		message: 'Oops. Something has gone wrong.',
+		type: 'error',
+		id: 'one',
+		showCloseButton: true,
+		actions:{
+			cancel: {
+				label: '<a href="../">Leave me a message</a>',
+				action: function(){
+					window.location.href = '../';	
+				}
+			}	
+		}
+	});
+}
+$(function() {
+    if (window.location.hash.indexOf("chat") !== -1) {
+        $('.chat').modal('show');
+    }
+});
+
+
+
+/*! Front Page Stuff */
+
+var i;i = 0;
+$(function(){
+    Messenger.options = {extraClasses: "messenger-fixed messenger-on-bottom messenger-on-left",theme: "flat"};
+	var msg; msg = Messenger().post({
+		message: 'I am currently online', type: 'success',
+		actions: {retry: {label: 'Connect', delay: 30,
+				action: function(){
+					txt_dave();
+					var msg_return; msg_return = Messenger().run({
+					  	errorMessage: 'Please wait a moment while I am texted a message to get connected with you.', 
+						successMessage: 'Connecting Now!',
+					  	action: function(opts) {
+						  msg.hide();		  
+							if (++i < 2) {
+								return opts.error({status: 500,readyState: 0,responseText: 0});	
+							} 
+							else {
+								window.location.href = 'contact/chat';		
+								return msg.update({message: 'Redirect to Chat', hideAfter: 20, type: 'success', actions: false});
+								
+							}
+						}
+					});
+				}
+			},
+			cancel: {
+				label: 'No Thanks',
+				action: function() {
+					return msg.update({message: 'Maybe Next Time', hideAfter: 1, type: 'error', actions: false});
+				}
+			}
+		}
+	});
+});
+function txt_dave() {
+	$.ajax({
+		url: 'https://davidawindham.com/wha/phony/sms',
+		dataType: 'json',
+		success: function(data){},
+	});
+}

File diff suppressed because it is too large
+ 37 - 1
js/front-page.min.js


File diff suppressed because it is too large
+ 2 - 1
js/front.min.js


File diff suppressed because it is too large
+ 0 - 1
js/message.min.js


+ 0 - 272
js/message.js

@@ -34,275 +34,3 @@
   };
 
 }).call(this);
-
-
-
-
-
-
-+function ($) {
-  'use strict';
-
-  // MODAL CLASS DEFINITION
-  // ======================
-
-  var Modal = function (element, options) {
-    this.options        = options
-    this.$body          = $(document.body)
-    this.$element       = $(element)
-    this.$backdrop      =
-    this.isShown        = null
-    this.scrollbarWidth = 0
-
-    if (this.options.remote) {
-      this.$element
-        .find('.modal-content')
-        .load(this.options.remote, $.proxy(function () {
-          this.$element.trigger('loaded.bs.modal')
-        }, this))
-    }
-  }
-
-  Modal.VERSION  = '3.2.0'
-
-  Modal.DEFAULTS = {
-    backdrop: true,
-    keyboard: true,
-    show: true
-  }
-
-  Modal.prototype.toggle = function (_relatedTarget) {
-    return this.isShown ? this.hide() : this.show(_relatedTarget)
-  }
-
-  Modal.prototype.show = function (_relatedTarget) {
-    var that = this
-    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
-
-    this.$element.trigger(e)
-
-    if (this.isShown || e.isDefaultPrevented()) return
-
-    this.isShown = true
-
-    this.checkScrollbar()
-    this.$body.addClass('modal-open')
-
-    this.setScrollbar()
-    this.escape()
-
-    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
-    this.backdrop(function () {
-      var transition = $.support.transition && that.$element.hasClass('fade')
-
-      if (!that.$element.parent().length) {
-        that.$element.appendTo(that.$body) // don't move modals dom position
-      }
-
-      that.$element
-        .show()
-        .scrollTop(0)
-
-      if (transition) {
-        that.$element[0].offsetWidth // force reflow
-      }
-
-      that.$element
-        .addClass('in')
-        .attr('aria-hidden', false)
-
-      that.enforceFocus()
-
-      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
-      transition ?
-        that.$element.find('.modal-dialog') // wait for modal to slide in
-          .one('bsTransitionEnd', function () {
-            that.$element.trigger('focus').trigger(e)
-          })
-          .emulateTransitionEnd(300) :
-        that.$element.trigger('focus').trigger(e)
-    })
-  }
-
-  Modal.prototype.hide = function (e) {
-    if (e) e.preventDefault()
-
-    e = $.Event('hide.bs.modal')
-
-    this.$element.trigger(e)
-
-    if (!this.isShown || e.isDefaultPrevented()) return
-
-    this.isShown = false
-
-    this.$body.removeClass('modal-open')
-
-    this.resetScrollbar()
-    this.escape()
-
-    $(document).off('focusin.bs.modal')
-
-    this.$element
-      .removeClass('in')
-      .attr('aria-hidden', true)
-      .off('click.dismiss.bs.modal')
-
-    $.support.transition && this.$element.hasClass('fade') ?
-      this.$element
-        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
-        .emulateTransitionEnd(300) :
-      this.hideModal()
-  }
-
-  Modal.prototype.enforceFocus = function () {
-    $(document)
-      .off('focusin.bs.modal') // guard against infinite focus loop
-      .on('focusin.bs.modal', $.proxy(function (e) {
-        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
-          this.$element.trigger('focus')
-        }
-      }, this))
-  }
-
-  Modal.prototype.escape = function () {
-    if (this.isShown && this.options.keyboard) {
-      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
-        e.which == 27 && this.hide()
-      }, this))
-    } else if (!this.isShown) {
-      this.$element.off('keyup.dismiss.bs.modal')
-    }
-  }
-
-  Modal.prototype.hideModal = function () {
-    var that = this
-    this.$element.hide()
-    this.backdrop(function () {
-      that.$element.trigger('hidden.bs.modal')
-    })
-  }
-
-  Modal.prototype.removeBackdrop = function () {
-    this.$backdrop && this.$backdrop.remove()
-    this.$backdrop = null
-  }
-
-  Modal.prototype.backdrop = function (callback) {
-    var that = this
-    var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
-    if (this.isShown && this.options.backdrop) {
-      var doAnimate = $.support.transition && animate
-
-      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
-        .appendTo(this.$body)
-
-      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
-        if (e.target !== e.currentTarget) return
-        this.options.backdrop == 'static'
-          ? this.$element[0].focus.call(this.$element[0])
-          : this.hide.call(this)
-      }, this))
-
-      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
-      this.$backdrop.addClass('in')
-
-      if (!callback) return
-
-      doAnimate ?
-        this.$backdrop
-          .one('bsTransitionEnd', callback)
-          .emulateTransitionEnd(150) :
-        callback()
-
-    } else if (!this.isShown && this.$backdrop) {
-      this.$backdrop.removeClass('in')
-
-      var callbackRemove = function () {
-        that.removeBackdrop()
-        callback && callback()
-      }
-      $.support.transition && this.$element.hasClass('fade') ?
-        this.$backdrop
-          .one('bsTransitionEnd', callbackRemove)
-          .emulateTransitionEnd(150) :
-        callbackRemove()
-
-    } else if (callback) {
-      callback()
-    }
-  }
-
-  Modal.prototype.checkScrollbar = function () {
-    if (document.body.clientWidth >= window.innerWidth) return
-    this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
-  }
-
-  Modal.prototype.setScrollbar = function () {
-    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
-    if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
-  }
-
-  Modal.prototype.resetScrollbar = function () {
-    this.$body.css('padding-right', '')
-  }
-
-  Modal.prototype.measureScrollbar = function () { // thx walsh
-    var scrollDiv = document.createElement('div')
-    scrollDiv.className = 'modal-scrollbar-measure'
-    this.$body.append(scrollDiv)
-    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
-    this.$body[0].removeChild(scrollDiv)
-    return scrollbarWidth
-  }
-
-  function Plugin(option, _relatedTarget) {
-    return this.each(function () {
-      var $this   = $(this)
-      var data    = $this.data('bs.modal')
-      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
-      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
-      if (typeof option == 'string') data[option](_relatedTarget)
-      else if (options.show) data.show(_relatedTarget)
-    })
-  }
-
-  var old = $.fn.modal
-
-  $.fn.modal             = Plugin
-  $.fn.modal.Constructor = Modal
-
-  $.fn.modal.noConflict = function () {
-    $.fn.modal = old
-    return this
-  }
-
-  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
-    var $this   = $(this)
-    var href    = $this.attr('href')
-    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
-    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
-    if ($this.is('a')) e.preventDefault()
-
-    $target.one('show.bs.modal', function (showEvent) {
-      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
-      $target.one('hidden.bs.modal', function () {
-        $this.is(':visible') && $this.trigger('focus')
-      })
-    })
-    Plugin.call($target, option, this)
-  })
-
-}(jQuery);
-
-$('.chat').on('shown.bs.modal', function() {
-    $(this).find('iframe').attr('src','http://code.davidawindham.com:8080')
-}) 
-$('.chat').on('hidden.bs.modal', function() {
-	$(this).find('iframe').attr('src','http://code.davidawindham.com:8080').remove();
-})

File diff suppressed because it is too large
+ 136 - 0
page-chat.php