[EXTENSION] spinner input field
#2
Posted 21 May 2009 - 07:44 AM
#3
Posted 21 May 2009 - 08:44 AM
Quote
I intend to add this feature.
I'm not that good with javascript but I'll think i can find a way
#4
Posted 21 May 2009 - 08:59 AM
onclick="func"
func ( var a = 1 )
changefield(var a)
var b = a +1
sleep(100)
func(var
Iam now quite sure if iam right, but this should be the general "way" hope it helps that you know how to start and what to search
#5
Posted 21 May 2009 - 09:08 AM
I would appreciate autorepeat with increasing speed every n'th tick until the mouseup event. I've done this in Javascript but need to improve the structure. In this case I guess a good solution would be to let the mousedown handler register element id, up/down direction and other params to the timer callback, make the first call to up/down, finally set off the timer. The mouseup handler will stop the timer. In the timer callback step will be incremented every n'th tick (to increase speed).
Unfortunately the demo doesn't work in IE6/IE7 for the text fields ('Object doesn't support this property or method'). Maybe the 'string' parameter in the call to up()? Numeric fields are OK.
I was unable debug this problem because I get a parse error (unexpected $end ... SSpinner.php ... on line 313) when including SSpinner in my page.
/Tommy
#6
Posted 21 May 2009 - 11:13 AM
When the mouse is pressed on the spinner the numbers increase/decrease faster
Fixed a bug with I.E. and string type spinners
#7
Posted 21 May 2009 - 11:15 AM
Quote
I would appreciate autorepeat with increasing speed every n'th tick until the mouseup event. I've done this in Javascript but need to improve the structure. In this case I guess a good solution would be to let the mousedown handler register element id, up/down direction and other params to the timer callback, make the first call to up/down, finally set off the timer. The mouseup handler will stop the timer. In the timer callback step will be incremented every n'th tick (to increase speed).
Unfortunately the demo doesn't work in IE6/IE7 for the text fields ('Object doesn't support this property or method'). Maybe the 'string' parameter in the call to up()? Numeric fields are OK.
I was unable debug this problem because I get a parse error (unexpected $end ... SSpinner.php ... on line 313) when including SSpinner in my page.
/Tommy
The problem in IE was an ID conflict of 2 elements. It's fixed now
Alaso as you can see there's a new version where when you keep the mouse button pressed the spinner increases/dicreases faster
#8
Posted 21 May 2009 - 11:27 AM
Probably I get the parse error because I didn't enable "short_open_tag" in php.ini
But, here is a quote from the PHP manual
Quote
#10
Posted 21 May 2009 - 12:11 PM
The stepping rate is too fast, I think. My thought was to have an incremental stepping rate, starting with some initial rate and increasing with time elapsed since mousedown.
#11
Posted 21 May 2009 - 12:32 PM
#12
Posted 22 May 2009 - 02:17 PM
You can set the delay of the spinner's value update so you can control the speed of the spinner when the mouse is kept pressed on a button (Spinner's delay parameter)
Also when button is kept pressed this speed increases (Spinner's acceleration parameter. Values can be "none", "slow" , "normal" and "fast")
#13
Posted 22 May 2009 - 02:53 PM
Quote
You can set the delay of the spinner's value update so you can control the speed of the spinner when the mouse is kept pressed on a button (Spinner's delay parameter)
Also when button is kept pressed this speed increases (Spinner's acceleration parameter. Values can be "none", "slow" , "normal" and "fast")
Great job!
#14
Posted 11 July 2009 - 12:10 PM
how can i use the spinner for time?
i need the time in half hour steps - it is possible?
#15
Posted 12 July 2009 - 05:21 AM
If you mean something like 00:00, 00:30,1:30,2:00 etc it can't be done but it's a good idea so i'll try to implement it right now and I'll let you know
#16
Posted 13 July 2009 - 04:42 AM
Quote
how can i use the spinner for time?
i need the time in half hour steps - it is possible?
I implemented the STimeSpinner.
I'll upload the update later , when I 'm finished with the documentation
#17
Posted 16 July 2009 - 01:18 AM
http://www.yiiframew...ension/spinner/
Details documentation can be found here:
http://spyros.agilit...site/spinnerDoc
#18
Posted 02 January 2010 - 05:56 AM
I get :
Parse error: parse error in C:\wamp\www\protected\extensions\spinner\SNumericSpinner.php on line 211
There is a PHP short tag there...
Something else :
How I can add some $htmlOptions and make the text input manually editable (with keyboard) in the case of Numeric Spinner ?
#19
Posted 03 January 2010 - 11:20 AM
Parse error: parse error in C:\wamp\www\ssis\protected\extensions\spinner\STimeSpinner.php on line 211
[solved by appending <? by <?php ]
Another problem:
In view I would like to use time spinner.
1. Time spinner does not give neither take proper value from model in view _form:
$this->widget('application.extensions.spinner.STimeSpinner',
array(
"name"=>"Time",
"model"=>$model, //added model and attribute, but still no effect :)
"attribute"=>"Lenght",
"data"=>array(
"min"=>"06:00",
"max"=>"23:00",
"step"=>15,
"value"=>"12:00"
),
"width"=>60,
"delay"=>100,
"acceleration"=>"slow"
)
);
?>
---
Thanks for help!
Nice extension thought!
#20
Posted 04 January 2010 - 01:17 AM
I'll take a look at these problems and I'll upload a new version soon
Thanks

Help
















