[ZBXNEXT-2602] Replace "input" buttons with the "button" tag Created: 2014 Oct 14  Updated: 2015 Apr 21  Resolved: 2015 Apr 21

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 2.5.0
Fix Version/s: 2.5.0

Type: Change Request Priority: Blocker
Reporter: Pavels Jelisejevs (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: forms, frontend, refactoring
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File IE10.png     PNG File IE8_before_after.png     PNG File checkbox_design.png     PNG File opera_12_disabled_field.png     PNG File opera_12_real_radio_buttons.png     PNG File transparent_checkboxes.png    

 Description   

Currently all of the buttons are implemented as "input" tags which makes them submit their label as the value. They will be remade into buttons to allow to set a custom value.



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ]

Some minor cosmetic changes have been made in this issue:

  1. The distance between the two arrow buttons in the host group selection tween box is now the same as in other tween boxes;
  2. The "Search" button now has a hover effect the same way as other buttons;
  3. Multiselect will now have the same buttons as other fields with pop ups (everywhere except for the map element configuration form);
  4. In the dark blue theme form buttons gained a hover effect, the same way as in filters;
  5. In the orange theme, input field and button hover color has been changed to orange, button text now changes color as well;
  6. Dialog buttons are now the same size as other jquery buttons;
  7. The jquery buttons now have the same size across all browsers;
  8. Hover effect of the jquery buttons in filters has been changed to match the hover effect of buttons in forms.
  9. Radio and checkbox inputs became slightly bigger.
Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 04 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-8896.

I've tried to add some structure to the CSS used for styling buttons. There are currently 4 main classes used for styling buttons:

  • button-plain - our default old buttons;
  • button-form - the buttons used in forms and filters;
  • link_menu - the buttons that look like links;
  • jqueryinput - jquery buttons (this class is used only for initializing the plugin, the styling itself is done using ui-input).

Two new classes have been provided for working with the new buttons: CSubmitButton and CRedirectButton. They are meant for future use and currently aren't used anywhere.

Additionally, I've made some improvements to the existing PHP html classes.

jelisejev I've added an additional class for creating buttons: CSimpleButton. It's meant to replace CButton, since CButton automatically generates an ID from the name. This is undesired since we can have multiple buttons with the same name on one page.

jelisejev I've also added a common interface for the CButton and CSimpleButton classes.

Comment by Alexei Vladishev [ 2014 Nov 06 ]

(1) Buttons are much smaller now. Also for some reason it affected size of the bar below menu (for example, "CONFIGURATION OF PROXIES") as well.

jelisejev Which buttons became smaller and what browser are you using?

alexei I'm on Firefox 31, Ubuntu. It seems to be Firefox specific issue, other browsers rendered it smaller before your changes. Now the buttons are small everywhere. CLOSED.

iivs As discussed with alexei, let's make those buttons bigger like they were in Firefox.
REOPENED.

jelisejev RESOLVED in r50693.

iivs Can we make them 2px vertically larger? It almost looks like text is not aligned to middle.

jelisejev I don't think we should make them even bigger then they were. Besides, the text alignment was always a bit off on windows, that's a separate issue.

iivs Well, OK.
CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 06 ]

(2) The mass action "Go" button counter is broken.

jelisejev RESOLVED in r50546.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 06 ]

(3) Configuration > IT Services > edit parent service that has at least one child

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Each element of $otherButtons must be an instance of CButtonInterface' in C:\Development\ZBX-8896-test\frontends\php\include\html.inc.php on line 515

jelisejev RESOLVED in r50547.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(4) Radio buttons are now 2px higher. That also means they are 2px higher than input fields near them. See host interfaces form, for example.

jelisejev RESOLVED in r50550, 50554 and 50555.

iivs In classic theme the disabled buttons, for example templated host prototype form [IP][DNS] buttons, have changed color from #555 to #777 and it's now harder to see the selected button. It's due to .radioset class in classic/main.css: 185

administration.authentication.edit.php: 50 exeeds maximum line length

REOPENED.

jelisejev RESOLVED in r50751.

iivs Now those buttons look very wide. Probably due to changes in (1).

REOPENED.

jelisejev RESOLVED in r50767.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(5) Most filter forms have orange border around "Filter" button, however Latest data page has not.

