Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created August 20, 2009 20:51
Show Gist options
  • Select an option

  • Save tammersaleh/171359 to your computer and use it in GitHub Desktop.

Select an option

Save tammersaleh/171359 to your computer and use it in GitHub Desktop.
PlatosForms.Sidebar = function (tab) {
this.tab = tab;
this.show = function() {
PlatosForms.log("showing the sidebar");
sidebar = document.getElementById("platos-forms-sidebar");
sidebar.hidden = false;
};
this.hide = function() {
PlatosForms.log("hiding the sidebar");
sidebar = document.getElementById("platos-forms-sidebar");
sidebar.hidden = true;
};
this.toggle = function() {
sidebar = document.getElementById("platos-forms-sidebar");
if (sidebar.hidden) {
this.show();
} else {
this.hide();
}
};
this.pre_load = function(url) {
PlatosForms.log("preloading " + url);
document.getElementById('platos-forms-sidebar-iframe').setAttribute("src", url);
};
this.focus = function() {
PlatosForms.log("focusing " + tab);
};
this.destroy = function() {
PlatosForms.log("destroying " + tab);
};
}
sidebar = new PlatosForms.Sidebar(tab);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment