Skip to content

Commit 68b61b0

Browse files
committed
Merge pull request #175 from devgeeks/issue-137-174-char-encoding
Avoid char encoding issues and XAS
2 parents 8d83f9a + a60a2f8 commit 68b61b0

6 files changed

+11
-10
lines changed

src/views/EntryView.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@
6868
copyable_longTapHandler: function(event) {
6969
event.preventDefault();
7070
event.stopPropagation();
71-
var text = $(event.target).text();
72-
window.app.copyToClipboard(text);
71+
var type = $(event.target).attr('data-type');
72+
var key = _.findWhere(this.model.get("items"), { key: type });
73+
window.app.copyToClipboard(key.value);
7374
window.app.toastView.show("Copied to clipboard");
7475
},
7576
copyable_doubleTapHandler: function(event) {

src/views/MainView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
this.trigger("deleteentry");
8787
},
8888
setTitle: function(title) {
89-
this.$(".nav .title").html(title);
89+
this.$(".nav .title").text(title);
9090
},
9191
backButtonDisplay: function(show) {
9292
if (show) {

tpl/editListItemView.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{? it.type === 'textarea' }}
22
<textarea name="{{= it.id }}" rows="3" placeholder="{{= it.placeholder }}">{{= it.value }}</textarea>
33
{{?? }}
4-
<input type="{{= it.type || 'text' }}" autocorrect="off" autocapitalize="off" name="{{= it.id }}" placeholder="{{= it.placeholder }}" value="{{= it.value }}" />
4+
<input type="{{= it.type || 'text' }}" autocorrect="off" autocapitalize="off" name="{{= it.id }}" placeholder="{{= it.placeholder }}" value="{{! it.value }}" />
55
{{? }}

tpl/editView.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<form>
22
<ul class="flat">
33
<li class="sep">Label *</li>
4-
<li class="input"><input type="text" name="label" placeholder="A label to display" value="{{= it.label || '' }}" /></li>
4+
<li class="input"><input type="text" name="label" placeholder="A label to display" value="{{! it.label || '' }}" /></li>
55
</ul>
66
<ul class="editable flat"></ul>
77
<div><p><small>* All fields are optional except "label"</small></p></div>

tpl/entriesListItemView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<a>
2-
<div>{{= it.label }}</div>
2+
<div>{{! it.label }}</div>
33
<div><span class='small'>{{= it.type }}</span></div>
4-
</a>
4+
</a>

tpl/entryView.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<ul>
2-
<li><strong>{{= it.label }}</strong></li>
2+
<li><strong>{{! it.label }}</strong></li>
33
<!-- <li class="sep">Type</li>
44
<li><em>{{= it.type }}</em></li> -->
55
{{ _.each(it.items, function(item) { }}
66
{{? item.value }}<li class="sep">{{= item.key}}</li>
77
<li>{{= item.type === 'textarea' ? '<pre>' : ''}}
8-
<a class="copyable {{= item.type || item.key.toLowerCase() }}">
9-
{{= item.value }}
8+
<a data-type="{{= item.key }}" class="copyable {{= item.type || item.key.toLowerCase() }}">
9+
{{! item.value }}
1010
</a>
1111
{{= item.key === 'Password' ? '<a href="#" class="eye fa fa-eye"></a>' : '' }}
1212
{{= item.type === 'textarea' ? '</pre>' : ''}}</li>{{? }}

0 commit comments

Comments
 (0)