Skip to content

Commit

Permalink
remove category dropdown js
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Balogh committed Dec 14, 2010
1 parent 59811a1 commit d331db3
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions media/js/amo2009/global.js
Expand Up @@ -281,46 +281,6 @@ jQuery(function($) {
$el.detach();
});

// Categories dropdown only on pages where it is not in secondary
if($('#categories').parents('.secondary').length == 0) {
var categories = new DropdownArea();
// add class to style differently
$('#categories').addClass('dropdown-categories');

// set up images for dropdown
var categoryContainer = $('#categories :first-child')[0];
if (categoryContainer) {
var clickableCategories = $(categoryContainer);
clickableCategories.prepend('<img src="/img/amo2009/icons/category-dropdown-down.gif" alt="" /> ');

// stop the accidental selection during double click
clickableCategories.each(function(){
this.onselectstart = function () { return false; }
this.onmousedown = function () { return false; }
});

// set up variables for object
categories.trigger = clickableCategories; // node
categories.target = '#categories>ul'; // reference
categories.targetParent = '#categories'; // reference
categories.callbackFunction = function() {
if($('#categories>ul:visible').length){
$('#categories img').attr('src', '/img/amo2009/icons/category-dropdown-down.gif');
} else {
$('#categories img').attr('src', '/img/amo2009/icons/category-dropdown-up.gif');
}
};

// initialise dropdown area
categories.init();
}
} else {
// Turn the link into a span so it's not deceptively clickable.
var e = $('#categories h3');
e.html('<span>' + e.text() + '</span>');
}


// advanced form dropdown
var advancedForm = new DropdownArea();
// set up variables for object
Expand Down

0 comments on commit d331db3

Please sign in to comment.