Author: ahyoungryu
Date: Sat Mar 25 02:57:43 2017
New Revision: 1788640

URL: http://svn.apache.org/viewvc?rev=1788640&view=rev
Log: (empty)

Modified:
    zeppelin/site/assets/themes/zeppelin/js/helium.controller.js
    zeppelin/site/helium_packages.html

Modified: zeppelin/site/assets/themes/zeppelin/js/helium.controller.js
URL: 
http://svn.apache.org/viewvc/zeppelin/site/assets/themes/zeppelin/js/helium.controller.js?rev=1788640&r1=1788639&r2=1788640&view=diff
==============================================================================
--- zeppelin/site/assets/themes/zeppelin/js/helium.controller.js (original)
+++ zeppelin/site/assets/themes/zeppelin/js/helium.controller.js Sat Mar 25 
02:57:43 2017
@@ -46,15 +46,20 @@ angular.module("app", ['ui.bootstrap'])
     }
 
     $scope.latestPkgInfo = latestPkgInfo
-    $scope.numberOfAllPkgs = latestPkgInfo.length
   }
 
+  var orderPackageByPubDate = function(a, b) {
+    return new Date(a.published).getTime() - new Date(b.published).getTime();
+  };
+
   var classifyPkgByType = function(latestPkgInfo) {
     var vizTypePkgs = []
     var spellTypePkgs = []
     var interpreterTypePkgs = []
     var allTypePkgs = {}
 
+    latestPkgInfo = latestPkgInfo.sort(orderPackageByPubDate).reverse();
+
     for (var idx in latestPkgInfo) {
       switch (latestPkgInfo[idx].type) {
         case "VISUALIZATION":

Modified: zeppelin/site/helium_packages.html
URL: 
http://svn.apache.org/viewvc/zeppelin/site/helium_packages.html?rev=1788640&r1=1788639&r2=1788640&view=diff
==============================================================================
--- zeppelin/site/helium_packages.html (original)
+++ zeppelin/site/helium_packages.html Sat Mar 25 02:57:43 2017
@@ -299,7 +299,7 @@ and <a href="https://zeppelin.apache.org
         <div>
           <input class="helium-radio" id="'ALL'" type="radio" 
                ng-model="pkgListByType" ng-value="'ALL'" 
ng-click="pkgListByType = 'ALL'">
-          <label for="'ALL'">Lately published</label>
+          <label for="'ALL'">Recently published</label>
         </div>
         <div ng-repeat="pkgTypes in allPackageTypes">
           <input class="helium-radio" id="{{pkgTypes}}" type="radio" 
@@ -325,7 +325,7 @@ and <a href="https://zeppelin.apache.org
       </div>
       <div ng-if="pkgListByType === 'ALL'">
         <div class="row heliumPackageList"
-           ng-repeat="pkg in 
latestPkgInfo.slice(((currentPage-1)*itemsPerPage), 
((currentPage)*itemsPerPage)) | orderBy: ['published']:true">
+             ng-repeat="pkg in 
latestPkgInfo.slice(((currentPage-1)*itemsPerPage), 
((currentPage)*itemsPerPage))">
         <div class="col-md-12">
           <div class="heliumPackageHead">
             <div class="heliumPackageIcon"
@@ -355,14 +355,14 @@ and <a href="https://zeppelin.apache.org
         </div>
       </div>
       <div class="text-center" style="margin-top: 24px;">
-        <ul uib-pagination boundary-links="true" total-items="numberOfAllPkgs" 
+        <ul uib-pagination boundary-links="true" 
total-items="latestPkgInfo.length" 
             ng-model="currentPage" class="pagination-sm"
             previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" 
last-text="&raquo;"></ul>
       </div>
     </div>
     <div ng-if="pkgListByType !== 'ALL'" ng-repeat="(types, pkgs) in 
allTypePkgs">
         <div class="row heliumPackageList"
-           ng-repeat="pkg in pkgs.slice(((currentPage-1)*itemsPerPage), 
((currentPage)*itemsPerPage)) | orderBy: ['published']:true"
+           ng-repeat="pkg in pkgs.slice(((currentPage-1)*itemsPerPage), 
((currentPage)*itemsPerPage))"
            ng-show="$parent.pkgListByType === types">
         <div class="col-md-12">
           <div class="heliumPackageHead">
@@ -394,7 +394,7 @@ and <a href="https://zeppelin.apache.org
       </div>
       <div class="text-center" style="margin-top: 24px;">
         <ul uib-pagination boundary-links="true" total-items="pkgs.length" 
-            ng-model="currentPage" class="pagination-sm"
+            ng-model="$parent.currentPage" class="pagination-sm"
             ng-show="$parent.pkgListByType === types"
             previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" 
last-text="&raquo;"></ul>
       </div>


Reply via email to