You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/11/10 07:26:59 UTC
cordova-registry-web git commit: Add filter by platform to add plugin
view
Repository: cordova-registry-web
Updated Branches:
refs/heads/master 7e6048bea -> 87b33e7f5
Add filter by platform to add plugin view
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/87b33e7f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/tree/87b33e7f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/diff/87b33e7f
Branch: refs/heads/master
Commit: 87b33e7f54485e6ab3c7ed7eac9058e818975fd6
Parents: 7e6048b
Author: Raymond Camden <ra...@gmail.com>
Authored: Wed Nov 5 14:04:06 2014 -0600
Committer: Raymond Camden <ra...@gmail.com>
Committed: Wed Nov 5 14:04:06 2014 -0600
----------------------------------------------------------------------
attachments/js/controllers/viewAll.js | 60 +++++++++++++++++++++++
attachments/partials/views/viewAll.html | 72 ++++++++++++++++++++++++++++
2 files changed, 132 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/87b33e7f/attachments/js/controllers/viewAll.js
----------------------------------------------------------------------
diff --git a/attachments/js/controllers/viewAll.js b/attachments/js/controllers/viewAll.js
index 15b076d..2420b38 100644
--- a/attachments/js/controllers/viewAll.js
+++ b/attachments/js/controllers/viewAll.js
@@ -2,6 +2,60 @@ angular.module('registry.controllers').controller('ViewAllController', ['$rootSc
$scope.loading = true;
+ $scope.showFilters = false;
+ $scope.hideFilters = true;
+
+ $scope.filteriOS = false;
+ $scope.filterAndroid = false;
+ $scope.filterWindowsPhone7 = false;
+ $scope.filterWindowsPhone8 = false;
+ $scope.filterWindows8 = false;
+ $scope.filterFirefox = false;
+ $scope.filterBlackberry = false;
+ $scope.filterUbuntu = false;
+ $scope.filterBrowser = false;
+
+ $scope.selectedPlatforms = function() {
+ //send back null if we arent showing filters
+ if(!$scope.showFilters) {
+ return null;
+ }
+
+ var platformFilters = [];
+ if($scope.filterFirefox) {
+ platformFilters.push('firefoxos');
+ }
+ if($scope.filterAndroid) {
+ platformFilters.push('android');
+ }
+ if($scope.filterFireOs) {
+ platformFilters.push('amazon-fireos');
+ }
+ if($scope.filterUbuntu) {
+ platformFilters.push('ubuntu');
+ }
+ if($scope.filteriOS) {
+ platformFilters.push('ios');
+ }
+ if($scope.filterBlackberry) {
+ platformFilters.push('blackberry10');
+ }
+ if($scope.filterWindowsPhone7) {
+ platformFilters.push('wp7');
+ }
+ if($scope.filterWindowsPhone8) {
+ platformFilters.push('wp8');
+ }
+ if($scope.filterWindows8) {
+ platformFilters.push('windows8');
+ }
+ if($scope.filterBrowser) {
+ platformFilters.push('browser');
+ }
+
+ return platformFilters;
+ };
+
$scope.getPlugins = function(){
$http.get('/_view/searcher/').
success(function(data, status, headers, config) {
@@ -29,4 +83,10 @@ angular.module('registry.controllers').controller('ViewAllController', ['$rootSc
}
$scope.getPlugins();
+
+ $scope.toggleFilters = function toggleFilters() {
+ $scope.hideFilters = $scope.showFilters;
+ $scope.showFilters = !($scope.showFilters);
+ };
+
}]);
http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/87b33e7f/attachments/partials/views/viewAll.html
----------------------------------------------------------------------
diff --git a/attachments/partials/views/viewAll.html b/attachments/partials/views/viewAll.html
index c198d45..cdded5d 100644
--- a/attachments/partials/views/viewAll.html
+++ b/attachments/partials/views/viewAll.html
@@ -2,6 +2,78 @@
<div class="row">
<div class="offset-1--hand column-10--hand">
<div class="viewContainer">
+
+
+ <div class="row filter-row">
+ <a ng-click="toggleFilters()"><i ng-class="{'icon-minus-circled': showFilters, 'icon-plus-circled': hideFilters}"></i>Filter by Platform:</a> <span ng-show="showFilters" class="filter-platform-note">* Note, if the plugin developer did not specify platforms available, it will be filtered out. Sorry!</span>
+ </div>
+ <div class="row filter-list" ng-show="showFilters">
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filteriOS" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>iOS</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterAndroid" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Android</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterWindowsPhone7" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Windows Phone 7</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterWindowsPhone8" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Windows Phone 8</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterWindows8" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Windows 8</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterFirefox" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Firefox OS</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterBlackberry" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Blackberry</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterUbuntu" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Ubuntu</span>
+ </label>
+ </div>
+ <div class="column-3--lap">
+ <label class="topcoat-checkbox">
+ <input type="checkbox" ng-model="filterBrowser" />
+ <div class="topcoat-checkbox__checkmark"></div>
+ <span>Browser</span>
+ </label>
+ </div>
+ </div>
+
+
<pluginlist></pluginlist>
<div ng-show="loading" class="row loading-plugins">
<div class="offset-1--hand column-10--hand offset-1-lap column-10--lap center">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org