Opened 11 years ago
Last modified 10 months ago
#2454 new feature-request
Plugin frame work only allows script resources, no CSS or images
Reported by: | amain | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.1.1 |
Component: | Web UI | Version: | 1.3.6 |
Keywords: | Cc: |
Description
It is not possible, or unclear how, to register image resources within a plugin. Script resources are added by:
class WebUI(WebPluginBase):
scripts = [get_resource("<my-js-resource>.js")]
def enable(self):
pass
def disable(self):
pass
It be great if plugins would be allowed to register image sources. Image resources can be used for example in the torrent drop-down menu. At the moment all torrent drop-down menu internal items have an nice icon associated. Items added by plugins don't.
Change History (7)
comment:1 by , 11 years ago
Version: | other (please specify) → 1.3.6 |
---|
comment:2 by , 10 years ago
comment:3 by , 8 years ago
Milestone: | Future → 2.0 |
---|
I've not tested this but it is possible from within a plugin WebUI class to access the existing components the same way that the scripts are added:
from deluge import component icons = component.get('Icons') icons.add_directory('relative/path/icondir') css = component.get('Css') css.add_directory('relative/path/icondir')
I'll see about getting that code added to pluginmanager
A response is appreciated.