Sha256: ab4d871391e71ba22ab34291b5d04f736196be2b93567957b4eee15e15b2d833

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

App.Views.SourceDocs = Backbone.View.extend({
	
    initialize: function() {
		var source_id = this.model.get('source_id');
		var user	  = this.model.get('user_id');
		var doctype   = this.model.get('doctype');
		var client_id = this.model.get('client_id');
		this.render(source_id);
		this.model.get_source_params(source_id);
		if(doctype == 'client'){
			client = new Client();
			client.list_client_docs(client_id,source_id)
		}
		else{
			this.model.list_source_docs(source_id,user);
		}
    },  	
    
    render: function(source_id) {
        $('#secondary-nav').css('display','block');
		out  = "<div class='page-header well'><h1>"+source_id+"</h1></div>";
		out += "<div class='docalert alert-error' style='display:none'></div>";
	    out += "<table id='sourceparams-table' class='table table-bordered'><thead><tr><th><h3>Attributes</h3></th></tr></thead>";
		out += "</table>";
	    out += "<table id='sourcedocs-table' class='table table-bordered'><tr><th class='span5'><h3>Documents</h3></th></tr>";
	    out += "</table>";
        $(this.el).html(out);
        $('#main_content').html(this.el);
    }
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rhoconnect-3.2.0.beta2 lib/rhoconnect/web-console/views/source_docs.js
rhoconnect-3.2.0.beta1 lib/rhoconnect/web-console/views/source_docs.js