mirror of https://github.com/calzoneman/sync.git
fixes
This commit is contained in:
parent
44a981bb54
commit
fa243d5303
|
@ -9,6 +9,16 @@ The above copyright notice and this permission notice shall be included in all c
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* window focus/blur */
|
||||
$(window).focus(function() {
|
||||
FOCUSED = true;
|
||||
clearInterval(TITLE_BLINK);
|
||||
TITLE_BLINK = false;
|
||||
document.title = PAGETITLE;
|
||||
}).blur(function() {
|
||||
FOCUSED = false;
|
||||
});
|
||||
|
||||
/* Generalized show/hide function */
|
||||
function generateToggle(chevron, div) {
|
||||
$(chevron).click(function() {
|
||||
|
@ -29,6 +39,7 @@ function generateToggle(chevron, div) {
|
|||
|
||||
/* setup show/hide toggles */
|
||||
generateToggle("#usercountwrap", "#userlist");
|
||||
$("#usercountwrap").click(scrollChat);
|
||||
generateToggle("#librarytoggle", "#librarywrap");
|
||||
generateToggle("#userpltoggle", "#userplaylistwrap");
|
||||
generateToggle("#playlisttoggle", "#playlist_controls");
|
||||
|
@ -57,6 +68,9 @@ $("#logout").click(function() {
|
|||
});
|
||||
|
||||
/* chatbox */
|
||||
$("#messagebuffer").mouseenter(function() { SCROLLCHAT = false; });
|
||||
$("#messagebuffer").mouseleave(function() { SCROLLCHAT = true; });
|
||||
|
||||
$("#chatline").keydown(function(ev) {
|
||||
if(ev.keyCode == 13) {
|
||||
var msg = $("#chatline").val();
|
||||
|
|
|
@ -283,7 +283,8 @@ function rebuildPlaylist() {
|
|||
|
||||
/* menus */
|
||||
function showOptionsMenu() {
|
||||
PLAYER.hide();
|
||||
if(PLAYER)
|
||||
PLAYER.hide();
|
||||
var modal = $("<div/>").addClass("modal hide fade")
|
||||
.appendTo($("body"));
|
||||
var head = $("<div/>").addClass("modal-header")
|
||||
|
@ -426,7 +427,8 @@ function showOptionsMenu() {
|
|||
});
|
||||
|
||||
modal.on("hidden", function() {
|
||||
PLAYER.unhide();
|
||||
if(PLAYER)
|
||||
PLAYER.unhide();
|
||||
applyOpts();
|
||||
modal.remove();
|
||||
});
|
||||
|
@ -509,7 +511,8 @@ function applyOpts() {
|
|||
applyOpts();
|
||||
|
||||
function showLoginMenu() {
|
||||
PLAYER.hide();
|
||||
if(PLAYER)
|
||||
PLAYER.hide();
|
||||
var modal = $("<div/>").addClass("modal hide fade")
|
||||
.appendTo($("body"));
|
||||
var head = $("<div/>").addClass("modal-header")
|
||||
|
@ -580,7 +583,8 @@ function showLoginMenu() {
|
|||
}
|
||||
var footer = $("<div/>").addClass("modal-footer").appendTo(modal);
|
||||
modal.on("hidden", function() {
|
||||
PLAYER.unhide();
|
||||
if(PLAYER)
|
||||
PLAYER.unhide();
|
||||
modal.remove();
|
||||
});
|
||||
modal.modal();
|
||||
|
|
Loading…
Reference in New Issue