1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-10-29 18:37:35 +01:00

Fixed tag editor layout. Behaviour still incomplete, though.

This commit is contained in:
Giulio Cesare Solaroli
2015-02-13 16:44:18 +01:00
parent 182e9eb00f
commit 6141a7fce3
8 changed files with 138 additions and 49 deletions

View File

@@ -115,12 +115,12 @@ Clipperz.PM.UI.Components.Cards.TagEditor = React.createClass({
renderTag: function (aTag) {
return React.DOM.li({'className':'tag'}, [
React.DOM.span({'className':'tagLabel'}, aTag),
this.isReadOnly() ? null : React.DOM.span({'className':'tagRemoveButton', 'onClick':this.removeTagHandler, 'data-label':aTag}, 'delete')
this.isReadOnly() ? null : React.DOM.span({'className':'tagRemoveButton', 'onClick':this.removeTagHandler, 'data-label':aTag}, 'remove tag')
])
},
renderEditField: function () {
return React.DOM.input({'type':'text', 'onKeyDown': this.handleKeyDown});
return React.DOM.input({'type':'text', 'onKeyDown':this.handleKeyDown, 'placeholder': "tag"});
},
render: function () {
@@ -133,8 +133,8 @@ Clipperz.PM.UI.Components.Cards.TagEditor = React.createClass({
return React.DOM.div({'className':React.addons.classSet(classes)}, [
React.DOM.ul({},[
MochiKit.Base.map(this.renderTag, this.props['selectedTags']),
this.isReadOnly() ? null : this.renderEditField()
])
]),
this.isReadOnly() ? null : this.renderEditField()
]);
},