fix search

This commit is contained in:
2013-09-23 00:02:31 +02:00
parent 7624861623
commit 8b991096c4
23 changed files with 120 additions and 132 deletions

36
masks/list.html Normal file → Executable file
View File

@@ -10,7 +10,19 @@ databap.pageInit = function()
//TODO : to be replaced by tinyscrollbar
databap.$main.css('overflow', 'auto');
databap.getInfo('list', function(items){buildList(items);}, {}, 'json');
databap.getInfo
(
'list',
function(items)
{
buildList(items);
//Init's end
databap.setInitEnd(true);
},
{},
'json'
);
};
function buildList(asAllItems)
@@ -21,26 +33,10 @@ function buildList(asAllItems)
{
for(iItemId in asAllItems[sType])
{
asItemInfo = asAllItems[sType][iItemId];
//Filling up the item line
$verHtml = $(databap.consts.versionHtml);
$verHtml.find('#description').html(asItemInfo.description);
$verHtml.find('#author_name').html(asItemInfo.name);
$verHtml.find('#author_company').html(asItemInfo.company);
$verHtml.find('#led').html(asItemInfo.led);
//Link
var sItemLink = databap.getExternalLink(sType, iItemId);
$verHtml.find('#item_link').attr('href', sItemLink).attr('title', 'Lien vers '+sItemLink);
$verHtml = databap.setElemTags($verHtml, iItemId, false, sType);
//Display
$verHtml.hide().appendTo(databap.getMainElem('#list_container')).slideDown('fast');
asAllItems[sType][iItemId]['type'] = sType;
asAllItems[sType][iItemId]['id_item'] = iItemId;
databap.appendItem(asAllItems[sType][iItemId], databap.getMainElem('#list_container'));
}
}
//Init's end
databap.setInitEnd(true);
}
</script>