the world’s leading publisher of classical, contemporary & educational music (2024)

"); $("#composer-search").addClass('hide'); // Submit handler for login (special case) $("#popupContainer").on("submit", "#loginForm", function (event) { doLogin(event, navigateTo); }); // Submit handler for general popup forms $("#popupContainer").on("submit", "form:not(#loginForm)", function (event) { doPopupSubmit(event, this); }); // Click handler for "Popup In Popup" links - these are loaded into popup only when clicked from within popup, else are loaded normally. $("#popupContainer").on("click", "a[data-pip]", function (event) { doPopupLink(event, this); }); // Click handler for all other popup links (with data-popup attribute) - these are always loaded into popup where possible. $("body").on("click", "a[data-popup]", function (event) { doPopupLink(event, this); }); $("a.LoginLink").click(function() { // Check if already logged in, navigate as normal if(loginCheck()) return true; //Fallback to secure page for browsers that don't support CORS if(!checkCORS()) return true; // Get url for "LoginFollow" links if($(this).hasClass("LoginFollow")) navigateTo = $(this).attr("href"); else navigateTo = null; $("#popupContainer").loadSecure("https://www.boosey.com/profile/login.cshtml", showPopup); return false; }); $("button.loadModal").click(function () { $("#popupContainer").load("default.cshtml #composer-search", showPopup); return false; }); $(document).on("click", "#popupBackground, #popupCloseBtn, .popupCloseBtn", hidePopup); $(document).on("change", ".js--sitelang", function () { var pageQS = "&composerid=3288"; var basePath = "/pages/teaching/calendar/perf_results"; var langId = $(this).val(); window.location.href = basePath + "?sl-id=" + langId + pageQS; }); $.fn.centerPopup = function () { var mt = -25 - (this.outerHeight() / 2); var ml = 0 - (this.outerWidth() / 2); var minT = ($(window).height() / 2) * -1; var minL = ($(window).width() / 2) * -1; if (mt < minT) mt = minT; if (ml < minL) ml = minL; this.css({ "position": "absolute", "top": "50%", "left": "50%", "margin-top": mt, "margin-left": ml }); return this; } //$.fn.loadSecure = function (href, fnCallback) { // var self = this; // $.ajax({ // type: "GET", // url: href, // crossDomain: false, // xhrFields: { withCredentials: true } // }).done(function (data, textStatus, jqXHR) { // self.html(data); // }).done(fnCallback); // return this; //} // // NGB: loadSecure function to allow ajax .load() functionality with CORS // $.fn.loadSecure = function (url, params, callback) { if (typeof url !== "string" && _load) { return _load.apply(this, arguments); } var selector, type, response, self = this, off = url.indexOf(" "); if (off > -1) { selector = jQuery.trim(url.slice(off, url.length)); url = url.slice(0, off); } // If it's a function if (jQuery.isFunction(params)) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if (params && typeof params === "object") { type = "POST"; } // If we have elements to modify, make the request if (self.length > 0) { jQuery.ajax({ url: url, // If "type" variable is undefined, then "GET" method will be used. // Make value of this field explicit since // user can override it through ajaxSetup method type: type || "GET", dataType: "html", data: params, // NGB: Add parameters to allow CORS crossDomain: false, xhrFields: { withCredentials: true } }).done(function (responseText) { // Save response for use in complete callback response = arguments; self.html(selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery("

").append(jQuery.parseHTML(responseText)).find(selector) : // Otherwise use the full result responseText); // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" }).always(callback && function (jqXHR, status) { self.each(function () { callback.apply(this, response || [jqXHR.responseText, status, jqXHR]); }); }); } return this; }; }); function showPopup() { $("#popupBackground").fadeTo(250, 0.5); $("#popupContainer").centerPopup().fadeTo(350, 1); //.show(); window.scrollTo(0, 0); $("#composer-search").removeClass('hide'); } function hidePopup() { //$("#popupContainer .tooltip").tooltip("destroy"); $("#popupContainer").fadeOut(250); //hide(); $("#popupBackground").fadeOut(250); $("#composer-search").addClass('hide'); } function doLogin(event, navigateTo) { event.preventDefault(); var $frm = $("#loginForm"); $.ajax({ type: "POST", url: $frm.attr("action"), data: $frm.serialize(), crossDomain: false, xhrFields: { withCredentials: true } }).done(function(data, textStatus, jqXHR) { if(jqXHR.status == 299) { // Login failed - re-display login form $("#popupContainer").empty().append(data); } else { // Success. Navigate, reload, or hide the login form and re-load the profile bar if(navigateTo) window.location.href = navigateTo; else if(loginRefresh) window.location.reload(); else { hidePopup(); $("#js--profilebarContainer").loadSecure("https://www.boosey.com/profile/profileBar.cshtml #js--profilebar"); $("#js--shopBarContainer").load("/shop/ajax/sb_links.cshtml #js--shopBar"); $("body").removeClass("mobile-menuOpen"); //used in lcm for the sticky nav // $("#sb_basket").load("/pages/shop/ajax/minibasket?bt=2 .sb_box.sb_basket"); } } }); return false; } function doPopupSubmit(event, frm) { event.preventDefault(); var $frm = $(frm); $.ajax({ type: "POST", url: $frm.attr("action"), data: $frm.serialize(), crossDomain: false, xhrFields: { withCredentials: true } }).done(function (data, textStatus, jqXHR) { $("#popupContainer").empty().append(data); showPopup();// Resize popup to new content }); return false; } function loginCheck() { var ok = false; $.ajax({ async: false, type: "GET", url: "https://www.boosey.com/profile/loginCheck.cshtml", crossDomain: false, xhrFields: { withCredentials: true } }).done(function (data, textStatus, jqXHR) { if (jqXHR.status == 200) ok = true; }); return ok; } function doPopupLink(event, element) { var href = $(element).attr("href"); // Check CORS support if switching protocols, fall back to inline page if (href.substring(0, 6) == "https:" && location.protocol == "http:" && !checkCORS()) return true; // Must set withCredentials to true for http->https GETs (can't use .load). event.preventDefault(); $.ajax({ type: "GET", url: href, crossDomain: false, xhrFields: { withCredentials: true } }).done(function (data, textStatus, jqXHR) { $("#popupContainer").empty().append(data); showPopup();// Resize popup to new content }).fail(function () { // Navigate to default URL if ajax fails. window.location.href = href; }); return false; } function checkCORS() { if("withCredentials" in new XMLHttpRequest()) return true; return false; }

My Account

  • the world’s leading publisher of classical, contemporary & educational music (2)
  • the world’s leading publisher of classical, contemporary & educational music (3)
  • the world’s leading publisher of classical, contemporary & educational music (4)
  • the world’s leading publisher of classical, contemporary & educational music (5)
  • the world’s leading publisher of classical, contemporary & educational music (6)
  • the world’s leading publisher of classical, contemporary & educational music (7)

the world’s leading publisher of classical, contemporary & educational music (9)

the world’s leading publisher of classical, contemporary & educational music (2024)

References

Top Articles
Latest Posts
Article information

Author: Roderick King

Last Updated:

Views: 5647

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.