use get_application_static_files_root_url method in command_icon method
This commit is contained in:
parent
c45ada5437
commit
2adf2caf8a
|
@ -104,15 +104,15 @@ def command_icon [html] (url, type, label = None, icon = None, popup = False):
|
|||
}
|
||||
if not label:
|
||||
label = _(labels[str(type)])
|
||||
root_url = get_publisher().get_application_static_files_root_url()
|
||||
if not icon:
|
||||
root_url = get_publisher().get_root_url() + get_publisher().qommon_static_dir
|
||||
root_url = root_url + get_publisher().qommon_static_dir
|
||||
icon = root_url + 'images/' + icons[str(type)]
|
||||
else:
|
||||
if str(icon)[0] == '/':
|
||||
root_url = get_publisher().get_root_url()
|
||||
icon = root_url + str(icon)[1:]
|
||||
else:
|
||||
root_url = get_publisher().get_root_url() + get_publisher().qommon_static_dir
|
||||
root_url = root_url + get_publisher().qommon_static_dir
|
||||
icon = root_url + 'images/' + icon
|
||||
if url:
|
||||
if popup:
|
||||
|
|
Loading…
Reference in New Issue