Skip to content
Snippets Groups Projects
Commit 5f798ef2 authored by Demian Katz's avatar Demian Katz
Browse files

Removed unused file.

parent 6d6840b4
No related merge requests found
$(document).ready(function() {
registerLoadHandlers();
});
function registerLoadHandlers() {
registerLoadHandler('loadOptions', 'getOptionsAsHTML');
registerLoadHandler('loadAlphabet', 'getAlphabetAsHTML');
registerLoadHandler('loadSubjects', 'getSubjectsAsHTML');
}
function registerLoadHandler(linkClass, method) {
$('ul.browse a.'+linkClass).each(function() {
var params = extractParams($(this).attr('class'));
params.query = $(this).attr('title');
$(this).unbind('click').click(function() {
highlightBrowseLink(this);
loadBrowseOptions(method, params);
return false;
});
});
}
function loadBrowseOptions(method, params) {
$('#list4container').empty().removeClass('browseNav');
$('#'+params.target).addClass('browseNav').empty()
.append('<div class="dialogLoading"></div>');
$.ajax({
dataType: 'json',
url: path + '/AJAX/JSON_Browse?method='+method,
data: params,
success: function(response) {
if(response.status == 'OK') {
$('#'+params.target).empty().append(response.data);
registerLoadHandlers();
}
}
});
}
function highlightBrowseLink(link) {
$(link).parentsUntil('div.browseNav').children('li').removeClass('active');
$(link).parent('li').addClass('active');
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment