diff options
| author | group1 <f16_group1@pbridge.adm.cs.cmu.edu> | 2016-10-16 22:12:51 -0400 |
|---|---|---|
| committer | group1 <f16_group1@pbridge.adm.cs.cmu.edu> | 2016-10-16 22:12:51 -0400 |
| commit | 22f814539e14312afb5627f7ad39905e9450209b (patch) | |
| tree | ee0751e887600ed2a56bfc07a8bc34c537efcfda /webapp/app/templates | |
| parent | Package include path fix and add optimization for computing coverage (diff) | |
| parent | Use staticmethod instead of classmethod in by_type (diff) | |
| download | bridge-22f814539e14312afb5627f7ad39905e9450209b.tar.zst | |
Merge branch 'master' of https://github.com/rayhogenson/bridge
Conflicts:
fish_show.py
Diffstat (limited to 'webapp/app/templates')
| -rw-r--r-- | webapp/app/templates/index.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/webapp/app/templates/index.html b/webapp/app/templates/index.html index 3592985..4dadb7b 100644 --- a/webapp/app/templates/index.html +++ b/webapp/app/templates/index.html @@ -124,6 +124,23 @@ var c = new creature(msg.name, socket); c.render($('#creatures')); }); + + socket.on('enable image', function(msg) { + console.log('enable image'); + // to be tested + var name = msg.name; + var myImgElement = $("#" + name); + myImgElement.removeClass('img-disable'); + + }); + + socket.on('disable image', function(msg) { + console.log('disable image'); + // to be tested + var name = msg.name; + var myImgElement = $("#" + name); + myImgElement.addClass('img-disable'); + }); socket.on('disconnect', function() { console.log('disconnected'); @@ -134,6 +151,13 @@ function clickImg(element) { console.log(element.id); + + //-----Testing------------------ + //var name = element.id; + //var myImgElement = $("#" + name); + //myImgElement.addClass('img-disable'); + // ----------------------------- + var c = new creature(element.id, socket); c.click() } |
