Sha256: b0eb656f6961dcecb9630af3fa1cd764cd8554e6ec84d94b566b2049ea6345e9

Contents?: true

Size: 1.18 KB

Versions: 42

Compression:

Stored size: 1.18 KB

Contents

App.Views.SetAdapter = Backbone.View.extend({
	
	events: {
		"submit form" : "set_adapter"
	},
	
    initialize: function() {
	    this.render()
		this.model.get_adapter();
    },

	set_adapter: function(e){
		e.preventDefault();
		var adapter_url = $('#input_adapter').val();
		this.render(adapter_url);
		$(".setadapter-status")[0].firstChild.className = "label label-warning";
		$(".setadapter-status")[0].firstChild.innerHTML = "loading...";
		$(".setadapter-status").css("visibility","visible");
		this.delegateEvents();
		this.model.set_adapter(adapter_url);
	},
	
    render: function() {
        $('#secondary-nav').css('display','block');
		out  = "<h3>Backend App URL</h3>";
	    out += "<form style='margin:0'>";
	    out += "<input id='input_adapter' type='text' name='adapter_url' value='' class='input-xlarge' placeholder='Enter Adapter URL' style='margin:0'/>";
	    out += "<input type='submit' value='Submit' class='btn btn-primary' style='margin-left:10px'/><div class='setadapter-status' style='display:inline;margin-left:10px;visibility:hidden'><span class=''></span></div>";
	    out += "</form>";
	
        $(this.el).html(out);
        $('#settings_main').html(this.el);
    }
});



Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-7.5.1 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-7.4.1 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-7.1.17 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-6.2.0 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-6.0.11 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.18 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.17 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.15 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.0.22 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.2 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.0.7 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.0.3 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.5.0 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-5.1.1 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-4.0.4 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-4.0.3 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-4.0.2 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-4.0.1 lib/rhoconnect/web-console/views/set_adapter.js
rhoconnect-4.0.0 lib/rhoconnect/web-console/views/set_adapter.js