mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
2 lines
983 B
JavaScript
2 lines
983 B
JavaScript
define([],function(){var a=function(a,b){var c=this,d=this.shed_url,e=Galaxy.root+"api/tool_shed/search";$.get(e,{term:a.term,tool_shed_url:d},function(a){var d=c.shedParser(a);b(d)})},b=function(a){var b=[],c=a.hits;return $.each(c,function(a){var d=c[a],e=d.repository.name+" by "+d.repository.repo_owner_username+": "+d.repository.description,f={value:d.repository.id,label:e};b.push(f)}),b},c=function(a){"/"==a.tool_shed_url.substr(-1)&&(a.tool_shed_url=a.tool_shed_url.substr(0,a.tool_shed_url.length-1));var b=a.tool_shed_url+"|"+a.repository_id+"|"+a.changeset_revision,c=new Object;localStorage.repositories&&(c=JSON.parse(localStorage.repositories)),c[b]=a,localStorage.repositories=JSON.stringify(c)},d=function(){if(localStorage.hasOwnProperty("repositories")){var a=JSON.parse(localStorage.repositories),b=Object.keys(a).length;return b}return 0};return{searchShed:a,shedParser:b,addToQueue:c,queueLength:d}});
|
|
//# sourceMappingURL=../../../maps/mvc/toolshed/util.js.map
|