cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [24/32] git commit: Added some dummy data to the search controller - allows the search page to render the plugin results. Basic functionality is there
Date Mon, 20 Jan 2014 18:42:14 GMT
Added some dummy data to the search controller - allows the search page to render the plugin
results. Basic functionality is there


Project: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/commit/0cfa5486
Tree: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/tree/0cfa5486
Diff: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/diff/0cfa5486

Branch: refs/heads/refactor
Commit: 0cfa54862e0f57673f07219b79ce841156baf8e1
Parents: 9e1ca3c
Author: Josh Bavari <josh@raisemore.com>
Authored: Sun Jan 19 04:22:21 2014 -0600
Committer: Josh Bavari <josh@raisemore.com>
Committed: Sun Jan 19 04:22:21 2014 -0600

----------------------------------------------------------------------
 attachments/js/controllers/search.js   | 10 +++++++
 attachments/partials/views/search.html | 44 ++++++++++++++++++++++++++++-
 2 files changed, 53 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/0cfa5486/attachments/js/controllers/search.js
----------------------------------------------------------------------
diff --git a/attachments/js/controllers/search.js b/attachments/js/controllers/search.js
index f298e04..925d0f2 100644
--- a/attachments/js/controllers/search.js
+++ b/attachments/js/controllers/search.js
@@ -1,7 +1,17 @@
 angular.module('registry.controllers').controller('SearchController', ['$rootScope', '$routeParams',
'$scope', '$location', '$http', 'SearchService', function($rootScope, $routeParams, $scope,
$location, $http, SearchService) {
     
+    var results = [];
+
     $scope.searchText = $routeParams.searchText || SearchService.searchText || '';
 
+    $scope.searchResults = [{
+    	package_id: 'org.apache.cordova.device', 
+    	name: 'Device',
+    	description: 'Pulls device information',
+    	version: '0.5.1',
+    	downloads: 25617
+    }];
+
     $scope.searchPlugins = function() {
         $location.path('/search/' + $scope.searchText);
     };

http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/0cfa5486/attachments/partials/views/search.html
----------------------------------------------------------------------
diff --git a/attachments/partials/views/search.html b/attachments/partials/views/search.html
index 915cbb2..c2fcae9 100644
--- a/attachments/partials/views/search.html
+++ b/attachments/partials/views/search.html
@@ -1 +1,43 @@
-{{searchText}}
\ No newline at end of file
+<div class="topcoat-grid">
+    <div class="topcoat-grid__row">
+        <div class="topcoat-grid__column--12 topcoat-grid__offset--1">
+            <input id="search-text" type="search" ng-model="searchText" placeholder="Find
a plugin..." class="topcoat-search-input" ng-enter="searchPlugins()" />
+        </div>
+    </div>
+    <div class="topcoat-grid__row">
+        <div class="topcoat-grid__column--12 topcoat-grid__offset--1">
+            <span>{{searchResults.length}} plugins found</span>
+        </div>
+    </div>
+    <div class="topcoat-grid__row">
+        <div class="topcoat-grid__column--12 topcoat-grid__offset--1">
+            <a href="#Filter">Filter by Platform:</a> All
+        </div>
+    </div>
+
+    <div ng-show="searchResults.length > 0">
+        <div class="topcoat-grid__row">
+            <div class="topcoat-grid__column--9 topcoat-grid__offset--1">
+                <h3>Plugin Name and Description</h3>
+            </div>
+            <div class="topcoat-grid__column--1">
+                <h3>Version</h3>
+            </div>
+            <div class="topcoat-grid__column--1">
+                <h3>Downloads</h3>
+            </div>
+        </div>
+        <div class="topcoat-grid__row" ng-repeat="result in searchResults">
+            <div class="topcoat-grid__column--9 topcoat-grid__offset--1">
+                <a href="/#/package/{{result.package_id}}"><h4>{{result.name}}</h4></a>
+                <h5>{{result.description}}</h5>
+            </div>
+            <div class="topcoat-grid__column--1">
+                <h3>{{result.version}}</h3>
+            </div>
+            <div class="topcoat-grid__column--1">
+                <h3>{{result.downloads}}</h3>
+            </div>
+        </div>
+    </div>
+</div>
\ No newline at end of file


Mime
View raw message