Re: [web2py] Re: This javascript worked in older version of web2py - not in trunk version.

2013-07-25 Thread Johann Spies
Thanks Richard and Paolo.

Regards
Johann


> ---
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] optimizing for mobile devices

2013-07-25 Thread BlueShadow
Hi,
since my Mobile menu links to non existing stuff "%20CA% or something like 
that I want to use the normal menu which I find way nicer.
I guess I need to change this line:
{{=MENU(response.menu, _class='mobile-menu' if is_mobile else 
'sf-menu',mobile=is_mobile)}}

the second thing I would love to do is use smaler images for mobile 
devices. Can I do this just by:
is_mobile=request.user_agent().is_mobile
if s_mobile:
...small img...
else:
...large img...

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] How can I check if a IS_IN_SET validator is set for a field and get the validtor values?

2013-07-25 Thread Sarbjit singh
I have a db where I have set validator IS_IN_SET on a particular field. I 
am generating table rows (to be used as form), so I need to check if a 
particular field is having IS_IN_SET validator set and I want to retrieve 
the set values. Reason I want to do this is that I am generating a dynamic 
form based on the table fields and for the fields having IS_IN_SET 
validtor, I want to show the "Drop Down" menu rather than Text Field and 
wants to populate it with the Validator values.

db.define_table('persons',Field('gender')
db.persons.gender.requires = IS_IN_SET(['Male', 'Female'])

-Sarbjit

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: Appending for validation using jQuery.

2013-07-25 Thread Prasad Muley
Now it's Working.
Thank you for quick response.


On Thu, Jul 25, 2013 at 7:26 PM, Paolo Caruccio
wrote:

> Please try;
>
> jQuery("Please Enter Name").appendTo(jQuery
> ("#taxpayer_name").parent());
>
> or
>
> jQuery("Please Enter Name").insertAfter(
> "#taxpayer_name");
>
> Your code fails because the div.error is created inside the input element
>
> Il giorno giovedì 25 luglio 2013 13:39:34 UTC+2, Prasad Muley ha scritto:
>>
>> has anybody got my question?
>>
>>
>> On Thu, Jul 25, 2013 at 2:30 PM, Prasad Muley  wrote:
>>
>>> Hello Joe,
>>>   I made a mistake while pasting. // working isn't there in
>>> updated code.
>>> actual code is
>>> {{extend 'layout.html'}}
>>> {{=form}}
>>> 
>>> jQuery(document).ready( function(){
>>> var flag=0
>>> jQuery('.web2py_form').submit(**function(){
>>> //Getting value from tracker status
>>> var get_data=jQuery(this).html();
>>> var get_name=jQuery('#taxpayer_**name').val()
>>> if(get_name =="") {
>>>   if(flag==0) {
>>>   //Following are working
>>> //alert("Please Enter valid Name");
>>> // jQuery("
Please Enter Valid >>> Name
").appendTo("#**taxpayer_name__label") >>> //jQuery("
Please Enter Valid >>> Name
").appendTo(".w2p_**fw") >>> jQuery("
Please Enter >>> Name