Skip to content

Instantly share code, notes, and snippets.

@vidalon
Created May 6, 2013 20:06
Show Gist options
  • Save vidalon/5527741 to your computer and use it in GitHub Desktop.
Save vidalon/5527741 to your computer and use it in GitHub Desktop.
Ooyala Adobe Access Javascript example
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