Sha256: c7acf041be78b2f0049305c2f41b435cb0ef468a4fd000d991cfe44b78d6645d
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 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 += "<tr class='remove-tr-src'><td colspan='2' style='text-align:center'>Loading...</td></tr>" out += "</table>"; out += "<table id='sourcedocs-table' class='table table-bordered'><tr><th class='span5'><h3>Documents</h3></th></tr>"; out += "<tr class='remove-tr-docs'><td colspan='2' style='text-align:center'>Loading...</td></tr>" out += "</table>"; $(this.el).html(out); $('#main_content').html(this.el); } });
Version data entries
6 entries across 6 versions & 1 rubygems