Skip to content

Commit

Permalink
Merge pull request #175 from devgeeks/issue-137-174-char-encoding
Browse files Browse the repository at this point in the history
Avoid char encoding issues and XAS
  • Loading branch information
kenmanheimer committed Aug 4, 2015
2 parents 8d83f9a + a60a2f8 commit 68b61b0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/views/EntryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
copyable_longTapHandler: function(event) {
event.preventDefault();
event.stopPropagation();
var text = $(event.target).text();
window.app.copyToClipboard(text);
var type = $(event.target).attr('data-type');
var key = _.findWhere(this.model.get("items"), { key: type });
window.app.copyToClipboard(key.value);
window.app.toastView.show("Copied to clipboard");
},
copyable_doubleTapHandler: function(event) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/MainView.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
this.trigger("deleteentry");
},
setTitle: function(title) {
this.$(".nav .title").html(title);
this.$(".nav .title").text(title);
},
backButtonDisplay: function(show) {
if (show) {
Expand Down
2 changes: 1 addition & 1 deletion tpl/editListItemView.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{? it.type === 'textarea' }}
<textarea name="{{= it.id }}" rows="3" placeholder="{{= it.placeholder }}">{{= it.value }}</textarea>
{{?? }}
<input type="{{= it.type || 'text' }}" autocorrect="off" autocapitalize="off" name="{{= it.id }}" placeholder="{{= it.placeholder }}" value="{{= it.value }}" />
<input type="{{= it.type || 'text' }}" autocorrect="off" autocapitalize="off" name="{{= it.id }}" placeholder="{{= it.placeholder }}" value="{{! it.value }}" />
{{? }}
2 changes: 1 addition & 1 deletion tpl/editView.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form>
<ul class="flat">
<li class="sep">Label *</li>
<li class="input"><input type="text" name="label" placeholder="A label to display" value="{{= it.label || '' }}" /></li>
<li class="input"><input type="text" name="label" placeholder="A label to display" value="{{! it.label || '' }}" /></li>
</ul>
<ul class="editable flat"></ul>
<div><p><small>* All fields are optional except "label"</small></p></div>
Expand Down
4 changes: 2 additions & 2 deletions tpl/entriesListItemView.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a>
<div>{{= it.label }}</div>
<div>{{! it.label }}</div>
<div><span class='small'>{{= it.type }}</span></div>
</a>
</a>
6 changes: 3 additions & 3 deletions tpl/entryView.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<ul>
<li><strong>{{= it.label }}</strong></li>
<li><strong>{{! it.label }}</strong></li>
<!-- <li class="sep">Type</li>
<li><em>{{= it.type }}</em></li> -->
{{ _.each(it.items, function(item) { }}
{{? item.value }}<li class="sep">{{= item.key}}</li>
<li>{{= item.type === 'textarea' ? '<pre>' : ''}}
<a class="copyable {{= item.type || item.key.toLowerCase() }}">
{{= item.value }}
<a data-type="{{= item.key }}" class="copyable {{= item.type || item.key.toLowerCase() }}">
{{! item.value }}
</a>
{{= item.key === 'Password' ? '<a href="#" class="eye fa fa-eye"></a>' : '' }}
{{= item.type === 'textarea' ? '</pre>' : ''}}</li>{{? }}
Expand Down

0 comments on commit 68b61b0

Please sign in to comment.