Commit Graph

23 Commits

Author SHA1 Message Date
Dominik Csapak
5003213241 open picker for all comboboxes on focus, even if they are editable
when a combobox was editable, a click inside did not open the picker,
but it would if the combobox was not editable.

Since this is
 1. Inconsistent
 2. Inconvenient (the user has to specifically press the arrow)

we already had this implemented for our ComboGrid, but not for
regular comboboxes

This patch moves the code for this to an override for ComboBox, which
our ComboGrid then inherits (so we do not need it there anymore)

while at it, do some non-significant code-cleanup
 * whitespace fixes
 * don't shadow 'me' in the focus callback
 * fix typo in comment

Originally this was implemented in pve-manager, commit
851c032d69ad5ae23725dd1add9e4084ebc12650

https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=851c032d69ad5ae23725dd1add9e4084ebc12650

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Originally-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-16 14:39:38 +02:00
Alexandre Derumier
8aefd47ceb add vlan interface support
vlan-raw-device && vlan-id field are only
enabled if interface name is different than interfaceX.Y

I have added a listener on iface,
to enable them live if user want a custom name for vlan interface

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-30 16:14:30 +01:00
Thomas Lamprecht
30076ed6cc fix Firefox spinner scroller
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-11 15:59:03 +01:00
Dominik Csapak
312310e0f2 override Ext.Components 'validIdRe' to include '@'
we use itemIds with '@' already in the ceph dashboard, and in
non-debug modeit works (as expected) but throws an error
while using ext-all-debug.js so override it to include the '@'

the regex was in place because in html4 the 'id' tag could only consist
letters ofthe mentioned regex, this was lifted in html5 though[0]

0: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-11 14:37:24 +02:00
Dominik Csapak
acfbf25527 backport fix for ExtJS pie chart tooltip for 0% entries
this fixes bug EXTJS_18900 where the tooltip of a piechart was always
shown for the first data entry with 0 percent of the pie chart

the relevant lines for the fix are
...
if (a === b) {
    return false;
}
...

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-31 10:58:11 +02:00
Mira Limbeck
577b6c7546 add ipv6 and ipv4 cidr match vtype
add additional vtype for combined ipv4 and ipv6 cidr validation.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-04-16 05:37:12 +00:00
Stoiko Ivanov
a2fb6c87cb change allowed v6 prefix-length to 128
Currently the frontend validation only allows values 8-120 as prefix-lengths for
ipv6-cidr notations.

Following commit 70ea22506939f9687e1146c0f35247cfbe9225b8 in pve-common, this
patch changes that value to 128, which, while seldomly seen in regular setups
is technically correct.

Problem was reported by a user in the forum - they needed to set a length of
125, because their provider supplies only smaller networks. [0]

[0] https://forum.proxmox.com/threads/lxc-ipv6-why-8-120.52638/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-03-21 18:35:37 +01:00
Thomas Lamprecht
ffe265051c MacPrefix: add note about unicast addr. to MacPrefixText
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-14 10:12:49 +01:00
Stoiko Ivanov
add18fadb5 MacPrefix: prevent multicast MacPrefixes
provide direct visual feedback for the related commit in pve-cluster.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-03-14 10:08:22 +01:00
Thomas Lamprecht
694a76f617 minimal coding style and grammar fixup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-14 07:41:18 +01:00
Dominik Csapak
ba916e58a9 add DnsOrIp vtype
this is useful for options that can be dns names or ips (e.g. ldap servers)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-14 07:38:21 +01:00
Dominik Csapak
aea77b2c69 (partially) fix #1223: add touchscreen override for extjs
the combination of firefox, touchscreen, mouse input and extjs
prevents normal click/touch input for buttons, lists, etc.

the workaround on firefox was to set
dom.w3c_touch_events.enabled
to 0 (in about:config)

or to upgrade to extjs >= 6.5.1 (of which there is no gpl release as of now)

so we introduce that workaround as it seems to not disrupt 'normal'
browsers and non-touchscreen devices

we then still have an issue with scrolling though, since extjs
now expects the user to drag the content instead of using the wheel

but it is still better than a completely non working interface

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-30 10:10:46 +02:00
Thomas Lamprecht
5106364829 toolkit: remove PVE specific VType
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-17 12:21:04 +01:00
Thomas Lamprecht
8f449655ad toolkit: add MacPrefix vtype
useful for our PVE dc/options panel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-17 12:20:50 +01:00
Thomas Lamprecht
1fb41f2e36 toolkit: fix #1516: mouse-scrolling of overflowhandlers in firefox
this is a workaround for scrolling in toolbars, etc. in firefox with
the mouse.
while the result is not very "pretty", it maintains the old behaviour
for all other browsers and makes it work in firefox

we may drop this when we update to a new extjs release

commit 484bf3f29e58d0f96c65e6dca6b5dd95eaea180c from pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 14:45:48 +01:00
Thomas Lamprecht
47d1c80c37 toolkit: fix #1510: don't scroll back to focus when view refreshes
adds a workaround, so that we restore the scroll position when we
restore the focus. Fixies an annoying issue where, if a user had an
ellemtn selected, scrolled down and then a store refresh re-rendered
the view it was scrolled back to the selected item and the user lost
his scrolling position.

Add also the 'jumpToFocus' flag to allow enabling the old behaviour

commit e6f2a94f4fff3c125e8406a21d8d6159aca1421e from pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 14:45:48 +01:00
Thomas Lamprecht
3c15824972 toolkit: fix #1307: don\'t use language dependent separator
by default, extjs submits the language dependent decimal separator,
e.g., ',' (comma) for german and '.' (dot) for english.

We always want the dot.

commit 5c660b6d1302a5fbb3dcf477cf8b5adc9f798530 from pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 14:45:48 +01:00
Thomas Lamprecht
9503d4570e toolkit: remove unneeded applyEmptyText
The parent method does this already in ExtJS 6

commit d19ffc1bb078e42a042c5c73797d713aa9cf9bcc from pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 14:45:48 +01:00
Dominik Csapak
a2d8b9a99a add textarea/enter workaround
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-17 09:08:28 +02:00
Dietmar Maurer
a55813d6d7 do not override getSubmitValue, add note about strange semantics 2017-03-30 06:30:14 +02:00
Dietmar Maurer
36704a2fcc add VType for password confirmation 2017-03-29 18:02:23 +02:00
Dietmar Maurer
1d9804a953 add missing setSubmitValue() for text fields 2017-03-29 17:46:57 +02:00
Dietmar Maurer
bb64de6e76 add Toolkit.js
Copied from pve-manager
2017-01-31 17:32:18 +01:00