fix delete check, allow AZ ids if not 0xDb
This commit is contained in:
parent
c089551e08
commit
6eb50153eb
1 changed files with 6 additions and 2 deletions
|
@ -27,7 +27,7 @@ pandora.ui.filesView = function(options, self) {
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$deleteButton = Ox.Button({
|
self.$deleteButton = Ox.Button({
|
||||||
disabled: !pandora.site.capabilities.canRemoveItems[pandora.user.ui.level],
|
disabled: !pandora.site.capabilities.canRemoveItems[pandora.user.level],
|
||||||
title: 'Delete ' + pandora.site.itemName.singular + '...',
|
title: 'Delete ' + pandora.site.itemName.singular + '...',
|
||||||
width: 128
|
width: 128
|
||||||
})
|
})
|
||||||
|
@ -323,7 +323,11 @@ pandora.ui.filesView = function(options, self) {
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
var conditions, matches;
|
var conditions, matches;
|
||||||
if (key == 'id' && data.value.substr(0, 2) != '0x') {
|
if (key == 'id' && data.value.substr(0, 2) != '0x') {
|
||||||
matches = data.value.match(/\d{7}/);
|
if (pandora.site.site.id == 'oxdb') {
|
||||||
|
matches = data.value.match(/\d{7}/);
|
||||||
|
} else {
|
||||||
|
matches = data.value.match(/[A-Z]+/);
|
||||||
|
}
|
||||||
data.value = matches ? matches[0] : '';
|
data.value = matches ? matches[0] : '';
|
||||||
self.$idInput.value(data.value);
|
self.$idInput.value(data.value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue