Advertisement
tatdat171

Controller.Reponsive

Apr 16th, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //AUthor Datpt17@fpt.com.vn-->
  2. //Template for Morning checklist AD
  3. //Controller:
  4.  
  5. 'use strict';
  6. app.controller('MorningCheckListMailExchangeCtrl', ['$scope', 'DTOptionsBuilder', 'DTColumnBuilder', '$resource', function ($scope, DTOptionsBuilder, DTColumnBuilder, $resource) {
  7.     //
  8.     $scope.Value = false;
  9.     $scope.TableSystemAD = true;
  10.  
  11.     var vm = this;
  12.  
  13.     var link = 'http://api.bsc.ho.fpt.vn/api/Importer/ImporterObjectiveController/GetObjectives?usertoken=ddd3b678-666d-4dbe-87b2-9944ce9e13c8&CompanyId=1f4d9d9c-f79f-4537-9944-d524b04628b2&Year=2014&Period=2';
  14.    
  15.     vm.dtOptions = DTOptionsBuilder.fromFnPromise(function () {
  16.         return $resource(link).query().$promise;
  17.     }).withPaginationType('full_numbers')
  18.         // Active Responsive plugin
  19.         .withOption('responsive', true)
  20.         .withBootstrap()
  21.         .withBootstrapOptions({
  22.             pagination: {
  23.                 classes: {
  24.                     ul: 'pagination pagination-sm'
  25.                 }
  26.             }
  27.         });
  28.     vm.dtColumns = [
  29.         DTColumnBuilder.newColumn('ObjectiveCode').withTitle('ObjectiveCode'),
  30.         DTColumnBuilder.newColumn('StrategicTheme1').withTitle('ID'),
  31.         DTColumnBuilder.newColumn('StrategicTheme2').withTitle('First name'),
  32.         DTColumnBuilder.newColumn('ObjectivePerspective').withTitle('ObjectivePerspective'),
  33.         DTColumnBuilder.newColumn('ObjectivePersonInCharge').withTitle('ObjectivePersonInCharge'),
  34.         DTColumnBuilder.newColumn('FractalYN').withTitle('FractalYN'),
  35.     // .notVisible() does not work in this case. Use .withClass('none') instead
  36.         DTColumnBuilder.newColumn('ObjectiveId').withTitle('ObjectiveId').withClass('none'),
  37.         DTColumnBuilder.newColumn('ObjectiveName').withTitle('ObjectiveName').withClass('none'),
  38.         DTColumnBuilder.newColumn('StrategyMapId').withTitle('StrategyMapId').withClass('none'),
  39.         DTColumnBuilder.newColumn('ObjectiveDescription').withTitle('ObjectiveDescription').withClass('none'),
  40.         DTColumnBuilder.newColumn('ObjectivePersonInCharge').withTitle('Last name').withClass('none'),
  41.         DTColumnBuilder.newColumn('ActiveYN').withTitle('ActiveYN').withClass('none'),
  42.         DTColumnBuilder.newColumn('Year').withTitle('Year').withClass('none')
  43.     ];
  44.  
  45. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement