App.Views.Home = Backbone.View.extend({ events: { "click a#reset" : "reset" }, initialize: function() { var domain = $('input#domain').val(); this.model.set('partition_type','app') this.model.save({ error: function(model,resp) { if(resp.status == 422){ new App.Views.Index() } } }); this.model.fetch({ error: function(model,resp) { if(resp.status == 422){ new App.Views.Index() } } }); this.render(domain); }, reset: function(){ var session = new Session(); if(confirm("Are you sure you want to reset?")){ session.reset() } }, render: function(domain) { $('#secondary-nav').css('display','block'); //out = "" out = "" out += "
" //out += "
" out += "
" out += "
" out += "
" out += "Reset" out += "
" out += "
" out += "" out += "

App partition sources

" out += "

Sync Server URL

http://"+domain+"
"; out += "Paste this url into your client app configuration to sync with this RhoConnect instance.
" $(this.el).html(out); $('#main_content').html(this.el); return this } });