diff --git a/VERSION b/VERSION index c3cbd4cc..37b52e94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.3 (2011-12-09 20:46:02) stable +Version 1.99.3 (2011-12-09 20:55:52) stable diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 2033d154..5e912165 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -1,9 +1,9 @@ # coding: utf8 -EXPERIMENTAL_STUFF = False +EXPERIMENTAL_STUFF = True if EXPERIMENTAL_STUFF: - is_mobile=request.user_agent().is_mobile + is_mobile = True #request.user_agent().is_mobile if is_mobile: response.view = response.view.replace( 'default/','default.mobile/') diff --git a/applications/admin/models/buttons.py b/applications/admin/models/buttons.py index 33a8811a..d33f2bff 100644 --- a/applications/admin/models/buttons.py +++ b/applications/admin/models/buttons.py @@ -2,8 +2,17 @@ import os +def A_button(*a,**b): + b['_data-role'] = 'button' + b['_data-inline'] = 'true' + return A(*a,**b) + def button(href, label): - return A(SPAN(label),_class='button',_href=href) + if request.user_agent().is_mobile: + ret = A_button(SPAN(label), _href=href) + else: + ret = A(SPAN(label),_class='button',_href=href) + return ret def button_enable(href, app): if os.path.exists(os.path.join(apath(app,r=request),'DISABLED')): @@ -14,7 +23,11 @@ def button_enable(href, app): return A(label,_class='button',_id=id,callback=href,target=id) def sp_button(href, label): - return A(SPAN(label),_class='button special',_href=href) + if request.user_agent().is_mobile: + ret = A_button(SPAN(label), _href=href) + else: + ret = A(SPAN(label),_class='button special',_href=href) + return ret def helpicon(): return IMG(_src=URL('static', 'images/help.png'), _alt='help') diff --git a/applications/admin/views/default.mobile/about.html b/applications/admin/views/default.mobile/about.html index 46499408..6772b80c 100644 --- a/applications/admin/views/default.mobile/about.html +++ b/applications/admin/views/default.mobile/about.html @@ -4,10 +4,10 @@
{{=button(URL('edit/%s/ABOUT' % (app)), T('Edit'))}}
-{{=button(URL('edit/%s/ABOUT' % (app)), T('Edit'))}}
+{{=button(URL('edit/%s/LICENSE' % (app)), T('Edit'))}}
-{{=button(URL('edit/%s/LICENSE' % (app)), T('Edit'))}}
+{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('Abort')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}{{=FORM(INPUT(_type='submit',_name='delete',_value=T('Delete')),INPUT(_type='hidden',_name='sender',_value=sender), _class="inline")}}
{{=FORM(INPUT(_type='submit',_name='nodelete',_value=T('NO')))}}
{{=FORM(INPUT(_type='submit',_name='delete',_value=T('YES')))}}
diff --git a/applications/admin/views/default.mobile/design.html b/applications/admin/views/default.mobile/design.html index dcd59f72..f33b588c 100644 --- a/applications/admin/views/default.mobile/design.html +++ b/applications/admin/views/default.mobile/design.html @@ -1,40 +1,88 @@ {{extend 'default.mobile/layout.html'}} +{{ +def A_info(*a,**b): + b['_data-role'] = 'button' + b['_data-icon'] = 'info' + b['_data-theme'] = 'b' + return A(*a,**b) + +def A_gear(*a,**b): + b['_data-role'] = 'button' + b['_data-icon'] = 'gear' + return A(*a,**b) + +def A_delete(*a,**b): + b['_data-role'] = 'button' + b['_data-icon'] = 'delete' + return A(*a,**b) + +def A_check(*a,**b): + b['_data-role'] = 'button' + b['_data-icon'] = 'check' + return A(*a,**b) + +def all(items): + return reduce(lambda a,b:a and b,items,True) +def peekfile(path,file): + return A_info(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file))) +def editfile(path,file): + return A_gear(SPAN(T('Edit')),_href=URL('edit', args=(app, path, file))) +def testfile(path,file): + return A_check(SPAN(T('Run tests')), _href=URL('test', args=(app, file))) +def editlanguagefile(path,file): + return A_gear(SPAN(T('Edit')),_href=URL('edit_language', args=(app, path, file))) +def file_upload_form(location): + form=FORM(T("upload file:")," ", + INPUT(_type="file",_name="file")," ",T("and rename it:")," ", + INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY), + INPUT(_type="hidden",_name="location",_value=location), + INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)), + INPUT(_type="submit",_value=T("upload")),_action=URL('upload_file')) + return form +def file_create_form(location): + form=FORM(T("create file with filename:")," ", + INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY), + INPUT(_type="hidden",_name="location",_value=location), + INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)), + INPUT(_type="submit",_value=T("Create")),_action=URL('create_file')) + return form +def upload_plugin_form(app): + form=FORM(T("upload plugin file:")," ", + INPUT(_type="file",_name="pluginfile"), + INPUT(_type="submit",_value=T("upload"))) + return form +def deletefile(arglist): + return A_delete(SPAN(T('Delete')), _href=URL('delete',args=arglist,vars=dict(sender=request.function+'/'+app))) +}} {{block sectionclass}}design {{=app}}{{end}} - +{{=T("There are no models")}}
{{else:}} -{{=T("There are no controllers")}}
{{else:}} -{{=T("There are no views")}}
{{pass}} -{{=T("There are no translators, only default language is supported")}}
{{pass}} -{{=T("There are no translators")}}
{{pass}} {{for file in languages:}} -{{=T("There are no static files")}}
{{pass}} -{{=T("There are no modules")}}
{{pass}} -{{=T('There are no plugins')}}
{{pass}} -{{=T('ATTENTION:')}} {{=T('This is an experimental feature and it needs more testing. If you decide to downgrade you do it at your own risk')}}
+
{{=T('ATTENTION:')}} {{=T('This is an experimental feature and it needs more testing. If you decide to downgrade you do it at your own risk')}}
{{=T('If start the downgrade, be patient, it may take a while to rollback')}}
+
{{=B(T('exposes:'))}}{{=XML(', '.join([A(f,_href=URL(a=app,c=controller,f=f)).xml() for f in functions]))}} @@ -35,7 +35,7 @@ jQuery(document).ready(function(){