X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fupdater%2F__init__.py;h=2f68b410222b1742ddf6a06f263679e4d592afa1;hb=c82cd94c927d1f2ccf60a0f3b1a014c1425b1727;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=8c344999d6ee3b3a9172a1068a77c83af77a7aee;p=myslice.git diff --git a/plugins/updater/__init__.py b/plugins/updater/__init__.py index e69de29b..2f68b410 100644 --- a/plugins/updater/__init__.py +++ b/plugins/updater/__init__.py @@ -0,0 +1,31 @@ +from unfold.plugin import Plugin + +class Updater (Plugin): + + def __init__ (self, query, label="Update", **settings): + Plugin.__init__ (self, **settings) + self.query=query + if query.action != "get": print "Updater on non-get query: ",query.action + self.label=label + + def template_file (self): + return "updater.html" + + def requirements (self): + return { + 'js_files' : [ "js/updater.js" , "js/manifold.js", "js/manifold-query.js", + "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", + "js/Math.uuid.js", + ], + 'css_files' : "css/updater.css", + } + + # although this has no query, we need a plugin instance to be created in the js output + def export_json_settings (self): return True + # the js plugin expects a domid + def json_settings_list (self): return [ 'plugin_uuid', 'query_uuid', ] + + # and we don't need a spin wheel + def start_with_spin (self): return False + + def default_togglable (self): return False