This commit is contained in:
Jonathan Corwin 2011-05-16 22:01:21 +01:00
parent 274c4ee87a
commit 5fcb41bc9d
2 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ window.OpenLP = {
}
return $(targ);
},
searchPlugins: function (event) {
getSearchablePlugins: function (event) {
$.getJSON(
"/api/plugin/search",
function (data, status) {
@ -259,7 +259,7 @@ $("#alert-submit").live("click", OpenLP.showAlert);
// Search
$("#search-submit").live("click", OpenLP.search);
// Poll the server twice a second to get any updates.
OpenLP.searchPlugins();
OpenLP.getSearchablePlugins();
$.ajaxSetup({ cache: false });
setInterval("OpenLP.pollServer();", 500);
OpenLP.pollServer();

View File

@ -251,7 +251,7 @@ class HttpConnection(object):
(r'^/api/service/(.*)$', self.service),
(r'^/api/display/(hide|show)$', self.display),
(r'^/api/alert$', self.alert),
(r'^/api/plugin/(search)$', self.plugin),
(r'^/api/plugin/(search)$', self.pluginInfo),
(r'^/api/(.*)/search$', self.search),
(r'^/api/(.*)/live$', self.go_live)
]
@ -446,9 +446,9 @@ class HttpConnection(object):
return HttpResponse(json.dumps({u'results': {u'success': True}}),
{u'Content-Type': u'application/json'})
def plugin(self, action):
def pluginInfo(self, action):
"""
Return plugin related actions
Return plugin related information, based on the action
``action`` - The action to perform
if 'search' return a list of plugin names which support search