/*global window, rJS, btoa */ /*jslint nomen: true, indent: 2, maxerr: 3*/ (function (window, rJS) { "use strict"; var gadget_klass = rJS(window); gadget_klass .ready(function (g) { g.props = {}; }) .declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("setSetting", "setSetting") .declareMethod("render", function (options) { var gadget = this, current_display; return gadget.getSetting('monitor_url_description') .push(function (monitor_url_description) { if (!monitor_url_description) { return gadget.redirect({ page: 'settings_configurator', tab: 'add' }); } return gadget.redirect({ page: 'hosting_subscription_list' }); }); }) .declareService(function () { var gadget = this; }); }(window, rJS));