SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  $scope.getPages = (params, paramsObj) ->
  2.       urlApi = "/api/sites/#{$scope.siteId}/pages_paginated?" + params
  3.       if !$scope.initial_load && paramsObj.page > 0
  4.         if paramsObj.filters
  5.           search = paramsObj.filters.path
  6.         else
  7.           search = null
  8.         queryParams = {page: paramsObj.page, count: paramsObj.count, sortBy: paramsObj.sortBy, sortOrder: paramsObj.sortOrder, search: search}
  9.         $state.go(".", queryParams, {notify: false})
  10.       $scope.initial_load = false
  11.  
  12.       return $http.get(urlApi).then (response) ->
  13.         return {'rows': response.data.pages, 'header': pages_header, 'pagination': response.data.pagination, 'sortBy': response.data.sort_by, 'sortOrder': response.data.sort_order }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top