});
$(document).
on('ajax:send', function(e, xhr) {
- $('.loading').show();
+ $('.loading').fadeTo('fast', 1);
}).
on('ajax:complete', function(e, status) {
- $('.loading').hide();
+ $('.loading').fadeOut('fast', 0);
+ }).
+ on('click', '.removable-tag a', function(e) {
+ $(this).parents('[data-tag-link-uuid]').eq(0).next().andSelf().remove();
+ }).
+ on('click', 'a.add-tag-button', function(e) {
+ new_tag = window.prompt("Add tag for collection "+
+ $(this).parents('tr').attr('data-object-uuid'),
+ "");
+ if (new_tag != null) {
+ $(this).
+ parent().
+ find('>span').
+ append($('<span class="label label-info removable-tag" data-tag-link-uuid=""></span>').text(new_tag).append(' <a>×</a>')).
+ append('<br/>');
+ }
+ return false;
});
+
+ HeaderRowFixer = function(selector) {
+ var tables = $(selector);
+ this.duplicateTheadTr = function() {
+ $('>tbody', tables).each(function(){
+ $(this).prepend($('thead>tr', this).clone().css('opacity:0'));
+ });
+ }
+ this.fixThead = function() {
+ tables.each(function() {
+ var widths = [];
+ $('> tbody > tr:eq(1) > td', this).each( function(i,v){
+ widths.push($(v).width());
+ });
+ for(i=0;i<widths.length;i++) {
+ $('thead th:eq('+i+')', this).width(widths[i]);
+ }
+ });
+ }
+ }
+ var fixer = new HeaderRowFixer('.table-fixed-header-row');
+ fixer.fixThead();
+ fixer.duplicateTheadTr();
+ $(window).resize(function(){
+ fixer.fixThead();
+ });
})(jQuery);
display:inline-block;
}
-
+td.add-tag-button .add-tag-button {
+ margin-top: 2px;
+ opacity: 0;
+}
-
+td.add-tag-button:hover .add-tag-button {
+ opacity: 1;
+}
+.removable-tag a {
+ cursor: pointer;
+}
++
+ li.notification {
+ padding: 10px;
+ }
+ .arvados-nav-container {
+ top: 70px;
+ height: calc(100% - 70px);
+ overflow: auto;
+ z-index: 2;
+ }
+
+ .arvados-nav-active {
+ background: rgb(66, 139, 202);
+ }
+
+ .arvados-nav-active a {
+ color: white;
+ }
+
+ // See HeaderRowFixer in application.js
+ table.table-fixed-header-row {
+ width: 100%;
+ border-spacing: 0px;
+ margin:0;
+ }
+ table.table-fixed-header-row thead {
+ position:fixed;
+ background: #fff;
+ }
+ table.table-fixed-header-row tbody {
+ position:relative;
+ top:1.5em;
+ }