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 amain, 11 years ago

Version: other (please specify)1.3.6

comment:2 by amain, 10 years ago

A response is appreciated.

comment:3 by Calum, 8 years ago

Milestone: Future2.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

comment:4 by Calum, 7 years ago

Milestone: 2.02.0.0

Milestone renamed

comment:5 by Calum, 6 years ago

Milestone: 2.0.02.1.x

Ticket retargeted after milestone closed

comment:6 by Calum, 3 years ago

Milestone: 2.1.x2.1.0

Milestone renamed

comment:7 by Calum, 3 years ago

Milestone: 2.1.02.1.1

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.