Changeset - d8ccc0df69de
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 8 years ago 2017-06-10 23:38:20
drewp@bigasterisk.com
edit-choice use resource display, unlink button
Ignore-this: a0bd52abc48cb9861416ab39ca923331
3 files changed with 14 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/web/edit-choice.coffee
Show inline comments
 
@@ -51,6 +51,7 @@ Polymer
 
      ]
 

	
 
    ready: ->
 
      @uri = null
 
      setupDrop @$.box, @$.box, null, (uri) =>
 
        @uri=uri
 
        @updateLabel()
 
@@ -64,3 +65,6 @@ Polymer
 
        catch
 
          @uri
 

	
 
    unlink: ->
 
      @uri = null
 

	
light9/web/edit-choice.html
Show inline comments
 
<link rel="import" href="/lib/polymer/polymer.html">
 
<link rel="import" href="resource-display.html">
 

	
 
<!-- see light9/editchoice.py for gtk version -->
 
<dom-module id="edit-choice">
 
@@ -7,9 +8,11 @@
 
     #box {
 
         display: inline-block;
 
         background: #141448;
 
         min-width: 10em;
 
     }
 
     #box.dragging {
 
         background: rgba(126, 52, 245, 0.0784313725490196);
 
         box-shadow: 0 0 20px #ffff00;
 
     }
 
     a {
 
         color: #8e8eff;
 
@@ -18,12 +21,11 @@
 
         font-size: 145%;
 
     }
 
     
 
     
 
    </style>
 
    <div id="box">
 
      <!-- maybe use resource-display for this part -->
 
      <a href="{{uri}}" title="{{label}}"><!-- type icon goes here -->{{label}}</a>
 
      <!-- <button on-click="unlink">Unlink</button>  -->
 
      Effect:
 
      <resource-display graph="{{graph}}" uri="{{uri}}" rename></resource-display>
 
      <button on-click="unlink">Unlink</button>
 
    </div>
 
  </template>
 
  <script src="edit-choice.js"></script>
light9/web/resource-display.html
Show inline comments
 
@@ -14,7 +14,10 @@
 
         zpadding: 2px;
 
     }
 
    </style>
 
    <span class$="[[resClasses]]"><a href="{{uri}}">{{label}}</a></span>
 
    <span class$="[[resClasses]]"><a href="{{uri}}">
 
      <!-- type icon goes here -->
 
      {{label}}
 
    </a></span>
 
    <template is="dom-if" if="{{rename}}">
 
      <button on-click="onRename">Rename</button>
 

	
0 comments (0 inline, 0 general)