Re: [web2py] Re: Jquery mobile module not working

2013-05-01 Thread Martin Weissenboeck
May I ask: is it very difficult to build a new jquery mobile plugin? Other
problems are solved during a few hours, but there are questions about
jquery mobile since a lot of months. I think many people would like to use
it (me too), but it does not work.

E.g. I have copies some files (all?) from the admin app, but I did get a
working nested directory.

Regards Martin



2013/4/30 Massimo Di Pierro massimo.dipie...@gmail.com

 Use the plugin wiki with comes with web2py (it is in the admin app).


 On Tuesday, 30 April 2013 05:38:55 UTC-5, Matt Johnson wrote:

 If you got the download from http://web2py.com/plugins/**
 plugin_jqmobile/about http://web2py.com/plugins/plugin_jqmobile/aboutI 
 found that when I did it was just not working, also resulting in a blank
 page.

 My solution was to revert back to the original files downloaded with
 web2py (as they were included anyway)

 -Matt

 On Tuesday, 2 April 2013 21:07:35 UTC+1, Torvald Baade Bringsvor wrote:

 Hi

 I'm trying out the jquery mobile plugin for web2py (2.4.5) and I'm
 having no success. When I load the page (both on mobile device and desktop)
 I get a blank page.

 When I look at the JavaScript console I get this error:

 Uncaught Error: Syntax error, unrecognized expression:
 [data-role='none'], [data-role='nojs'], [object Object]

 I'm not a JavaScript expert (or Jquery for that matter) so I'm a bit
 stuck here. The other views (regular desktop version) of the application
 are working as intended.

 I had to change the reference to modernizr in the Jquery mobile plugin
 layout.html file to point to modernizr.custom.js in stead of the default
 version 1.6 (which isn't included).

 I see that my menu is rendered in the html:



 div data-role=page div data-role=header data-fullscreen=true
 data-position=fixed
 [...]

   /div
   div data-role=content


 ul data-role=listview data-inset=true
   li data-role='list-divider'Main Menu/li

   lia href=/appname/default/index.**mobile.htmlHjem/a/li
 [...]

 I see one strange thing, the page doesn't seem to have a body
 starttag, just the end tag. Instead it has this:



 !-- paulirish.com/2008/**conditional-stylesheets-vs-**
 css-hacks-answer-neither/http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/--
 !--[if lt IE 7 ] body class=ie6 ![endif]--
 !--[if IE 7 ] body class=ie7 ![endif]--
 !--[if IE 8 ] body class=ie8 ![endif]--
 !--[if IE 9 ] body class=ie9 ![endif]--
 !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--

 Is that a problem too?

 -Torvald



  --

 ---
 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.




-- 

--- 
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] Re: Jquery mobile module not working

2013-05-01 Thread toni campins
Replace plugin_jqmobile/layout.html for this :

!DOCTYPE html
html lang={{=T.accepted_language or 'en'}} class=no-js!-- no-js need 
it for modernzr --
  head
meta charset=utf-8 /
!-- www.phpied.com/conditional-comments-block-downloads/ --
!--[if IE]![endif]--
!-- Always force latest IE rendering engine 
 (even in intranet)  Chrome Frame 
 Remove this if you use the .htaccess --
meta http-equiv=X-UA-Compatible content=IE=edge,chrome=1

title{{=response.title or request.application}}/title

!-- http://dev.w3.org/html5/markup/meta.name.html --
meta name=application-name content={{=request.application}} / 

!-- Speaking of Google, don't forget to set your site up: 
 http://google.com/webmasters --
meta name=google-site-verification content= /

!--  Mobile Viewport Fix
  j.mp/mobileviewport  davidbcalhoun.com/2010/viewport-metatag 
  device-width: Occupy full width of the screen in its current 
orientation
  initial-scale = 1.0 retains dimensions instead of zooming out if page 
height  device height
  maximum-scale = 1.0 retains dimensions instead of zooming in if page 
width  device width
  --
meta name=viewport content=width=device-width; initial-scale=1.0; 
maximum-scale=1.0;

!-- Place favicon.ico and apple-touch-icon.png in the root of your 
domain and delete these references --
meta name=apple-mobile-web-app-capable content=yes
meta name=apple-mobile-web-app-status-bar-style content=black
link rel=shortcut icon href={{=URL('static','images/favicon.ico')}} 
type=image/x-icon
link rel=apple-touch-icon 
href={{=URL('static','images/favicon2.png')}}
 !--  link rel=apple-touch-icon href=touch-icon-iphone.png / --
!--  link rel=apple-touch-icon sizes=72x72 href=touch-icon-ipad.png 
/ --
!--  link rel=apple-touch-icon sizes=114x114 
href=touch-icon-iphone-retina.png / --
!--  link rel=apple-touch-icon sizes=144x144 
href=touch-icon-ipad-retina.png / --
!--  link rel=apple-touch-startup-image href=/startup.png --


!-- For the less-enabled mobile browsers like Opera Mini --
link rel=stylesheet media=handheld 
href={{=URL('static','plugin_jqmobile/css/handheld.css')}}

!-- All JavaScript at the bottom, except for Modernizr which enables 
HTML5 elements  feature detects --
script src={{=URL('static','js/modernizr-1.6.min.js')}}/script

 script src=http://code.jquery.com/jquery-1.9.1.min.js;/script

{{include 'web2py_ajax.html'}}

script type=text/javascript
//run this script after jQuery loads, but before jQuery Mobile loads

//customize jQuery Mobile to let IE7+ in (Mobile IE)   

$(document).bind(mobileinit, function(){
  $.extend(  $.mobile , {
 
  //extend gradeA qualifier to include IE7+
gradeA: function(){
 //IE version check by James Padolsey, modified by jdalton - from 
http://gist.github.com/527683
 var ie = (function() {
 var v = 3, div = document.createElement('div'), a = 
div.all || [];
 while (div.innerHTML = '!--[if gt IE 
'+(++v)+']br![endif]--', a[0]); 
 return v  4 ? v : !v;
 }());
 
 //must either support media queries or be IE7+
 return $.support.mediaquery || (ie  ie = 7);
}
  });
});
/script

link rel=stylesheet 
href=http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css; /
script 
src=http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js;/script
 
style
  .error { color: red; }
/style
  /head
  
  !-- 
paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -- 
 
  !--[if lt IE 7 ] body class=ie6 ![endif]--
  !--[if IE 7 ]body class=ie7 ![endif]--
  !--[if IE 8 ]body class=ie8 ![endif]--
  !--[if IE 9 ]body class=ie9 ![endif]--
  !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--

div data-role=page
  div data-role=header 
h1{{=response.title}}/h1
{{block header}}
{{if not auth.user:}}
a href={{=URL('default','user',args='login')}} data-icon=login 
class=ui-btn-leftLogin/a
{{else:}}
a href={{=URL('default','user',args='logout')}} data-icon=logout 
class=ui-btn-leftLogout/a
{{pass}}
a rel=external href={{=URL('default','index')}} data-icon=home 
class=ui-btn-right{{=T(Home)}}/a
{{end}}
{{if response.menu:}}
div data-role=navbar
ul
  {{for _ in response.menu[1:]:}}
  lia href={{=_[2]}}{{=_[0]}}/a/li
  {{pass}}
/ul
/div
{{pass}} 
  /div
  div data-role=content
{{if response.flash:}}div class=ui-body 
ui-body-e{{=response.flash}}/div{{pass}} 
{{include}}
  /div
  div data-role=footer style=padding: 5px; text-align: center 
data-position=fixed
{{block footer}}
powered by Prosystem@2013
{{end}}
  /div
/div

  
!--[if lt IE 7 ]
script 
src={{=URL('static','plugin_jqmobile/js/dd_belatedpng.js')}}/script
script 

[web2py] Re: Jquery mobile module not working

2013-05-01 Thread Massimo Di Pierro
Can you send me a patch for admin?

On Wednesday, 1 May 2013 03:15:33 UTC-5, toni campins wrote:

 Replace plugin_jqmobile/layout.html for this :

 !DOCTYPE html
 html lang={{=T.accepted_language or 'en'}} class=no-js!-- no-js 
 need it for modernzr --
   head
 meta charset=utf-8 /
 !-- www.phpied.com/conditional-comments-block-downloads/ --
 !--[if IE]![endif]--
 !-- Always force latest IE rendering engine 
  (even in intranet)  Chrome Frame 
  Remove this if you use the .htaccess --
 meta http-equiv=X-UA-Compatible content=IE=edge,chrome=1
 
 title{{=response.title or request.application}}/title
 
 !-- http://dev.w3.org/html5/markup/meta.name.html --
 meta name=application-name content={{=request.application}} / 
 
 !-- Speaking of Google, don't forget to set your site up: 
  http://google.com/webmasters --
 meta name=google-site-verification content= /
 
 !--  Mobile Viewport Fix
   j.mp/mobileviewport  davidbcalhoun.com/2010/viewport-metatag 
   device-width: Occupy full width of the screen in its current 
 orientation
   initial-scale = 1.0 retains dimensions instead of zooming out if 
 page height  device height
   maximum-scale = 1.0 retains dimensions instead of zooming in if page 
 width  device width
   --
 meta name=viewport content=width=device-width; initial-scale=1.0; 
 maximum-scale=1.0;
 
 !-- Place favicon.ico and apple-touch-icon.png in the root of your 
 domain and delete these references --
 meta name=apple-mobile-web-app-capable content=yes
 meta name=apple-mobile-web-app-status-bar-style content=black
 link rel=shortcut icon href={{=URL('static','images/favicon.ico')}} 
 type=image/x-icon
 link rel=apple-touch-icon 
 href={{=URL('static','images/favicon2.png')}}
  !--  link rel=apple-touch-icon href=touch-icon-iphone.png / --
 !--  link rel=apple-touch-icon sizes=72x72 
 href=touch-icon-ipad.png / --
 !--  link rel=apple-touch-icon sizes=114x114 
 href=touch-icon-iphone-retina.png / --
 !--  link rel=apple-touch-icon sizes=144x144 
 href=touch-icon-ipad-retina.png / --
 !--  link rel=apple-touch-startup-image href=/startup.png --


 !-- For the less-enabled mobile browsers like Opera Mini --
 link rel=stylesheet media=handheld 
 href={{=URL('static','plugin_jqmobile/css/handheld.css')}}
 
 !-- All JavaScript at the bottom, except for Modernizr which enables 
 HTML5 elements  feature detects --
 script src={{=URL('static','js/modernizr-1.6.min.js')}}/script

  script src=http://code.jquery.com/jquery-1.9.1.min.js;/script
 
 {{include 'web2py_ajax.html'}}

 script type=text/javascript
 //run this script after jQuery loads, but before jQuery Mobile loads

 //customize jQuery Mobile to let IE7+ in (Mobile IE)   
 
 $(document).bind(mobileinit, function(){
   $.extend(  $.mobile , {
  
   //extend gradeA qualifier to include IE7+
 gradeA: function(){
  //IE version check by James Padolsey, modified by jdalton - from 
 http://gist.github.com/527683
  var ie = (function() {
  var v = 3, div = document.createElement('div'), a = 
 div.all || [];
  while (div.innerHTML = '!--[if gt IE 
 '+(++v)+']br![endif]--', a[0]); 
  return v  4 ? v : !v;
  }());
  
  //must either support media queries or be IE7+
  return $.support.mediaquery || (ie  ie = 7);
 }
   });
 });
 /script
 
 link rel=stylesheet href=
 http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css; /
 script src=
 http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js;/script
  
 style
   .error { color: red; }
 /style
   /head
   
   !-- 
 paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/--  
   !--[if lt IE 7 ] body class=ie6 ![endif]--
   !--[if IE 7 ]body class=ie7 ![endif]--
   !--[if IE 8 ]body class=ie8 ![endif]--
   !--[if IE 9 ]body class=ie9 ![endif]--
   !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--
 
 div data-role=page
   div data-role=header 
 h1{{=response.title}}/h1
 {{block header}}
 {{if not auth.user:}}
 a href={{=URL('default','user',args='login')}} data-icon=login 
 class=ui-btn-leftLogin/a
 {{else:}}
 a href={{=URL('default','user',args='logout')}} data-icon=logout 
 class=ui-btn-leftLogout/a
 {{pass}}
 a rel=external href={{=URL('default','index')}} data-icon=home 
 class=ui-btn-right{{=T(Home)}}/a
 {{end}}
 {{if response.menu:}}
 div data-role=navbar
 ul
   {{for _ in response.menu[1:]:}}
   lia href={{=_[2]}}{{=_[0]}}/a/li
   {{pass}}
 /ul
 /div
 {{pass}} 
   /div
   div data-role=content
 {{if response.flash:}}div class=ui-body 
 ui-body-e{{=response.flash}}/div{{pass}} 
 {{include}}
   /div
   div data-role=footer style=padding: 5px; 

[web2py] Re: Jquery mobile module not working

2013-04-30 Thread Matt Johnson
If you got the download from 
http://web2py.com/plugins/plugin_jqmobile/about I found that when I did it 
was just not working, also resulting in a blank page.

My solution was to revert back to the original files downloaded with web2py 
(as they were included anyway)

-Matt

On Tuesday, 2 April 2013 21:07:35 UTC+1, Torvald Baade Bringsvor wrote:

 Hi

 I'm trying out the jquery mobile plugin for web2py (2.4.5) and I'm having 
 no success. When I load the page (both on mobile device and desktop) I get 
 a blank page.

 When I look at the JavaScript console I get this error:

 Uncaught Error: Syntax error, unrecognized expression: [data-role='none'], 
 [data-role='nojs'], [object Object] 

 I'm not a JavaScript expert (or Jquery for that matter) so I'm a bit stuck 
 here. The other views (regular desktop version) of the application are 
 working as intended.

 I had to change the reference to modernizr in the Jquery mobile plugin 
 layout.html file to point to modernizr.custom.js in stead of the default 
 version 1.6 (which isn't included).

 I see that my menu is rendered in the html:



 div data-role=pagediv data-role=header data-fullscreen=true 
 data-position=fixed
 [...]

   /div
   div data-role=content

 
 ul data-role=listview data-inset=true
   li data-role='list-divider'Main Menu/li

   lia href=/appname/default/index.mobile.htmlHjem/a/li
 [...]

 I see one strange thing, the page doesn't seem to have a body starttag, 
 just the end tag. Instead it has this:



 !-- 
 paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/-- 
 !--[if lt IE 7 ] body class=ie6 ![endif]--
 !--[if IE 7 ] body class=ie7 ![endif]--
 !--[if IE 8 ] body class=ie8 ![endif]--
 !--[if IE 9 ] body class=ie9 ![endif]--
 !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--

 Is that a problem too?

 -Torvald





-- 

--- 
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] Re: Jquery mobile module not working

2013-04-30 Thread Massimo Di Pierro
Use the plugin wiki with comes with web2py (it is in the admin app).

On Tuesday, 30 April 2013 05:38:55 UTC-5, Matt Johnson wrote:

 If you got the download from 
 http://web2py.com/plugins/plugin_jqmobile/about I found that when I did 
 it was just not working, also resulting in a blank page.

 My solution was to revert back to the original files downloaded with 
 web2py (as they were included anyway)

 -Matt

 On Tuesday, 2 April 2013 21:07:35 UTC+1, Torvald Baade Bringsvor wrote:

 Hi

 I'm trying out the jquery mobile plugin for web2py (2.4.5) and I'm having 
 no success. When I load the page (both on mobile device and desktop) I get 
 a blank page.

 When I look at the JavaScript console I get this error:

 Uncaught Error: Syntax error, unrecognized expression: 
 [data-role='none'], [data-role='nojs'], [object Object] 

 I'm not a JavaScript expert (or Jquery for that matter) so I'm a bit 
 stuck here. The other views (regular desktop version) of the application 
 are working as intended.

 I had to change the reference to modernizr in the Jquery mobile plugin 
 layout.html file to point to modernizr.custom.js in stead of the default 
 version 1.6 (which isn't included).

 I see that my menu is rendered in the html:



 div data-role=pagediv data-role=header data-fullscreen=true 
 data-position=fixed
 [...]

   /div
   div data-role=content

 
 ul data-role=listview data-inset=true
   li data-role='list-divider'Main Menu/li

   lia href=/appname/default/index.mobile.htmlHjem/a/li
 [...]

 I see one strange thing, the page doesn't seem to have a body starttag, 
 just the end tag. Instead it has this:



 !-- 
 paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/-- 
 !--[if lt IE 7 ] body class=ie6 ![endif]--
 !--[if IE 7 ] body class=ie7 ![endif]--
 !--[if IE 8 ] body class=ie8 ![endif]--
 !--[if IE 9 ] body class=ie9 ![endif]--
 !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--

 Is that a problem too?

 -Torvald





-- 

--- 
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] Re: Jquery mobile module not working

2013-04-29 Thread Christian Espinoza
I have the same Problem..

El martes, 2 de abril de 2013 17:07:35 UTC-3, Torvald Baade Bringsvor 
escribió:

 Hi

 I'm trying out the jquery mobile plugin for web2py (2.4.5) and I'm having 
 no success. When I load the page (both on mobile device and desktop) I get 
 a blank page.

 When I look at the JavaScript console I get this error:

 Uncaught Error: Syntax error, unrecognized expression: [data-role='none'], 
 [data-role='nojs'], [object Object] 

 I'm not a JavaScript expert (or Jquery for that matter) so I'm a bit stuck 
 here. The other views (regular desktop version) of the application are 
 working as intended.

 I had to change the reference to modernizr in the Jquery mobile plugin 
 layout.html file to point to modernizr.custom.js in stead of the default 
 version 1.6 (which isn't included).

 I see that my menu is rendered in the html:



 div data-role=pagediv data-role=header data-fullscreen=true 
 data-position=fixed
 [...]

   /div
   div data-role=content

 
 ul data-role=listview data-inset=true
   li data-role='list-divider'Main Menu/li

   lia href=/appname/default/index.mobile.htmlHjem/a/li
 [...]

 I see one strange thing, the page doesn't seem to have a body starttag, 
 just the end tag. Instead it has this:



 !-- 
 paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/-- 
 !--[if lt IE 7 ] body class=ie6 ![endif]--
 !--[if IE 7 ] body class=ie7 ![endif]--
 !--[if IE 8 ] body class=ie8 ![endif]--
 !--[if IE 9 ] body class=ie9 ![endif]--
 !--[if (gt IE 9)|!(IE)]!-- body !--![endif]--

 Is that a problem too?

 -Torvald





-- 

--- 
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.