Created
May 6, 2013 20:06
-
-
Save vidalon/5527741 to your computer and use it in GitHub Desktop.
Ooyala Adobe Access Javascript example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function OoyalaAccessEnablerView(){ | |
} | |
OoyalaAccessEnablerView.prototype.selectItem = function(provider_id) { | |
this.hide(); | |
this.callback.apply(this, [provider_id]); | |
}; | |
OoyalaAccessEnablerView.prototype.show = function() { | |
$("#providerSelectBoxButtonArea").html(''); | |
$.each(this.providers, function(index, item){ | |
var start = '<a href="#" mvpd_id="' + item.ID + '"><div | |
class="provider-button">'; | |
var end = "</div></a>" | |
var content = start + "<img src='" + item.logoURL + "' style='padding:6px;' | |
width=130 height=32> " + end; | |
$("#providerSelectBoxButtonArea").append(content); | |
}); | |
var me = this; | |
$("#providerSelectBoxButtonArea a").click(function(){ | |
var providerId = $(this).attr("mvpd_id"); | |
me.selectItem.apply(me, [providerId]); | |
}); | |
$("#providerSelectBoxOutter").show(); | |
}; | |
OoyalaAccessEnablerView.prototype.hide = function() { | |
$("#providerSelectBoxOutter").hide(); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment