* Fix error in automatic podcast ingest
* Switch from text-scrolling to using title attributes to display overflowing text strings
This commit is contained in:
parent
14104a93ae
commit
be3a3fbd9f
5 changed files with 26 additions and 9 deletions
|
@ -304,9 +304,27 @@ function getUsabilityHint() {
|
|||
});
|
||||
}
|
||||
|
||||
// Set up text scrolling for all tags matching selector within the calling element(s)
|
||||
jQuery.fn.textScroll = function(selector) {
|
||||
/**
|
||||
* Add title attributes (whose values are their inner text) to all elements in the calling parent matching selector
|
||||
*
|
||||
* @param selector jQuery selector to search descendants
|
||||
* @returns {jQuery}
|
||||
*/
|
||||
jQuery.fn.addTitles = function(selector) {
|
||||
this.each(function() {
|
||||
// Put this in a mouseenter event handler so it's dynamic
|
||||
// (newly created elements will have the title applied on hover)
|
||||
$(this).on("mouseenter", selector, function () {
|
||||
$(this).attr("title", $(this).text());
|
||||
});
|
||||
});
|
||||
|
||||
return this; // jQuery chaining
|
||||
};
|
||||
|
||||
// XXX: Old code to pan selector text; keeping this around in case we want to use it later - Duncan
|
||||
jQuery.fn.scrollText = function(selector) {
|
||||
this.each(function () {
|
||||
$(this).on("mouseenter", selector, function () {
|
||||
var sw = $(this)[0].scrollWidth - parseFloat($(this).css("textIndent")), iw = $(this).innerWidth();
|
||||
if (sw > iw) {
|
||||
|
@ -322,5 +340,5 @@ jQuery.fn.textScroll = function(selector) {
|
|||
});
|
||||
});
|
||||
|
||||
return this; // jQuery chaining
|
||||
return this;
|
||||
};
|
||||
|
|
|
@ -162,7 +162,7 @@ $(document).ready(function () {
|
|||
});
|
||||
};
|
||||
|
||||
$("#recent_uploads").textScroll("td");
|
||||
$("#recent_uploads").addTitles("td");
|
||||
|
||||
self.isRecentUploadsRefreshTimerActive = false;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ var AIRTIME = (function (AIRTIME) {
|
|||
//when you're creating a new podcast, we already have the object from the result of the POST. We're saving
|
||||
//a roundtrip by not fetching it again here.
|
||||
$scope.podcast = podcast;
|
||||
console.log(podcast);
|
||||
tab.setName($scope.podcast.title);
|
||||
|
||||
$scope.savePodcast = function() {
|
||||
|
@ -168,7 +167,7 @@ var AIRTIME = (function (AIRTIME) {
|
|||
}
|
||||
});
|
||||
|
||||
podcastEpisodesTableWidget.getDatatable().textScroll("td");
|
||||
podcastEpisodesTableWidget.getDatatable().addTitles("td");
|
||||
return podcastEpisodesTableWidget;
|
||||
};
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
$(document).ready(function() {
|
||||
// Add text scrolling to tab names
|
||||
$("#show_builder").textScroll(".tab-name");
|
||||
$("#show_builder").addTitles(".tab-name");
|
||||
// Initialize the ScheduleTab
|
||||
AIRTIME.tabs.initScheduleTab();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue