From 055018f12e5d85c2fa77de0e2c598147ff01ade2 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 20 Nov 2014 16:31:25 +0000 Subject: [PATCH] update entities dialog --- static/js/entitiesDialog.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/static/js/entitiesDialog.js b/static/js/entitiesDialog.js index 1fdd7491b..0b218d491 100644 --- a/static/js/entitiesDialog.js +++ b/static/js/entitiesDialog.js @@ -32,6 +32,7 @@ pandora.ui.entitiesDialog = function(options) { $findInput = Ox.Input({ clear: true, placeholder: 'Find', + submitOnKeypress: true, width: 122 }) .css({ @@ -98,9 +99,15 @@ pandora.ui.entitiesDialog = function(options) { $listStatus.html(text[0].toUpperCase() + text.slice(1)); }, select: function(data) { + var text = Ox.formatCount( + data.ids, + Ox._('entity'), + OX._('entities') + ) + ' ' + Ox._('selected'); selected = data.ids; renderEntity(); renderForm(); + $itemStatus.html(text[0].toUpperCase() + text.slice(1)); } }), @@ -335,11 +342,11 @@ pandora.ui.entitiesDialog = function(options) { title: Ox._(key.title), width: 248 - Ox.SCROLLBAR_SIZE }) - .css({margin: '2px'}) + .css({margin: '2px 2px 4px 2px'}) .appendTo($form), $input; if (key.type == 'document') { - $input = Ox.Input({autovalidate: /[A-Z]/}); + $input = Ox.Input({autovalidate: /^[A-Z]+?$/}); } else if (key.type == 'float') { $input = Ox.Input({type: 'float'}); } else if (key.type == 'int') { @@ -355,11 +362,11 @@ pandora.ui.entitiesDialog = function(options) { }); } $input.options({ - disabled: key == 'id', - value: data[key], + disabled: key.id == 'id', + value: data[key.id], width: 248 - Ox.SCROLLBAR_SIZE }) - .css({margin: '2px'}) + .css({margin: '2px 2px 4px 2px'}) .bindEvent({ change: function(data) { pandora.api.editEntity(Ox.extend({