X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Funivbris%2Fstatic%2Fjs%2Funivbris.js;fp=plugins%2Funivbris%2Fstatic%2Fjs%2Funivbris.js;h=a22201e94a6751652cebf8388426e980d38ceed7;hb=6a3f5d4949171451d5df2df5d0f96e9eb396f29c;hp=4c84a90c6c2a3de6bf9e1e95b6b4707b017b8757;hpb=583c62239bbf6be5222e170609e547349389c1c1;p=myslice.git diff --git a/plugins/univbris/static/js/univbris.js b/plugins/univbris/static/js/univbris.js index 4c84a90c..a22201e9 100644 --- a/plugins/univbris/static/js/univbris.js +++ b/plugins/univbris/static/js/univbris.js @@ -1,6 +1,6 @@ /** - * univbris: test plugin for Bristol University - * Version: 0.1 + * univbris: test ofam plugin for Bristol University + * Version: 0.2 * Description: just testing plugin in myslice * Requires: js/plugin.js * URL: http://www.myslice.info @@ -13,94 +13,21 @@ var Univbris = Plugin.extend({ - /** XXX to check - * @brief Plugin constructor - * @param options : an associative array of setting values - * @param element : - * @return : a jQuery collection of objects on which the plugin is - * applied, which allows to maintain chainability of calls - */ init: function(options, element) { - // Call the parent constructor, see FAQ when forgotten this._super(options, element); - - /* Member variables */ - - /* Plugin events */ - - /* Setup query and record handlers */ - - // Explain this will allow query events to be handled - // What happens when we don't define some events ? - // Some can be less efficient this.listen_query(options.query_uuid); - this.listen_query(options.query_uuid, 'all'); - - /* GUI setup and event binding */ - // call function - - alert("univbris plugin 2"); }, - /* PLUGIN EVENTS */ - // on_show like in querytable - - - /* GUI EVENTS */ - - // a function to bind events here: click change - // how to raise manifold events - - - /* GUI MANIPULATION */ - - // We advise you to write function to change behaviour of the GUI - // Will use naming helpers to access content _inside_ the plugin - // always refer to these functions in the remaining of the code - - show_hide_button: function() - { - // this.id, this.el, this.cl, this.elts - // same output as a jquery selector with some guarantees - }, + on_query_done: function() + { + $("#univbris_welcome").hide(); + jQuery("#univbris_flowspace_selection").show(); + }, - /* TEMPLATES */ - - // see in the html template - // How to load a template, use of mustache - - /* QUERY HANDLERS */ - - // How to make sure the plugin is not desynchronized - // He should manifest its interest in filters, fields or records - // functions triggered only if the proper listen is done - - // no prefix - - on_filter_added: function(filter) - { - - }, - - // ... be sure to list all events here - - /* RECORD HANDLERS */ - on_all_new_record: function(record) - { - // - }, - - /* INTERNAL FUNCTIONS */ - _dummy: function() { - // only convention, not strictly enforced at the moment - }, }); - /* Plugin registration */ $.plugin('Univbris', Univbris); - // TODO Here use cases for instanciating plugins in different ways like in the pastie. - })(jQuery);