Changeset - ace07d2e971f
[Not reviewed]
default
0 1 0
Drew Perttula - 9 years ago 2016-05-30 20:59:42
drewp@bigasterisk.com
don't use 'this' as an attribute name
Ignore-this: 498ade272028afa2e03fdefa982826f
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/live.html
Show inline comments
 
@@ -14,29 +14,30 @@
 
    <dom-module id="light9-collector-client">
 
      <template>
 
        <iron-ajax url="/collector/attrs" method="PUT" id="put"></iron-ajax>
 
        <span>{{status}}</span>
 
      </template>
 
      <script>
 
       HTMLImports.whenReady(function () {
 
           Polymer({
 
               is: "light9-collector-client",
 
               properties: {
 
                   status: {type: String, value: 'init'},
 
                   clientSession: {value: ""+Date.now()},
 
                   this: {type: Object, notify: true}
 
                   self: {type: Object, notify: true}
 
               },
 
               ready: function() {
 
                   this.self = this;
 
                   var self = this;
 
                   self.this = self;
 
                   
 
                   self.$.put.addEventListener(
 
                       'error', function() { self.status = 'err'; });
 
                   self.$.put.addEventListener(
 
                       'request', function() { self.status = 'send'; });
 
                   self.$.put.addEventListener(
 
                       'response', function() { self.status = 'ok'; });
 
                   // collector gives up on clients after 10sec
 
                   setInterval(self.ping.bind(self), 9000);
 
                   self.status = 'ready';
 
               },               
 
               ping: function() {
 
                   this.send([]);
 
@@ -102,25 +103,25 @@
 
               _useColor: function(attr) {
 
                   return attr == 'http://light9.bigasterisk.com/color';
 
               },
 
           });
 
       });
 
      </script>
 
    </dom-module>
 
    
 
    <dom-module id="light9-live-controls">
 
      <template>
 
        <style>
 
        </style>
 
        <light9-collector-client this="{{client}}"></light9-collector-client>
 
        <light9-collector-client self="{{client}}"></light9-collector-client>
 
        <h1>live</h1>
 

	
 
        <ul>
 
          <li>
 
            <h2>colorstrip</h2>
 
            <light9-live-control
 
                client="{{client}}"
 
                device="http://light9.bigasterisk.com/device/colorStrip"
 
                attr="http://light9.bigasterisk.com/color"
 
            ></light9-live-control>
 
          </li>
 
          <li>
0 comments (0 inline, 0 general)