Merge pull request #1962 from martenson/better-library-paging

libraries: also show folder items paginator at the bottom of the items
This commit is contained in:
John Chilton
2016-03-21 12:54:38 -04:00
12 changed files with 38 additions and 38 deletions
@@ -220,29 +220,22 @@ var FolderView = Backbone.View.extend({
tmpl_array.push(' <a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions"><button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button" type="button"><span class="fa fa-group"></span> Permissions</span></button></a>');
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button" type="button"><span class="fa fa-share"></span> Share</span></button>');
tmpl_array.push(' </div>');
// tmpl_array.push('<% if (item.get("is_unrestricted")) { %>');
tmpl_array.push(' <p>');
tmpl_array.push(' This dataset is unrestricted so everybody can access it. Just share the URL of this page. ');
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button"><span class="fa fa-clipboard"></span> To Clipboard</span></button> ');
tmpl_array.push(' </p>');
// tmpl_array.push('<% } %>');
tmpl_array.push('<div class="dataset_table">');
tmpl_array.push(' <table class="grid table table-striped table-condensed">');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row" id="id_row" data-id="<%= _.escape(item.get("ldda_id")) %>">Name</th>');
tmpl_array.push(' <td><%= _.escape(item.get("name")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% if (item.get("file_ext")) { %>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data type</th>');
tmpl_array.push(' <td><%= _.escape(item.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% } %>');
tmpl_array.push(' </table>');
tmpl_array.push('</div>');
@@ -99,7 +99,7 @@ var FolderToolbarView = Backbone.View.extend({
renderPaginator: function( options ){
this.options = _.extend( this.options, options );
var paginator_template = this.templatePaginator();
this.$el.find( '#folder_paginator' ).html( paginator_template({
$("body").find( '.folder-paginator' ).html( paginator_template({
id: this.options.id,
show_page: parseInt( this.options.show_page ),
page_count: parseInt( this.options.page_count ),
@@ -1059,7 +1059,7 @@ var FolderToolbarView = Backbone.View.extend({
tmpl_array.push(' <div id="library_toolbar">');
tmpl_array.push('<form class="form-inline" role="form">');
tmpl_array.push(' <span><strong>DATA LIBRARIES</strong></span>');
tmpl_array.push(' <span id="folder_paginator" class="library-paginator">');
tmpl_array.push(' <span class="library-paginator folder-paginator">');
// paginator will append here
tmpl_array.push(' </span>');
tmpl_array.push('<div class="checkbox toolbar-item logged-dataset-manipulation" style="height: 20px; display:none;">');
@@ -1119,6 +1119,8 @@ var FolderToolbarView = Backbone.View.extend({
tmpl_array.push(' <div id="folder_items_element">');
tmpl_array.push(' </div>');
tmpl_array.push('</div>');
tmpl_array.push('<div class="folder-paginator paginator-bottom"></div>');
// CONTAINER END
return _.template(tmpl_array.join(''));
+5
View File
@@ -229,3 +229,8 @@ span.expandLink {
.library-paginator {
margin-left: 2em;
}
.paginator-bottom{
width: 27em;
margin-left: auto;
margin-right: auto;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
a{text-decoration:underline}label{font-weight:normal}.libraryRow{background-color:#ebd9b2}.datasetHighlighted{background-color:#f9f9f9}.libraryItemDeleted-True{font-style:italic}div.libraryItemBody{padding:4px 4px 2px 4px}li.folderRow,li.datasetRow{border-top:solid 1px #c6bfa8}li.folderRow:hover,li.datasetRow:hover{background-color:#f9f9f9}td.right-center{vertical-align:middle !important;text-align:right}.library-genome-select{max-width:350px}.library-extension-select{max-width:140px}.library_table td{border-top:1px solid #5f6990 !important}.library_table th{border-bottom:2px solid #5f6990 !important}.library_table a{color:#0A143D}.library_table a:hover{color:maroon}.library_style_container{width:95%;margin:auto;margin-top:2em;overflow:auto !important}.library_style_container tr{height:32px}tr.light td{background-color:white;color:black}tr.light:hover td{background-color:#f5e8cc}tr.dark td{background-color:#d6b161;color:white}tr.dark:hover td{background-color:#ebd4a4;color:white}a.dark{color:white}.dataset_table tr{border-bottom:1px solid #5f6990 !important}.dataset_table th{border:none !important}.dataset_table td{border:none !important}.dataset_table .dataset-first-column{width:30%}th.button_heading{width:2em}.bigdrop.select2-container .select2-results{max-height:300px}.bigdrop .select2-results{max-height:300px}.select2-container-multi{width:100%}.roles-selection{width:66%}#library_toolbar{margin-bottom:.5em}#library_toolbar span{margin-right:.2em}#library_toolbar .toolbar-item{margin-left:1em}#libraries_element button,#folder_items_element button{margin-left:.5em}img.expanderIcon{padding-right:4px}input.datasetCheckbox,li,ul{padding:0;margin:0}.rowTitle{padding:2px}ul{list-style:none}.libraryTitle th{text-align:left}pre.peek{background:white;color:black;overflow:auto}pre.peek th{color:white;background:#ebd9b2}.help-button{float:right}span.expandLink{padding-left:12px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png) no-repeat}.folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png) no-repeat}.folderRow span.rowIcon{float:left;margin-right:5px;width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png)}.libraryItem-error{margin-right:2px;padding:0 2px 0 2px;border:1px solid #dd1b15;background:#f9c7c5}.libraryItem-queued{margin-right:2px;padding:0 2px 0 2px;border:1px solid #bfbfbf;background:#eee}.libraryItem-running{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AAAA66;background:#FFFFCC}.libraryItem-upload{margin-right:2px;padding:0 2px 0 2px;border:1px solid #119ac2;background:#a8e5f7}.pagination-sm{height:15px}.library-paginator{margin-left:2em}
a{text-decoration:underline}label{font-weight:normal}.libraryRow{background-color:#ebd9b2}.datasetHighlighted{background-color:#f9f9f9}.libraryItemDeleted-True{font-style:italic}div.libraryItemBody{padding:4px 4px 2px 4px}li.folderRow,li.datasetRow{border-top:solid 1px #c6bfa8}li.folderRow:hover,li.datasetRow:hover{background-color:#f9f9f9}td.right-center{vertical-align:middle !important;text-align:right}.library-genome-select{max-width:350px}.library-extension-select{max-width:140px}.library_table td{border-top:1px solid #5f6990 !important}.library_table th{border-bottom:2px solid #5f6990 !important}.library_table a{color:#0A143D}.library_table a:hover{color:maroon}.library_style_container{width:95%;margin:auto;margin-top:2em;overflow:auto !important}.library_style_container tr{height:32px}tr.light td{background-color:white;color:black}tr.light:hover td{background-color:#f5e8cc}tr.dark td{background-color:#d6b161;color:white}tr.dark:hover td{background-color:#ebd4a4;color:white}a.dark{color:white}.dataset_table tr{border-bottom:1px solid #5f6990 !important}.dataset_table th{border:none !important}.dataset_table td{border:none !important}.dataset_table .dataset-first-column{width:30%}th.button_heading{width:2em}.bigdrop.select2-container .select2-results{max-height:300px}.bigdrop .select2-results{max-height:300px}.select2-container-multi{width:100%}.roles-selection{width:66%}#library_toolbar{margin-bottom:.5em}#library_toolbar span{margin-right:.2em}#library_toolbar .toolbar-item{margin-left:1em}#libraries_element button,#folder_items_element button{margin-left:.5em}img.expanderIcon{padding-right:4px}input.datasetCheckbox,li,ul{padding:0;margin:0}.rowTitle{padding:2px}ul{list-style:none}.libraryTitle th{text-align:left}pre.peek{background:white;color:black;overflow:auto}pre.peek th{color:white;background:#ebd9b2}.help-button{float:right}span.expandLink{padding-left:12px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png) no-repeat}.folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png) no-repeat}.folderRow span.rowIcon{float:left;margin-right:5px;width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png)}.libraryItem-error{margin-right:2px;padding:0 2px 0 2px;border:1px solid #dd1b15;background:#f9c7c5}.libraryItem-queued{margin-right:2px;padding:0 2px 0 2px;border:1px solid #bfbfbf;background:#eee}.libraryItem-running{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AAAA66;background:#FFFFCC}.libraryItem-upload{margin-right:2px;padding:0 2px 0 2px;border:1px solid #119ac2;background:#a8e5f7}.pagination-sm{height:15px}.library-paginator{margin-left:2em}.paginator-bottom{width:27em;margin-left:auto;margin-right:auto}