You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/08/27 01:51:10 UTC
docs commit: Fixed untyped text entry in plugin searchbar Prevented
download data from being shown before data request Added supported platform
icons to plugin cards Fixed downloads sorting of plugins without download
fields Fixed query string not appear
Repository: cordova-docs
Updated Branches:
refs/heads/cordova-website 421839a95 -> 84e63266e
Fixed untyped text entry in plugin searchbar
Prevented download data from being shown before data request
Added supported platform icons to plugin cards
Fixed downloads sorting of plugins without download fields
Fixed query string not appearing in search bar
This closes #312
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/84e63266
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/84e63266
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/84e63266
Branch: refs/heads/cordova-website
Commit: 84e63266e6aa523b64b7a9bd6598f0cb3b12a6c7
Parents: 421839a
Author: riknoll <ri...@microsoft.com>
Authored: Mon Aug 24 13:49:03 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Wed Aug 26 16:50:55 2015 -0700
----------------------------------------------------------------------
www/static/css-src/_plugins.scss | 24 +++
www/static/img/platform-logos-all-sprite.svg | 202 ++++++++++++++++++++++
www/static/plugins/app.js | 60 ++++---
www/static/plugins/plugin.jsx | 5 +-
www/static/plugins/searchbar.jsx | 4 +-
www/static/plugins/sortdropdown.jsx | 7 +-
www/static/plugins/supportedplatforms.jsx | 95 ++++------
7 files changed, 307 insertions(+), 90 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/css-src/_plugins.scss
----------------------------------------------------------------------
diff --git a/www/static/css-src/_plugins.scss b/www/static/css-src/_plugins.scss
index d81a417..21e22f9 100644
--- a/www/static/css-src/_plugins.scss
+++ b/www/static/css-src/_plugins.scss
@@ -138,3 +138,27 @@
hr.results-divider-line {
border-color:$gray-20;
}
+
+.results-supported-platforms {
+ list-style: none;
+ padding:0;
+ margin-bottom:0;
+}
+.results-supported-platforms li {
+ display: inline-block;
+}
+.results-supported-platforms > li > div {
+ background-image:url('/static/img/platform-logos-all-sprite.svg');
+ width:50px;
+ height:50px;
+ display:inline-block;
+ background-size: 400px 50px;
+}
+.android { background-position: 0 }
+.ios { background-position: 14.3%; }
+.windows { background-position: 28.6%; }
+.blackberry { background-position: 42.9%; }
+.ubuntu { background-position: 57.1%; }
+.firefox { background-position: 71.4%; }
+.webos { background-position: 85.7%; }
+.fireos { background-position: 100%; }
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/img/platform-logos-all-sprite.svg
----------------------------------------------------------------------
diff --git a/www/static/img/platform-logos-all-sprite.svg b/www/static/img/platform-logos-all-sprite.svg
new file mode 100644
index 0000000..cfbf53b
--- /dev/null
+++ b/www/static/img/platform-logos-all-sprite.svg
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 392.6 49.1" style="enable-background:new 0 0 392.6 49.1;" xml:space="preserve">
+<style type="text/css">
+ .st0{display:none;}
+ .st1{display:inline;fill:#FFDE17;}
+ .st2{display:inline;fill:#F26522;}
+ .st3{fill:#333333;}
+ .st4{fill:none;}
+</style>
+<g class="st0">
+ <rect class="st1" width="49.1" height="49.1"/>
+ <rect x="49.1" class="st2" width="49.1" height="49.1"/>
+ <rect x="98.1" class="st1" width="49.1" height="49.1"/>
+ <rect x="147.2" class="st2" width="49.1" height="49.1"/>
+ <rect x="196.3" class="st1" width="49.1" height="49.1"/>
+ <rect x="245.4" class="st2" width="49.1" height="49.1"/>
+ <rect x="294.4" class="st1" width="49.1" height="49.1"/>
+ <rect x="343.5" class="st2" width="49.1" height="49.1"/>
+</g>
+<g>
+ <g>
+ <path class="st3" d="M81,25.4c0-3.4,2.8-5,2.9-5.1c-1.6-2.3-4-2.6-4.9-2.7c-2.1-0.2-4.1,1.2-5.2,1.2c-1.1,0-2.7-1.2-4.4-1.2
+ c-2.3,0-4.4,1.3-5.6,3.4c-2.4,4.1-0.6,10.2,1.7,13.6c1.1,1.6,2.5,3.5,4.2,3.4c1.7-0.1,2.3-1.1,4.4-1.1c2.1,0,2.6,1.1,4.4,1.1
+ c1.8,0,3-1.7,4.1-3.3c1.3-1.9,1.8-3.7,1.9-3.8C84.5,30.8,81,29.5,81,25.4L81,25.4z M77.6,15.4c0.9-1.1,1.6-2.7,1.4-4.3
+ c-1.4,0.1-3,0.9-4,2c-0.9,1-1.6,2.6-1.4,4.2C75.1,17.4,76.6,16.5,77.6,15.4L77.6,15.4z M77.6,15.4"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path class="st3" d="M160.8,14.6C159.2,16.2,158.6,16.8,160.8,14.6c0.5-0.5,0.9-0.9,0.9-0.9C161.7,13.6,161.3,14.1,160.8,14.6
+ L160.8,14.6z M160.8,14.6"/>
+ <path class="st3" d="M159.7,11.2c-0.2,0-0.4,0-0.6,0.1c-0.4-0.1-1,0.1-1,0.5c0,2.3-0.2,4.5-0.7,6.8c-0.1,0.2,0.2,0.3,0.4,0.3
+ c2.3,0.1,7.3,0,8.1-2.9C167,12.2,162.2,11.8,159.7,11.2L159.7,11.2z M159.4,12c0.4,0.1,1,0.2,1.5,0.3c-0.3,0.1-0.6,0.4-0.9,0.7
+ c-0.1,0.1-0.2,0.2-0.4,0.3c-0.1,0.1-0.2,0.2-0.2,0.3C159.4,13.1,159.4,12.6,159.4,12L159.4,12z M160.8,18c0.3-0.3,0.5-0.9,0.6-1.5
+ c0.1-0.6-0.3-0.7-0.8-0.2c-0.4,0.5-0.9,0.9-1.3,1.4c-0.1,0.1-0.2,0.3-0.3,0.4c-0.2,0-0.3,0-0.4,0c0.1-0.2,0.2-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188.2,17.1,183.4,16.7,180.9,16.1L180.9,16.1z M180.8,23c-0.4,0-0.7,0-0.9,0.1c0.1-0.2,0.2-0.5,0.3-1
+ c0-0.1,0-0.1,0-0.2c0.1,0,0.1-0.1,0.2-0.2c0.5-0.5,1-0.9,1.5-1.4c0.5-0.5,1-1.3,1-1.9c0-0.5-0.4-0.6-0.9-0.1
+ c-0.4,0.4-0.8,0.8-1.2,1.1c-0.1,0.1-0.2,0.2-0.3,0.3c0.1-0.7,0.1-1.4,0.1-2.1c0,0,0,0,0.1-0.1c0.2-0.2,0.3-0.4,0.4-0.5
+ c1.9,0.3,4.4,0.7,5,2.6C186.7,22.3,183.2,22.9,180.8,23L180.8,23z M180.8,23"/>
+ <path class="st3" d="M177.8,33.8c2.5,0.1,7.5,0,8.1-3.2c0.7-3.7-4-4-6.5-4.6c-0.2-0.1-0.4,0-0.6,0.1c-0.4,0-0.8,0.2-0.8,0.5
+ c0,2.3-0.2,4.5-0.7,6.7C177.3,33.6,177.6,33.8,177.8,33.8L177.8,33.8z M179.3,27.1c0,0,0.1-0.1,0.1-0.1c0.4,0.1,1,0.2,1.5,0.3
+ c-0.2,0.2-0.5,0.4-0.8,0.7c-0.2,0.2-0.4,0.4-0.7,0.7c-0.1,0.1-0.2,0.2-0.2,0.3C179.3,28.3,179.3,27.7,179.3,27.1L179.3,27.1z
+ M178.9,32c0-0.3,0.1-0.5,0.1-0.8c0.1,0,0.1-0.1,0.2-0.2c0.5-0.5,1-1,1.5-1.5c0.5-0.5,0.9-1.3,0.9-1.6c0-0.2,0-0.3-0.1-0.4
+ c1.6,0.4,3.1,1,3.2,2.6c0,2.3-3,2.8-5.2,2.8c-0.4,0-0.7,0-0.9,0.1C178.8,32.7,178.9,32.4,178.9,32L178.9,32z M178.9,32"/>
+ <path class="st3" d="M176.8,15.9c1-3.8-3.7-4.2-6.3-4.7c-0.2,0-0.4,0-0.6,0.1c-0.4-0.1-1,0.1-1,0.4c0,2.3-0.2,4.5-0.7,6.7
+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1.2,0.2-2.4,0.2-3.7c0,0,0-0.1,0.1-0.1
+ C171.5,22.4,175.9,23.2,174,26.5L174,26.5z M174,26.5"/>
+ <path class="st3" d="M166,37.9c2.6,0.2,6.9,0,8.1-2.9c1.5-3.6-4.1-4.2-6.2-4.7c-0.1,0-0.4,0-0.6,0.1c-0.4-0.1-1,0.1-1,0.4
+ c0,2.3-0.2,4.5-0.7,6.7C165.5,37.8,165.8,37.9,166,37.9L166,37.9z M167.1,36.2c0.1-0.1,0.1-0.1,0.2-0.2c0.5-0.5,1-0.9,1.5-1.4
+ c0.5-0.5,1-1,1-1.1c0-0.1-0.4,0.2-0.9,0.8c-0.5,0.5-1,1-1.6,1.6c-0.1,0.1-0.1,0.1-0.2,0.2c0.2-1.3,0.3-2.7,0.4-4
+ c0.1,0,0.1-0.1,0.2-0.1c0.3-0.3,0.4-0.6,0.4-0.7c1.9,0.3,4.3,0.7,4.8,2.6c0.6,2.2-1.5,3-3.6,3.3c0-0.1,0-0.2,0-0.3
+ c0.1-0.4-0.3-0.3-0.8,0.2c-0.1,0.1-0.2,0.2-0.2,0.3c-0.2,0-0.4,0-0.6,0c-0.4,0-0.8,0-1,0.1C166.9,37.1,167,36.7,167.1,36.2
+ L167.1,36.2z M167.1,36.2"/>
+</g>
+<g>
+ <path class="st3" d="M14.9,19.9L14.9,19.9c-0.9,0-1.7,0.7-1.7,1.6v6.9c0,0.9,0.7,1.6,1.6,1.6h0.1c0.9,0,1.6-0.7,1.6-1.6v-6.9
+ C16.4,20.6,15.7,19.9,14.9,19.9L14.9,19.9z M14.9,19.9"/>
+ <g>
+ <path class="st3" d="M17.2,31.1c0,0.8,0.7,1.5,1.5,1.5h1.6v3.7c0,0.9,0.7,1.6,1.6,1.6h0.1c0.9,0,1.6-0.7,1.6-1.6v-3.7h2.2v3.7
+ c0,0.9,0.7,1.6,1.6,1.6h0.1c0.9,0,1.6-0.7,1.6-1.6v-3.7h1.6c0.8,0,1.5-0.6,1.5-1.5V20.2H17.2V31.1z M17.2,31.1"/>
+ <path class="st3" d="M28.2,13.6l1.2-1.9c0.1-0.1,0-0.3-0.1-0.4c-0.1-0.1-0.3,0-0.4,0.1l-1.3,2c-1-0.4-2-0.6-3.2-0.6
+ c-1.1,0-2.2,0.2-3.2,0.6l-1.3-2c-0.1-0.1-0.2-0.2-0.4-0.1c-0.1,0.1-0.2,0.2-0.1,0.4l1.2,1.9c-2.2,1.1-3.7,3.2-3.7,5.5
+ c0,0.1,0,0.3,0,0.4h14.7c0-0.1,0-0.3,0-0.4C31.9,16.7,30.4,14.7,28.2,13.6L28.2,13.6z M21.1,17c-0.4,0-0.7-0.3-0.7-0.7
+ c0-0.4,0.3-0.7,0.7-0.7c0.4,0,0.7,0.3,0.7,0.7C21.8,16.7,21.5,17,21.1,17L21.1,17z M28,17c-0.4,0-0.7-0.3-0.7-0.7
+ c0-0.4,0.3-0.7,0.7-0.7c0.4,0,0.7,0.3,0.7,0.7C28.7,16.7,28.3,17,28,17L28,17z M28,17"/>
+ <path class="st3" d="M34.3,19.9L34.3,19.9c-0.9,0-1.7,0.7-1.7,1.6v6.9c0,0.9,0.7,1.6,1.6,1.6h0.1c0.9,0,1.6-0.7,1.6-1.6v-6.9
+ C35.9,20.6,35.2,19.9,34.3,19.9L34.3,19.9z M34.3,19.9"/>
+ </g>
+</g>
+<g>
+ <path class="st3" d="M109.2,23.6l0-8.8l10.8-1.5v10.2H109.2z M121.8,13.2l14.4-2.1v12.6h-14.4V13.2z M136.2,25.4l0,12.6l-14.4-2
+ V25.4H136.2z M120,35.8l-10.8-1.5l0-8.8H120V35.8z M120,35.8"/>
+</g>
+<path class="st3" d="M220.9,9.4c-8.3,0-15.1,6.8-15.1,15.1s6.8,15.1,15.1,15.1c8.3,0,15.1-6.8,15.1-15.1S229.2,9.4,220.9,9.4z
+ M224.2,14.6c0.6-1,1.8-1.3,2.8-0.7c1,0.6,1.3,1.8,0.7,2.8c-0.6,1-1.8,1.3-2.8,0.7C224,16.9,223.7,15.6,224.2,14.6z M210.6,26.6
+ c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C212.6,25.7,211.7,26.6,210.6,26.6z M212.3,26.7c0.7-0.5,1.1-1.3,1.1-2.2
+ c0-0.9-0.4-1.7-1.1-2.2c0.5-2.1,1.9-3.9,3.6-5.1l1.5,2.5c-1.5,1.1-2.5,2.8-2.5,4.8s1,3.8,2.5,4.8l-1.5,2.5
+ C214.2,30.6,212.9,28.8,212.3,26.7z M227,35.2c-1,0.5-2.2,0.2-2.8-0.7c-0.5-1-0.2-2.2,0.7-2.8c0.9-0.6,2.2-0.2,2.8,0.7
+ C228.3,33.4,228,34.7,227,35.2z M227,30.8c-0.8-0.3-1.6-0.2-2.4,0.2c-0.7,0.4-1.2,1.2-1.4,2c-0.7,0.2-1.5,0.3-2.3,0.3
+ c-1.4,0-2.7-0.3-3.9-0.9l1.4-2.5c0.8,0.4,1.6,0.5,2.5,0.5c3.1,0,5.6-2.3,5.8-5.4l2.9,0C229.4,27.3,228.5,29.3,227,30.8z M226.7,24
+ c-0.3-3-2.8-5.4-5.9-5.4c-0.9,0-1.8,0.2-2.5,0.5l-1.4-2.5c1.2-0.6,2.5-0.9,3.9-0.9c0.8,0,1.6,0.1,2.3,0.3c0.1,0.8,0.6,1.6,1.4,2
+ c0.8,0.4,1.6,0.5,2.4,0.2c1.5,1.5,2.5,3.5,2.6,5.7L226.7,24z"/>
+<g>
+ <g>
+ <path class="st3" d="M269.9,10.4c7.7,0,13.9,6.2,13.9,13.9c0,7.7-6.2,13.9-13.9,13.9c-7.7,0-13.9-6.2-13.9-13.9
+ C255.9,16.6,262.2,10.4,269.9,10.4 M269.9,9.4c-8.2,0-14.9,6.7-14.9,14.9c0,8.2,6.7,14.9,14.9,14.9c8.2,0,14.9-6.7,14.9-14.9
+ C284.8,16.1,278.1,9.4,269.9,9.4L269.9,9.4z"/>
+ </g>
+ <g>
+ <path class="st3" d="M281.7,15.2c0.1,0.2,0.3,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z"/>
+ </g>
+</g>
+<path class="st4" d="M341.4,40.5c8.2,0,14.9-6.7,14.9-14.9c0-8.2-6.7-14.9-14.9-14.9c-8.2,0-14.9,6.7-14.9,14.9
+ C326.5,33.8,333.2,40.5,341.4,40.5z"/>
+<g>
+ <circle class="st4" cx="368.1" cy="24.5" r="15.1"/>
+ <g>
+ <path class="st3" d="M354.4,20.9V24h2.8v0.5h-2.8v3.6h-0.5v-7.7h3.6v0.5L354.4,20.9L354.4,20.9z"/>
+ <path class="st3" d="M359.1,21.2c-0.1,0-0.2,0-0.3-0.1c-0.1-0.1-0.1-0.2-0.1-0.3c0-0.1,0-0.2,0.1-0.3c0.1-0.1,0.2-0.1,0.3-0.1
+ c0.1,0,0.2,0,0.3,0.1c0.1,0.1,0.1,0.2,0.1,0.3c0,0.1,0,0.2-0.1,0.3C359.3,21.2,359.2,21.2,359.1,21.2z M358.8,28.1v-5.5h0.5v5.5
+ H358.8z"/>
+ <path class="st3" d="M363.6,23.1c-0.2-0.1-0.4-0.2-0.6-0.2c-0.4,0-0.8,0.2-1.1,0.7c-0.3,0.4-0.4,1.1-0.4,1.9V28h-0.5v-5.5h0.5v1.2
+ h0c0.1-0.4,0.3-0.7,0.6-1c0.3-0.2,0.6-0.3,0.9-0.3c0.2,0,0.4,0,0.5,0.1L363.6,23.1L363.6,23.1z"/>
+ <path class="st3" d="M364.6,25.4c0,0.8,0.2,1.4,0.5,1.8c0.3,0.4,0.8,0.6,1.4,0.6c0.6,0,1.2-0.2,1.8-0.7v0.5
+ c-0.6,0.4-1.2,0.6-1.9,0.6s-1.3-0.3-1.7-0.8c-0.4-0.5-0.7-1.2-0.7-2.2c0-0.8,0.2-1.5,0.7-2c0.5-0.5,1.1-0.8,1.8-0.8
+ c0.7,0,1.2,0.2,1.6,0.7c0.4,0.5,0.5,1.1,0.5,2v0.2L364.6,25.4L364.6,25.4z M368.1,24.9c0-0.6-0.2-1.1-0.5-1.5
+ c-0.3-0.3-0.7-0.5-1.2-0.5s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0.2,0.2,0.3c0.4,1.2,0.8,2.4,1.1,3.6c0.1,0.2,0.1,0.3,0.2,0.4c0,0,0.1,0,0.1,0
+ c0.4-1.4,0.9-2.8,1.3-4.3c0,0,0.1,0,0.1,0c-0.5,1.5-1,3-1.4,4.4C310,27.7,309.9,27.7,309.9,27.7z"/>
+ <path class="st3" d="M316.6,26.2c0.1,0.2,0.2,0.4,0.3,0.5c0.4,0.7,0.9,1,1.7,1c0.7-0.1,1.2-0.4,1.5-1.1c0.3-0.8,0.3-1.6-0.1-2.3
+ c-0.3-0.7-0.8-1.1-1.6-1c-0.7,0-1.3,0.4-1.6,1.1c-0.1,0.4-0.2,0.7-0.3,1.2c0-1.4,0-2.7,0-4c0,0,0.1,0,0.1,0c0,0.9,0,1.9,0,2.9
+ c0.1-0.1,0.1-0.1,0.2-0.1c0.5-0.9,1.1-1.3,2-1.2c0.9,0.1,1.5,0.7,1.6,1.7c0.2,0.8,0.1,1.5-0.3,2.2c-0.4,0.6-1.2,1-1.9,0.8
+ C317.3,27.6,316.7,27,316.6,26.2z"/>
+ <path class="st3" d="M315.7,25.4c-1.2,0-2.2,0-3.3,0c-0.6,0-0.6,0-0.5,0.6c0.2,1.3,1.2,1.9,2.4,1.5c0.5-0.2,0.9-0.5,1.1-1
+ c0.1-0.1,0.1-0.3,0.2-0.4c-0.1,0.6-0.4,1.1-0.9,1.4c-1.3,0.6-2.7-0.1-2.9-1.5c-0.1-0.6-0.1-1.2,0.2-1.8c0.4-0.8,1.2-1.3,2-1.2
+ c0.9,0.1,1.5,0.7,1.7,1.6C315.7,24.9,315.7,25.1,315.7,25.4z M311.9,25.3c1.2,0,2.3,0,3.5,0c0.1,0,0.2-0.2,0.2-0.2
+ c0.1-0.7-0.5-1.6-1.3-1.8C313,22.9,311.9,23.8,311.9,25.3z"/>
+ </g>
+</g>
+</svg>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/plugins/app.js
----------------------------------------------------------------------
diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js
index 92f14d1..de75e0a 100755
--- a/www/static/plugins/app.js
+++ b/www/static/plugins/app.js
@@ -31,37 +31,37 @@ var App = React.createClass({
staticFilters['platforms'] = staticFilters['platforms'].concat(platforms.split(','));
}
var q = App.getURLParameter('q');
+ var state = {
+ plugins: [],
+ placeHolderText: 'Loading...',
+ searchResults: [],
+ staticFilters: staticFilters,
+ sortCriteria: "Quality",
+ downloadsReceived: false
+ }
+
if (q) {
- return {
- plugins: [],
- filterText: q,
- placeHolderText: 'Loading...',
- searchResults: [],
- staticFilters: staticFilters,
- sortCriteria: "Quality"
- };
+ state.filterText = q;
} else {
- return {
- plugins: [],
- filterText: '',
- placeHolderText: 'Loading...',
- searchResults: [],
- staticFilters: staticFilters,
- sortCriteria: "Quality"
- };
+ state.filterText = '';
}
+
+ return state;
},
handleUserInput: function(filterText) {
- /* Routing logic */
- var platformFilters = this.state.staticFilters["platforms"];
- delay(function(){
- App.updateURL(filterText, platformFilters);
- }, INPUT_DELAY);
+ /* We receive events for all inputs, so make sure text changed */
+ if(this.state.filterText !== filterText) {
+ /* Routing logic */
+ var platformFilters = this.state.staticFilters["platforms"];
+ delay(function(){
+ App.updateURL(filterText, platformFilters);
+ }, INPUT_DELAY);
- this.setState({
- filterText: filterText,
- searchResults: App.filterPlugins(this.state.plugins, filterText, this.state.staticFilters)
- });
+ this.setState({
+ filterText: filterText,
+ searchResults: App.filterPlugins(this.state.plugins, filterText, this.state.staticFilters)
+ });
+ }
},
toggleCondition: function(keyword, condition) {
this.setState(function(previousState, currentProps) {
@@ -220,6 +220,11 @@ var App = React.createClass({
switch(criteria) {
case 'Downloads':
plugins.sort(function(p1, p2) {
+ if(!p1.downloadCount) {
+ return 1;
+ } else if(!p2.downloadCount) {
+ return -1;
+ }
if(p2.downloadCount === p1.downloadCount) {
return compareName(p1, p2);
};
@@ -311,7 +316,8 @@ var App = React.createClass({
that.setState({
plugins: plugins,
- searchResults: App.filterPlugins(plugins, this.state.filterText, this.state.staticFilters)
+ searchResults: App.filterPlugins(plugins, this.state.filterText, this.state.staticFilters),
+ downloadsReceived: true
});
}.bind(self), function() { console.log('xhr err'); });
packageNames = "";
@@ -430,7 +436,7 @@ var App = React.createClass({
</ul>
</div>
<div className="col-sm-3">
- <SortDropdown selected={this.state.sortCriteria}/>
+ <SortDropdown selected={this.state.sortCriteria} downloadsEnabled={this.state.downloadsReceived}/>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/plugins/plugin.jsx
----------------------------------------------------------------------
diff --git a/www/static/plugins/plugin.jsx b/www/static/plugins/plugin.jsx
index 858bf37..ef1bd39 100755
--- a/www/static/plugins/plugin.jsx
+++ b/www/static/plugins/plugin.jsx
@@ -56,7 +56,7 @@ var Plugin = React.createClass({
if(this.props.plugin.downloadCount) {
var downloadCount = this.props.plugin.downloadCount.toLocaleString();
- downloadField = <p><small> {downloadCount} downloads last month</small></p>;
+ downloadField = <p className="downloads"><strong>{downloadCount}</strong> downloads last month</p>;
}
if(document.queryCommandSupported("copy")) {
@@ -75,11 +75,12 @@ var Plugin = React.createClass({
<div className="row">
<div className="col-sm-8">
<p>{this.props.plugin.description}</p>
+ <SupportedPlatforms keywords={this.props.plugin.keywords}/>
</div>
<div className="col-sm-3 col-sm-offset-1">
<hr className="visible-xs results-divider-line"/>
<p className="license">{license}</p>
- <p className="downloads"><strong>{downloadCount}</strong> downloads last month</p>
+ {downloadField}
<p className="last-updated">Last updated <strong>{this.props.plugin.modified} days ago</strong></p>
</div>
<div className="plugin-npm-command" id={"command-" + this.props.plugin.name}>{"npm install " + this.props.plugin.name}</div>
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/plugins/searchbar.jsx
----------------------------------------------------------------------
diff --git a/www/static/plugins/searchbar.jsx b/www/static/plugins/searchbar.jsx
index 29948dc..193724d 100755
--- a/www/static/plugins/searchbar.jsx
+++ b/www/static/plugins/searchbar.jsx
@@ -20,8 +20,8 @@ var SearchBar = React.createClass({
delay = 200, // in ms
inputElem = React.findDOMNode(this.refs.filterTextInput);
- // Convert keydown events to stream
- var text = Bacon.fromEvent(inputElem, 'keydown')
+ // Convert input events to stream
+ var text = Bacon.fromEvent(inputElem, 'input')
.debounce(delay)
.map(function(event) {
return event.target.value;
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/plugins/sortdropdown.jsx
----------------------------------------------------------------------
diff --git a/www/static/plugins/sortdropdown.jsx b/www/static/plugins/sortdropdown.jsx
index 4b88e36..a8f57fa 100755
--- a/www/static/plugins/sortdropdown.jsx
+++ b/www/static/plugins/sortdropdown.jsx
@@ -3,6 +3,11 @@ var SortButton = require('./sortbutton.jsx');
var SortDropdown = React.createClass({
render: function() {
+ var downloadsButton;
+
+ if(this.props.downloadsEnabled) {
+ downloadsButton = <SortButton criteria="Downloads"/>;
+ }
return (
<div className="dropdown plugins-sort-dropdown">
<button className="btn btn-primary btn-block dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@@ -12,7 +17,7 @@ var SortDropdown = React.createClass({
<ul className="dropdown-menu" aria-labelledby="dropdownMenu1">
<SortButton criteria="Quality"/>
<SortButton criteria="Recently Updated"/>
- <SortButton criteria="Downloads"/>
+ {downloadsButton}
</ul>
</div>
);
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/84e63266/www/static/plugins/supportedplatforms.jsx
----------------------------------------------------------------------
diff --git a/www/static/plugins/supportedplatforms.jsx b/www/static/plugins/supportedplatforms.jsx
index 83df2b9..9891815 100755
--- a/www/static/plugins/supportedplatforms.jsx
+++ b/www/static/plugins/supportedplatforms.jsx
@@ -2,89 +2,68 @@ var React = require('react'),
PlatformButton = require('./platformbutton.jsx')
var SupportedPlatforms = React.createClass({
- getInitialState: function() {
- return {
- moreClicked: false
- };
- },
- onClick: function() {
- this.setState({
- moreClicked: true
- });
- },
- componentWillReceiveProps: function(nextProps) {
- this.setState({
- moreClicked: false
- });
- },
render: function() {
var keywords = this.props.keywords;
- var sortedMajorPlatforms = [
- {present:false, text: "Android", keyword:"cordova-android"},
- {present:false, text: "iOS", keyword:"cordova-ios"},
- {present:false, text: "Windows", keyword:"cordova-windows"},
- {present:false, text: "Blackberry10", keyword:"cordova-blackberry10"}
+ var sortedPlatforms = [
+ {present:false, icon: "android"},
+ {present:false, icon: "ios"},
+ {present:false, icon: "windows"},
+ {present:false, icon: "blackberry"},
+ {present:false, icon: "ubuntu"},
+ {present:false, icon: "firefox"},
+ {present:false, icon: "webos"},
+ {present:false, icon: "fireos"}
];
- var majorPlatformsSupported = [];
- var otherPlatformsSupported = [];
+
+ var platformsSupported = [];
+
// remove windows8 & windows dupe
if (keywords.indexOf('cordova-windows') > -1 && keywords.indexOf('cordova-windows8') > -1) {
keywords.splice(keywords.indexOf('cordova-windows8'), 1);
}
keywords.forEach(function(keyword) {
switch (keyword) {
- case 'cordova-firefoxos':
- otherPlatformsSupported.push(<PlatformButton platform="FirefoxOS" keyword={keyword} />);
- break;
case 'cordova-android':
- sortedMajorPlatforms[0].present = true;
- break;
- case 'cordova-amazon-fireos':
- otherPlatformsSupported.push(<PlatformButton platform="FireOS" keyword={keyword} />);
- break;
- case 'cordova-ubuntu':
- otherPlatformsSupported.push(<PlatformButton platform="Ubuntu" keyword={keyword} />);
+ sortedPlatforms[0].present = true;
break;
case 'cordova-ios':
- sortedMajorPlatforms[1].present = true;
+ sortedPlatforms[1].present = true;
+ break;
+ case 'cordova-windows8':
+ case 'cordova-windows':
+ sortedPlatforms[2].present = true;
break;
case 'cordova-blackberry10':
- sortedMajorPlatforms[3].present = true;
+ sortedPlatforms[3].present = true;
break;
- case 'cordova-wp8':
- otherPlatformsSupported.push(<PlatformButton platform="Windows Phone 8" keyword={keyword} />);
+ case 'cordova-ubuntu':
+ sortedPlatforms[4].present = true;
break;
- case 'cordova-windows8':
- case 'cordova-windows':
- sortedMajorPlatforms[2].present = true;
+ case 'cordova-firefoxos':
+ sortedPlatforms[5].present = true;
+ break;
+ case 'cordova-webos':
+ sortedPlatforms[6].present = true;
break;
- case 'cordova-browser':
- otherPlatformsSupported.push(<PlatformButton platform="Browser" keyword={keyword} />);
+ case 'cordova-amazon-fireos':
+ sortedPlatforms[7].present = true;
break;
+
+ // case 'cordova-wp8':
+ // break;
+ // case 'cordova-browser':
+ // break;
}
});
- sortedMajorPlatforms.forEach(function(platform) {
+ sortedPlatforms.forEach(function(platform) {
if(platform.present) {
- majorPlatformsSupported.push(<PlatformButton platform={platform.text} keyword={platform.keyword}/>)
+ platformsSupported.push(<li><div className={platform.icon}></div></li>)
}
});
- while(majorPlatformsSupported.length < 4 && otherPlatformsSupported.length > 0) {
- majorPlatformsSupported.push(otherPlatformsSupported.shift());
- }
-
- var moreButton;
- if(otherPlatformsSupported.length > 0 && !this.state.moreClicked) {
- moreButton = <li className="clickable" onClick={this.onClick}>...</li>
- }
- if (!this.state.moreClicked) {
- otherPlatformsSupported = null;
- }
return (
- <ul className="supportedPlatforms">
- {majorPlatformsSupported}
- {moreButton}
- {otherPlatformsSupported}
+ <ul className="results-supported-platforms">
+ {platformsSupported}
</ul>
);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org