Files @ 21a52ce16954
Branch filter:

Location: light9/light9/web/resource-display.html

Drew Perttula
new effects2.html polymer port
Ignore-this: 2edbfa5954a7592c1ddc77ec8c22e5d
<link rel="import" href="/lib/polymer/polymer.html">

<dom-module id="resource-display">
  <template>
    <link rel="stylesheet" href="/style.css">
    <span class="resource"><a href="{{uri}}">{{label}}</a></span>
    <template is="dom-if" if="{{rename}}">
      <button>Rename</button>
    </template>
  </template>
  <script>
   Polymer({
       is: "resource-display",
       properties: {
           graph: { type: Object },
           uri: { type: String },
           label: { type: String },
           rename: { type: Boolean },
       },
       ready: function() {
           this.graph.runHandler(this.setLabel.bind(this), "label #{this.uri}");
           console.log('ren', this.rename);
       },
       setLabel: function() {
           this.label = this.graph.stringValue(this.uri, this.graph.Uri('rdfs:label'));
           if (!this.label) {
               this.label = this.uri;
           }
       }
   });
  </script>
</dom-module>