<html>
<head>
<title>Chat Popup Test</title>
<link href='https://botcompany.de/1014036/raw/1025925?contentType=text/css' rel='stylesheet'>
<script type='text/javascript' src='//code.jquery.com/jquery-1.10.2.min.js'></script>
<script type='text/javascript' src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js'></script>
<script type='text/javascript'> $(function(){
$("#addClass").click(function () {
console.log("Click!");
$('#qnimate').addClass('popup-box-on');
});
$("#removeClass").click(function () {
$('#qnimate').removeClass('popup-box-on');
});
});
var showActions = false;
function showAction(action) {
if (showActions) {
$("#actionMsg").html(action);
$("#actionMsg").show();
}
}
function appendAction(action) {
if (showActions) {
$("#actionMsg").append(" | " + action);
$("#actionMsg").show();
}
}
function hideAction() {
$("#actionMsg").hide();
$("#actionMsg").html("");
}
var n = #N#;
var interval = 1000;
nInitial = n;
function start() {
url = "#INCREMENTALURL#";
if (url != '' && url != ("#INC" + "REMENTALURL#")) {
showAction("Loading " + url + n);
$.get(url + n, function(src) {
showAction("Loaded");
var match = src.match(/\d+/);
if (match != null) {
n = parseInt(match[0]);
$(".direct-chat-messages").append(src);
$("#scrollme").scrollTop(1E10);
showAction("Appended " + src.length);
} else
showAction("n=" + n + " (initial=" + nInitial + ")");
appendAction("Rescheduling");
setTimeout(start, interval);
appendAction("Rescheduled");
}, 'text')
.fail(function() {
showAction("Rescheduling after fail");
setTimeout(start, interval);
});
}
}
</script>
</head>
<body onLoad='$("#scrollme").scrollTop(1E10); start();'>
<div id="actionMsg"></div>
<div class="container text-center">
<div class="row">
<div class="round hollow text-center">
<a href="#" id="addClass"><span class="glyphicon glyphicon-comment"></span> Open chat </a>
</div>
</div>
</div>
<form>
<div class="popup-box chat-popup" id="qnimate">
<div class="popup-head">
<div onClick="$('#qnimate').removeClass('popup-box-on')" class="popup-head-left pull-left"><img src="http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1008323&contentType=image/png" alt="Bot Image"> $HEADING</div>
<div class="popup-head-right pull-right">
<!--
<div class="btn-group">
<button class="chat-header-button" data-toggle="dropdown" type="button" aria-expanded="false">
<i class="glyphicon glyphicon-cog"></i> </button>
<ul role="menu" class="dropdown-menu pull-right">
<li><a href="#">Media</a></li>
<li><a href="#">Block</a></li>
<li><a href="#">Clear Chat</a></li>
<li><a href="#">Email Chat</a></li>
</ul>
</div>
-->
<button data-widget="remove" id="removeClass" class="chat-header-button pull-right" type="button"><i class="glyphicon glyphicon-off"></i></button>
</div>
</div>
<div id="scrollme" class="popup-messages">
<div class="direct-chat-messages">
<!-- MSGS HERE -->
</div>
<div class="popup-messages-footer">
<textarea autofocus id="status_message" placeholder="Type a message..." rows="10" cols="30" name="message" onkeydown="if (event.keyCode == 13) { if (status_message.value == 'clear') form.submit(); else { url = '#MSGURL#' + encodeURIComponent(status_message.value); showAction('Submitting ' + url); $.get(url); } return false; }"></textarea>
<div class="btn-footer">
<!--
<button class="bg_none"><i class="glyphicon glyphicon-film"></i> </button>
<button class="bg_none"><i class="glyphicon glyphicon-camera"></i> </button>
<button class="bg_none"><i class="glyphicon glyphicon-paperclip"></i> </button>
-->
<!--
<button class="bg_none pull-right"><i class="glyphicon glyphicon-thumbs-up"></i> </button>
-->
</div>
</div>
</div>
</form>
</body></html>Began life as a copy of #1008787
download render html show line numbers
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025924 |
| Snippet name: | Generic Yellow Web Chat Bot Template (OK) |
| Eternal ID of this version: | #1025924/8 |
| Text MD5: | ad2521697b5ec67be81b612dd22251a6 |
| Author: | stefan |
| Category: | javax / web chat bots |
| Type: | HTML |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-11-05 11:20:52 |
| Source code size: | 4456 bytes / 127 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 431 / 690 |
| Version history: | 7 change(s) |
| Referenced in: | #1025923 - Dummy Web Chat Bot |