CC-6131 - add div to show when search is active; css tweaks
This commit is contained in:
parent
888762739e
commit
c928627d8b
4 changed files with 39 additions and 9 deletions
|
@ -88,16 +88,20 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
// TODO: once the new manual pages are added, change links!
|
||||
$.getJSON( "ajax/library_placeholders.json", function( data ) {
|
||||
var opts = data[mediaType];
|
||||
var opts = data[mediaType],
|
||||
wrapper = $('#library_display_wrapper').find('.dataTables_scrolling');
|
||||
img.addClass("icon-white " + opts.icon);
|
||||
$('#library_empty_text').html(
|
||||
$.i18n._("You haven't added any " + opts.media + ".")
|
||||
+ "<br/>" + $.i18n._(opts.subtext)
|
||||
+ "<br/><a target='_blank' href='" + opts.href + "'>" + $.i18n._("Learn about " + opts.media) + "</a>"
|
||||
);
|
||||
});
|
||||
|
||||
libEmpty.show();
|
||||
);
|
||||
|
||||
libEmpty.show();
|
||||
libEmpty.css('margin-left', (wrapper.width() / 2) - (libEmpty.width() / 2));
|
||||
libEmpty.css('margin-top', (wrapper.height() / 2) - (libEmpty.height() / 2) - 19);
|
||||
});
|
||||
} else {
|
||||
libEmpty.hide();
|
||||
}
|
||||
|
@ -373,6 +377,14 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
};
|
||||
|
||||
mod.onResize = function() {
|
||||
var libEmpty = $('#library_empty'), wrapper = $('#library_display_wrapper').find('.dataTables_scrolling');
|
||||
libEmpty.css('margin-left', (wrapper.width() / 2) - (libEmpty.width() / 2));
|
||||
libEmpty.css('margin-top', (wrapper.height() / 2) - (libEmpty.height() / 2) - 19);
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
||||
|
||||
$(window).resize(AIRTIME.library.onResize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue