mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
Galaxy.root (proxy prefix) support for toolshed's Group model.
This commit is contained in:
@@ -4,11 +4,11 @@ define([], function() {
|
||||
// TS GROUP RELATED MODELS
|
||||
|
||||
var Group = Backbone.Model.extend({
|
||||
urlRoot: '/api/groups',
|
||||
urlRoot: Galaxy.root + 'api/groups',
|
||||
});
|
||||
|
||||
var Groups = Backbone.Collection.extend({
|
||||
url: '/api/groups',
|
||||
url: Galaxy.root + 'api/groups',
|
||||
|
||||
model: Group,
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"group-detail-view.js","sources":["../../../src/mvc/groups/group-detail-view.js"],"names":["define","mod_toastr","mod_group_model","GroupDetailView","Backbone","View","extend","el","options","app","initialize","this","_","window","globalTS","groups","collection","model","get","group_id","render","fetchGroup","that","Group","id","fetch","success","console","log","error","response","responseJSON","err_msg","template","templateRow","$el","html","group","$","tooltip","css","join"],"mappings":"AAAAA,QACI,cACA,2CAEJ,SACIC,EACAC,GAIJ,GAAIC,GAAkBC,SAASC,KAAKC,QAChCC,GAAI,kBACJC,WACAC,IAAK,KAELC,WAAa,SAAUF,GACnBG,KAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKF,IAAMI,OAAOC,SAASC,OAEE,OAAxBJ,KAAKF,IAAIO,YACVL,KAAKM,MAAQN,KAAKF,IAAIO,WAAWE,IAAKP,KAAKH,QAAQW,UACnDR,KAAKS,UAELT,KAAKU,cAKbA,WAAY,SAAUb,GAClB,GAAIc,GAAOX,IACXA,MAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKM,MAAQ,GAAIf,GAAgBqB,OAASC,GAAIb,KAAKH,QAAQW,WAC3DR,KAAKM,MAAMQ,OACTC,QAAS,SAAUT,GACjBU,QAAQC,IAAK,mBACbD,QAAQC,IAAKX,GACbK,EAAKF,UAEPS,MAAO,SAAUZ,EAAOa,GAElB7B,EAAW4B,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,yBAM9BZ,OAAQ,WACJ,GAAIa,GAAWtB,KAAKuB,aACpBvB,MAAKwB,IAAIC,KAAMH,GAAYI,MAAO1B,KAAKM,SACvCqB,EAAG,yBAA0BC,UAC7BD,EAAG,WAAYE,IAAK,WAAW,SAGnCN,YAAa,WACT,MAAOtB,GAAEqB,UACD,QACI,oCACA,mCACA,qMAEA,mBACA,6CACI,UACI,gBACA,wBACA,sBACJ,WACA,UACI,wDACA,OACI,OACI,yBACJ,QACA,OACI,gPACJ,QACA,OACI,6BACJ,QACJ,QACA,YACJ,WACJ,WAEA,wBACA,6CACI,UACI,gBACA,uBACA,kBACA,iBACA,sBACA,mBACA,mBACA,kBACA,oBACJ,WACA,UACI,2DACI,OACI,OACI,6KACJ,QACA,OACI,0BACJ,QACA,OACI,+BACJ,QACA,OACI,oBACJ,QACA,OACI,kDACI,qMAEJ,YACJ,QACA,wFACI,2BACJ,QACA,wFACI,2BACJ,QACA,OACI,2BACJ,QACA,OACI,uBACJ,QACJ,QACJ,YACJ,WACJ,WACJ,UACNQ,KAAK,OAGf,QACItC,gBAAiBA"}
|
||||
{"version":3,"file":"group-detail-view.js","sources":["../../../src/mvc/groups/group-detail-view.js"],"names":["define","mod_toastr","mod_group_model","GroupDetailView","Backbone","View","extend","el","options","app","initialize","this","_","window","globalTS","groups","collection","model","get","group_id","render","fetchGroup","that","Group","id","fetch","success","console","log","error","response","responseJSON","err_msg","template","templateRow","$el","html","group","$","tooltip","css","join"],"mappings":"AAAAA,QACI,cACA,2CAEJ,SACIC,EACAC,GAIJ,GAAIC,GAAkBC,SAASC,KAAKC,QAChCC,GAAI,kBACJC,WACAC,IAAK,KAELC,WAAa,SAAUF,GACnBG,KAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKF,IAAMI,OAAOC,SAASC,OAEE,OAAxBJ,KAAKF,IAAIO,YACVL,KAAKM,MAAQN,KAAKF,IAAIO,WAAWE,IAAKP,KAAKH,QAAQW,UACnDR,KAAKS,UAELT,KAAKU,cAKbA,WAAY,SAAUb,GAClB,GAAIc,GAAOX,IACXA,MAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKM,MAAQ,GAAIf,GAAgBqB,OAASC,GAAIb,KAAKH,QAAQW,WAC3DR,KAAKM,MAAMQ,OACTC,QAAS,SAAUT,GACjBU,QAAQC,IAAK,mBACbD,QAAQC,IAAKX,GACbK,EAAKF,UAEPS,MAAO,SAAUZ,EAAOa,GAElB7B,EAAW4B,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,0BAM9BZ,OAAQ,WACJ,GAAIa,GAAWtB,KAAKuB,aACpBvB,MAAKwB,IAAIC,KAAMH,GAAYI,MAAO1B,KAAKM,SACvCqB,EAAG,yBAA0BC,UAC7BD,EAAG,WAAYE,IAAK,WAAW,SAGnCN,YAAa,WACT,MAAOtB,GAAEqB,UACD,QACI,8CACA,mCACA,qMAEA,mBACA,6CACI,UACI,gBACA,wBACA,sBACJ,WACA,UACI,wDACA,OACI,OACI,mCACJ,QACA,OACI,0PACJ,QACA,OACI,6BACJ,QACJ,QACA,YACJ,WACJ,WAEA,wBACA,6CACI,UACI,gBACA,uBACA,kBACA,iBACA,sBACA,mBACA,mBACA,kBACA,oBACJ,WACA,UACI,2DACI,OACI,OACI,oNACJ,QACA,OACI,oCACJ,QACA,OACI,+BACJ,QACA,OACI,8BACJ,QACA,OACI,kDACI,qMAEJ,YACJ,QACA,wFACI,2BACJ,QACA,wFACI,2BACJ,QACA,OACI,2BACJ,QACA,OACI,uBACJ,QACJ,QACJ,YACJ,WACJ,WACJ,UACNQ,KAAK,OAGf,QACItC,gBAAiBA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"group-list-view.js","sources":["../../../src/mvc/groups/group-list-view.js"],"names":["define","mod_toastr","mod_group_model","mod_group_row","GroupListView","Backbone","View","extend","el","defaults","initialize","options","this","_","that","window","globalTS","groups","collection","Groups","fetch","success","model","console","log","render","error","response","responseJSON","err_msg","$","hide","template","templateGroupsList","$el","html","length","models","renderRows","tooltip","css","groups_to_render","i","group","renderOne","rowView","GroupListRowView","find","append","tmpl_array","push","join"],"mappings":"AAAAA,QACI,cACA,0CACA,kDAED,SACCC,EACAC,EACAC,GAGJ,GAAIC,GAAgBC,SAASC,KAAKC,QAC9BC,GAAI,kBACJC,YAOAC,WAAa,SAAUC,GACnBC,KAAKD,QAAUE,EAAEJ,SAAUG,KAAKD,YAAeC,KAAKH,SAAUE,EAC9D,IAAIG,GAAOF,IACXG,QAAOC,SAASC,OAAOC,WAAa,GAAIhB,GAAgBiB,OACxDJ,OAAOC,SAASC,OAAOC,WAAWE,OAChCC,QAAS,SAAUC,GACjBC,QAAQC,IAAK,mBACbD,QAAQC,IAAKF,GACbR,EAAKW,UAEPC,MAAO,SAAUJ,EAAOK,GAElB1B,EAAWyB,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,yBAO9BT,MAAO,aAMPK,OAAQ,SAAWd,GACfC,KAAKD,QAAUE,EAAEN,OAAQK,KAAKD,QAASA,GACvCmB,EAAG,YAAaC,MAChB,IAAIC,GAAWpB,KAAKqB,oBACpBrB,MAAKsB,IAAIC,KAAMH,GAAYI,OAAQrB,OAAOC,SAASC,OAAOC,WAAWmB,OAAOD,UAC5ExB,KAAK0B,WAAYvB,OAAOC,SAASC,OAAOC,WAAWmB,QACnDP,EAAG,yBAA0BS,UAC7BT,EAAG,WAAYU,IAAK,WAAW,SAOnCF,WAAY,SAAUG,GAClB,IAAM,GAAIC,GAAI,EAAGA,EAAID,EAAiBL,OAAQM,IAAM,CAChD,GAAIC,GAAQF,EAAiBC,EAC7B9B,MAAKgC,WAAaD,MAAOA,MAQjCC,UAAW,SAAUjC,GACjB,GAAIkC,GAAU,GAAI1C,GAAc2C,iBAAkBnC,EAClDC,MAAKsB,IAAIa,KAAM,oBAAqBC,OAAQH,EAAQrC,KAyCxDyB,mBAAoB,WAuBhB,MAtBAgB,eAEAA,WAAWC,KAAK,qBAChBD,WAAWC,KAAK,UAChBD,WAAWC,KAAK,mDAChBD,WAAWC,KAAK,4BAChBD,WAAWC,KAAK,uCAChBD,WAAWC,KAAK,iBAChBD,WAAWC,KAAK,8CAChBD,WAAWC,KAAK,cAChBD,WAAWC,KAAK,sBAEhBD,WAAWC,KAAK,0BAChBD,WAAWC,KAAK,8BAChBD,WAAWC,KAAK,eAChBD,WAAWC,KAAK,mCAEhBD,WAAWC,KAAK,eAChBD,WAAWC,KAAK,YAChBD,WAAWC,KAAK,UAChBD,WAAWC,KAAK,UAETrC,EAAEmB,SAASiB,WAAWE,KAAK,OAK1C,QACI/C,cAAeA"}
|
||||
{"version":3,"file":"group-list-view.js","sources":["../../../src/mvc/groups/group-list-view.js"],"names":["define","mod_toastr","mod_group_model","mod_group_row","GroupListView","Backbone","View","extend","el","defaults","initialize","options","this","_","that","window","globalTS","groups","collection","Groups","fetch","success","model","console","log","render","error","response","responseJSON","err_msg","$","hide","template","templateGroupsList","$el","html","length","models","renderRows","tooltip","css","groups_to_render","i","group","renderOne","rowView","GroupListRowView","find","append","tmpl_array","push","join"],"mappings":"AAAAA,QACI,cACA,0CACA,kDAED,SACCC,EACAC,EACAC,GAGJ,GAAIC,GAAgBC,SAASC,KAAKC,QAC9BC,GAAI,kBACJC,YAOAC,WAAa,SAAUC,GACnBC,KAAKD,QAAUE,EAAEJ,SAAUG,KAAKD,YAAeC,KAAKH,SAAUE,EAC9D,IAAIG,GAAOF,IACXG,QAAOC,SAASC,OAAOC,WAAa,GAAIhB,GAAgBiB,OACxDJ,OAAOC,SAASC,OAAOC,WAAWE,OAChCC,QAAS,SAAUC,GACjBC,QAAQC,IAAK,mBACbD,QAAQC,IAAKF,GACbR,EAAKW,UAEPC,MAAO,SAAUJ,EAAOK,GAElB1B,EAAWyB,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,0BAO9BT,MAAO,aAMPK,OAAQ,SAAWd,GACfC,KAAKD,QAAUE,EAAEN,OAAQK,KAAKD,QAASA,GACvCmB,EAAG,YAAaC,MAChB,IAAIC,GAAWpB,KAAKqB,oBACpBrB,MAAKsB,IAAIC,KAAMH,GAAYI,OAAQrB,OAAOC,SAASC,OAAOC,WAAWmB,OAAOD,UAC5ExB,KAAK0B,WAAYvB,OAAOC,SAASC,OAAOC,WAAWmB,QACnDP,EAAG,yBAA0BS,UAC7BT,EAAG,WAAYU,IAAK,WAAW,SAOnCF,WAAY,SAAUG,GAClB,IAAM,GAAIC,GAAI,EAAGA,EAAID,EAAiBL,OAAQM,IAAM,CAChD,GAAIC,GAAQF,EAAiBC,EAC7B9B,MAAKgC,WAAaD,MAAOA,MAQjCC,UAAW,SAAUjC,GACjB,GAAIkC,GAAU,GAAI1C,GAAc2C,iBAAkBnC,EAClDC,MAAKsB,IAAIa,KAAM,oBAAqBC,OAAQH,EAAQrC,KAkCxDyB,mBAAoB,WAChB,GAAIgB,KAsBJ,OApBAA,GAAWC,KAAK,qBAChBD,EAAWC,KAAK,UAChBD,EAAWC,KAAK,mDAChBD,EAAWC,KAAK,4BAChBD,EAAWC,KAAK,uCAChBD,EAAWC,KAAK,iBAChBD,EAAWC,KAAK,8CAChBD,EAAWC,KAAK,cAChBD,EAAWC,KAAK,sBAEhBD,EAAWC,KAAK,0BAChBD,EAAWC,KAAK,8BAChBD,EAAWC,KAAK,eAChBD,EAAWC,KAAK,mCAEhBD,EAAWC,KAAK,eAChBD,EAAWC,KAAK,YAChBD,EAAWC,KAAK,UAChBD,EAAWC,KAAK,UAETrC,EAAEmB,SAASiB,EAAWE,KAAK,OAK1C,QACI/C,cAAeA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"group-listrow-view.js","sources":["../../../src/mvc/groups/group-listrow-view.js"],"names":["define","GroupListRowView","Backbone","View","extend","events","initialize","options","this","render","group","tmpl","templateRow","setElement","$el","show","_","template","join"],"mappings":"AAAAA,UACA,WAGA,GAAIC,GAAmBC,SAASC,KAAKC,QACjCC,UAEAC,WAAa,SAAUC,GACnBC,KAAKC,OAAQF,EAAQG,QAGzBD,OAAQ,SAAUC,GACd,GAAIC,GAAOH,KAAKI,aAGhB,OAFAJ,MAAKK,WAAWF,GAAQD,MAAMA,KAC9BF,KAAKM,IAAIC,OACFP,MAGXI,YAAa,WACT,MAAOI,GAAEC,UACD,iDACA,iFAEA,6CACA,2CACA,SACNC,KAAK,OAKf,QACIjB,iBAAkBA"}
|
||||
{"version":3,"file":"group-listrow-view.js","sources":["../../../src/mvc/groups/group-listrow-view.js"],"names":["define","GroupListRowView","Backbone","View","extend","events","initialize","options","this","render","group","tmpl","templateRow","setElement","$el","show","_","template","join"],"mappings":"AAAAA,UACA,WAGA,GAAIC,GAAmBC,SAASC,KAAKC,QACjCC,UAEAC,WAAa,SAAUC,GACnBC,KAAKC,OAAQF,EAAQG,QAGzBD,OAAQ,SAAUC,GACd,GAAIC,GAAOH,KAAKI,aAGhB,OAFAJ,MAAKK,WAAWF,GAAQD,MAAMA,KAC9BF,KAAKM,IAAIC,OACFP,MAGXI,YAAa,WACT,MAAOI,GAAEC,UACD,iDACA,2FAEA,6CACA,2CACA,SACNC,KAAK,OAKf,QACIjB,iBAAkBA"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"group-model.js","sources":["../../../src/mvc/groups/group-model.js"],"names":["define","Group","Backbone","Model","extend","urlRoot","Groups","Collection","url","model"],"mappings":"AAAAA,UAAW,WAKP,GAAIC,GAAQC,SAASC,MAAMC,QACzBC,QAAS,gBAGPC,EAASJ,SAASK,WAAWH,QAC/BI,IAAK,cAELC,MAAOR,GAIb,QACIA,MAAOA,EACPK,OAAQA"}
|
||||
{"version":3,"file":"group-model.js","sources":["../../../src/mvc/groups/group-model.js"],"names":["define","Group","Backbone","Model","extend","urlRoot","Galaxy","root","Groups","Collection","url","model"],"mappings":"AAAAA,UAAW,WAKP,GAAIC,GAAQC,SAASC,MAAMC,QACzBC,QAASC,OAAOC,KAAO,eAGrBC,EAASN,SAASO,WAAWL,QAC/BM,IAAKJ,OAAOC,KAAO,aAEnBI,MAAOV,GAIb,QACIA,MAAOA,EACPO,OAAQA"}
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model"],function(a,b){var c=Backbone.View.extend({el:"#groups_element",options:{},app:null,initialize:function(a){this.options=_.extend(this.options,a),this.app=window.globalTS.groups,null!==this.app.collection?(this.model=this.app.collection.get(this.options.group_id),this.render()):this.fetchGroup()},fetchGroup:function(c){var d=this;this.options=_.extend(this.options,c),this.model=new b.Group({id:this.options.group_id}),this.model.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error occurred.")}})},render:function(){var a=this.templateRow();this.$el.html(a({group:this.model})),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},templateRow:function(){return _.template(["<div>",'<h3><%= group.get("name") %></h3>','<p class="" style="color:gray;">','A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined repository clones.</p>',"<h3>Members</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Repositories</th>","<th>Registered</th>","</thead>","<tbody>",'<% _.each(group.get("members"), function(member) { %>',"<tr>","<td>","<%= member.username %>","</td>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Repositories of <%= member.username %>" href="/repository/browse_repositories_by_user?user_id=<%= member.id %>&use_panels=true" id="<%= member.id %>"><%= member.user_repos_count %></a>',"</td>","<td>","<%= member.time_created %>","</td>","</tr>","<% }); %>","</tbody>","</table>","<h3>Repositories</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Description</th>","<th>Clones</th>","<th>Owner</th>","<th>Categories</th>","<th>Created</th>","<th>Updated</th>","<th>Rating</th>","<th>Verified</th>","</thead>","<tbody>",'<% _.each(group.get("repositories"), function(repo) { %>',"<tr>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Details of <%= repo.name %>" href="/view/<%= repo.owner %>/<%= repo.name %>" id="<%= repo.id %>"><%= repo.name %></a>',"</td>","<td>","<%= repo.description %>","</td>","<td>","<%= repo.times_downloaded %>","</td>","<td>","<%= repo.owner %>","</td>","<td>","<% _.each((repo.categories), function(cat) { %>",'<a data-toggle="tooltip" data-placement="top" title="Repositories in <%= cat.name %>" href="/repository/browse_repositories_in_category?id=<%= cat.id %>&use_panels=true"><%= cat.name %></a><br/>',"<% }); %>","</td>",'<td data-toggle="tooltip" data-placement="top" title="<%= repo.time_created_full %>">',"<%= repo.time_created %>","</td>",'<td data-toggle="tooltip" data-placement="top" title="<%= repo.time_updated_full %>">',"<%= repo.time_updated %>","</td>","<td>","<%= repo.ratings_mean %>","</td>","<td>","<%= repo.approved %>","</td>","</tr>","<% }); %>","</tbody>","</table>","</div>"].join(""))}});return{GroupDetailView:c}});
|
||||
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model"],function(a,b){var c=Backbone.View.extend({el:"#groups_element",options:{},app:null,initialize:function(a){this.options=_.extend(this.options,a),this.app=window.globalTS.groups,null!==this.app.collection?(this.model=this.app.collection.get(this.options.group_id),this.render()):this.fetchGroup()},fetchGroup:function(c){var d=this;this.options=_.extend(this.options,c),this.model=new b.Group({id:this.options.group_id}),this.model.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error occurred.")}})},render:function(){var a=this.templateRow();this.$el.html(a({group:this.model})),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},templateRow:function(){return _.template(["<div>",'<h3><%= _.escape(group.get("name")) %></h3>','<p class="" style="color:gray;">','A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined repository clones.</p>',"<h3>Members</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Repositories</th>","<th>Registered</th>","</thead>","<tbody>",'<% _.each(group.get("members"), function(member) { %>',"<tr>","<td>","<%= _.escape(member.username) %>","</td>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Repositories of <%= _.escape(member.username) %>" href="/repository/browse_repositories_by_user?user_id=<%= member.id %>&use_panels=true" id="<%= member.id %>"><%= member.user_repos_count %></a>',"</td>","<td>","<%= member.time_created %>","</td>","</tr>","<% }); %>","</tbody>","</table>","<h3>Repositories</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Description</th>","<th>Clones</th>","<th>Owner</th>","<th>Categories</th>","<th>Created</th>","<th>Updated</th>","<th>Rating</th>","<th>Verified</th>","</thead>","<tbody>",'<% _.each(group.get("repositories"), function(repo) { %>',"<tr>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Details of <%= _.escape(repo.name) %>" href="/view/<%= _.escape(repo.owner) %>/<%= _escape(repo.name) %>" id="<%= repo.id %>"><%= _.escape(repo.name) %></a>',"</td>","<td>","<%= _.escape(repo.description) %>","</td>","<td>","<%= repo.times_downloaded %>","</td>","<td>","<%= _.escape(repo.owner) %>","</td>","<td>","<% _.each((repo.categories), function(cat) { %>",'<a data-toggle="tooltip" data-placement="top" title="Repositories in <%= cat.name %>" href="/repository/browse_repositories_in_category?id=<%= cat.id %>&use_panels=true"><%= cat.name %></a><br/>',"<% }); %>","</td>",'<td data-toggle="tooltip" data-placement="top" title="<%= repo.time_created_full %>">',"<%= repo.time_created %>","</td>",'<td data-toggle="tooltip" data-placement="top" title="<%= repo.time_updated_full %>">',"<%= repo.time_updated %>","</td>","<td>","<%= repo.ratings_mean %>","</td>","<td>","<%= repo.approved %>","</td>","</tr>","<% }); %>","</tbody>","</table>","</div>"].join(""))}});return{GroupDetailView:c}});
|
||||
//# sourceMappingURL=../../../maps/mvc/groups/group-detail-view.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model","toolshed/scripts/mvc/groups/group-listrow-view"],function(a,b,c){var d=Backbone.View.extend({el:"#groups_element",defaults:{},initialize:function(c){this.options=_.defaults(this.options||{},this.defaults,c);var d=this;window.globalTS.groups.collection=new b.Groups,window.globalTS.groups.collection.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error occurred.")}})},fetch:function(){},render:function(a){this.options=_.extend(this.options,a),$(".tooltip").hide();var b=this.templateGroupsList();this.$el.html(b({length:window.globalTS.groups.collection.models.length})),this.renderRows(window.globalTS.groups.collection.models),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},renderRows:function(a){for(var b=0;b<a.length;b++){var c=a[b];this.renderOne({group:c})}},renderOne:function(a){var b=new c.GroupListRowView(a);this.$el.find("#group_list_body").append(b.el)},templateGroupsList:function(){return tmpl_array=[],tmpl_array.push('<div id="groups">'),tmpl_array.push("</div>"),tmpl_array.push('<div class="groups_container table-responsive">'),tmpl_array.push("<% if(length === 0) { %>"),tmpl_array.push("<div>There are no groups yet.</div>"),tmpl_array.push("<% } else{ %>"),tmpl_array.push('<table class="grid table table-condensed">'),tmpl_array.push(" <thead>"),tmpl_array.push(" <th>Name</th>"),tmpl_array.push(" <th>Members</th> "),tmpl_array.push(" <th>Repositories</th>"),tmpl_array.push(" </thead>"),tmpl_array.push(' <tbody id="group_list_body">'),tmpl_array.push(" </tbody>"),tmpl_array.push("</table>"),tmpl_array.push("<% }%>"),tmpl_array.push("</div>"),_.template(tmpl_array.join(""))}});return{GroupListView:d}});
|
||||
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model","toolshed/scripts/mvc/groups/group-listrow-view"],function(a,b,c){var d=Backbone.View.extend({el:"#groups_element",defaults:{},initialize:function(c){this.options=_.defaults(this.options||{},this.defaults,c);var d=this;window.globalTS.groups.collection=new b.Groups,window.globalTS.groups.collection.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error occurred.")}})},fetch:function(){},render:function(a){this.options=_.extend(this.options,a),$(".tooltip").hide();var b=this.templateGroupsList();this.$el.html(b({length:window.globalTS.groups.collection.models.length})),this.renderRows(window.globalTS.groups.collection.models),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},renderRows:function(a){for(var b=0;b<a.length;b++){var c=a[b];this.renderOne({group:c})}},renderOne:function(a){var b=new c.GroupListRowView(a);this.$el.find("#group_list_body").append(b.el)},templateGroupsList:function(){var a=[];return a.push('<div id="groups">'),a.push("</div>"),a.push('<div class="groups_container table-responsive">'),a.push("<% if(length === 0) { %>"),a.push("<div>There are no groups yet.</div>"),a.push("<% } else{ %>"),a.push('<table class="grid table table-condensed">'),a.push(" <thead>"),a.push(" <th>Name</th>"),a.push(" <th>Members</th> "),a.push(" <th>Repositories</th>"),a.push(" </thead>"),a.push(' <tbody id="group_list_body">'),a.push(" </tbody>"),a.push("</table>"),a.push("<% }%>"),a.push("</div>"),_.template(a.join(""))}});return{GroupListView:d}});
|
||||
//# sourceMappingURL=../../../maps/mvc/groups/group-list-view.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define([],function(){var a=Backbone.View.extend({events:{},initialize:function(a){this.render(a.group)},render:function(a){var b=this.templateRow();return this.setElement(b({group:a})),this.$el.show(),this},templateRow:function(){return _.template(['<tr class="" data-id="<%- group.get("id") %>">','<td><a href="groups#/<%= group.get("id") %>"><%= group.get("name") %></a></td>','<td><%= group.get("total_members") %></td>','<td><%= group.get("total_repos") %></td>',"</tr>"].join(""))}});return{GroupListRowView:a}});
|
||||
define([],function(){var a=Backbone.View.extend({events:{},initialize:function(a){this.render(a.group)},render:function(a){var b=this.templateRow();return this.setElement(b({group:a})),this.$el.show(),this},templateRow:function(){return _.template(['<tr class="" data-id="<%- group.get("id") %>">','<td><a href="groups#/<%= group.get("id") %>"><%= _.escape(group.get("name")) %></a></td>','<td><%= group.get("total_members") %></td>','<td><%= group.get("total_repos") %></td>',"</tr>"].join(""))}});return{GroupListRowView:a}});
|
||||
//# sourceMappingURL=../../../maps/mvc/groups/group-listrow-view.js.map
|
||||
@@ -1,2 +1,2 @@
|
||||
define([],function(){var a=Backbone.Model.extend({urlRoot:"/api/groups"}),b=Backbone.Collection.extend({url:"/api/groups",model:a});return{Group:a,Groups:b}});
|
||||
define([],function(){var a=Backbone.Model.extend({urlRoot:Galaxy.root+"api/groups"}),b=Backbone.Collection.extend({url:Galaxy.root+"api/groups",model:a});return{Group:a,Groups:b}});
|
||||
//# sourceMappingURL=../../../maps/mvc/groups/group-model.js.map
|
||||
Reference in New Issue
Block a user