mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-01-10 12:00:02 +01:00
Highlighted selected items in the selection panel.
Also added some improvements suggested here: http://www.luster.io/blog/9-29-14-mobile-web-checklist.html
This commit is contained in:
parent
c3add59d1b
commit
3910a2dd8f
@ -58,12 +58,16 @@ Clipperz.PM.UI.Components.Selections = React.createClass({
|
|||||||
var archivedCardsCount;
|
var archivedCardsCount;
|
||||||
var selectedCardCount;
|
var selectedCardCount;
|
||||||
var filterType;
|
var filterType;
|
||||||
|
var filterValue;
|
||||||
|
|
||||||
|
console.log("SELECTIONS PROPS", this.props);
|
||||||
tagInfo = this.props['tags'] ? this.props['tags'] : {};
|
tagInfo = this.props['tags'] ? this.props['tags'] : {};
|
||||||
tags = MochiKit.Base.filter(Clipperz.PM.DataModel.Record.isRegularTag, MochiKit.Base.keys(tagInfo)).sort(Clipperz.Base.caseInsensitiveCompare);
|
tags = MochiKit.Base.filter(Clipperz.PM.DataModel.Record.isRegularTag, MochiKit.Base.keys(tagInfo)).sort(Clipperz.Base.caseInsensitiveCompare);
|
||||||
archivedCardsCount = this.props['archivedCardsCount'];
|
archivedCardsCount = this.props['archivedCardsCount'];
|
||||||
selectedCardCount = this.props['cards'] ? this.props['cards'].length : 0;
|
selectedCardCount = this.props['cards'] ? this.props['cards'].length : 0;
|
||||||
|
|
||||||
filterType = (this.props['filter'] && this.props['filter']['type']) ? this.props['filter']['type'] : 'ALL';
|
filterType = (this.props['filter'] && this.props['filter']['type']) ? this.props['filter']['type'] : 'ALL';
|
||||||
|
filterValue = (this.props['filter'] && this.props['filter']['value']) ? this.props['filter']['value'] : null;
|
||||||
|
|
||||||
return React.DOM.div({'key':'selections', 'id':'selections', 'className':filterType}, [
|
return React.DOM.div({'key':'selections', 'id':'selections', 'className':filterType}, [
|
||||||
React.DOM.ul({'className':'defaultSet'}, [
|
React.DOM.ul({'className':'defaultSet'}, [
|
||||||
@ -80,7 +84,7 @@ Clipperz.PM.UI.Components.Selections = React.createClass({
|
|||||||
React.DOM.div({}, [ React.DOM.span({'className':'count'}, selectedCardCount) ])
|
React.DOM.div({}, [ React.DOM.span({'className':'count'}, selectedCardCount) ])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
React.DOM.ul({'className':'tagList'}, MochiKit.Base.map(function (aTag) {return Clipperz.PM.UI.Components.TagIndexItem({'label':aTag, 'count':tagInfo[aTag]}); }, tags)),
|
React.DOM.ul({'className':'tagList'}, MochiKit.Base.map(function (aTag) {return Clipperz.PM.UI.Components.TagIndexItem({'label':aTag, 'count':tagInfo[aTag], 'selected':aTag == filterValue}); }, tags)),
|
||||||
React.DOM.div({'className':'showArchivedCards', 'onClick':this.handleCheckboxChanges}, [
|
React.DOM.div({'className':'showArchivedCards', 'onClick':this.handleCheckboxChanges}, [
|
||||||
React.DOM.input({'type':'checkbox', 'checked':this.props['shouldIncludeArchivedCards'] ? 'checked' : null}),
|
React.DOM.input({'type':'checkbox', 'checked':this.props['shouldIncludeArchivedCards'] ? 'checked' : null}),
|
||||||
React.DOM.span({'className':'label'}, "Show archived cards"),
|
React.DOM.span({'className':'label'}, "Show archived cards"),
|
||||||
|
@ -39,7 +39,11 @@ Clipperz.PM.UI.Components.TagIndexItem = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
return React.DOM.li({'onClick': this.handleClick, 'data-tag':this.props['label']}, [
|
var classes = {
|
||||||
|
'selected': this.props['selected']
|
||||||
|
}
|
||||||
|
|
||||||
|
return React.DOM.li({'onClick': this.handleClick, 'className':React.addons.classSet(classes), 'data-tag':this.props['label']}, [
|
||||||
React.DOM.span({'className':'tagLabel'}, this.props['label']),
|
React.DOM.span({'className':'tagLabel'}, this.props['label']),
|
||||||
React.DOM.span({'className':'tagCount'}, this.props['count'])
|
React.DOM.span({'className':'tagCount'}, this.props['count'])
|
||||||
]);
|
]);
|
||||||
|
@ -56,7 +56,7 @@ $transition-duration: 0.5s;
|
|||||||
@mixin sliding-panel ($side, $size) {
|
@mixin sliding-panel ($side, $size) {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
overflow: scroll;
|
@include overflow-scroll;
|
||||||
|
|
||||||
@if $side == left {
|
@if $side == left {
|
||||||
@include sliding-panel-left($size);
|
@include sliding-panel-left($size);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
.page {
|
.page {
|
||||||
@include pageElement();
|
@include pageElement();
|
||||||
|
@include user-select(none);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainPage {
|
.mainPage {
|
||||||
|
@ -141,3 +141,20 @@
|
|||||||
0% { @include transform(0deg, 0, 0); }
|
0% { @include transform(0deg, 0, 0); }
|
||||||
100% { @include transform(359deg, 0, 0); }
|
100% { @include transform(359deg, 0, 0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin user-select($value) {
|
||||||
|
// http://css-tricks.com/almanac/properties/u/user-select/
|
||||||
|
// none | text | all | element
|
||||||
|
-webkit-user-select: $value; /* Chrome all / Safari all */
|
||||||
|
-moz-user-select: $value; /* Firefox all */
|
||||||
|
-ms-user-select: $value; /* IE 10+ */
|
||||||
|
|
||||||
|
/* No support for these yet, use at own risk */
|
||||||
|
-o-user-select: $value;
|
||||||
|
user-select: $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin overflow-scroll () {
|
||||||
|
overflow: scroll;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
@ -220,6 +220,8 @@ $cardViewBasePadding: 10px;
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
.cardLabel {
|
.cardLabel {
|
||||||
|
@include user-select(text);
|
||||||
|
|
||||||
font-size: 24pt;
|
font-size: 24pt;
|
||||||
padding: $cardViewBasePadding;
|
padding: $cardViewBasePadding;
|
||||||
}
|
}
|
||||||
@ -258,6 +260,7 @@ $cardViewBasePadding: 10px;
|
|||||||
|
|
||||||
.fieldValue {
|
.fieldValue {
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
|
@include user-select(text);
|
||||||
|
|
||||||
&.hidden {
|
&.hidden {
|
||||||
font-family: clipperz-password;
|
font-family: clipperz-password;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#loginPage {
|
#loginPage {
|
||||||
overflow: scroll;
|
@include overflow-scroll;
|
||||||
|
|
||||||
div.loginForm {
|
div.loginForm {
|
||||||
@include flexbox;
|
@include flexbox;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
background-color: $main-alternate-color;
|
background-color: $main-alternate-color;
|
||||||
color: $main-alternate-text-color;
|
color: $main-alternate-text-color;
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
overflow: scroll;
|
@include overflow-scroll;
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
|
|
||||||
$iconColumnWidth: 40px;
|
$iconColumnWidth: 40px;
|
||||||
@ -90,3 +90,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$selectionColor: yellow;
|
||||||
|
|
||||||
|
#selections.ALL {
|
||||||
|
li.allCards {
|
||||||
|
color: $selectionColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#selections.RECENT {
|
||||||
|
li.recentCards {
|
||||||
|
color: $selectionColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#selections.UNTAGGED {
|
||||||
|
li.untaggedCards {
|
||||||
|
color: $selectionColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#selections.SEARCH {
|
||||||
|
div.search {
|
||||||
|
color: $selectionColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#selections.TAG {
|
||||||
|
ul.tagList {
|
||||||
|
li.selected {
|
||||||
|
color: $selectionColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user