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

authorSamuel Trégouët <samuel.tregouet@logilab.fr>
changeseta2ea06e8687d
branchdefault
phasepublic
hiddenno
parent revision#5ee6b9c8d679 [xmosaicframe] small refactoring: use an alias for root.querySelector
child revision#d1ad54af02fc 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 a2ea06e8687d7d829a99999afde5d8e9f171a633
# Parent 5ee6b9c8d679519de923c33c9191bde2d810efb2
[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>