files view: allow for pasting anything that contains 7 consecutive digits into id field in 'move files' (fixes #941)
This commit is contained in:
parent
9a3a90e666
commit
eeed6f3216
1 changed files with 6 additions and 1 deletions
|
@ -311,7 +311,12 @@ pandora.ui.filesView = function(options, self) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var conditions;
|
var conditions, matches;
|
||||||
|
if (key == 'id' && data.value.substr(0, 2) != '0x') {
|
||||||
|
matches = data.value.match(/\d{7}/);
|
||||||
|
data.value = matches ? matches[0] : '';
|
||||||
|
self.$idInput.value(data.value);
|
||||||
|
}
|
||||||
if (data.value.length) {
|
if (data.value.length) {
|
||||||
conditions = {};
|
conditions = {};
|
||||||
['id', 'title', 'director', 'year'].map(function(key) {
|
['id', 'title', 'director', 'year'].map(function(key) {
|
||||||
|
|
Loading…
Reference in a new issue