Changeset - 822b9b1fcf0b
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 8 years ago 2015-12-24 22:21:47
bkuhn@ebb.org
Add title to this text.

Most browsers popup the title= attribute on mouse-over.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/jquery.ui.multiprogressbar.js
Show inline comments
...
 
@@ -98,48 +98,49 @@
 
					first = false;
 
					// Check if the part would exceed the 100% and cut it at 100%
 
					part.value = totalValue+part.value > 100 ? 100-totalValue : part.value; 
 
					partElement.css('width', part.value+"%").show();
 
					lastVisibleElement = partElement;
 
					totalValue += part.value;
 
				}
 
				else {
 
					// Hide part if the progress is <= 0 or if we exceeded 100% already 
 
					part.value = 0;
 
					partElement.hide();
 
				}
 
				
 
				partElement.addClass(part.barClass);
 
				
 
				if (part.text !== undefined && part.text !== null && part.text !== false) {
 
					var textForPart;
 
					if (part.text === true) {
 
						textForPart = Math.round(part.value)+"%";
 
					}
 
					else if ($.trim(part.text) !== "") {
 
						textForPart = part.text;
 
					}
 
					$('<div></div>').addClass("ju-multiprogressbar-valuetext").text(textForPart).addClass(part.textClass).appendTo(partElement);
 
					partElement.attr('title', textForPart);
 
				}
 
			});
 
			if (self.created === true) { // Don't trigger "change" when we are creating the progressbar for the first time 
 
				self._trigger("change", null, {parts: parts});
 
			}
 
			if (totalValue >= 99.9) {
 
				lastVisibleElement.addClass("ui-corner-right");
 
				// Trigger complete
 
				self._trigger("complete");
 
			}
 
		},
 
		
 
		/**
 
		 * Restores the element to it's original state.
 
		 * @public
 
		 * @author julrich
 
		 * @since 1.0
 
		 */
 
		destroy: function() {
 
			var self = this;
 
			self._getPartElements().remove();
 
			self.element.progressbar("destroy");
 
		},
 
		
0 comments (0 inline, 0 general)