jelisejev The problem went away after I've updated to the latest trunk in 50548.

iivs But another problem appeared

Fatal error: Call to undefined method CSubmit::useJQueryStyle() in C:\Development\ZBX-8896-test\frontends\php\include\views\administration.general.macros.edit.php on line 35

There are now two different types of setting the button class implementations. latest.php:415 has setButtonClass(), but other files have the button class set via constructor. Also while you're at it check that filter buttons have shadow class. Most of them don't have it.

REOPENED.

jelisejev The fatal error problem was resolved in r50752. The shadow problem was resolved in (23). Usages of setButtonClass() were removed earlier.

iivs Yes, correct. Thanks!
CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(6) Text in search button is now aligned to bottom. Previously it was aligned to middle (on Chrome, Opera 25). Also it's strange that when page takes longer time to load (Monitoring > Events, for example), search button doesn't have a style. After page data is loaded, style is applied.

jelisejev Fixed text alignment in r50764. The button is initially displayed as a plain button, because the jquery style is now applied after the document is loaded, just as with other jquery buttons. RESOLVED.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(7) Monitoring > Events > Filter "Select" button looks misplaced by 1px and text is aligned to bottom. Seen on Firefox. On Chrome it looks OK.

iivs I fixed several coding style issues in css, PHP line overflows and that button being misplaced by 1px in r50766
Button fix is at default.css 473-474
Please, review.

jelisejev Looks good, thanks. CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(8) /popup_bitem.php (Bar reports item popup) "Select" button doesn't have style. Also that button type should be "button", not "submit".

jelisejev RESOLVED in r50553. I've changed the style of the button to "button-plain" to avoid introducing a separate button style for this particular popup.

iivs Ok, but let's change button type to "button" as discussed.

REOPENED.

jelisejev RESOLVED in r50753.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(9) In Configuration > Graphs a templated graphs and graph prototypes now can add and remove disabled graph items.

jelisejev RESOLVED in r50557.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(10) User profile "Play" and "Stop" buttons are now enabled when "Frontend messaging" checkbox is not checked. Also there was a tiny sapace in between buttons, now button borders are touching.

jelisejev RESOLVED in r50561.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(11) Administration > General > Trigger severities, Trigger displaying options and Housekeeping > Reset defaults confirmation dialog, the close button ("X") has now orange border.

jelisejev RESOLVED in r50655.

iivs Let's change the selector to access class. Please, change

.ui-dialog-buttonset button:first

to

.ui-dialog-buttonset .ui-button:first

REOPENED.

jelisejev RESOLVED in r50754.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(12) When doing a click action on new button, text color turns to black

jelisejev RESOLVED in r50656.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(13) In User edit form "Add" button near "Groups" field is now at the bottom.

jelisejev RESOLVED in r50657.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(14) Administraion > Audit log filter labels "Action" and "Resource" are no longer aligned to selects. They are 1px off.

jelisejev Restored the same position in r50659. RESOLVED.

iivs Just noticed that something isn't right in Audit filter on IE8, but it got brokend many revisions ago, not in this one. Can you please check https://support.zabbix.com/secure/attachment/31716/IE8_before_after.png ?

jelisejev RESOLVED in r50757.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(15) Installation buttons have a black border hover effect

jelisejev RESOLVED in r50660.

iivs Not all buttons are fixed. Buttons "Retry" and "Download configuration file" are missing style.

REOPENED.

jelisejev RESOLVED in r50761.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(16) Reports > Bar reports > Compare values for multiple periods > Tweenbox buttons [«] [»] are broken. Also select button for item has no style.

jelisejev RESOLVED in r50661.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(17) In Configuration > Host prototype edit form > Groups tab > a templated host prototype now can add and remove disabled group prototypes

jelisejev RESOLVED in r50662.

iivs Selectors must have classes, not tags.

REOPENED.

jelisejev I've only changed button since this script also needs to disable hidden inputs, which don't have an "input" class. RESOLVED in r50762.

iivs OK.
CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 07 ]

(18) A disabled "Update" button (for example some child graph or administration authentication form when opened) now has a hower effect and mouse cursor is not pointer.

