[xmosaicframe] add a button to remove a frame (closes #289628)

authorSamuel Trégouët <samuel.tregouet@logilab.fr>
changeset720d62e1ca10
branchdefault
phasedraft
hiddenyes
parent revision#886ba3945c2d [xmosaicframe] small refactoring: use an alias for root.querySelector
child revision#22f0a11e4b9b add a button to fold/unfold frame (closes #289629), #8d49c3f075df add a button to fold/unfold frame (closes #289629)
files modified by this revision
components/xmosaicframe/xmosaicframe.es6
components/xmosaicframe/xmosaicframe.html
# HG changeset patch
# User Samuel Trégouët <samuel.tregouet@logilab.fr>
# Date 1427453191 -3600
# Fri Mar 27 11:46:31 2015 +0100
# Node ID 720d62e1ca100d0bee0e2f8a9178b6de91828f7a
# Parent 886ba3945c2d7ae0a6cea48cb6127c85298409a9
[xmosaicframe] add a button to remove a frame (closes #289628)

diff --git a/components/xmosaicframe/xmosaicframe.es6 b/components/xmosaicframe/xmosaicframe.es6
@@ -22,10 +22,13 @@
1              qs('#panel').style.display = 'block';
2              qs('form').style.display = 'none';
3              queryUpdated(host, ownerDocument, registry);
4              e.preventDefault();
5          });
6 +        qs('#remove-frame').addEventListener('click', function(e) {
7 +            host.remove();
8 +        });
9      }
10 
11 
12      function queryUpdated(host, ownerDocument, registry) {
13          let sourceviews = registry.views[host.dataset.source],
diff --git a/components/xmosaicframe/xmosaicframe.html b/components/xmosaicframe/xmosaicframe.html
@@ -36,10 +36,11 @@
14  		aria-expanded="false">View <span class="caret"></span>
15  	</button>
16  	<ul id="view-menu" class="dropdown-menu" role="menu">
17  	</ul>
18        </div>
19 +      <button id="remove-frame" class="btn btn-default glyphicon glyphicon-remove"></button>
20      </div>
21      <div class="panel-body">
22      </div>
23    </div>
24  </template>