mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 17:36:48 +00:00
Part of GCI task: https://www.google-melange.com/gci/task/view/google/gci2014/6693211636498432 - Almost all search/filter pages save data. I had a problem with ClienController and UserListController during npm test. Couldn't figure out why it didn't like the new code... Hope you guys can have a look at them. - MainController removed pointless if statement - In some filter views, you can search for a selection option (offices for example). That search box had a search icon with 2 pixels above it. Those 2 pixels are from X in the chosen-sprite.png above the search icon. Those have been trimmed. - Other formatting changes
29 lines
1017 B
JavaScript
29 lines
1017 B
JavaScript
(function (module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
CodeController: function (scope, resourceFactory, location) {
|
|
scope.codes = [];
|
|
|
|
scope.routeTo = function (id) {
|
|
location.path('/viewcode/' + id);
|
|
}
|
|
|
|
if (!scope.searchCriteria.codes) {
|
|
scope.searchCriteria.codes = null;
|
|
scope.saveSC();
|
|
}
|
|
scope.filterText = scope.searchCriteria.codes;
|
|
|
|
scope.onFilter = function () {
|
|
scope.searchCriteria.codes = scope.filterText;
|
|
scope.saveSC();
|
|
};
|
|
|
|
resourceFactory.codeResources.getAllCodes(function (data) {
|
|
scope.codes = data;
|
|
});
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('CodeController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.CodeController]).run(function ($log) {
|
|
$log.info("CodeController initialized");
|
|
});
|
|
}(mifosX.controllers || {})); |