Making a separate webclient_gui file to handle the graphical interface.
This commit is contained in:
parent
098be9792a
commit
33b73c7430
3 changed files with 40 additions and 1 deletions
28
evennia/web/webclient/static/webclient/js/webclient_gui.js
Normal file
28
evennia/web/webclient/static/webclient/js/webclient_gui.js
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Evennia Webclient GUI component
|
||||||
|
*
|
||||||
|
* This is used in conjunction with the main evennia.js library, which
|
||||||
|
* handles all the communication with the Server.
|
||||||
|
*
|
||||||
|
* The job of this code is to create listeners to subscribe to evennia
|
||||||
|
* messages, via Evennia.emitter.on(cmdname, listener) and to handle
|
||||||
|
* input from the user and send it to
|
||||||
|
* Evennia.msg(cmdname, args, kwargs, [callback]).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
// GUI Helpers
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Listeners
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Senders
|
||||||
|
//
|
||||||
|
|
@ -54,14 +54,20 @@ JQuery available.
|
||||||
webclient.html to point to the local copy.</p>
|
webclient.html to point to the local copy.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- This is will only fire if js is actually active -->
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$('#noscript').remove();
|
$('#noscript').remove();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id=client>
|
<div id=clientwrapper>
|
||||||
{% block client %}
|
{% block client %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- import this after the client -->
|
||||||
|
{% block guilib_import %}
|
||||||
|
<script src="webclient/js/webclient_gui.js" language="javascript" type="test/javascript"> </script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "webclient/base.html" %}
|
{% extends "webclient/base.html" %}
|
||||||
|
|
||||||
|
{% block guilib_import %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block connecting %}
|
{% block connecting %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
@ -23,3 +26,5 @@ var sendInput = function() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue