This commit is contained in:
calzoneman 2013-05-12 21:37:03 -04:00
parent c7e63391f6
commit a6fff1c849
6 changed files with 24 additions and 6 deletions

View file

@ -29,7 +29,7 @@ Callbacks = {
announcement: function(data) {
var div = $("<div/>").addClass("alert")
.insertAfter($(".row")[0]);
$("<button/>").addClass("close pull-right").data.text("×")
$("<button/>").addClass("close pull-right").text("×")
.appendTo(div)
.click(function() { div.remove(); });
$("<h3/>").data.text(data.title).appendTo(div);

View file

@ -806,7 +806,7 @@ function showLoginFrame() {
}
function showUserOpts() {
var vid = $("#ytapiplayer").detach();
PLAYER.hide();
var modal = $("<div/>").addClass("modal hide fade")
.appendTo($("body"));
var head = $("<div/>").addClass("modal-header")
@ -932,7 +932,7 @@ function showUserOpts() {
});
modal.on("hidden", function() {
vid.appendTo($("#videodiv"));
PLAYER.unhide();
applyOpts();
modal.remove();
});

View file

@ -349,3 +349,21 @@ Media.prototype.removeOld = function() {
old.remove();
placeholder.attr("id", "ytapiplayer");
}
Media.prototype.hide = function() {
this.getTime(function(seconds) {
this.time = seconds;
this.hidden = $("#ytapiplayer").detach();
}.bind(this));
}
Media.prototype.unhide = function() {
this.hidden.appendTo($("#videodiv"));
var data = {
id: this.id,
currentTime: this.time
};
setTimeout(function() { this.load(data); }.bind(this), 1000);
delete this.hidden;
delete this.time;
}