Toolbar manage the concept of single and multiple actions over the mindmap.

This commit is contained in:
Paulo Gustavo Veiga 2012-05-20 14:54:35 -03:00
parent a4e6325b12
commit 93da41dcf5
2 changed files with 19 additions and 12 deletions

View File

@ -151,17 +151,24 @@ function updateToolbar() {
$("#mindmapListTable tbody input:not(:checked)").parent().parent().removeClass('row-selected'); $("#mindmapListTable tbody input:not(:checked)").parent().parent().removeClass('row-selected');
var inputs = $("#mindmapListTable tbody input:checked"); var inputs = $("#mindmapListTable tbody input:checked");
var selected = inputs.length > 0;
if (selected) { $("#buttonsToolbar .act-multiple").hide();
$("#actionsBtn").show(); $("#buttonsToolbar .act-single").hide();
$("#deleteBtn").show();
$("#infoBtn").show();
console.log($("#buttonsToolbar .act-multiple"));
if (inputs.length > 0) {
if (inputs.length == 1) {
$("#buttonsToolbar .act-single").show();
$("#buttonsToolbar .act-multiple").show();
} else { } else {
$("#actionsBtn").hide(); $("#buttonsToolbar .act-multiple").show();
$("#deleteBtn").hide(); }
$("#infoBtn").hide();
} }
} }

View File

@ -265,15 +265,15 @@
<button class="btn" id="importBtn"><i class="icon-upload"></i> Import</button> <button class="btn" id="importBtn"><i class="icon-upload"></i> Import</button>
</div> </div>
<div class="btn-group" id="deleteBtn" style="display:none"> <div class="btn-group act-multiple" id="deleteBtn" style="display:none">
<button class="btn"><i class="icon-trash"></i> Delete</button> <button class="btn"><i class="icon-trash"></i> Delete</button>
</div> </div>
<div class="btn-group" id="infoBtn" style="display:none"> <div class="btn-group act-single" id="infoBtn" style="display:none">
<button class="btn"><i class="icon-exclamation-sign"></i> Info</button> <button class="btn"><i class="icon-exclamation-sign"></i> Info</button>
</div> </div>
<div class="btn-group" id="actionsBtn" style="display:none"> <div class="btn-group act-single" id="actionsBtn" style="display:none">
<button class="btn dropdown-toggle" data-toggle="dropdown"> <button class="btn dropdown-toggle" data-toggle="dropdown">
<i class="icon-asterisk"></i> More <i class="icon-asterisk"></i> More
<span class="caret"></span> <span class="caret"></span>