Skip to content

Commit

Permalink
Add a view for sharing, and start adding js sharing functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfairchild365 committed Apr 25, 2012
1 parent 29c98aa commit 74ee6b3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions www/js/VisitorChat/Operator.js
Expand Up @@ -43,6 +43,10 @@ var VisitorChat_Chat = VisitorChat_ChatBase.extend({
}
});

WDN.jQuery('#shareConversation').click(function() {
VisitorChat.openShareWindow();
});

this._super();
},

Expand Down Expand Up @@ -81,6 +85,22 @@ var VisitorChat_Chat = VisitorChat_ChatBase.extend({
this._super();
},

openShareWindow: function() {
//Update the Client List
WDN.jQuery.ajax({
url: this.serverURL + "conversation/" + this.conversationID + "/share?format=partial",
xhrFields: {
withCredentials: true
},
success: WDN.jQuery.proxy(function(data) {
alert(data);
WDN.jQuery("#shareChat").html(data);

//start a new dialog box.
}, this),
});
},

updateConversationListWithUnreadMessages: function()
{
//Do we need to display a notice?
Expand Down
Expand Up @@ -12,7 +12,10 @@
if ($user->type == 'operator') {
?>
<div id='visitorChat_conversation_options'>
<a href='#' id='closeConversation'>End Conversation</a>
<ul>
<li><a href='#' id='shareConversation'>Share</a></li>
<li><a href='#' id='closeConversation'>End Conversation</a></li>
</ul>
</div>
<?php
}
Expand Down
3 changes: 3 additions & 0 deletions www/templates/default/UNL/VisitorChat/Manage/View.tpl.php
Expand Up @@ -20,6 +20,9 @@
<div id="alert" title="Alert">
</div>

<div id="shareChat" title="Share">
</div>

<div id='visitorChat_sound_container'>
<audio id='visitorChat_sound' src='<?php echo \UNL\VisitorChat\Controller::$url?>audio/message.wav'></audio>
</div>
Expand Down

0 comments on commit 74ee6b3

Please sign in to comment.