});
}
}).on('click', '.persistent-selection', function() {
+ var checked_status = this.checked;
var $modal = $(this).closest('.modal');
$checked_selections = $modal.find('.persistent-selection:checked');
+
+ if (checked_status && ($checked_selections.length > 1)) {
+ $(this).prop('checked', false);
+ }
+
any = ($checked_selections.length > 0);
$(this).
closest('.modal').
}
});
- $(window).on('load storage', update_count);
+ $(window).on('load', clear_selections);
+ $(window).on('storage', update_count);
$('#selection-form-content').on("click", function(e) {
e.stopPropagation();
</ul>
</li>
- <li class="dropdown selection-menu">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- <span class="fa fa-lg fa-paperclip"></span>
- <span class="badge" id="persistent-selection-count"></span>
- </a>
- <ul class="dropdown-menu" role="menu" id="persistent-selection-list">
- <%= form_tag '/actions' do %>
- <%= hidden_field_tag 'uuid', @object.andand.uuid %>
- <div id="selection-form-content"></div>
- <% end %>
- </ul>
- </li>
-
<% if current_user.is_admin %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="system-menu">