Fix #162
This commit is contained in:
parent
1cb46eef80
commit
7fa776a9c5
@ -5582,7 +5582,22 @@
|
|||||||
}
|
}
|
||||||
return post.setFile(file);
|
return post.setFile(file);
|
||||||
},
|
},
|
||||||
openFileInput: function() {
|
openFileInput: function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
if (e.shiftKey && e.type === 'click') {
|
||||||
|
return QR.selected.rmFile();
|
||||||
|
}
|
||||||
|
if (e.ctrlKey && e.type === 'click') {
|
||||||
|
$.addClass(QR.nodes.filename, 'edit');
|
||||||
|
QR.nodes.filename.focus();
|
||||||
|
return $.on(QR.nodes.filename, 'blur', function() {
|
||||||
|
return $.rmClass(QR.nodes.filename, 'edit');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (e.target.nodeName === 'INPUT' || (e.keyCode && ![32, 13].contains(e.keyCode)) || e.ctrlKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
return QR.nodes.fileInput.click();
|
return QR.nodes.fileInput.click();
|
||||||
},
|
},
|
||||||
posts: [],
|
posts: [],
|
||||||
|
|||||||
@ -5592,7 +5592,22 @@
|
|||||||
}
|
}
|
||||||
return post.setFile(file);
|
return post.setFile(file);
|
||||||
},
|
},
|
||||||
openFileInput: function() {
|
openFileInput: function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
if (e.shiftKey && e.type === 'click') {
|
||||||
|
return QR.selected.rmFile();
|
||||||
|
}
|
||||||
|
if (e.ctrlKey && e.type === 'click') {
|
||||||
|
$.addClass(QR.nodes.filename, 'edit');
|
||||||
|
QR.nodes.filename.focus();
|
||||||
|
return $.on(QR.nodes.filename, 'blur', function() {
|
||||||
|
return $.rmClass(QR.nodes.filename, 'edit');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (e.target.nodeName === 'INPUT' || (e.keyCode && ![32, 13].contains(e.keyCode)) || e.ctrlKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
return QR.nodes.fileInput.click();
|
return QR.nodes.fileInput.click();
|
||||||
},
|
},
|
||||||
posts: [],
|
posts: [],
|
||||||
|
|||||||
@ -495,7 +495,16 @@ QR =
|
|||||||
post = new QR.post()
|
post = new QR.post()
|
||||||
post.setFile file
|
post.setFile file
|
||||||
|
|
||||||
openFileInput: ->
|
openFileInput: (e) ->
|
||||||
|
e.stopPropagation()
|
||||||
|
if e.shiftKey and e.type is 'click'
|
||||||
|
return QR.selected.rmFile()
|
||||||
|
if e.ctrlKey and e.type is 'click'
|
||||||
|
$.addClass QR.nodes.filename, 'edit'
|
||||||
|
QR.nodes.filename.focus()
|
||||||
|
return $.on QR.nodes.filename, 'blur', -> $.rmClass QR.nodes.filename, 'edit'
|
||||||
|
return if e.target.nodeName is 'INPUT' or (e.keyCode and not [32, 13].contains e.keyCode) or e.ctrlKey
|
||||||
|
e.preventDefault()
|
||||||
QR.nodes.fileInput.click()
|
QR.nodes.fileInput.click()
|
||||||
|
|
||||||
posts: []
|
posts: []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user