diff --git a/admin/spec/features/invited_users_spec.rb b/admin/spec/features/invited_users_spec.rb index 2e621d00c..8fa92598f 100644 --- a/admin/spec/features/invited_users_spec.rb +++ b/admin/spec/features/invited_users_spec.rb @@ -27,7 +27,7 @@ describe InvitedUser do end - it { should have_selector('#main_content .panel:first-child h3', text: "Invited Users Details" ); } + it { should have_selector('#main_content .panel:first-child h3', text: "Invited Users nDetails" ); } it { UserMailer.deliveries.length.should == 1 } end end diff --git a/web/Gemfile b/web/Gemfile index 9f6af9081..1db5f3b03 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -95,7 +95,7 @@ end gem 'rack-test' # gem 'rb-fsevent', '0.9.1', :require => false # gem 'growl', '1.0.3' - gem 'poltergeist' , '1.4.1' # can't go to 1.4.0 until this is fixed https://github.com/jonleighton/poltergeist/issues/385 + gem 'poltergeist' end diff --git a/web/app/assets/images/content/button_download_linux.png b/web/app/assets/images/content/button_download_linux.png new file mode 100644 index 000000000..b271f72d2 Binary files /dev/null and b/web/app/assets/images/content/button_download_linux.png differ diff --git a/web/app/assets/images/content/button_download_mac.png b/web/app/assets/images/content/button_download_mac.png new file mode 100644 index 000000000..7a301312a Binary files /dev/null and b/web/app/assets/images/content/button_download_mac.png differ diff --git a/web/app/assets/images/content/button_download_other_linux.png b/web/app/assets/images/content/button_download_other_linux.png new file mode 100644 index 000000000..83aec944c Binary files /dev/null and b/web/app/assets/images/content/button_download_other_linux.png differ diff --git a/web/app/assets/images/content/button_download_other_mac.png b/web/app/assets/images/content/button_download_other_mac.png new file mode 100644 index 000000000..8f63820dc Binary files /dev/null and b/web/app/assets/images/content/button_download_other_mac.png differ diff --git a/web/app/assets/images/content/button_download_other_windows.png b/web/app/assets/images/content/button_download_other_windows.png new file mode 100644 index 000000000..d857bf373 Binary files /dev/null and b/web/app/assets/images/content/button_download_other_windows.png differ diff --git a/web/app/assets/images/content/button_download_windows.png b/web/app/assets/images/content/button_download_windows.png new file mode 100644 index 000000000..fd240ee35 Binary files /dev/null and b/web/app/assets/images/content/button_download_windows.png differ diff --git a/web/app/assets/images/web/Bullet-Black.png b/web/app/assets/images/web/Bullet-Black.png new file mode 100755 index 000000000..ef28ebc35 Binary files /dev/null and b/web/app/assets/images/web/Bullet-Black.png differ diff --git a/web/app/assets/images/web/Bullet-White.png b/web/app/assets/images/web/Bullet-White.png new file mode 100755 index 000000000..5b373a1c7 Binary files /dev/null and b/web/app/assets/images/web/Bullet-White.png differ diff --git a/web/app/assets/images/web/bkg_corporate.gif b/web/app/assets/images/web/bkg_corporate.gif new file mode 100644 index 000000000..c0f94155e Binary files /dev/null and b/web/app/assets/images/web/bkg_corporate.gif differ diff --git a/web/app/assets/images/web/bkg_home.gif b/web/app/assets/images/web/bkg_home.gif new file mode 100644 index 000000000..dd9434401 Binary files /dev/null and b/web/app/assets/images/web/bkg_home.gif differ diff --git a/web/app/assets/images/web/carousel_bands.jpg b/web/app/assets/images/web/carousel_bands.jpg new file mode 100644 index 000000000..309366d68 Binary files /dev/null and b/web/app/assets/images/web/carousel_bands.jpg differ diff --git a/web/app/assets/images/web/carousel_fans.jpg b/web/app/assets/images/web/carousel_fans.jpg new file mode 100644 index 000000000..929864c5b Binary files /dev/null and b/web/app/assets/images/web/carousel_fans.jpg differ diff --git a/web/app/assets/images/web/carousel_musicians.jpg b/web/app/assets/images/web/carousel_musicians.jpg new file mode 100644 index 000000000..74d0fe73a Binary files /dev/null and b/web/app/assets/images/web/carousel_musicians.jpg differ diff --git a/web/app/assets/images/web/cta_button.png b/web/app/assets/images/web/cta_button.png new file mode 100644 index 000000000..cca3f358a Binary files /dev/null and b/web/app/assets/images/web/cta_button.png differ diff --git a/web/app/assets/images/web/icon_pdf.png b/web/app/assets/images/web/icon_pdf.png new file mode 100644 index 000000000..a08a55700 Binary files /dev/null and b/web/app/assets/images/web/icon_pdf.png differ diff --git a/web/app/assets/images/web/icon_pr.png b/web/app/assets/images/web/icon_pr.png new file mode 100644 index 000000000..99d0e7aae Binary files /dev/null and b/web/app/assets/images/web/icon_pr.png differ diff --git a/web/app/assets/images/web/icon_product.png b/web/app/assets/images/web/icon_product.png new file mode 100644 index 000000000..739cf6200 Binary files /dev/null and b/web/app/assets/images/web/icon_product.png differ diff --git a/web/app/assets/images/web/icon_users.png b/web/app/assets/images/web/icon_users.png new file mode 100644 index 000000000..889d5395f Binary files /dev/null and b/web/app/assets/images/web/icon_users.png differ diff --git a/web/app/assets/images/web/logo_corporate.png b/web/app/assets/images/web/logo_corporate.png new file mode 100644 index 000000000..529cff728 Binary files /dev/null and b/web/app/assets/images/web/logo_corporate.png differ diff --git a/web/app/assets/images/web/logo_home.png b/web/app/assets/images/web/logo_home.png new file mode 100644 index 000000000..d7482a85d Binary files /dev/null and b/web/app/assets/images/web/logo_home.png differ diff --git a/web/app/assets/images/web/next_button.png b/web/app/assets/images/web/next_button.png new file mode 100755 index 000000000..dc45fd579 Binary files /dev/null and b/web/app/assets/images/web/next_button.png differ diff --git a/web/app/assets/images/web/prev_button.png b/web/app/assets/images/web/prev_button.png new file mode 100755 index 000000000..445d40377 Binary files /dev/null and b/web/app/assets/images/web/prev_button.png differ diff --git a/web/app/assets/images/web/shadowLeft.png b/web/app/assets/images/web/shadowLeft.png new file mode 100755 index 000000000..74d131262 Binary files /dev/null and b/web/app/assets/images/web/shadowLeft.png differ diff --git a/web/app/assets/images/web/shadowLeft8.png b/web/app/assets/images/web/shadowLeft8.png new file mode 100755 index 000000000..c4b7bc6aa Binary files /dev/null and b/web/app/assets/images/web/shadowLeft8.png differ diff --git a/web/app/assets/images/web/shadowMiddle8.png b/web/app/assets/images/web/shadowMiddle8.png new file mode 100755 index 000000000..a4381df28 Binary files /dev/null and b/web/app/assets/images/web/shadowMiddle8.png differ diff --git a/web/app/assets/images/web/shadowRight.png b/web/app/assets/images/web/shadowRight.png new file mode 100755 index 000000000..56f1a7d86 Binary files /dev/null and b/web/app/assets/images/web/shadowRight.png differ diff --git a/web/app/assets/images/web/shadowTile.png b/web/app/assets/images/web/shadowTile.png new file mode 100755 index 000000000..ad9e48ab3 Binary files /dev/null and b/web/app/assets/images/web/shadowTile.png differ diff --git a/web/app/assets/images/web/video.png b/web/app/assets/images/web/video.png new file mode 100755 index 000000000..05960f0ac Binary files /dev/null and b/web/app/assets/images/web/video.png differ diff --git a/web/app/assets/javascripts/accounts_profile_avatar.js b/web/app/assets/javascripts/accounts_profile_avatar.js index 4f1757f30..d656577bc 100644 --- a/web/app/assets/javascripts/accounts_profile_avatar.js +++ b/web/app/assets/javascripts/accounts_profile_avatar.js @@ -92,7 +92,7 @@ function deleteAvatarSuccess(response) { renderAvatar(null, null); - JK.Header.loadMe(); + JK.UserDropdown.loadMe(); rest.getUserDetail() .done(function(userDetail) { @@ -361,7 +361,7 @@ self.userDetail = response; // notify any listeners that the avatar changed - JK.Header.loadMe(); + JK.UserDropdown.loadMe(); // $('.avatar_large img').trigger('avatar_changed', [self.userDetail.photo_url]); app.notify( diff --git a/web/app/assets/javascripts/header.js b/web/app/assets/javascripts/header.js index 9bb52535f..02575410f 100644 --- a/web/app/assets/javascripts/header.js +++ b/web/app/assets/javascripts/header.js @@ -1,7 +1,7 @@ (function(context,$) { /** - * Javascript for managing the header (account dropdown) as well + * Javascript for managing the header as well * as any dialogs reachable from there. Account settings dialog. */ @@ -17,8 +17,7 @@ var instrumentIds = []; var instrumentNames = []; var instrumentPopularities = {}; // id -> popularity - var invitationDialog = new context.JK.InvitationDialog(app); - var rest = new JK.Rest(); + function loadInstruments() { // TODO: This won't work in the long-term. We'll need to provide @@ -98,45 +97,10 @@ context.location = '#/home'; }); - $('.userinfo').on('click', function() { - $('ul.shortcuts', this).toggle(); - }); - - $('.userinfo .invite-friends .menuheader').on('click', function(e) { - $(this).closest('li').css('height', 'auto').find('ul').toggle(); - e.stopPropagation(); - return false; - }); - - /** - $('.userinfo .sign-out a').on('click', function(e) { - e.stopPropagation(); - - /** rest.signout() - .done(function() { - - }) - - }); */ - - $('.invite-friends .google-invite a').on('click', function(e) { - invitationDialog.showGoogleDialog(); - }); - - $('.invite-friends .email-invite a').on('click', function(e) { - invitationDialog.showEmailDialog(); - }) - $('#account-identity-form').submit(handleIdentitySubmit); $('#account-profile-form').submit(handleProfileSubmit); // Remove added instruments when 'X' is clicked $('#added-profile-instruments').on("click", ".instrument span", removeInvitation); - - $('#header-avatar').on('avatar_changed', function(event, newAvatarUrl) { - updateAvatar(newAvatarUrl); - event.preventDefault(); - return false; - }) } function handleIdentitySubmit(evt) { @@ -194,52 +158,12 @@ return false; } - function loadMe() { - $.ajax({ - url: '/api/users/' + context.JK.currentUserId - }).done(function(r) { - userMe = r; - // TODO - Setting global variable for local user. - context.JK.userMe = r; - updateHeader(); - }).fail(app.ajaxError); - } - - function updateHeader() { - - $('#user').html(userMe.name); - showAvatar(); - } - - // initially show avatar - function showAvatar() { - var photoUrl = context.JK.resolveAvatarUrl(userMe.photo_url); - $('#header-avatar').attr('src', photoUrl); - } - - // handle update avatar event - function updateAvatar(avatar_url) { - var photoUrl = context.JK.resolveAvatarUrl(avatar_url); - var avatar = $(new Image()); - avatar.attr('src', photoUrl + '?cache_bust=' + new Date().getTime()); - avatar.attr('alt', "Avatar"); - avatar.attr('id', 'header-avatar'); - $('#header-avatar').replaceWith(avatar); - } - this.initialize = function() { - events(); loadInstruments(); - loadMe(); - invitationDialog.initialize(); - - //searcher = new context.JK.Searcher(app); //searcher.initialize(); }; - - this.loadMe = loadMe; }; })(window,jQuery); \ No newline at end of file diff --git a/web/app/assets/javascripts/homeScreen.js b/web/app/assets/javascripts/homeScreen.js index 56e802e0d..9f94bc624 100644 --- a/web/app/assets/javascripts/homeScreen.js +++ b/web/app/assets/javascripts/homeScreen.js @@ -8,17 +8,6 @@ var isFtueComplete = false; function beforeShow(data) { - refreshDeviceState(); - } - - function refreshDeviceState() { - isFtueComplete = checkDeviceState(); - updateTiles(); - } - - function checkDeviceState() { - var devices = context.jamClient.TrackGetDevices(); - return Object.keys(devices).length > 0; } function mouseenterTile() { @@ -49,19 +38,7 @@ } function userHasDevices() { - var $createSession = $('div[type="createSession"]'); - var $findSession = $('div[type="findSession"]'); - $createSession.attr('layout-link', 'createSession'); - $findSession.attr('layout-link', 'findSession'); - - // undo any earlier disabling - $('h2', $createSession).removeClass('disabled'); - $('h2', $findSession).removeClass('disabled'); - $createSession.removeClass('createsession-disabled'); - $createSession.addClass('createsession'); - $findSession.removeClass('findsession-disabled'); - $findSession.addClass('findsession'); // and enable features $($createSession).on('mouseenter', mouseenterTile); @@ -97,36 +74,22 @@ // used to initialize things that do not have to be touched up in the same UI sessiion function events() { // initialize profile, feed and account tiles normally - $('.homecard.profile, .homecard.feed, .homecard.account').on('mouseenter', mouseenterTile); - $('.homecard.profile, .homecard.feed, .homecard.account').on('mouseleave', mouseleaveTile); - $('div[layout-id=ftue]').on("ftue_success", refreshDeviceState); + $('.homecard').on('mouseenter', mouseenterTile); + $('.homecard').on('mouseleave', mouseleaveTile); + if(gon.allow_force_native_client) { $('body').on('keyup', switchClientMode); } } - function updateTiles() { - logger.debug("isFtueComplete=" + isFtueComplete); - - if(isFtueComplete) { - userHasDevices(); - } - else { - userHasNoDevices(); - } - - $('.profile').on('click', function() { - context.location = '#/profile/' + context.JK.currentUserId; - }); - } - - this.initialize = function() { var screenBindings = { 'beforeShow': beforeShow }; app.bindScreen('home', screenBindings); events(); - + $('.profile').on('click', function() { + context.location = '#/profile/' + context.JK.currentUserId; + }); }; this.beforeShow = beforeShow; diff --git a/web/app/assets/javascripts/jamkazam.js b/web/app/assets/javascripts/jamkazam.js index 9ac210a95..c7462d62f 100644 --- a/web/app/assets/javascripts/jamkazam.js +++ b/web/app/assets/javascripts/jamkazam.js @@ -28,7 +28,10 @@ var heartbeatAckCheckInterval = null; var opts = { - layoutOpts: {} + inClient: true, // specify false if you want the app object but none of the client-oriented features + layoutOpts: { + layoutFilter: true // specify false if you want footer to be left alone + } }; /** @@ -279,14 +282,17 @@ this.opts = $.extend(opts, inOpts); this.layout = new context.JK.Layout(); this.layout.initialize(this.opts.layoutOpts); - registerLoginAck(); - registerHeartbeatAck(); - registerBadStateRecovered(); - registerBadStateError(); - registerSocketClosed(); events(); - context.JK.FaderHelpers.initialize(); - context.window.onunload = this.unloadFunction; + + if(opts.inClient) { + registerLoginAck(); + registerHeartbeatAck(); + registerBadStateRecovered(); + registerBadStateError(); + registerSocketClosed(); + context.JK.FaderHelpers.initialize(); + context.window.onunload = this.unloadFunction; + } }; diff --git a/web/app/assets/javascripts/jquery.hoverIntent.js b/web/app/assets/javascripts/jquery.hoverIntent.js index 3dcff261f..bc1637354 100644 --- a/web/app/assets/javascripts/jquery.hoverIntent.js +++ b/web/app/assets/javascripts/jquery.hoverIntent.js @@ -1,106 +1,115 @@ -/** -* hoverIntent is similar to jQuery's built-in "hover" function except that -* instead of firing the onMouseOver event immediately, hoverIntent checks -* to see if the user's mouse has slowed down (beneath the sensitivity -* threshold) before firing the onMouseOver event. -* -* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ -* -* -* hoverIntent is currently available for use in all personal or commercial -* projects under both MIT and GPL licenses. This means that you can choose -* the license that best suits your project, and use it accordingly. -* -* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions -* $("ul li").hoverIntent( showNav , hideNav ); -* -* // advanced usage receives configuration object only -* $("ul li").hoverIntent({ -* sensitivity: 7, // number = sensitivity threshold (must be 1 or higher) -* interval: 100, // number = milliseconds of polling interval -* over: showNav, // function = onMouseOver callback (required) -* timeout: 0, // number = milliseconds delay before onMouseOut function call -* out: hideNav // function = onMouseOut callback (required) -* }); -* -* @param f onMouseOver function || An object with configuration options -* @param g onMouseOut function || Nothing (use configuration options object) -* @author Brian Cherne brian(at)cherne(dot)net -*/ +/*! + * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+ + * http://cherne.net/brian/resources/jquery.hoverIntent.html + * + * You may use hoverIntent under the terms of the MIT license. Basically that + * means you are free to use hoverIntent as long as this header is left intact. + * Copyright 2007, 2013 Brian Cherne + */ + +/* hoverIntent is similar to jQuery's built-in "hover" method except that + * instead of firing the handlerIn function immediately, hoverIntent checks + * to see if the user's mouse has slowed down (beneath the sensitivity + * threshold) before firing the event. The handlerOut function is only + * called after a matching handlerIn. + * + * // basic usage ... just like .hover() + * .hoverIntent( handlerIn, handlerOut ) + * .hoverIntent( handlerInOut ) + * + * // basic usage ... with event delegation! + * .hoverIntent( handlerIn, handlerOut, selector ) + * .hoverIntent( handlerInOut, selector ) + * + * // using a basic configuration object + * .hoverIntent( config ) + * + * @param handlerIn function OR configuration object + * @param handlerOut function OR selector for delegation OR undefined + * @param selector selector OR undefined + * @author Brian Cherne + */ (function($) { - $.fn.hoverIntent = function(f,g) { - // default configuration options - var cfg = { - sensitivity: 7, - interval: 100, - timeout: 0 - }; - // override configuration options with user supplied object - cfg = $.extend(cfg, g ? { over: f, out: g } : f ); + $.fn.hoverIntent = function(handlerIn,handlerOut,selector) { - // instantiate variables - // cX, cY = current X and Y position of mouse, updated by mousemove event - // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval - var cX, cY, pX, pY; + // default configuration values + var cfg = { + interval: 100, + sensitivity: 7, + timeout: 0 + }; - // A private function for getting mouse position - var track = function(ev) { - cX = ev.pageX; - cY = ev.pageY; - }; + if ( typeof handlerIn === "object" ) { + cfg = $.extend(cfg, handlerIn ); + } else if ($.isFunction(handlerOut)) { + cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); + } else { + cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); + } - // A private function for comparing current and previous mouse position - var compare = function(ev,ob) { - ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); - // compare mouse positions to see if they've crossed the threshold - if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { - $(ob).unbind("mousemove",track); - // set hoverIntent state to true (so mouseOut can be called) - ob.hoverIntent_s = 1; - return cfg.over.apply(ob,[ev]); - } else { - // set previous coordinates for next time - pX = cX; pY = cY; - // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) - ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); - } - }; + // instantiate variables + // cX, cY = current X and Y position of mouse, updated by mousemove event + // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval + var cX, cY, pX, pY; - // A private function for delaying the mouseOut function - var delay = function(ev,ob) { - ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); - ob.hoverIntent_s = 0; - return cfg.out.apply(ob,[ev]); - }; + // A private function for getting mouse position + var track = function(ev) { + cX = ev.pageX; + cY = ev.pageY; + }; - // A private function for handling mouse 'hovering' - var handleHover = function(e) { - // copy objects to be passed into t (required for event object to be passed in IE) - var ev = jQuery.extend({},e); - var ob = this; + // A private function for comparing current and previous mouse position + var compare = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + // compare mouse positions to see if they've crossed the threshold + if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { + $(ob).off("mousemove.hoverIntent",track); + // set hoverIntent state to true (so mouseOut can be called) + ob.hoverIntent_s = 1; + return cfg.over.apply(ob,[ev]); + } else { + // set previous coordinates for next time + pX = cX; pY = cY; + // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) + ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); + } + }; - // cancel hoverIntent timer if it exists - if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } + // A private function for delaying the mouseOut function + var delay = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + ob.hoverIntent_s = 0; + return cfg.out.apply(ob,[ev]); + }; - // if e.type == "mouseenter" - if (e.type == "mouseenter") { - // set "previous" X and Y position based on initial entry point - pX = ev.pageX; pY = ev.pageY; - // update "current" X and Y position based on mousemove - $(ob).bind("mousemove",track); - // start polling interval (self-calling timeout) to compare mouse coordinates over time - if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} + // A private function for handling mouse 'hovering' + var handleHover = function(e) { + // copy objects to be passed into t (required for event object to be passed in IE) + var ev = jQuery.extend({},e); + var ob = this; - // else e.type == "mouseleave" - } else { - // unbind expensive mousemove event - $(ob).unbind("mousemove",track); - // if hoverIntent state is true, then call the mouseOut function after the specified delay - if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} - } - }; + // cancel hoverIntent timer if it exists + if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } - // bind the function to the two event listeners - return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover); - }; + // if e.type == "mouseenter" + if (e.type == "mouseenter") { + // set "previous" X and Y position based on initial entry point + pX = ev.pageX; pY = ev.pageY; + // update "current" X and Y position based on mousemove + $(ob).on("mousemove.hoverIntent",track); + // start polling interval (self-calling timeout) to compare mouse coordinates over time + if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} + + // else e.type == "mouseleave" + } else { + // unbind expensive mousemove event + $(ob).off("mousemove.hoverIntent",track); + // if hoverIntent state is true, then call the mouseOut function after the specified delay + if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} + } + }; + + // listen for mouseenter and mouseleave + return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); + }; })(jQuery); \ No newline at end of file diff --git a/web/app/assets/javascripts/landing/downloads.js b/web/app/assets/javascripts/landing/downloads.js deleted file mode 100644 index 76f6e5714..000000000 --- a/web/app/assets/javascripts/landing/downloads.js +++ /dev/null @@ -1,74 +0,0 @@ -(function(context,$) { - - "use strict"; - - context.JK = context.JK || {}; - - var downloads = {}; - - function listClients() { - var rest = context.JK.Rest(); - - var currentOS = context.JK.detectOS(); - - var downloads = $('.downloads'); - rest.getClientDownloads() - .done(function(data) { - downloads.removeClass('spinner-large'); - - var count = 0; - for ( var property in data ) count++; - - - if(count == 0) { - alert("Currently unable to list client software downloads."); - } - else { - - $.each(data, function(key, item) { - - - // if the currentOS we detect from browser is found within the product of an available client - // we flag it with this boolean - var matchesUserOS = currentOS != null && key.toLowerCase().indexOf(currentOS.toLowerCase()) > -1; - - var platform = key.substring('JamClient/'.length); - - var options = { - emphasis: matchesUserOS ? "currentOS" : "", - uri: item.uri, - platform: platform - } - - var download = $(context._.template($('#client-download-link').html(), options, { variable: 'data' })); - - download.find('a').data('platform', platform).click(function() { - var clicked = $(this); - rest.userDownloadedClient().always(function() { - $('body').append('