Skip to content

Commit

Permalink
fixup pagination. rockstor#796
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Feb 18, 2016
1 parent db5d0c9 commit 8f55328
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
Expand Up @@ -19,16 +19,6 @@
*/
</script>

<script>
$(document).ready(function() {
$('table.data-table').DataTable({
"iDisplayLength": 15,
"aLengthMenu": [[15, 30, 45, -1], [15, 30, 45, "All"]]
});
});
</script>


<div id="messages"></div>
<div class="row">
<div class="col-md-12">
Expand All @@ -51,8 +41,8 @@ $(document).ready(function() {
<a href="#" class="configure" data-service-name="{{this.name}}"><i class="glyphicon glyphicon-wrench"></i></a>&nbsp;
{{/if}}
{{#if (isServiceAD this.name)}}
<i class="fa fa-info-circle" title="By turning this service on, the system will attempt to join
Active Directory domain using the credentials provided during configuration.
<i class="fa fa-info-circle" title="By turning this service on, the system will attempt to join
Active Directory domain using the credentials provided during configuration.
If enumerate option is checked in configuration, users and groups are displayed in the UI."></i>
{{/if}}
</td>
Expand All @@ -65,7 +55,6 @@ $(document).ready(function() {
{{/each}}
</tbody>
</table>
<div>{{pagination}}</div>
</div>
</div>
</div>
Expand Down
Expand Up @@ -85,6 +85,10 @@ ServicesView = Backbone.View.extend({
collection: this.collection,
servicesColl: this.collection.toJSON(),
}));
$('table.data-table').DataTable({
"iDisplayLength": 10,
"aLengthMenu": [[10, 15, 30, 45, -1], [10, 15, 30, 45, "All"]]
});

//Initialize bootstrap switch
this.$("[type='checkbox']").bootstrapSwitch();
Expand Down Expand Up @@ -174,7 +178,7 @@ ServicesView = Backbone.View.extend({
return true;
}
});

Handlebars.registerHelper('isServiceAD', function(serviceName){
if(serviceName == "active-directory") {
return true;
Expand All @@ -188,10 +192,7 @@ ServicesView = Backbone.View.extend({
}else{
html = '';
}
return new Handlebars.SafeString(html)
});
return new Handlebars.SafeString(html);
});
}
});

//Add pagination
Cocktail.mixin(ServicesView, PaginationMixin);

0 comments on commit 8f55328

Please sign in to comment.