Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

Commit

Permalink
show all table entries by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Jehu committed Feb 19, 2012
1 parent 02442f7 commit 8b70cc3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions frontend/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ function ContactsListCtrl($xhr,$defer,$location,globalObjects,ResContacts) {
{ "bSearchable": false, "bSortable": false }
];
self.$eval();
jQuery('#table-contacts').dataTable( {"bJQueryUI": true, "aoColumns": tblColumns, "bDestroy": true } );
jQuery('#table-contacts').dataTable( {
"bJQueryUI": true,
"aLengthMenu": [[-1, 25, 50, 100], ["All", 25, 50, 100]],
//"bPaginate": true,
"aoColumns": tblColumns,
"bDestroy": true
});
});

self.editContact = function(contact) {
Expand Down Expand Up @@ -67,7 +73,7 @@ function ContactEditCtrl($location, globalObjects, ResContacts, ResTerritories)
}

self.deleteContact = function(contact) {
// FIXME ask user if he want delete this really!
// FIXME ask user if he want really delete this!

var hasTerritories = checkHasTerritories(contact, ResTerritories);
if(Boolean(hasTerritories)) {
Expand Down Expand Up @@ -179,7 +185,12 @@ function TerritoriesListCtrl($xhr, $defer, $resource, $location, globalObjects,
null,
{ "bSortable": false },
];
var tblConfig = { "bJQueryUI": true, "aoColumns": tblColumns };
var tblConfig = {
"bJQueryUI": true,
"aLengthMenu": [[-1, 25, 50, 100], ["All", 25, 50, 100]],
//"bPaginate": true,
"aoColumns": tblColumns
};
//$("select, input:checkbox, input:text, input:password, input:radio, input:file, textarea").uniform();
jQuery('#table-territories').dataTable(tblConfig);
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/themes/01/partials/territoriesList.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<td><span ng:hide="territory.contact.name">-- {{'in the box'|i18n}} --</span>{{territory.contact.name}}</td>
<td>{{territory.status_changed_at|i18nDate}}</td>
<td>{{territory.last_processed_at|i18nDate}}</td>
<td>
<td style="width: 200px;">
<button class="btn btn-primary" name="{{'Info'|i18n}}" ng:click="showTerritoryInfo(territory)" my:dialog="show('territory-info',{modal:true})">{{'info'|i18n}}</button>
<button class="btn" ng:click="editTerritory(territory)">{{'edit'|i18n}}</button>
<button class="btn btn-success" ng:show="territory.contact.name" ng:click="processed(territory)" ng:bind="'processed'|i18n"></button>
Expand Down

0 comments on commit 8b70cc3

Please sign in to comment.