From 6eb50153eb38660a5dce69496c52156e6c3f139f Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 25 Feb 2013 11:14:39 +0000 Subject: [PATCH] fix delete check, allow AZ ids if not 0xDb --- static/js/pandora/filesView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/filesView.js b/static/js/pandora/filesView.js index 5495e7d3..bab820cd 100644 --- a/static/js/pandora/filesView.js +++ b/static/js/pandora/filesView.js @@ -27,7 +27,7 @@ pandora.ui.filesView = function(options, self) { }); 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 + '...', width: 128 }) @@ -323,7 +323,11 @@ pandora.ui.filesView = function(options, self) { change: function(data) { var conditions, matches; 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] : ''; self.$idInput.value(data.value); }