jelisejev RESOLVED in r50663.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 10 ]

(19) In map edit and in map layout in element the popup "Add", "Remove" links are span tags, not buttons.

jelisejev RESOLVED in r50665.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 11 ]

(20) In Administration > General > Icon mapping the "Remove" button has stopped working.

jelisejev RESOLVED in r50666.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 13 ]

(21) Opera 12.10 (Windows) checkboxes have changed the look. See https://support.zabbix.com/secure/attachment/31540/checkbox_design.png
Another strange thing on Opera 12.x browser is that disabled fields look like read-only fields. See https://support.zabbix.com/secure/attachment/31541/opera_12_disabled_field.png
While we change checkboxes, can we also change this? => https://support.zabbix.com/secure/attachment/31542/opera_12_real_radio_buttons.png Those are radio buttons in Opera 12.x, they look terrible.

jelisejev RESOLVED in r50687.

iivs Text still looks black like mentioned here https://support.zabbix.com/secure/attachment/31541/opera_12_disabled_field.png
Can you please check again?

Also, let's try to remove background-color and height for checkboxes and radios. Then they should looke like normal default ones in FF and Opera 25.

REOPENED.

jelisejev The checkbox and radio input problem is fixed in r50763. And I couldn't reproduce the problem with the input field color.

iivs I'm afraid that resetting radio and checkbox look for Opera to default view is not gonna be that easy as to overwrite the style. See https://support.zabbix.com/secure/attachment/31745/transparent_checkboxes.png now Opera displays them with transparent background. Can we do it with specific selectors like .input[type="text"] to leave out radios and checkboxes?

jelisejev I've decided to restore the original checkbox styles in r50770. Changebox styling seems to be a more complex issue than I thought, so if any changes are needed, they should be made in a separate ZBX.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 14 ]

(22) Some visual bugs and changes in IE10. See https://support.zabbix.com/secure/attachment/31562/IE10.png
Same in IE9, IE8

jelisejev Seems that all of these issues have already been fixed.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 19 ]

(23) Classic theme: read only fields have changed the background color from #F5F5F5 to #EEEEEE which is same as overall background. Please, change it back.

Black and blue theme:

  • filter button hover effect has no glow (shadow).
  • subform buttons like "Add", "Select" have no hover effect. Should a blue line like input fields.

Dark orange theme:

  • filter buttons have different hover effect than form buttons.
  • subform buttons like "Add", "Select" have only orange border hover effect, but name stays white.

jelisejev The style of the filter buttons in the dark orange theme was changed to match the style of the form buttons. That was intended. Everything else RESOLVED in 50689, 50690 and 50692.

iivs I fixed couple of line overflows and added missing shadow class for filter Reset buttons. Please review r50746

jelisejev Looks good, thanks! CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 24 ]

(24) Unit test didn't work.


PHP Fatal error: Interface 'CButtonInterface' not found in /home/hudson/ZBX-8896/frontends/php/include/classes/html/CButton.php on line 22
hudson@hudson:~/ZBX-8896/frontends/php/tests/unit${code}

jelisejev RESOLVED in r50771.

iivs Thanks!
CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 24 ]

(25) I fixed several coding style isues while doing a final review. Please review r50780

jelisejev Thanks, CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 24 ]

TESTED,
but don't forget to close (25).

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 24 ]

Available in 2.5.0 r50782.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 24 ]

Martins, please have a look if any of the visual changes are worth documenting.

martins-v Screenshots as a whole will be updated closer to the 3.0 release, to avoid duplicate work. Other than that, I don't see any user-side functional changes here.

jelisejev Agreed.

Comment by Alexander Vladishev [ 2015 Mar 24 ]

(26) Already used inventory fields are accessible in the item form. These fields should be disabled.

sasha RESOLVED in r52863. Also rewrote most calls of "new CComboBox()"

iivs I made some adjustments and found several more places where code could have been refactored. Please, see my changes in r53120

sasha Thanks. I fixed "Undefined index" in action form in r53269. CLOSED

Available in pre-2.5.0 r53271.

Comment by Ivo Kurzemnieks [ 2015 Apr 13 ]

TESTED, but don't forget to close (26)

Generated at Sat Apr 27 00:23:02 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.