OOPs!
I make my widgets exactly this way (another class), but Pierre wants to
customize existing - let's give him a chance ;)
On Tuesday, March 15, 2016 at 11:52:22 PM UTC+3, Niphlod wrote:
>
> actually you picked up a good example on how to override properly
> web2py.js.... the new scaffolding app overwrites the default string widget
> with one that is more in line with bootstrap3 (see
> welcome/static/js/web2py-bootstrap3.js).
>
> anyhow, if you want no interactions whatsoever with web2py.js
> or web2py-bootstrap3.js , just use a different class name (i.e. not
> .w2p_list)
>
> On Tuesday, March 15, 2016 at 9:44:04 PM UTC+1, Val K wrote:
>>
>> See web2py.js
>> There is :
>> $(ul).find(":text").after('<a href="#">+</a> <a href="#">-</a>').
>> keypress(function(e) {
>> return(e.which == 13) ? pe(ul, e) : true;
>> }).next().click(function(e) {
>> pe(ul, e);
>> e.preventDefault();
>> }).next().click(function(e) {
>> rl(ul, e);
>> e.preventDefault();
>> });
>>
>>
>> you can overwrite it as you want
>>
>>
>>
>>
>> On Tuesday, March 15, 2016 at 10:11:10 PM UTC+3, Pierre wrote:
>>>
>>> ok..... l see the list:string class : class ListWidget(StringWidget)
>>> what i'd like to do is keep the default design and sqlform structure
>>> associated to list:string fields but to have my own javascript to manage a
>>> few things
>>>
>>> in particular the use of Jquery on() or Jquery delegate() to watch the +
>>> and - buttons clicks events generates conflicts
>>>
>>> how do I proceed ?
>>>
>>>
>>>
>>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.