/*global window, rJS, RSVP, URI, location, $, loopEventListener, btoa */ /*jslint nomen: true, indent: 2, maxerr: 3*/ (function (window, rJS, $) { "use strict"; rJS(window) .ready(function (gadget) { gadget.property_dict = { render_deferred: RSVP.defer() }; }) .ready(function (gadget) { return gadget.getDeclaredGadget("listview") .push(function (listbox_gadget) { gadget.property_dict.listview = listbox_gadget; }); }) .declareMethod('render', function (options) { var gadget = this, header = { "title": 'Software Instances List' }, listview_options = { search_page: 'software_instance_list', search: options.search, filter: options.filter, selection: '', column: { select: 'title', title: 'Title' }, data_id: 'monitor.global', search_column_list: [ {select: 'status', title: 'Status'}, {select: 'hosting-title', title: 'Date'} ], sort_column_list: [ {select: 'status', title: 'Status'}, {select: 'title', title: 'Title'}, {select: 'hosting-title', title: 'Date'} ], query: { select_list: ['title', 'status', 'date', '_links', 'state', 'hosting-title'], //query: '_id:"monitor.global"', sort_on: [["status", "ascending"]] } }; return gadget.updateHeader(header) .push(function () { return gadget.property_dict.listview.render(listview_options); }); }) .declareAcquiredMethod("updateHeader", "updateHeader"); }(window, rJS, $));