forked from openlp/openlp
Lose the [None] and fix jquery issue
This commit is contained in:
parent
218ee2db2b
commit
031525b0e6
@ -506,13 +506,13 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
# multiple service items?
|
||||
if self.singleServiceItem or self.remoteTriggered:
|
||||
log.debug(u'%s Add requested', self.plugin.name)
|
||||
self.addToService([None], self.remoteTriggered)
|
||||
self.addToService(replace=self.remoteTriggered)
|
||||
else:
|
||||
items = self.listView.selectedIndexes()
|
||||
self.addToService(items)
|
||||
|
||||
def addToService(self, items, replace=None):
|
||||
for item in items:
|
||||
self.addToService(item)
|
||||
|
||||
def addToService(self, item=None, replace=None):
|
||||
serviceItem = self.buildServiceItem(item, True)
|
||||
if serviceItem:
|
||||
serviceItem.from_plugin = False
|
||||
|
@ -247,8 +247,11 @@ window.OpenLP = {
|
||||
var text = JSON.stringify({"request": {"id": id}});
|
||||
$.getJSON(
|
||||
"/api/" + $("#search-plugin").val() + "/add",
|
||||
{"data": text})
|
||||
{"data": text},
|
||||
function () {
|
||||
history.back();
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ class HttpConnection(object):
|
||||
plugin = self.parent.parent.pluginManager.get_plugin_by_name(type)
|
||||
if plugin.status == PluginStatus.Active and plugin.mediaItem:
|
||||
item_id = plugin.mediaItem.createItemFromId(id)
|
||||
plugin.mediaItem.addToService([item_id])
|
||||
plugin.mediaItem.addToService(item_id)
|
||||
|
||||
def send_response(self, response):
|
||||
http = u'HTTP/1.1 %s\r\n' % response.code
|
||||
|
Loading…
Reference in New Issue
Block a user