View Single Post
  #5  
Old 02-12-2017, 11:48 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Scroll Wheel Numbers in 5.3

No, I meant a bit different thing.

PARAM_MOUSE_WHEEL_CTRL is a widget parameter that is set in defineWidgetParams() method.
So, you should either decorate this method and set the parameter to true there, or tweak the getDefaultMouseWheelCtrlValue() method that returns the default value for the parameter.

Also, when you change the behavior of an existing class ("decorate" it), you should not just create a new class extending the existing one, but also mark it with the "implements" directive like this (also see how the namespace matches the namespace of the existing class - it is not a requirement, but a good practice):
PHP Code:
namespace XLite\Module\KB\TDT\View\FormField\Input\Text\Base;

class 
Numeric extends \XLite\View\FormField\Input\Text\Base\Numeric implements \XLite\Base\IDecorator
{
    protected function 
getDefaultMouseWheelCtrlValue()
    {
        return 
true;
    }

__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions

Last edited by qualiteam : 02-12-2017 at 11:51 PM.
Reply With Quote