Permalink
Browse files

BrightBox now included!

  • Loading branch information...
1 parent 74ee6b3 commit 9fc2ce130046c8264cd37b4aa07988d0f1b9443d @cbwiedel cbwiedel committed Apr 25, 2012
Showing with 80 additions and 4 deletions.
  1. +42 −0 www/css/operator.css
  2. +30 −1 www/js/VisitorChat/Operator.js
  3. +8 −3 www/templates/default/UNL/VisitorChat/Manage/View.tpl.php
View
@@ -320,4 +320,46 @@
#visitorChat_conversation_options {
display: inline;
float: right;
+}
+
+#visitorChat_sitesWarning {
+ margin-top: 5px;
+}
+
+#visitorChat_sitesWarning li {
+ margin-left: 25px;
+ font-size: 12px;
+ list-style-type: circle;
+ margin-top: 3px;
+}
+
+#visitorChat_brightBox {
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ box-shadow: 1px 2px 24px -2px #555;
+ display: none;
+ padding: 18px;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ margin-top:-200px;
+ margin-left: -180px;
+ height: 400px;
+ width: 320px;
+ z-index: 100;
+}
+
+#visitorChat_backDrop {
+ cursor: pointer;
+ display: block;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10;
+ background-color: #000000;
+ opacity: .35;
+ filter:progid:DXImageTransform.Microsoft.BasicImage(opacity=.7);
}
@@ -16,6 +16,35 @@ var VisitorChat_Chat = VisitorChat_ChatBase.extend({
return false;
});
+ //BrightBox Testing hurr.
+ var mouse_is_inside = false;
+
+ WDN.jQuery("#visitorChat_siteList").click(function() {
+
+ //Navigation needs to be under back-drop
+ WDN.jQuery("#wdn_navigation_wrapper").css({'z-index': '1'});
+
+ //Add in the back-drop and show brightBox
+ WDN.jQuery("body").append("<div id='visitorChat_backDrop'></div>");
+ WDN.jQuery('#visitorChat_brightBox').fadeIn("fast");
+
+ //Track mouse position
+ WDN.jQuery('#visitorChat_brightBox').hover(function() {
+ mouse_is_inside = true;
+ }, function() {
+ mouse_is_inside = false;
+ });
+
+ //Click outside container to close
+ WDN.jQuery("#visitorChat_backDrop").mouseup(function() {
+ if (!mouse_is_inside) {
+ WDN.jQuery("#visitorChat_backDrop").remove();
+ WDN.jQuery('#visitorChat_brightBox').fadeOut(100);
+ WDN.jQuery("#wdn_navigation_wrapper").css({'z-index': 'auto'});
+ }
+ });
+ });
+
this._super();
},
@@ -403,4 +432,4 @@ var VisitorChat_Chat = VisitorChat_ChatBase.extend({
WDN.jQuery(function(){
VisitorChat = new VisitorChat_Chat();
VisitorChat.start();
-});
+});
@@ -1,7 +1,8 @@
-<script type="text/javascript" src="<?php echo \UNL\VisitorChat\Controller::$url?>js/chat.php?for=operator"></script>
+<script type="text/javascript" src="<?php echo \UNL\VisitorChat\Controller::$url ?>js/chat.php?for=operator"></script>
<div id="operatorOptions">
- <a href="#" id="toggleOperatorStatus"><span id="currentOperatorStatus"></span></a>
+ <a id="toggleOperatorStatus" href="#"><span id="currentOperatorStatus"></span></a>
+ <a id="visitorChat_siteList" href="#">Sites I operate</a>
</div>
<div id="visitorChat_rightSide">
@@ -24,9 +25,13 @@
</div>
<div id='visitorChat_sound_container'>
- <audio id='visitorChat_sound' src='<?php echo \UNL\VisitorChat\Controller::$url?>audio/message.wav'></audio>
+ <audio id='visitorChat_sound' src='<?php echo \UNL\VisitorChat\Controller::$url ?>audio/message.wav'></audio>
</div>
<div id="notificationOptions">
<a href="#" id="requestNotifications">Show Desktop Notifications</a>
+</div>
+
+<div id="visitorChat_brightBox">
+ <p>Hello all!</p>
</div>

0 comments on commit 9fc2ce1

Please sign in to comment.