Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f13aed1a84 | ||
|
|
cb3de825f2 | ||
|
|
fd4c775710 | ||
|
|
3e550b3e97 | ||
|
|
7a543250f9 | ||
|
|
a071f07634 | ||
|
|
a078f860d2 | ||
|
|
2bfd7a2467 | ||
|
|
55c9392de4 | ||
|
|
7991b555ff | ||
|
|
eab7815c24 | ||
|
|
79c09de103 | ||
|
|
24daa335b6 | ||
|
|
812ba9d52b | ||
|
|
00fb3b56cc | ||
|
|
3644d081f6 | ||
|
|
f05c46b3f1 | ||
|
|
13e76fe278 | ||
|
|
0906ae28c1 | ||
|
|
04905adb89 | ||
|
|
9767109d4e | ||
|
|
a57919bc4d | ||
|
|
c7c94d1f8f | ||
|
|
817e6c3313 | ||
|
|
a23f4c5c88 | ||
|
|
eac9768549 | ||
|
|
a42fb6b558 | ||
|
|
879e825b61 | ||
|
|
07f4310153 | ||
|
|
10c67e5be3 | ||
|
|
1279d5ddaa | ||
|
|
2af15e4b27 | ||
|
|
3096fcf045 | ||
|
|
831492448a | ||
|
|
a5284e846c | ||
|
|
22accaced3 | ||
|
|
f92d97f36e | ||
|
|
4f0a16a24c | ||
|
|
72dade793a | ||
|
|
8addc54015 | ||
|
|
25ab6f9a07 | ||
|
|
b853f72e0c | ||
|
|
449a658521 | ||
|
|
7776a22533 | ||
|
|
554eccc14a | ||
|
|
8cd6928da3 | ||
|
|
8c28be1041 | ||
|
|
810aa8f4f3 | ||
|
|
8e5be952bf | ||
|
|
5a560fee8a | ||
|
|
21819ffc5d | ||
|
|
1f8bdd6061 | ||
|
|
523c813439 | ||
|
|
7ee638bc36 | ||
|
|
76c515d3af | ||
|
|
1c8ce00657 | ||
|
|
0f4bbecd2a | ||
|
|
e292f5a869 | ||
|
|
da25c6f843 | ||
|
|
5122fbe110 | ||
|
|
dee3a3b655 | ||
|
|
4e2bcd22d9 | ||
|
|
17890027a6 | ||
|
|
5e93804525 | ||
|
|
778070dd8a | ||
|
|
74ecc762f3 | ||
|
|
63f7b35cf8 | ||
|
|
0c3f4601cc | ||
|
|
101b74398f |
@@ -1,4 +1,4 @@
|
|||||||
## 2.4.1- 2.4.2
|
## 2.4.1- 2.4.3
|
||||||
|
|
||||||
- 2D GEO API: geoPoint, getLine, geoPolygon
|
- 2D GEO API: geoPoint, getLine, geoPolygon
|
||||||
- support for 'json' field type in DAL
|
- support for 'json' field type in DAL
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Web2py is Licensed under the LGPL license version 3
|
Web2py is Licensed under the LGPL license version 3
|
||||||
(http://www.gnu.org/licenses/lgpl.html)
|
(http://www.gnu.org/licenses/lgpl.html)
|
||||||
|
|
||||||
Copyrighted (c) by Massimo Di Pierro (2007-2011)
|
Copyrighted (c) by Massimo Di Pierro (2007-2013)
|
||||||
|
|
||||||
### On Commercial Redistribution
|
### On Commercial Redistribution
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ update:
|
|||||||
echo "remember that pymysql was tweaked"
|
echo "remember that pymysql was tweaked"
|
||||||
src:
|
src:
|
||||||
### Use semantic versioning
|
### Use semantic versioning
|
||||||
echo 'Version 2.4.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
echo 'Version 2.4.3-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||||
### rm -f all junk files
|
### rm -f all junk files
|
||||||
make clean
|
make clean
|
||||||
### clean up baisc apps
|
### clean up baisc apps
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Version 2.4.2-stable+timestamp.2013.03.03.21.22.42
|
Version 2.4.3-stable+timestamp.2013.03.11.14.40.17
|
||||||
|
|||||||
@@ -319,6 +319,9 @@ def state():
|
|||||||
|
|
||||||
|
|
||||||
def ccache():
|
def ccache():
|
||||||
|
cache.ram.initialize()
|
||||||
|
cache.disk.initialize()
|
||||||
|
|
||||||
form = FORM(
|
form = FORM(
|
||||||
P(TAG.BUTTON(
|
P(TAG.BUTTON(
|
||||||
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
||||||
@@ -385,7 +388,7 @@ def ccache():
|
|||||||
|
|
||||||
return (hours, minutes, seconds)
|
return (hours, minutes, seconds)
|
||||||
|
|
||||||
for key, value in cache.ram.storage.items():
|
for key, value in cache.ram.storage.iteritems():
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
ram['hits'] = value['hit_total'] - value['misses']
|
ram['hits'] = value['hit_total'] - value['misses']
|
||||||
ram['misses'] = value['misses']
|
ram['misses'] = value['misses']
|
||||||
|
|||||||
@@ -148,9 +148,7 @@ def check_version():
|
|||||||
elif platform.system().lower() in ('windows', 'win32', 'win64') and os.path.exists("web2py.exe"):
|
elif platform.system().lower() in ('windows', 'win32', 'win64') and os.path.exists("web2py.exe"):
|
||||||
return SPAN('You should upgrade to version %s.%s.%s' % version_number[:3])
|
return SPAN('You should upgrade to version %s.%s.%s' % version_number[:3])
|
||||||
else:
|
else:
|
||||||
return sp_button(URL('upgrade_web2py'), T('upgrade now')) \
|
return sp_button(URL('upgrade_web2py'), T('upgrade now to %s') % version_number.split('-')[0])
|
||||||
+ XML(' <strong class="upgrade_version">%s.%s.%s</strong>'
|
|
||||||
% version_number[:3])
|
|
||||||
|
|
||||||
|
|
||||||
def logout():
|
def logout():
|
||||||
@@ -205,14 +203,12 @@ def site():
|
|||||||
|
|
||||||
is_appname = IS_VALID_APPNAME()
|
is_appname = IS_VALID_APPNAME()
|
||||||
form_create = SQLFORM.factory(Field('name', requires=is_appname),
|
form_create = SQLFORM.factory(Field('name', requires=is_appname),
|
||||||
table_name='appcreate',
|
table_name='appcreate')
|
||||||
_class='well well-small')
|
|
||||||
form_update = SQLFORM.factory(Field('name', requires=is_appname),
|
form_update = SQLFORM.factory(Field('name', requires=is_appname),
|
||||||
Field('file', 'upload', uploadfield=False),
|
Field('file', 'upload', uploadfield=False),
|
||||||
Field('url'),
|
Field('url'),
|
||||||
Field('overwrite', 'boolean'),
|
Field('overwrite', 'boolean'),
|
||||||
table_name='appupdate',
|
table_name='appupdate')
|
||||||
_class='well well-small')
|
|
||||||
form_create.process()
|
form_create.process()
|
||||||
form_update.process()
|
form_update.process()
|
||||||
|
|
||||||
@@ -1430,7 +1426,7 @@ def errors():
|
|||||||
hash2error[hash]['count'] += 1
|
hash2error[hash]['count'] += 1
|
||||||
except KeyError:
|
except KeyError:
|
||||||
error_lines = error['traceback'].split("\n")
|
error_lines = error['traceback'].split("\n")
|
||||||
last_line = error_lines[-2]
|
last_line = error_lines[-2] if len(error_lines)>1 else 'unknown'
|
||||||
error_causer = os.path.split(error['layer'])[1]
|
error_causer = os.path.split(error['layer'])[1]
|
||||||
hash2error[hash] = dict(count=1, pickel=error,
|
hash2error[hash] = dict(count=1, pickel=error,
|
||||||
causer=error_causer,
|
causer=error_causer,
|
||||||
@@ -1667,7 +1663,7 @@ def twitter():
|
|||||||
d = dict()
|
d = dict()
|
||||||
for e in data:
|
for e in data:
|
||||||
d[e["id"]] = e
|
d[e["id"]] = e
|
||||||
r = reversed(sorted(d))
|
r = reversed(sorted(d))
|
||||||
return dict(tweets=[d[k] for k in r])
|
return dict(tweets=[d[k] for k in r])
|
||||||
else:
|
else:
|
||||||
return 'disabled'
|
return 'disabled'
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ if request.vars.app or request.args:
|
|||||||
|
|
||||||
if os.path.exists('applications/examples'):
|
if os.path.exists('applications/examples'):
|
||||||
response.menu.append(
|
response.menu.append(
|
||||||
(T('Help'), False, URL('examples', 'default', 'index')))
|
(T('Help'), False, URL('examples', 'default', 'documentation')))
|
||||||
else:
|
else:
|
||||||
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
|
response.menu.append((T('Help'), False, 'http://web2py.com/examples/default/documentation'))
|
||||||
|
|
||||||
if not session.authorized:
|
if not session.authorized:
|
||||||
response.menu = [(T('Login'), True, URL('site'))]
|
response.menu = [(T('Login'), True, URL('site'))]
|
||||||
|
|||||||
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
@@ -7,7 +7,7 @@ def peekfile(path,file,vars={},title=None):
|
|||||||
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
return A(file.replace('\\\\','/'),_title=title,_href=URL('peek', args=args, vars=vars))
|
||||||
def editfile(path,file,vars={}):
|
def editfile(path,file,vars={}):
|
||||||
args=(path,file) if 'app' in vars else (app,path,file)
|
args=(path,file) if 'app' in vars else (app,path,file)
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=args, vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit', args=args, vars=vars))
|
||||||
def testfile(path,file):
|
def testfile(path,file):
|
||||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||||
SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))),
|
SPAN(T("Run tests in this file (to run all files, you may also use the button labelled 'test')"))),
|
||||||
@@ -17,9 +17,9 @@ def testfile(path,file):
|
|||||||
**{'_data-placement':'right',
|
**{'_data-placement':'right',
|
||||||
'_data-original-title':T("Run tests in this file (to run all files, you may also use the button labelled 'test')")})
|
'_data-original-title':T("Run tests in this file (to run all files, you may also use the button labelled 'test')")})
|
||||||
def editlanguagefile(path,file,vars={}):
|
def editlanguagefile(path,file,vars={}):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_language', args=(app, path, file), vars=vars))
|
||||||
def editpluralsfile(path,file,vars={}):
|
def editpluralsfile(path,file,vars={}):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit_plurals', args=(app, path, file), vars=vars))
|
||||||
def file_upload_form(location, anchor=None):
|
def file_upload_form(location, anchor=None):
|
||||||
form=FORM(
|
form=FORM(
|
||||||
LABEL(T("upload file:")),
|
LABEL(T("upload file:")),
|
||||||
@@ -125,9 +125,10 @@ def deletefile(arglist, vars={}):
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form1').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
<div id="form1" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/models/' % app, 'models')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -172,9 +173,10 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form2').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
<div id="form2" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/controllers/' % app, 'controllers')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -211,9 +213,10 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form3').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
<div id="form3" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/views/' % app, 'views')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -274,9 +277,10 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form4').slideToggle()" class="btn btn-mini">Create</button>
|
||||||
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
|
<div id="form4" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="span3">{{=file_create_form('%s/languages/' % app, 'languages', T('(something like "it-it")'))}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -328,10 +332,11 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form5').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/static/' % app, 'static')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form5" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
<div class="span3">{{=file_create_form('%s/static/' % app, 'static')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/static/' % app, 'static')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -363,10 +368,11 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
</ul>
|
</ul>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form5').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/modules/' % app, 'modules')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form5" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
<div class="span3">{{=file_create_form('%s/modules/' % app, 'modules')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/modules/' % app, 'modules')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -419,10 +425,11 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
{{pass}}
|
{{pass}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form6').slideToggle()" class="btn btn-mini">Create/Upload</button>
|
||||||
<div class="span3">{{=file_create_form('%s/private/' % app, 'private')}}<em>{{=T('or alternatively')}}</em></div>
|
<div id="form6" class="row-fluid" style="display:none">
|
||||||
<div class="span3">{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
<div class="span3">{{=file_create_form('%s/private/' % app, 'private')}}<em>{{=T('or alternatively')}}</em></div>
|
||||||
</div>
|
<div class="span3">{{=file_upload_form('%s/private/' % app, 'private')}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -451,10 +458,12 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
|
|||||||
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
<p><strong>{{=T('There are no plugins')}}</strong></p>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<div class="controls formfield">
|
<div class="controls formfield">
|
||||||
<div class="row-fluid">
|
<button onclick="jQuery('#form7').slideToggle()" class="btn btn-mini">Upload</button>
|
||||||
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
|
<div id="form7" class="row-fluid" style="display:none">
|
||||||
</div>
|
<div class="row-fluid">
|
||||||
</div>
|
<div class="span3">{{=upload_plugin_form(app, 'plugins')}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -465,7 +474,7 @@ function filter_files() {
|
|||||||
files=data['files'];
|
files=data['files'];
|
||||||
message=data['message'];
|
message=data['message'];
|
||||||
for(var i=0; i<files.length; i++)
|
for(var i=0; i<files.length; i++)
|
||||||
jQuery('li#'+files[i].replace(/\//g,'__').replace('.','__')).slideDown();
|
jQuery('li#_'+files[i].replace(/\//g,'__').replace('.','__')).slideDown();
|
||||||
jQuery('.flash').html(message).slideDown();
|
jQuery('.flash').html(message).slideDown();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ jQuery(document).ready(function(){
|
|||||||
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
|
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
|
||||||
<div class="editor-bar-column">
|
<div class="editor-bar-column">
|
||||||
<label>{{=T('Save file:')}}</label>
|
<label>{{=T('Save file:')}}</label>
|
||||||
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon btn btn-mini" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
|
<a value="save" name="save" onclick="return doClickSave();" class="icon saveicon" style="background-image: -webkit-linear-gradient(top,white,#E6E6E6);">
|
||||||
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ def all(items):
|
|||||||
def peekfile(path,file):
|
def peekfile(path,file):
|
||||||
return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
|
return A(file.replace('\\\\','/'),_href=URL('peek', args=(app, path, file)))
|
||||||
def editfile(path,file):
|
def editfile(path,file):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton btn',_href=URL('edit', args=(app, path, file)))
|
return A(SPAN(T('Edit')),_class='button editbutton btn btn-mini',_href=URL('edit', args=(app, path, file)))
|
||||||
def testfile(path,file):
|
def testfile(path,file):
|
||||||
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
return A(TAG[''](IMG(_src=URL('static', 'images/test_icon.png'), _alt=T('test')),
|
||||||
SPAN(T("Run tests in this file"))),
|
SPAN(T("Run tests in this file"))),
|
||||||
@@ -16,7 +16,7 @@ def testfile(path,file):
|
|||||||
**{'_data-placement':'right',
|
**{'_data-placement':'right',
|
||||||
'_data-original-title':T("Run tests in this file")})
|
'_data-original-title':T("Run tests in this file")})
|
||||||
def editlanguagefile(path,file):
|
def editlanguagefile(path,file):
|
||||||
return A(SPAN(T('Edit')),_class='button editbutton',_href=URL('edit_language', args=(app, path, file)))
|
return A(SPAN(T('Edit')),_class='button editbutton btn-mini',_href=URL('edit_language', args=(app, path, file)))
|
||||||
def file_upload_form(location):
|
def file_upload_form(location):
|
||||||
form=FORM(T("upload file:")," ",
|
form=FORM(T("upload file:")," ",
|
||||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||||
|
|||||||
@@ -3,143 +3,157 @@
|
|||||||
{{block sectionclass}}site{{end}}
|
{{block sectionclass}}site{{end}}
|
||||||
<!-- begin "site" block -->
|
<!-- begin "site" block -->
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="applist f60 span7">
|
<div class="applist f60 span7">
|
||||||
<div class="applist_inner">
|
<div class="applist_inner">
|
||||||
<h2>{{=T("Installed applications")}}</h2>
|
<h2>{{=T("Installed applications")}}</h2>
|
||||||
<ul class="unstyled">
|
<table width="100%" class="table">
|
||||||
{{for a in apps:}}
|
{{for a in apps:}}
|
||||||
<li class="application"> <!-- onmouseover="jQuery(this).children('p').show()" onmouseout="jQuery(this).children('p').hide()"-->
|
<tr>{{buttons = []}}
|
||||||
{{if a==request.application:}}
|
<td>
|
||||||
<h3 class="currentapp muted">{{=a}} ({{=T('currently running')}})</h3>
|
{{if a==request.application:}}
|
||||||
<p class="controls row-buttons">
|
<h4 class="currentapp">{{=a}} ({{=T('currently running')}})</h4>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<h3 class="editableapp muted">{{=A(a,_href=URL(a,'default','index'))}}</h3>
|
<h4 class="editableapp">{{=A(a,_href=URL(a,'default','index'))}}</h4>
|
||||||
{{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}}
|
{{if MULTI_USER_MODE and db.app(name=a):}}(created by {{="%(first_name)s %(last_name)s" % db.auth_user[db.app(name=a).owner]}}){{pass}}
|
||||||
<p class="controls row-buttons">
|
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
{{buttons.append((URL('design',args=a), T("Edit")))}}
|
||||||
{{=sp_button(URL('design',args=a), T("Edit"))}}
|
{{else:}}
|
||||||
{{else:}}
|
{{buttons.append((URL(a,'appadmin','index'), T("appadmin")))}}
|
||||||
{{=button(URL(a,'appadmin','index'), T("appadmin"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{buttons.append((URL('about',args=a), T("About")))}}
|
||||||
{{=button(URL('about',args=a), T("About"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{buttons.append((URL('errors',args=a), T("Errors")))}}
|
||||||
{{=button(URL('errors',args=a), T("Errors"))}}
|
{{buttons.append((URL('cleanup',args=a), T("Clean")))}}
|
||||||
{{=button(URL('cleanup',args=a), T("Clean"))}}
|
{{buttons.append((URL('pack',args=a), T("Pack all")))}}
|
||||||
{{=button(URL('pack',args=a), T("Pack all"))}}
|
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
||||||
{{if not os.path.exists('applications/%s/compiled' % a):}}
|
{{buttons.append((URL('compile_app',args=a), T("Compile")))}}
|
||||||
{{=button(URL('compile_app',args=a), T("Compile"))}}
|
{{else:}}
|
||||||
{{else:}}
|
{{buttons.append((URL('pack',args=(a, 'compiled')), T("Pack compiled")))}}
|
||||||
{{=button(URL('pack',args=(a, 'compiled')), T("Pack compiled"))}}
|
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
|
||||||
{{if glob.glob('applications/%s/controllers/*.py' % a):}}
|
{{buttons.append((URL('remove_compiled_app',args=a), T("Remove compiled")))}}
|
||||||
{{=button(URL('remove_compiled_app',args=a), T("Remove compiled"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
||||||
{{if os.path.exists(os.path.join(apath(r=request),a,'.git')): }}
|
{{buttons.append((URL('git_pull',args=a), T("Git Pull")))}}
|
||||||
{{=button(URL('git_pull',args=a), T("Git Pull"))}}
|
{{buttons.append((URL('git_push',args=a), T("Git Push")))}}
|
||||||
{{=button(URL('git_push',args=a), T("Git Push"))}}
|
{{pass}}
|
||||||
{{pass}}
|
{{if a!=request.application:}}
|
||||||
{{if a!=request.application:}}
|
{{buttons.append((URL('uninstall',args=a), T("Uninstall")))}}
|
||||||
{{=button(URL('uninstall',args=a), T("Uninstall"))}}
|
{{pass}}
|
||||||
{{=button_enable(URL('enable',args=a), a)}}
|
</td>
|
||||||
{{pass}}
|
<td>
|
||||||
</p>
|
<div class="btn-group">
|
||||||
</li>
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
{{pass}}
|
{{=T('Manage')}}
|
||||||
</ul>
|
<span class="caret"></span>
|
||||||
</div>
|
</a>
|
||||||
</div> <!-- /applist -->
|
<ul class="dropdown-menu">
|
||||||
<div class="sidebar fl60 span5">
|
{{for link,name in buttons:}}
|
||||||
<div class="sidebar_inner controls well well-small">
|
{{=LI(A(name,_href=link))}}
|
||||||
<!-- CHANGE ADMIN PWD -->
|
{{pass}}
|
||||||
<div class="pwdchange pull-right">
|
</ul>
|
||||||
{{if MULTI_USER_MODE:}}
|
</div>
|
||||||
{{=auth.navbar()}}
|
{{=button_enable(URL('enable',args=a), a)}}
|
||||||
{{else:}}
|
</td>
|
||||||
{{=sp_button(URL('change_password'), T('Change admin password'))}}
|
</tr>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div> <!-- /CHANGE ADMIN PWD -->
|
</table>
|
||||||
{{if is_manager():}}
|
</div>
|
||||||
<!-- VERSION -->
|
</div> <!-- /applist -->
|
||||||
<div class="box">
|
<div class="sidebar fl60 span5">
|
||||||
<h3>{{=T("Version %s.%s.%s %s (%s)", myversion)}}</h3>
|
<div class="sidebar_inner controls well well-small">
|
||||||
<p id="check_version" class="row-buttons">
|
<!-- CHANGE ADMIN PWD -->
|
||||||
{{if session.check_version:}}
|
<div class="pwdchange pull-right">
|
||||||
{{=T('Checking for upgrades...')}}
|
{{if MULTI_USER_MODE:}}
|
||||||
</p>
|
{{=auth.navbar()}}
|
||||||
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>
|
{{else:}}
|
||||||
{{session.check_version=False}}
|
{{=sp_button(URL('change_password'), T('Change admin password'))}}
|
||||||
{{else:}}
|
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
|
||||||
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
|
{{pass}}
|
||||||
{{=button(URL('default','reload_routes'), T('Reload routes'))}}
|
</div> <!-- /CHANGE ADMIN PWD -->
|
||||||
</p>
|
{{if is_manager():}}
|
||||||
{{pass}}
|
<!-- VERSION -->
|
||||||
<p>{{=T("Running on %s", request.env.server_software)}}</p>
|
<div class="box">
|
||||||
{{if session.is_mobile=='auto':}}
|
<h4>{{=T("Version")}}</h4>
|
||||||
<p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
<p>
|
||||||
{{pass}}
|
<tt>{{=myversion}}</tt><br/>
|
||||||
</div> <!-- /VERSION -->
|
({{=T("Running on %s", request.env.server_software)}})
|
||||||
{{pass}}
|
</p>
|
||||||
{{if MULTI_USER_MODE and is_manager():}}
|
<p id="check_version" class="row-buttons">
|
||||||
<!-- MULTI_USER_INTERFACE -->
|
{{if session.check_version:}}
|
||||||
<div class="box">
|
{{=T('Checking for upgrades...')}}
|
||||||
<h3>{{=T("Multi User Mode")}}</h3>
|
<script>ajax('{{=URL('check_version')}}',[],'check_version');</script>
|
||||||
<p class="row-buttons">
|
{{session.check_version=False}}
|
||||||
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
{{else:}}
|
||||||
{{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}
|
{{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('Check for upgrades'))}}
|
||||||
</p>
|
{{pass}}
|
||||||
</div> <!-- /MULTI_USER_INTERFACE -->
|
</p>
|
||||||
{{pass}}
|
{{if session.is_mobile=='auto':}}
|
||||||
<!-- APP WIZARD -->
|
<p>{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
|
||||||
<div class="box">
|
{{pass}}
|
||||||
<h3>{{=T("New application wizard")}}</h3>
|
</div> <!-- /VERSION -->
|
||||||
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}
|
{{pass}}
|
||||||
{{=T("(requires internet access)")}}</p>
|
{{if MULTI_USER_MODE and is_manager():}}
|
||||||
</div> <!-- /APP WIZARD -->
|
<!-- MULTI_USER_INTERFACE -->
|
||||||
<!-- SCAFFOLD APP -->
|
<div class="box">
|
||||||
<div class="box">
|
<h4>{{=T("Multi User Mode")}}</h4>
|
||||||
<h3>{{=T("New simple application")}}</h3>
|
<p class="row-buttons">
|
||||||
{{=form_create.custom.begin}}
|
{{=button(URL('bulk_register'),T('Bulk Register'))}}
|
||||||
{{=LABEL(T("Application name:"))}}
|
{{=button(URL('manage_students',vars={'order':'auth_user.id'}),T('Manage Students'))}}
|
||||||
{{=form_create.custom.widget.name}}
|
</p>
|
||||||
<div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div>
|
</div> <!-- /MULTI_USER_INTERFACE -->
|
||||||
{{=form_create.custom.end}}
|
{{pass}}
|
||||||
</div> <!-- /SCAFFOLD APP -->
|
<!-- SCAFFOLD APP -->
|
||||||
<!-- UPLOAD PACKAGE -->
|
<div class="box">
|
||||||
<div class="box">
|
<h4>{{=T("New simple application")}}</h4>
|
||||||
<h3>{{=T("Upload and install packed application")}}</h3>
|
{{=form_create.custom.begin}}
|
||||||
{{=form_update.custom.begin}}
|
{{=LABEL(T("Application name:"))}}
|
||||||
<label for="appupdate_name">{{=T("Application name:")}}</label>
|
{{=form_create.custom.widget.name}}
|
||||||
{{=form_update.custom.widget.name}}
|
<div class="controls"><button type="submit" class="btn">{{=T('Create')}}</button></div>
|
||||||
<label for="appupdate_file">{{=T("Upload a package:")}}</label>
|
{{=form_create.custom.end}}
|
||||||
{{=form_update.custom.widget.file}}
|
</div> <!-- /SCAFFOLD APP -->
|
||||||
<label for="appupdate_url">{{=T("Or Get from URL:")}}</label>
|
<!-- UPLOAD PACKAGE -->
|
||||||
{{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small>
|
<div class="box">
|
||||||
<div class="controls">
|
<h4>{{=T("Upload and install packed application")}}</h4>
|
||||||
<label class="checkbox">
|
{{=form_update.custom.begin}}
|
||||||
{{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}}
|
<label for="appupdate_name">{{=T("Application name:")}}</label>
|
||||||
</label>
|
{{=form_update.custom.widget.name}}
|
||||||
<button type="submit" class='btn'>{{=T('Install')}}</button>
|
<label for="appupdate_file">{{=T("Upload a package:")}}</label>
|
||||||
</div>
|
{{=form_update.custom.widget.file}}
|
||||||
{{=form_update.custom.end}}
|
<label for="appupdate_url">{{=T("Or Get from URL:")}}</label>
|
||||||
</div> <!-- /UPLOAD PACKAGE -->
|
{{=form_update.custom.widget.url}}<small class="help-block">({{=T('can be a git repo')}})</small>
|
||||||
<!-- DEPLOY ON GAE -->
|
<div class="controls">
|
||||||
<div class="box">
|
<label class="checkbox">
|
||||||
<h3>{{=T("Deploy")}}</h3>
|
{{=form_update.custom.widget.overwrite}} {{=T("Overwrite installed app")}}
|
||||||
<p class="row-buttons">
|
</label>
|
||||||
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
<button type="submit" class='btn'>{{=T('Install')}}</button>
|
||||||
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
</div>
|
||||||
</p>
|
{{=form_update.custom.end}}
|
||||||
</div> <!-- /DEPLOY ON GAE -->
|
</div> <!-- /UPLOAD PACKAGE -->
|
||||||
<br/>
|
<!-- DEPLOY ON GAE -->
|
||||||
{{if TWITTER_HASH:}}
|
<div class="box">
|
||||||
<!-- TWITTER -->
|
<h4>{{=T("Deploy")}}</h4>
|
||||||
<div class="box">
|
<p class="row-buttons">
|
||||||
<h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>
|
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
|
||||||
<div id="tweets">{{=T('loading...')}}</div>
|
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
|
||||||
<script>jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter.load')}}');});</script>
|
</p>
|
||||||
</div> <!-- /TWITTER -->
|
</div> <!-- /DEPLOY ON GAE -->
|
||||||
{{pass}}
|
<!-- APP WIZARD -->
|
||||||
</div>
|
<div class="box">
|
||||||
</div> <!-- /sidebar -->
|
<h4>{{=T("New application wizard")}}</h4>
|
||||||
|
<p>{{=button(URL('wizard','index'), T('Start wizard'))}}<br/>
|
||||||
|
{{=T("(requires internet access, experimental)")}}</p>
|
||||||
|
</div> <!-- /APP WIZARD -->
|
||||||
|
{{if TWITTER_HASH:}}
|
||||||
|
<!-- TWITTER -->
|
||||||
|
<div class="box">
|
||||||
|
<h4>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h4>
|
||||||
|
<div id="tweets">{{=T('loading...')}}</div>
|
||||||
|
<script>jQuery(document).ready(function(){jQuery('#tweets').load('{{=URL('twitter.load')}}');});</script>
|
||||||
|
</div> <!-- /TWITTER -->
|
||||||
|
{{pass}}
|
||||||
|
</div>
|
||||||
|
</div> <!-- /sidebar -->
|
||||||
</div> <!-- /row-fluid
|
</div> <!-- /row-fluid
|
||||||
<!-- end "site" block -->
|
<!-- end "site" block -->
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>web2py™</th>
|
<th>web2py™</th>
|
||||||
<td>{{=myversion}}</td>
|
<td>Version {{=myversion}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{if snapshot:}}
|
{{if snapshot:}}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -27,8 +27,17 @@ Tweet attributes
|
|||||||
"""
|
"""
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
{{import re}}
|
||||||
|
{{hashtag = re.compile('([#@])(\w+)')}}
|
||||||
|
{{link = re.compile('(?!<")https?\:\/\/[\w\./?&]+')}}
|
||||||
|
<table class="twitter">
|
||||||
{{ for t in tweets: }}
|
{{ for t in tweets: }}
|
||||||
{{ =DIV(H5(t["from_user_name"])) }}
|
<tr class="tweet">
|
||||||
{{ =DIV(t["text"]) }}
|
<td><img src="{{=t['profile_image_url_https']}}"/></td>
|
||||||
{{ =BR() }}
|
<td>
|
||||||
|
<a href="http://twitter.com/{{=t['from_user']}}">{{=t["from_user_name"]}}</a>:
|
||||||
|
{{=XML(hashtag.sub('<a href="http://twitter.com/\\g<2>">\\g<1>\\g<2></a>',link.sub('<a href="\\g<0>">\\g<0></a>',t["text"])),sanitize=True)}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{{ pass }}
|
{{ pass }}
|
||||||
|
</table>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
<title>{{=response.title or URL()}}</title>
|
<title>{{=response.title or URL()}}</title>
|
||||||
{{
|
{{
|
||||||
response.files.append(URL('static','css/bootstrap.min.css'))
|
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||||
|
#response.files.append(URL('static','css/styles.css'))
|
||||||
response.files.append(URL('static','css/bootstrap_essentials.css'))
|
response.files.append(URL('static','css/bootstrap_essentials.css'))
|
||||||
# response.files.append(URL('static','css/bootstrap_adapters.css'))
|
# response.files.append(URL('static','css/bootstrap_adapters.css'))
|
||||||
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
||||||
@@ -79,6 +80,11 @@
|
|||||||
jQuery("[rel=tooltip]").tooltip();
|
jQuery("[rel=tooltip]").tooltip();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
{{if request.function in ('index','site'):}}
|
||||||
|
<a style="position:fixed;bottom:0;left:0;z-index:1000" href="https://groups.google.com/forum/?fromgroups#!forum/web2py" target="_blank">
|
||||||
|
<!-- http://webchat.freenode.net/?channels=web2py" //-->
|
||||||
|
<img src="{{=URL('static','images/questions.png')}}" />
|
||||||
|
</a>
|
||||||
|
{{pass}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ for application "{{=request.args[0]}}"</h2>
|
|||||||
<h3>Commit form</h3>
|
<h3>Commit form</h3>
|
||||||
{{=form}}
|
{{=form}}
|
||||||
|
|
||||||
|
|
||||||
{{if repo['.'].rev()>=0:}}
|
{{if repo['.'].rev()>=0:}}
|
||||||
<h3>Last Revision</h3>
|
<h3>Last Revision</h3>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -319,6 +319,9 @@ def state():
|
|||||||
|
|
||||||
|
|
||||||
def ccache():
|
def ccache():
|
||||||
|
cache.ram.initialize()
|
||||||
|
cache.disk.initialize()
|
||||||
|
|
||||||
form = FORM(
|
form = FORM(
|
||||||
P(TAG.BUTTON(
|
P(TAG.BUTTON(
|
||||||
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
||||||
@@ -385,7 +388,7 @@ def ccache():
|
|||||||
|
|
||||||
return (hours, minutes, seconds)
|
return (hours, minutes, seconds)
|
||||||
|
|
||||||
for key, value in cache.ram.storage.items():
|
for key, value in cache.ram.storage.iteritems():
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
ram['hits'] = value['hit_total'] - value['misses']
|
ram['hits'] = value['hit_total'] - value['misses']
|
||||||
ram['misses'] = value['misses']
|
ram['misses'] = value['misses']
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ def what():
|
|||||||
import urllib
|
import urllib
|
||||||
try:
|
try:
|
||||||
images = XML(urllib.urlopen(
|
images = XML(urllib.urlopen(
|
||||||
'http://web2py.com/poweredby/default/images').read())
|
'http://www.web2py.com/poweredby/default/images').read())
|
||||||
except:
|
except:
|
||||||
images = []
|
images = []
|
||||||
return response.render(images=images)
|
return response.render(images=images)
|
||||||
@@ -61,11 +61,11 @@ def videos():
|
|||||||
|
|
||||||
|
|
||||||
def security():
|
def security():
|
||||||
redirect('http://www.web2py.com/book/default/chapter/01#security')
|
redirect('http://www.web2py.com/book/default/chapter/01#Security')
|
||||||
|
|
||||||
|
|
||||||
def api():
|
def api():
|
||||||
redirect('http://web2py.com/book/default/chapter/04#API')
|
redirect('http://www.web2py.com/book/default/chapter/04#API')
|
||||||
|
|
||||||
|
|
||||||
@cache('license', time_expire=cache_expire)
|
@cache('license', time_expire=cache_expire)
|
||||||
@@ -74,10 +74,14 @@ def license():
|
|||||||
filename = os.path.join(request.env.gluon_parent, 'LICENSE')
|
filename = os.path.join(request.env.gluon_parent, 'LICENSE')
|
||||||
return response.render(dict(license=MARKMIN(read_file(filename))))
|
return response.render(dict(license=MARKMIN(read_file(filename))))
|
||||||
|
|
||||||
|
|
||||||
def version():
|
def version():
|
||||||
return 'Version %s.%s.%s (%s) %s' % request.env.web2py_version
|
if request.args(0)=='raw':
|
||||||
|
return request.env.web2py_version
|
||||||
|
from gluon.fileutils import parse_version
|
||||||
|
(a, b, c, pre_release, build) = parse_version(request.env.web2py_version)
|
||||||
|
return 'Version %i.%i.%i (%.4i-%.2i-%.2i %.2i:%.2i:%.2i) %s' % (
|
||||||
|
a,b,c,build.year,build.month,build.day,
|
||||||
|
build.hour,build.minute,build.second,pre_release)
|
||||||
|
|
||||||
@cache('examples', time_expire=cache_expire)
|
@cache('examples', time_expire=cache_expire)
|
||||||
def examples():
|
def examples():
|
||||||
|
|||||||
@@ -1,75 +1,49 @@
|
|||||||
session.forget()
|
session.forget()
|
||||||
|
|
||||||
response.menu = [['home', False, '/%s/default/index'
|
def get(args):
|
||||||
% request.application], ['docs', True,
|
if args[0].startswith('__'):
|
||||||
'/%s/global/vars' % request.application]]
|
return None
|
||||||
|
try:
|
||||||
|
obj = globals(),get(args[0])
|
||||||
|
for k in range(1,len(args)):
|
||||||
|
obj = getattr(obj,args[k])
|
||||||
|
return obj
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
def vars():
|
def vars():
|
||||||
"""the running controller function!"""
|
"""the running controller function!"""
|
||||||
|
title = '.'.join(request.args)
|
||||||
|
attributes = {}
|
||||||
if not request.args:
|
if not request.args:
|
||||||
(
|
(doc,keys,t,c,d,value)=('Global variables',globals(),None,None,[],None)
|
||||||
doc,
|
|
||||||
keys,
|
|
||||||
t,
|
|
||||||
c,
|
|
||||||
d,
|
|
||||||
value,
|
|
||||||
) = (
|
|
||||||
'Global variables',
|
|
||||||
globals(),
|
|
||||||
None,
|
|
||||||
None,
|
|
||||||
(),
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
(title, args) = ('globals()', '')
|
|
||||||
elif len(request.args) < 3:
|
elif len(request.args) < 3:
|
||||||
args = '.'.join(request.args)
|
obj = get(request.args)
|
||||||
try:
|
if obj:
|
||||||
doc = eval(args + '.__doc__')
|
doc = getattr(obj,'__doc__','no documentation')
|
||||||
except:
|
keys = dir(obj)
|
||||||
doc = 'no documentation'
|
t = type(obj)
|
||||||
try:
|
c = getattr(obj,'__class__',None)
|
||||||
keys = eval('dir(%s)' % args)
|
d = getattr(obj,'__bases__',None)
|
||||||
except:
|
|
||||||
|
for key in keys:
|
||||||
|
a = getattr(obj,key,None)
|
||||||
|
if a and not isinstance(a,DAL):
|
||||||
|
doc1 = getattr(a, '__doc__', '')
|
||||||
|
t1 = type(a)
|
||||||
|
c1 = getattr(a,'__class__',None)
|
||||||
|
d1 = getattr(a,'__bases__',None)
|
||||||
|
key = '.'.join(request.args)+'.'+key
|
||||||
|
attributes[key] = (doc1, t1, c1, d1)
|
||||||
|
else:
|
||||||
|
doc = 'Unkown'
|
||||||
keys = []
|
keys = []
|
||||||
t = eval('type(%s)' % args)
|
t = c = d = None
|
||||||
try:
|
|
||||||
c = eval('%s.__class__' % args)
|
|
||||||
except:
|
|
||||||
c = None
|
|
||||||
try:
|
|
||||||
d = eval('%s.__bases__' % args)
|
|
||||||
except:
|
|
||||||
d = None
|
|
||||||
title = args
|
|
||||||
args += '.'
|
|
||||||
else:
|
else:
|
||||||
raise HTTP(400)
|
raise HTTP(400)
|
||||||
attributes = {}
|
|
||||||
for key in keys:
|
|
||||||
a = args + key
|
|
||||||
if eval('isinstance(%s,SQLDB)' % a) or a == 'vars':
|
|
||||||
continue
|
|
||||||
try:
|
|
||||||
doc1 = eval(a + '.__doc__')
|
|
||||||
except:
|
|
||||||
doc1 = 'no documentation'
|
|
||||||
t1 = eval('type(%s)' % a)
|
|
||||||
try:
|
|
||||||
c1 = eval('%s.__class__' % a)
|
|
||||||
except:
|
|
||||||
c1 = None
|
|
||||||
try:
|
|
||||||
d1 = eval('%s.__bases__' % a)
|
|
||||||
except:
|
|
||||||
d1 = ()
|
|
||||||
attributes[a] = (doc1, t1, c1, d1)
|
|
||||||
return dict(
|
return dict(
|
||||||
title=title,
|
title=title,
|
||||||
args=args,
|
args=request.args,
|
||||||
t=t,
|
t=t,
|
||||||
c=c,
|
c=c,
|
||||||
d=d,
|
d=d,
|
||||||
|
|||||||
@@ -54,13 +54,6 @@ def raisehttp():
|
|||||||
raise HTTP(400, 'internal error')
|
raise HTTP(400, 'internal error')
|
||||||
|
|
||||||
|
|
||||||
def raiseexception():
|
|
||||||
""" generates an exeption, logs the event and returns a ticket number """
|
|
||||||
|
|
||||||
1 / 0
|
|
||||||
return 'oops'
|
|
||||||
|
|
||||||
|
|
||||||
def servejs():
|
def servejs():
|
||||||
""" serves a js document """
|
""" serves a js document """
|
||||||
|
|
||||||
@@ -69,7 +62,6 @@ def servejs():
|
|||||||
gluon.contenttype.contenttype('.js')
|
gluon.contenttype.contenttype('.js')
|
||||||
return 'alert("This is a Javascript document, it is not supposed to run!");'
|
return 'alert("This is a Javascript document, it is not supposed to run!");'
|
||||||
|
|
||||||
|
|
||||||
def makejson():
|
def makejson():
|
||||||
import gluon.contrib.simplejson as sj
|
import gluon.contrib.simplejson as sj
|
||||||
return sj.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
|
return sj.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from gluon.contrib.spreadsheet import Sheet
|
from gluon.contrib.spreadsheet import Sheet
|
||||||
|
|
||||||
|
|
||||||
def callback():
|
def callback():
|
||||||
return cache.ram('sheet1', lambda: None, None).process(request)
|
return cache.ram('sheet1', lambda: None, None).process(request)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
403
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
404
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
500
|
||||||
@@ -1,117 +1,16 @@
|
|||||||
footer-content {position: relative; bottom: 0; width: 100%;}
|
@import url(http://fonts.googleapis.com/css?family=Economica);
|
||||||
|
@@import url(http://fonts.googleapis.com/css?family=Belleza);
|
||||||
.statusbar {
|
|
||||||
padding: 2px 0;
|
|
||||||
border: 0;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
background-color: #C1CDCD;
|
|
||||||
/*background: url('../images/menu.png') repeat-x;*/
|
|
||||||
}
|
|
||||||
.statusbar a, .statusbar a:visited {
|
|
||||||
color: #406361;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.footer-content {
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
body { font-family: Arial, Helvetica; }
|
||||||
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
|
a, a:visited, a:hover, h1,h2,h3,h4,h5 {color: #658883}
|
||||||
a.button {color: #658883}
|
a.btn-danger, a.btn-warning, a.btn-success {color:white}
|
||||||
|
h1,h2,h3,h4,h5 { font-family: "Economica", Arial, Helevtica; }
|
||||||
.sf-menu li, .sf-menu li a { border-radius: 5px;}
|
body {
|
||||||
|
background: url('../images/stripes.png') repeat-x;
|
||||||
.wrapper {
|
|
||||||
background: url('../images/back-02.png') repeat-x;
|
|
||||||
padding-top:10px;
|
|
||||||
}
|
}
|
||||||
h1 { font-size: 32px }
|
#header {
|
||||||
h2 { font-size: 24px }
|
margin-top: 40px;
|
||||||
h3 { font-size: 20px }
|
|
||||||
h4 { font-size: 14px }
|
|
||||||
sup {
|
|
||||||
font-size: 0.5em;
|
|
||||||
line-height: 2em;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
}
|
||||||
ul { list-style: circle outside; padding-left: 30px;}
|
.btn-180 {
|
||||||
|
width: 180px;
|
||||||
.frame {
|
|
||||||
border: 3px solid #959595;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header h5 {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.logo: {
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.announce {
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
top: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
left: 0;
|
|
||||||
position: relative;
|
|
||||||
background: #000;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin: 7px 0 15px;
|
|
||||||
}
|
|
||||||
.announce a {color: white}
|
|
||||||
|
|
||||||
input:focus, textarea:focus {background:#f0f0f0}
|
|
||||||
|
|
||||||
table.downloads { width:100%; }
|
|
||||||
table.downloads th, table.downloads td {text-align:center;}
|
|
||||||
table.downloads a.button { width: 150px; }
|
|
||||||
th,td {padding-right: 10px;}
|
|
||||||
|
|
||||||
p {text-align: left;}
|
|
||||||
|
|
||||||
p + p {
|
|
||||||
margin-bottom: .75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
strong {color: inherit;}
|
|
||||||
|
|
||||||
img.centered {
|
|
||||||
margin: 0 auto;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tagCloud {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 489px;
|
|
||||||
}
|
|
||||||
.mainbody {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.aboutW2P {
|
|
||||||
margin-top: 23px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
.aboutW2P p {
|
|
||||||
padding: 0 0.5em;
|
|
||||||
font-size: 1.15em;
|
|
||||||
}
|
|
||||||
.aboutW2P h3 {
|
|
||||||
padding: 0 0.3em;
|
|
||||||
}
|
|
||||||
.userQuotes {
|
|
||||||
/*border-top: #eee 2px solid;*/
|
|
||||||
padding-top: 15px;
|
|
||||||
}
|
|
||||||
.userQuotes p {
|
|
||||||
text-align: left;
|
|
||||||
font-size: 111%;
|
|
||||||
color: #777;
|
|
||||||
}
|
|
||||||
#menu {
|
|
||||||
padding: 0.1em 0.5em;
|
|
||||||
}
|
}
|
||||||
@@ -1,629 +0,0 @@
|
|||||||
/*
|
|
||||||
* Skeleton V1.1
|
|
||||||
* Copyright 2011, Dave Gamache
|
|
||||||
* www.getskeleton.com
|
|
||||||
* Free to use under the MIT license.
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* 8/17/2011
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* Table of Content
|
|
||||||
==================================================
|
|
||||||
#Reset & Basics
|
|
||||||
#Basic Styles
|
|
||||||
#Site Styles
|
|
||||||
#Typography
|
|
||||||
#Links
|
|
||||||
#Lists
|
|
||||||
#Images
|
|
||||||
#Buttons
|
|
||||||
#Tabs
|
|
||||||
#Forms
|
|
||||||
#Misc */
|
|
||||||
|
|
||||||
|
|
||||||
/* #Reset & Basics (Inspired by E. Meyers)
|
|
||||||
================================================== */
|
|
||||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
font-size: 100%;
|
|
||||||
font: inherit;
|
|
||||||
vertical-align: baseline; }
|
|
||||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
|
||||||
display: block; }
|
|
||||||
body {
|
|
||||||
line-height: 1; }
|
|
||||||
// ol, ul { list-style: none; } /* WEB2PY EDIT */
|
|
||||||
blockquote, q {
|
|
||||||
quotes: none; }
|
|
||||||
blockquote:before, blockquote:after,
|
|
||||||
q:before, q:after {
|
|
||||||
content: '';
|
|
||||||
content: none; }
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Basic Styles
|
|
||||||
================================================== */
|
|
||||||
body {
|
|
||||||
background: #fff;
|
|
||||||
font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
color: #444;
|
|
||||||
-webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* #Typography
|
|
||||||
================================================== */
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
color: #181818;
|
|
||||||
font-family: "Georgia", "Times New Roman", Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: normal; }
|
|
||||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
|
|
||||||
h1 { font-size: 46px; line-height: 50px; }
|
|
||||||
h2 { font-size: 35px; line-height: 40px; }
|
|
||||||
h3 { font-size: 28px; line-height: 34px; }
|
|
||||||
h4 { font-size: 21px; line-height: 30px; }
|
|
||||||
h5 { font-size: 17px; line-height: 24px; }
|
|
||||||
h6 { font-size: 14px; line-height: 21px; }
|
|
||||||
|
|
||||||
.subheader { color: #777; }
|
|
||||||
|
|
||||||
p { margin: 0 0 20px 0; }
|
|
||||||
p img { margin: 0; }
|
|
||||||
p.lead { font-size: 21px; line-height: 27px; color: #777; }
|
|
||||||
|
|
||||||
em { font-style: italic; }
|
|
||||||
strong { font-weight: bold; color: #333; }
|
|
||||||
small { font-size: 80%; }
|
|
||||||
|
|
||||||
/* Blockquotes */
|
|
||||||
blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
|
|
||||||
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px;} /* WEB2PY EDIT */
|
|
||||||
blockquote cite { display: block; font-size: 12px; color: #555; }
|
|
||||||
blockquote cite:before { content: "\2014 \0020"; }
|
|
||||||
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
|
|
||||||
|
|
||||||
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Links
|
|
||||||
================================================== */
|
|
||||||
a, a:visited { color: #333; text-decoration: underline; outline: 0; }
|
|
||||||
a:hover, a:focus { color: #000; }
|
|
||||||
p a, p a:visited { line-height: inherit; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Lists
|
|
||||||
================================================== */
|
|
||||||
ul, ol { margin-bottom: 20px; }
|
|
||||||
// ul { list-style: none outside; } /* WEB2PY EDIT */
|
|
||||||
ol { list-style: decimal; }
|
|
||||||
ol, ul.square, ul.circle, ul.disc { margin-left: 30px; }
|
|
||||||
ul.square { list-style: square outside; }
|
|
||||||
ul.circle { list-style: circle outside; }
|
|
||||||
ul.disc { list-style: disc outside; }
|
|
||||||
ul ul, ul ol,
|
|
||||||
ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 90%; }
|
|
||||||
ul ul li, ul ol li,
|
|
||||||
ol ol li, ol ul li { margin-bottom: 6px; }
|
|
||||||
li { line-height: 18px; margin-bottom: 12px; }
|
|
||||||
ul.large li { line-height: 21px; }
|
|
||||||
li p { line-height: 21px; }
|
|
||||||
|
|
||||||
/* #Images
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
img.scale-with-grid {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Buttons
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
a.button,
|
|
||||||
button,
|
|
||||||
input[type="submit"],
|
|
||||||
input[type="reset"],
|
|
||||||
input[type="button"] {
|
|
||||||
background: #eee; /* Old browsers */
|
|
||||||
background: #eee -moz-linear-gradient(top, rgba(255,255,255,.2) 0%, rgba(0,0,0,.2) 100%); /* FF3.6+ */
|
|
||||||
background: #eee -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.2)), color-stop(100%,rgba(0,0,0,.2))); /* Chrome,Safari4+ */
|
|
||||||
background: #eee -webkit-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Chrome10+,Safari5.1+ */
|
|
||||||
background: #eee -o-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Opera11.10+ */
|
|
||||||
background: #eee -ms-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* IE10+ */
|
|
||||||
background: #eee linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* W3C */
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
border-top: 1px solid #ccc;
|
|
||||||
border-left: 1px solid #ccc;
|
|
||||||
padding: 4px 12px;
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #444;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 1em; /** WEB2PY EDIT **/
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
text-shadow: 0 1px rgba(255, 255, 255, .75);
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: 5px; /** WEB2PY EDIT **/
|
|
||||||
line-height: 21px;
|
|
||||||
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; }
|
|
||||||
|
|
||||||
a.button:hover,
|
|
||||||
button:hover,
|
|
||||||
input[type="submit"]:hover,
|
|
||||||
input[type="reset"]:hover,
|
|
||||||
input[type="button"]:hover {
|
|
||||||
color: #222;
|
|
||||||
background: #ddd; /* Old browsers */
|
|
||||||
background: #ddd -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); /* FF3.6+ */
|
|
||||||
background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.3)), color-stop(100%,rgba(0,0,0,.3))); /* Chrome,Safari4+ */
|
|
||||||
background: #ddd -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Chrome10+,Safari5.1+ */
|
|
||||||
background: #ddd -o-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Opera11.10+ */
|
|
||||||
background: #ddd -ms-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* IE10+ */
|
|
||||||
background: #ddd linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* W3C */
|
|
||||||
border: 1px solid #888;
|
|
||||||
border-top: 1px solid #aaa;
|
|
||||||
border-left: 1px solid #aaa; }
|
|
||||||
|
|
||||||
a.button:active,
|
|
||||||
button:active,
|
|
||||||
input[type="submit"]:active,
|
|
||||||
input[type="reset"]:active,
|
|
||||||
input[type="button"]:active {
|
|
||||||
border: 1px solid #666;
|
|
||||||
background: #ccc; /* Old browsers */
|
|
||||||
background: #ccc -moz-linear-gradient(top, rgba(255,255,255,.35) 0%, rgba(10,10,10,.4) 100%); /* FF3.6+ */
|
|
||||||
background: #ccc -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.35)), color-stop(100%,rgba(10,10,10,.4))); /* Chrome,Safari4+ */
|
|
||||||
background: #ccc -webkit-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Chrome10+,Safari5.1+ */
|
|
||||||
background: #ccc -o-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Opera11.10+ */
|
|
||||||
background: #ccc -ms-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* IE10+ */
|
|
||||||
background: #ccc linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* W3C */ }
|
|
||||||
|
|
||||||
.button.full-width,
|
|
||||||
button.full-width,
|
|
||||||
input[type="submit"].full-width,
|
|
||||||
input[type="reset"].full-width,
|
|
||||||
input[type="button"].full-width {
|
|
||||||
width: 100%;
|
|
||||||
padding-left: 0 !important;
|
|
||||||
padding-right: 0 !important;
|
|
||||||
text-align: center; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Tabs (activate in tabs.js)
|
|
||||||
================================================== */
|
|
||||||
ul.tabs {
|
|
||||||
display: block;
|
|
||||||
margin: 0 0 20px 0;
|
|
||||||
padding: 0;
|
|
||||||
border-bottom: solid 1px #ddd; }
|
|
||||||
ul.tabs li {
|
|
||||||
display: block;
|
|
||||||
width: auto;
|
|
||||||
height: 30px;
|
|
||||||
padding: 0;
|
|
||||||
float: left;
|
|
||||||
margin-bottom: 0; }
|
|
||||||
ul.tabs li a {
|
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
|
||||||
width: auto;
|
|
||||||
height: 29px;
|
|
||||||
padding: 0px 20px;
|
|
||||||
line-height: 30px;
|
|
||||||
border: solid 1px #ddd;
|
|
||||||
border-width: 1px 1px 0 0;
|
|
||||||
margin: 0;
|
|
||||||
background: #f5f5f5;
|
|
||||||
font-size: 13px; }
|
|
||||||
ul.tabs li a.active {
|
|
||||||
background: #fff;
|
|
||||||
height: 30px;
|
|
||||||
position: relative;
|
|
||||||
top: -4px;
|
|
||||||
padding-top: 4px;
|
|
||||||
border-left-width: 1px;
|
|
||||||
margin: 0 0 0 -1px;
|
|
||||||
color: #111;
|
|
||||||
-moz-border-radius-topleft: 2px;
|
|
||||||
-webkit-border-top-left-radius: 2px;
|
|
||||||
border-top-left-radius: 2px;
|
|
||||||
-moz-border-radius-topright: 2px;
|
|
||||||
-webkit-border-top-right-radius: 2px;
|
|
||||||
border-top-right-radius: 2px; }
|
|
||||||
ul.tabs li:first-child a.active {
|
|
||||||
margin-left: 0; }
|
|
||||||
ul.tabs li:first-child a {
|
|
||||||
border-width: 1px 1px 0 1px;
|
|
||||||
-moz-border-radius-topleft: 2px;
|
|
||||||
-webkit-border-top-left-radius: 2px;
|
|
||||||
border-top-left-radius: 2px; }
|
|
||||||
ul.tabs li:last-child a {
|
|
||||||
-moz-border-radius-topright: 2px;
|
|
||||||
-webkit-border-top-right-radius: 2px;
|
|
||||||
border-top-right-radius: 2px; }
|
|
||||||
|
|
||||||
ul.tabs-content { margin: 0; display: block; }
|
|
||||||
ul.tabs-content > li { display:none; }
|
|
||||||
ul.tabs-content > li.active { display: block; }
|
|
||||||
|
|
||||||
/* Clearfixing tabs for beautiful stacking */
|
|
||||||
ul.tabs:before,
|
|
||||||
ul.tabs:after {
|
|
||||||
content: '\0020';
|
|
||||||
display: block;
|
|
||||||
overflow: hidden;
|
|
||||||
visibility: hidden;
|
|
||||||
width: 0;
|
|
||||||
height: 0; }
|
|
||||||
ul.tabs:after {
|
|
||||||
clear: both; }
|
|
||||||
ul.tabs {
|
|
||||||
zoom: 1; }
|
|
||||||
|
|
||||||
|
|
||||||
/* #Forms
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
form {
|
|
||||||
margin-bottom: 5px; } /** WEB2PY EDIT **/
|
|
||||||
fieldset {
|
|
||||||
margin-bottom: 5px; } /** WEB2PY EDIT **/
|
|
||||||
input[type="text"],
|
|
||||||
input[type="password"],
|
|
||||||
input[type="email"],
|
|
||||||
textarea,
|
|
||||||
select {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 6px 4px;
|
|
||||||
outline: none;
|
|
||||||
-moz-border-radius: 2px;
|
|
||||||
-webkit-border-radius: 2px;
|
|
||||||
border-radius: 2px;
|
|
||||||
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
color: #777;
|
|
||||||
margin: 0;
|
|
||||||
width: 210px;
|
|
||||||
max-width: 100%;
|
|
||||||
// display: block; /** WEB2PY EDIT **/
|
|
||||||
margin-bottom: 0; /** WEB2PY EDIT **/
|
|
||||||
background: #fff; }
|
|
||||||
select {
|
|
||||||
padding: 0; }
|
|
||||||
input[type="text"]:focus,
|
|
||||||
input[type="password"]:focus,
|
|
||||||
input[type="email"]:focus,
|
|
||||||
textarea:focus {
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
color: #444;
|
|
||||||
-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);
|
|
||||||
-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);
|
|
||||||
box-shadow: 0 0 3px rgba(0,0,0,.2); }
|
|
||||||
textarea {
|
|
||||||
min-height: 60px; }
|
|
||||||
label,
|
|
||||||
legend {
|
|
||||||
display: block;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 13px; }
|
|
||||||
select {
|
|
||||||
width: 220px; }
|
|
||||||
input[type="checkbox"] {
|
|
||||||
display: inline; }
|
|
||||||
label span,
|
|
||||||
legend span {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #444; }
|
|
||||||
|
|
||||||
/* #Misc
|
|
||||||
================================================== */
|
|
||||||
.remove-bottom { margin-bottom: 0 !important; }
|
|
||||||
.half-bottom { margin-bottom: 10px !important; }
|
|
||||||
.add-bottom { margin-bottom: 20px !important; }
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Skeleton V1.1
|
|
||||||
* Copyright 2011, Dave Gamache
|
|
||||||
* www.getskeleton.com
|
|
||||||
* Free to use under the MIT license.
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* 8/17/2011
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Table of Content
|
|
||||||
==================================================
|
|
||||||
#Site Styles
|
|
||||||
#Page Styles
|
|
||||||
#Media Queries
|
|
||||||
#Font-Face */
|
|
||||||
|
|
||||||
/* #Site Styles
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* #Page Styles
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* #Media Queries
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* Smaller than standard 960 (devices and browsers) */
|
|
||||||
@media only screen and (max-width: 959px) {}
|
|
||||||
|
|
||||||
/* Tablet Portrait size to standard 960 (devices and browsers) */
|
|
||||||
@media only screen and (min-width: 768px) and (max-width: 959px) {}
|
|
||||||
|
|
||||||
/* All Mobile Sizes (devices and browser) */
|
|
||||||
@media only screen and (max-width: 767px) {}
|
|
||||||
|
|
||||||
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
|
|
||||||
@media only screen and (min-width: 480px) and (max-width: 767px) {}
|
|
||||||
|
|
||||||
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
|
|
||||||
@media only screen and (max-width: 479px) {}
|
|
||||||
|
|
||||||
|
|
||||||
/* #Font-Face
|
|
||||||
================================================== */
|
|
||||||
/* This is the proper syntax for an @font-face file
|
|
||||||
Just create a "fonts" folder at the root,
|
|
||||||
copy your FontName into code below and remove
|
|
||||||
comment brackets */
|
|
||||||
|
|
||||||
/* @font-face {
|
|
||||||
font-family: 'FontName';
|
|
||||||
src: url('../fonts/FontName.eot');
|
|
||||||
src: url('../fonts/FontName.eot?iefix') format('eot'),
|
|
||||||
url('../fonts/FontName.woff') format('woff'),
|
|
||||||
url('../fonts/FontName.ttf') format('truetype'),
|
|
||||||
url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal; }
|
|
||||||
*//*
|
|
||||||
* Skeleton V1.1
|
|
||||||
* Copyright 2011, Dave Gamache
|
|
||||||
* www.getskeleton.com
|
|
||||||
* Free to use under the MIT license.
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* 8/17/2011
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* Table of Contents
|
|
||||||
==================================================
|
|
||||||
#Base 960 Grid
|
|
||||||
#Tablet (Portrait)
|
|
||||||
#Mobile (Portrait)
|
|
||||||
#Mobile (Landscape)
|
|
||||||
#Clearing */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* #Base 960 Grid
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
|
|
||||||
.column, .columns { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
|
|
||||||
.row { margin-bottom: 20px; }
|
|
||||||
|
|
||||||
/* Nested Column Classes */
|
|
||||||
.column.alpha, .columns.alpha { margin-left: 0; }
|
|
||||||
.column.omega, .columns.omega { margin-right: 0; }
|
|
||||||
|
|
||||||
/* Base Grid */
|
|
||||||
.container .one.column { width: 40px; }
|
|
||||||
.container .two.columns { width: 100px; }
|
|
||||||
.container .three.columns { width: 160px; }
|
|
||||||
.container .four.columns { width: 220px; }
|
|
||||||
.container .five.columns { width: 280px; }
|
|
||||||
.container .six.columns { width: 340px; }
|
|
||||||
.container .seven.columns { width: 400px; }
|
|
||||||
.container .eight.columns { width: 460px; }
|
|
||||||
.container .nine.columns { width: 520px; }
|
|
||||||
.container .ten.columns { width: 580px; }
|
|
||||||
.container .eleven.columns { width: 640px; }
|
|
||||||
.container .twelve.columns { width: 700px; }
|
|
||||||
.container .thirteen.columns { width: 760px; }
|
|
||||||
.container .fourteen.columns { width: 820px; }
|
|
||||||
.container .fifteen.columns { width: 880px; }
|
|
||||||
.container .sixteen.columns { width: 940px; }
|
|
||||||
|
|
||||||
.container .one-third.column { width: 300px; }
|
|
||||||
.container .two-thirds.column { width: 620px; }
|
|
||||||
|
|
||||||
/* Offsets */
|
|
||||||
.container .offset-by-one { padding-left: 60px; }
|
|
||||||
.container .offset-by-two { padding-left: 120px; }
|
|
||||||
.container .offset-by-three { padding-left: 180px; }
|
|
||||||
.container .offset-by-four { padding-left: 240px; }
|
|
||||||
.container .offset-by-five { padding-left: 300px; }
|
|
||||||
.container .offset-by-six { padding-left: 360px; }
|
|
||||||
.container .offset-by-seven { padding-left: 420px; }
|
|
||||||
.container .offset-by-eight { padding-left: 480px; }
|
|
||||||
.container .offset-by-nine { padding-left: 540px; }
|
|
||||||
.container .offset-by-ten { padding-left: 600px; }
|
|
||||||
.container .offset-by-eleven { padding-left: 660px; }
|
|
||||||
.container .offset-by-twelve { padding-left: 720px; }
|
|
||||||
.container .offset-by-thirteen { padding-left: 780px; }
|
|
||||||
.container .offset-by-fourteen { padding-left: 840px; }
|
|
||||||
.container .offset-by-fifteen { padding-left: 900px; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* #Tablet (Portrait)
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* Note: Design for a width of 768px */
|
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) and (max-width: 959px) {
|
|
||||||
.container { width: 768px; }
|
|
||||||
.container .column,
|
|
||||||
.container .columns { margin-left: 10px; margin-right: 10px; }
|
|
||||||
.column.alpha, .columns.alpha { margin-left: 0; margin-right: 10px; }
|
|
||||||
.column.omega, .columns.omega { margin-right: 0; margin-left: 10px; }
|
|
||||||
|
|
||||||
.container .one.column { width: 28px; }
|
|
||||||
.container .two.columns { width: 76px; }
|
|
||||||
.container .three.columns { width: 124px; }
|
|
||||||
.container .four.columns { width: 172px; }
|
|
||||||
.container .five.columns { width: 220px; }
|
|
||||||
.container .six.columns { width: 268px; }
|
|
||||||
.container .seven.columns { width: 316px; }
|
|
||||||
.container .eight.columns { width: 364px; }
|
|
||||||
.container .nine.columns { width: 412px; }
|
|
||||||
.container .ten.columns { width: 460px; }
|
|
||||||
.container .eleven.columns { width: 508px; }
|
|
||||||
.container .twelve.columns { width: 556px; }
|
|
||||||
.container .thirteen.columns { width: 604px; }
|
|
||||||
.container .fourteen.columns { width: 652px; }
|
|
||||||
.container .fifteen.columns { width: 700px; }
|
|
||||||
.container .sixteen.columns { width: 748px; }
|
|
||||||
|
|
||||||
.container .one-third.column { width: 236px; }
|
|
||||||
.container .two-thirds.column { width: 492px; }
|
|
||||||
|
|
||||||
/* Offsets */
|
|
||||||
.container .offset-by-one { padding-left: 48px; }
|
|
||||||
.container .offset-by-two { padding-left: 96px; }
|
|
||||||
.container .offset-by-three { padding-left: 144px; }
|
|
||||||
.container .offset-by-four { padding-left: 192px; }
|
|
||||||
.container .offset-by-five { padding-left: 240px; }
|
|
||||||
.container .offset-by-six { padding-left: 288px; }
|
|
||||||
.container .offset-by-seven { padding-left: 336px; }
|
|
||||||
.container .offset-by-eight { padding-left: 348px; }
|
|
||||||
.container .offset-by-nine { padding-left: 432px; }
|
|
||||||
.container .offset-by-ten { padding-left: 480px; }
|
|
||||||
.container .offset-by-eleven { padding-left: 528px; }
|
|
||||||
.container .offset-by-twelve { padding-left: 576px; }
|
|
||||||
.container .offset-by-thirteen { padding-left: 624px; }
|
|
||||||
.container .offset-by-fourteen { padding-left: 672px; }
|
|
||||||
.container .offset-by-fifteen { padding-left: 720px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* #Mobile (Portrait)
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* Note: Design for a width of 320px */
|
|
||||||
|
|
||||||
@media only screen and (max-width: 767px) {
|
|
||||||
.container { width: 300px; }
|
|
||||||
.columns, .column { margin: 0; }
|
|
||||||
|
|
||||||
.container .one.column,
|
|
||||||
.container .two.columns,
|
|
||||||
.container .three.columns,
|
|
||||||
.container .four.columns,
|
|
||||||
.container .five.columns,
|
|
||||||
.container .six.columns,
|
|
||||||
.container .seven.columns,
|
|
||||||
.container .eight.columns,
|
|
||||||
.container .nine.columns,
|
|
||||||
.container .ten.columns,
|
|
||||||
.container .eleven.columns,
|
|
||||||
.container .twelve.columns,
|
|
||||||
.container .thirteen.columns,
|
|
||||||
.container .fourteen.columns,
|
|
||||||
.container .fifteen.columns,
|
|
||||||
.container .sixteen.columns,
|
|
||||||
.container .one-third.column,
|
|
||||||
.container .two-thirds.column { width: 300px; }
|
|
||||||
|
|
||||||
/* Offsets */
|
|
||||||
.container .offset-by-one,
|
|
||||||
.container .offset-by-two,
|
|
||||||
.container .offset-by-three,
|
|
||||||
.container .offset-by-four,
|
|
||||||
.container .offset-by-five,
|
|
||||||
.container .offset-by-six,
|
|
||||||
.container .offset-by-seven,
|
|
||||||
.container .offset-by-eight,
|
|
||||||
.container .offset-by-nine,
|
|
||||||
.container .offset-by-ten,
|
|
||||||
.container .offset-by-eleven,
|
|
||||||
.container .offset-by-twelve,
|
|
||||||
.container .offset-by-thirteen,
|
|
||||||
.container .offset-by-fourteen,
|
|
||||||
.container .offset-by-fifteen { padding-left: 0; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* #Mobile (Landscape)
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* Note: Design for a width of 480px */
|
|
||||||
|
|
||||||
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
|
||||||
.container { width: 420px; }
|
|
||||||
.columns, .column { margin: 0; }
|
|
||||||
|
|
||||||
.container .one.column,
|
|
||||||
.container .two.columns,
|
|
||||||
.container .three.columns,
|
|
||||||
.container .four.columns,
|
|
||||||
.container .five.columns,
|
|
||||||
.container .six.columns,
|
|
||||||
.container .seven.columns,
|
|
||||||
.container .eight.columns,
|
|
||||||
.container .nine.columns,
|
|
||||||
.container .ten.columns,
|
|
||||||
.container .eleven.columns,
|
|
||||||
.container .twelve.columns,
|
|
||||||
.container .thirteen.columns,
|
|
||||||
.container .fourteen.columns,
|
|
||||||
.container .fifteen.columns,
|
|
||||||
.container .sixteen.columns,
|
|
||||||
.container .one-third.column,
|
|
||||||
.container .two-thirds.column { width: 420px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* #Clearing
|
|
||||||
================================================== */
|
|
||||||
|
|
||||||
/* Self Clearing Goodness */
|
|
||||||
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
|
|
||||||
|
|
||||||
/* Use clearfix class on parent to clear nested columns,
|
|
||||||
or wrap each row of columns in a <div class="row"> */
|
|
||||||
.clearfix:before,
|
|
||||||
.clearfix:after,
|
|
||||||
.row:before,
|
|
||||||
.row:after {
|
|
||||||
content: '\0020';
|
|
||||||
display: block;
|
|
||||||
overflow: hidden;
|
|
||||||
visibility: hidden;
|
|
||||||
width: 0;
|
|
||||||
height: 0; }
|
|
||||||
.row:after,
|
|
||||||
.clearfix:after {
|
|
||||||
clear: both; }
|
|
||||||
.row,
|
|
||||||
.clearfix {
|
|
||||||
zoom: 1; }
|
|
||||||
|
|
||||||
/* You can also use a <br class="clear" /> to clear columns */
|
|
||||||
.clear {
|
|
||||||
clear: both;
|
|
||||||
display: block;
|
|
||||||
overflow: hidden;
|
|
||||||
visibility: hidden;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
|
|
||||||
/*** ESSENTIAL STYLES ***/
|
|
||||||
.sf-menu, .sf-menu * {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.sf-menu {
|
|
||||||
line-height: 1.0;
|
|
||||||
}
|
|
||||||
.sf-menu ul {
|
|
||||||
position: absolute;
|
|
||||||
top: -999em;
|
|
||||||
width: 10em; /* left offset of submenus need to match (see below) */
|
|
||||||
}
|
|
||||||
.sf-menu ul li {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.sf-menu li:hover {
|
|
||||||
visibility: inherit; /* fixes IE7 'sticky bug' */
|
|
||||||
}
|
|
||||||
.sf-menu li {
|
|
||||||
float: left;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.sf-menu a {
|
|
||||||
padding: 5px;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.sf-menu li:hover ul,
|
|
||||||
.sf-menu li.sfHover ul {
|
|
||||||
left: 0;
|
|
||||||
top: 26px; /* match top ul list item height */
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
ul.sf-menu li:hover li ul,
|
|
||||||
ul.sf-menu li.sfHover li ul {
|
|
||||||
top: -999em;
|
|
||||||
}
|
|
||||||
ul.sf-menu li li:hover ul,
|
|
||||||
ul.sf-menu li li.sfHover ul {
|
|
||||||
left: 10em; /* match ul width */
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
ul.sf-menu li li:hover li ul,
|
|
||||||
ul.sf-menu li li.sfHover li ul {
|
|
||||||
top: -999em;
|
|
||||||
}
|
|
||||||
ul.sf-menu li li li:hover ul,
|
|
||||||
ul.sf-menu li li li.sfHover ul {
|
|
||||||
left: 10em; /* match ul width */
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** DEMO SKIN ***/
|
|
||||||
.sf-menu {
|
|
||||||
float: left;
|
|
||||||
/*margin-bottom: 1em;*/
|
|
||||||
}
|
|
||||||
.sf-menu a {
|
|
||||||
padding-left: 1em;
|
|
||||||
padding-right: 1em;
|
|
||||||
text-decoration:none;
|
|
||||||
}
|
|
||||||
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
|
|
||||||
// color: #959595;
|
|
||||||
background-color: transparent;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.sf-menu li {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
.sf-menu li li {
|
|
||||||
background: #232323;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.sf-menu li li a {
|
|
||||||
padding-top: 0.25em;
|
|
||||||
padding-bottom: 0.25em;
|
|
||||||
color: #959595;
|
|
||||||
}
|
|
||||||
.sf-menu li li li {
|
|
||||||
background: #232323;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.sf-menu li li li a {
|
|
||||||
padding-top: 0.25em;
|
|
||||||
padding-bottom: 0.25em;
|
|
||||||
color: #959595;
|
|
||||||
}
|
|
||||||
.sf-menu li:hover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.sfHover, .sf-menu a:hover {
|
|
||||||
color: #FFFFFF;
|
|
||||||
background-color: #303030;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*** arrows **/
|
|
||||||
.sf-menu a.sf-with-ul {
|
|
||||||
padding-right: 2.25em;
|
|
||||||
min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */
|
|
||||||
}
|
|
||||||
.sf-sub-indicator {
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
right: .75em;
|
|
||||||
top: 1.05em; /* IE6 only */
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
text-indent: -999em;
|
|
||||||
overflow: hidden;
|
|
||||||
background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
|
||||||
}
|
|
||||||
a > .sf-sub-indicator { /* give all except IE6 the correct values */
|
|
||||||
top: .8em;
|
|
||||||
background-position: 0 -100px; /* use translucent arrow for modern browsers*/
|
|
||||||
}
|
|
||||||
/* apply hovers to modern browsers */
|
|
||||||
a:focus > .sf-sub-indicator,
|
|
||||||
a:hover > .sf-sub-indicator,
|
|
||||||
a:active > .sf-sub-indicator,
|
|
||||||
li:hover > a > .sf-sub-indicator,
|
|
||||||
li.sfHover > a > .sf-sub-indicator {
|
|
||||||
background-position: -10px -100px; /* arrow hovers for modern browsers*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/* point right for anchors in subs */
|
|
||||||
.sf-menu ul .sf-sub-indicator { background-position: -10px 0; }
|
|
||||||
.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; }
|
|
||||||
/* apply hovers to modern browsers */
|
|
||||||
.sf-menu ul a:focus > .sf-sub-indicator,
|
|
||||||
.sf-menu ul a:hover > .sf-sub-indicator,
|
|
||||||
.sf-menu ul a:active > .sf-sub-indicator,
|
|
||||||
.sf-menu ul li:hover > a > .sf-sub-indicator,
|
|
||||||
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
|
|
||||||
background-position: -10px 0; /* arrow hovers for modern browsers*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** shadows for all but IE6 ***/
|
|
||||||
.sf-shadow ul {
|
|
||||||
background: url('../images/shadow.png') no-repeat bottom right;
|
|
||||||
padding: 0 8px 9px 0;
|
|
||||||
-moz-border-radius-bottomleft: 17px;
|
|
||||||
-moz-border-radius-topright: 17px;
|
|
||||||
-webkit-border-top-right-radius: 17px;
|
|
||||||
-webkit-border-bottom-left-radius: 17px;
|
|
||||||
}
|
|
||||||
.sf-shadow ul.sf-shadow-off {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
/*=============================================================
|
||||||
|
CUSTOM RULES
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
body{height:auto;} /* to avoid vertical scroll bar */
|
||||||
|
div.flash.flash-center{left:25%;right:25%;}
|
||||||
|
div.flash.flash-top,div.flash.flash-top:hover{
|
||||||
|
position:relative;
|
||||||
|
display:block;
|
||||||
|
margin:0;
|
||||||
|
padding:1em;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width:100%;
|
||||||
|
text-align:center;
|
||||||
|
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
color:#865100;
|
||||||
|
background:#feea9a;
|
||||||
|
border:1px solid;
|
||||||
|
border-top:0px;
|
||||||
|
border-left:0px;
|
||||||
|
border-right:0px;
|
||||||
|
border-radius:0;
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
#header{margin-top:60px;}
|
||||||
|
.mastheader h1 {
|
||||||
|
margin-bottom:9px;
|
||||||
|
font-size:81px;
|
||||||
|
font-weight:bold;
|
||||||
|
letter-spacing:-1px;
|
||||||
|
line-height:1;
|
||||||
|
font-size:54px;
|
||||||
|
}
|
||||||
|
.mastheader small {
|
||||||
|
font-size:20px;
|
||||||
|
font-weight:300;
|
||||||
|
}
|
||||||
|
/* auth navbar - primitive style */
|
||||||
|
.auth_navbar,.auth_navbar a{color:inherit;}
|
||||||
|
.ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
|
||||||
|
.auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */
|
||||||
|
.auth_navbar a:hover{color:white;text-decoration:none;}
|
||||||
|
ul#navbar>.auth_navbar{
|
||||||
|
display:inline-block;
|
||||||
|
padding:5px;
|
||||||
|
}
|
||||||
|
/* form errors message box customization */
|
||||||
|
div.error_wrapper{margin-bottom:9px;}
|
||||||
|
div.error_wrapper .error{
|
||||||
|
border-radius: 4px;
|
||||||
|
-o-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
}
|
||||||
|
/* below rules are only for formstyle = bootstrap
|
||||||
|
trying to make errors look like bootstrap ones */
|
||||||
|
div.controls .error_wrapper{
|
||||||
|
display:inline-block;
|
||||||
|
margin-bottom:0;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
div.controls .error{
|
||||||
|
min-width:5px;
|
||||||
|
background:inherit;
|
||||||
|
color:#B94A48;
|
||||||
|
border:none;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
/*display:inline;*/ /* uncommenting this, the animation effect is lost */
|
||||||
|
}
|
||||||
|
div.controls .help-inline{color:#3A87AD;}
|
||||||
|
div.controls .error_wrapper +.help-inline {margin-left:-99999px;}
|
||||||
|
div.controls select +.error_wrapper {margin-left:5px;}
|
||||||
|
.ie-lte7 div.error{color:#fff;}
|
||||||
|
|
||||||
|
/* beautify brand */
|
||||||
|
.navbar-inverse .brand{color:#c6cecc;}
|
||||||
|
.navbar-inverse .brand b{display:inline-block;margin-top:-1px;}
|
||||||
|
.navbar-inverse .brand b>span{font-size:22px;color:white}
|
||||||
|
.navbar-inverse .brand:hover b>span{color:white}
|
||||||
|
/* beautify web2py link in navbar */
|
||||||
|
span.highlighted{color:#d8d800;}
|
||||||
|
.open span.highlighted{color:#ffff00;}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
OVERRIDING WEB2PY.CSS RULES
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
/* reset to default */
|
||||||
|
a{white-space:normal;}
|
||||||
|
li{margin-bottom:0;}
|
||||||
|
textarea,button{display:block;}
|
||||||
|
/*reset ul padding */
|
||||||
|
ul#navbar{padding:0;}
|
||||||
|
/* label aligned to related input */
|
||||||
|
td.w2p_fl,td.w2p_fc {padding:0;}
|
||||||
|
#web2py_user_form td{vertical-align:middle;}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
OVERRIDING BOOTSTRAP.CSS RULES
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
/* because web2py handles this via js */
|
||||||
|
.hidden{visibility:visible;}
|
||||||
|
/* right folder for bootstrap black images/icons */
|
||||||
|
[class^="icon-"],[class*=" icon-"]{
|
||||||
|
background-image:url("../images/glyphicons-halflings.png")
|
||||||
|
}
|
||||||
|
/* right folder for bootstrap white images/icons */
|
||||||
|
.icon-white,
|
||||||
|
.nav-tabs > .active > a > [class^="icon-"],
|
||||||
|
.nav-tabs > .active > a > [class*=" icon-"],
|
||||||
|
.nav-pills > .active > a > [class^="icon-"],
|
||||||
|
.nav-pills > .active > a > [class*=" icon-"],
|
||||||
|
.nav-list > .active > a > [class^="icon-"],
|
||||||
|
.nav-list > .active > a > [class*=" icon-"],
|
||||||
|
.navbar-inverse .nav > .active > a > [class^="icon-"],
|
||||||
|
.navbar-inverse .nav > .active > a > [class*=" icon-"],
|
||||||
|
.dropdown-menu > li > a:hover > [class^="icon-"],
|
||||||
|
.dropdown-menu > li > a:hover > [class*=" icon-"],
|
||||||
|
.dropdown-menu > .active > a > [class^="icon-"],
|
||||||
|
.dropdown-menu > .active > a > [class*=" icon-"] {
|
||||||
|
background-image:url("../images/glyphicons-halflings-white.png");
|
||||||
|
}
|
||||||
|
/* bootstrap has a label as input's wrapper while web2py has a div */
|
||||||
|
div>input[type="radio"],div>input[type="checkbox"]{margin:0;}
|
||||||
|
/* bootstrap has button instead of input */
|
||||||
|
input[type="button"], input[type="submit"]{margin-right:8px;}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
/*when formstyle=table3cols*/
|
||||||
|
tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;}
|
||||||
|
td.w2p_fw div>label{vertical-align:middle;}
|
||||||
|
td.w2p_fc {padding-bottom:5px;}
|
||||||
|
/*when formstyle=divs*/
|
||||||
|
div#auth_user_remember__row{margin-top:4px;}
|
||||||
|
div#auth_user_remember__row>.w2p_fl{display:none;}
|
||||||
|
div#auth_user_remember__row>.w2p_fw{min-height:39px;}
|
||||||
|
div.w2p_fw,div.w2p_fc{
|
||||||
|
display:inline-block;
|
||||||
|
vertical-align:middle;
|
||||||
|
margin-bottom:0;
|
||||||
|
}
|
||||||
|
div.w2p_fc{
|
||||||
|
padding-left:5px;
|
||||||
|
margin-top:-8px;
|
||||||
|
}
|
||||||
|
/*when formstyle=ul*/
|
||||||
|
form>ul{
|
||||||
|
list-style:none;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
li#auth_user_remember__row{margin-top:4px;}
|
||||||
|
li#auth_user_remember__row>.w2p_fl{display:none;}
|
||||||
|
li#auth_user_remember__row>.w2p_fw{min-height:39px;}
|
||||||
|
/*when formstyle=bootstrap*/
|
||||||
|
#auth_user_remember__row label.checkbox{display:block;}
|
||||||
|
span.inline-help{display:inline-block;}
|
||||||
|
input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;}
|
||||||
|
/*when recaptcha is used*/
|
||||||
|
#recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;}
|
||||||
|
td>#recaptcha{margin-bottom:6px;}
|
||||||
|
div>#recaptcha{margin-bottom:9px;}
|
||||||
|
div.control-group.error{
|
||||||
|
width:auto;
|
||||||
|
background:transparent;
|
||||||
|
border:0;
|
||||||
|
color:inherit;
|
||||||
|
padding:0;
|
||||||
|
background-repeat:repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
OTHER RULES
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
/* Massimo Di Pierro fixed alignment in forms with list:string */
|
||||||
|
form table tr{margin-bottom:9px;}
|
||||||
|
td.w2p_fw ul{margin-left:0px;}
|
||||||
|
|
||||||
|
/* web2py_console in grid and smartgrid */
|
||||||
|
.hidden{visibility:visible;}
|
||||||
|
.web2py_console input{
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.web2py_console input[type="submit"],
|
||||||
|
.web2py_console input[type="button"],
|
||||||
|
.web2py_console button{
|
||||||
|
padding-top:4px;
|
||||||
|
padding-bottom:4px;
|
||||||
|
margin:3px 0 0 2px;
|
||||||
|
}
|
||||||
|
.web2py_console a,
|
||||||
|
.web2py_console select,
|
||||||
|
.web2py_console input
|
||||||
|
{
|
||||||
|
margin:3px 0 0 2px;
|
||||||
|
}
|
||||||
|
.web2py_grid form table{width:auto;}
|
||||||
|
/* auth_user_remember checkbox extrapadding in IE fix */
|
||||||
|
.ie-lte9 input#auth_user_remember.checkbox {padding-left:0;}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
MEDIA QUERIES
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
@media only screen and (max-width:979px){
|
||||||
|
body{padding-top:0px;}
|
||||||
|
#navbar{top:5px;}
|
||||||
|
div.flash{right:5px;}
|
||||||
|
.dropdown-menu ul{visibility:visible;}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width:479px){
|
||||||
|
body{
|
||||||
|
padding-left:10px;
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
|
.navbar-fixed-top,.navbar-fixed-bottom {
|
||||||
|
margin-left:-10px;
|
||||||
|
margin-right:-10px;
|
||||||
|
}
|
||||||
|
input[type="text"],input[type="password"],select{
|
||||||
|
width:95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
/*=============================================================
|
||||||
|
BOOTSTRAP DROPDOWN MENU
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
.dropdown-menu ul{
|
||||||
|
left:100%;
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
visibility:hidden;
|
||||||
|
margin-top:-1px;
|
||||||
|
}
|
||||||
|
.dropdown-menu li:hover ul{visibility:visible;}
|
||||||
|
.navbar .dropdown-menu ul:before{
|
||||||
|
border-bottom:7px solid transparent;
|
||||||
|
border-left:none;
|
||||||
|
border-right:7px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-top:7px solid transparent;
|
||||||
|
left:-7px;
|
||||||
|
top:5px;
|
||||||
|
}
|
||||||
|
.nav > li.dropdown > a:after {
|
||||||
|
border-left: 4px solid transparent;
|
||||||
|
border-right: 4px solid transparent;
|
||||||
|
border-top: 4px solid #000000;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
height: 0;
|
||||||
|
opacity: 0.7;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
|
border-bottom-color: #FFFFFF;
|
||||||
|
border-top-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.dropdown-menu span{display:inline-block;}
|
||||||
|
ul.dropdown-menu li.dropdown > a:after {
|
||||||
|
border-left: 4px solid #000;
|
||||||
|
border-right: 4px solid transparent;
|
||||||
|
border-bottom: 4px solid transparent;
|
||||||
|
border-top: 4px solid transparent;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
height: 0;
|
||||||
|
opacity: 0.7;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.nav li.dropdown:hover ul.dropdown-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.open >.dropdown-menu ul{display:block;} /* fix menu issue when BS2.0.4 is applied */
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
BOOTSTRAP SUBMIT BUTTON
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
input[type='submit']:not(.btn) {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 14px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: whiteSmoke;
|
||||||
|
background-image: -webkit-gradient(linear,0 0,0 100%,from(white),to(#E6E6E6));
|
||||||
|
background-image: -webkit-linear-gradient(top,white,#E6E6E6);
|
||||||
|
background-image: -o-linear-gradient(top,white,#E6E6E6);
|
||||||
|
background-image: linear-gradient(to bottom,white,#E6E6E6);
|
||||||
|
background-image: -moz-linear-gradient(top,white,#E6E6E6);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border: 1px solid #BBB;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
border-bottom-color: #A2A2A2;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
|
||||||
|
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type='submit']:not(.btn):hover {
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #E6E6E6;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
-webkit-transition: background-position .1s linear;
|
||||||
|
-moz-transition: background-position .1s linear;
|
||||||
|
-o-transition: background-position .1s linear;
|
||||||
|
transition: background-position .1s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type='submit']:not(.btn).active, input[type='submit']:not(.btn):active {
|
||||||
|
background-color: #E6E6E6;
|
||||||
|
background-color: #D9D9D9 9;
|
||||||
|
background-image: none;
|
||||||
|
outline: 0;
|
||||||
|
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
||||||
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*=============================================================
|
||||||
|
OTHER
|
||||||
|
==============================================================*/
|
||||||
|
|
||||||
|
.ie-lte8 .navbar-fixed-top {position:static;}
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
|
||||||
|
Created and copyrighted by Massimo Di Pierro <massimo.dipierro@gmail.com>
|
||||||
|
(MIT license)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<script src="share.js"></script>
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
jQuery(function(){
|
||||||
|
var script_source = jQuery('script[src*="share.js"]').attr('src');
|
||||||
|
var params = function(name,default_value) {
|
||||||
|
var match = RegExp('[?&]' + name + '=([^&]*)').exec(script_source);
|
||||||
|
return match && decodeURIComponent(match[1].replace(/\+/g, ' '))||default_value;
|
||||||
|
}
|
||||||
|
var path = params('static','social');
|
||||||
|
var url = encodeURIComponent(window.location.href);
|
||||||
|
var host = window.location.hostname;
|
||||||
|
var title = escape(jQuery('title').text());
|
||||||
|
var twit = 'http://twitter.com/home?status='+title+'%20'+url;
|
||||||
|
var facebook = 'http://www.facebook.com/sharer.php?u='+url;
|
||||||
|
var gplus = 'https://plus.google.com/share?url='+url;
|
||||||
|
var tbar = '<div id="socialdrawer"><span>Share<br/></span><div id="sicons"><a href="'+twit+'" id="twit" title="Share on twitter"><img src="'+path+'/twitter.png" alt="Share on Twitter" width="32" height="32" /></a><a href="'+facebook+'" id="facebook" title="Share on Facebook"><img src="'+path+'/facebook.png" alt="Share on facebook" width="32" height="32" /></a><a href="'+gplus+'" id="gplus" title="Share on Google Plus"><img src="'+path+'/gplus-32.png" alt="Share on Google Plus" width="32" height="32" /></a></div></div>';
|
||||||
|
// Add the share tool bar.
|
||||||
|
jQuery('body').append(tbar);
|
||||||
|
var st = jQuery('#socialdrawer');
|
||||||
|
st.css({'opacity':'.7','z-index':'3000','background':'#FFF','border':'solid 1px #666','border-width':' 1px 0 0 1px','height':'20px','width':'40px','position':'fixed','bottom':'0','right':'0','padding':'2px 5px','overflow':'hidden','-webkit-border-top-left-radius':' 12px','-moz-border-radius-topleft':' 12px','border-top-left-radius':' 12px','-moz-box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)','-webkit-box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)','box-shadow':' -3px -3px 3px rgba(0,0,0,0.5)'});
|
||||||
|
jQuery('#socialdrawer a').css({'float':'left','width':'32px','margin':'3px 2px 2px 2px','padding':'0','cursor':'pointer'});
|
||||||
|
jQuery('#socialdrawer span').css({'float':'left','margin':'2px 3px','text-shadow':' 1px 1px 1px #FFF','color':'#444','font-size':'12px','line-height':'1em'});
|
||||||
|
jQuery('#socialdrawer img').hide();
|
||||||
|
// hover
|
||||||
|
st.click(function(){
|
||||||
|
jQuery(this).animate({height:'40px', width:'160px', opacity: 0.95}, 300);
|
||||||
|
jQuery('#socialdrawer img').show();
|
||||||
|
});
|
||||||
|
//leave
|
||||||
|
st.mouseleave(function(){
|
||||||
|
st.animate({height:'20px', width: '40px', opacity: .7}, 300);
|
||||||
|
jQuery('#socialdrawer img').hide();
|
||||||
|
return false;
|
||||||
|
} );
|
||||||
|
});
|
||||||
@@ -1,223 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Superfish v1.4.8 - jQuery menu widget
|
|
||||||
* Copyright (c) 2008 Joel Birch
|
|
||||||
*
|
|
||||||
* Dual licensed under the MIT and GPL licenses:
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
|
|
||||||
*/
|
|
||||||
|
|
||||||
;(function($){
|
|
||||||
$.fn.superfish = function(op){
|
|
||||||
|
|
||||||
var sf = $.fn.superfish,
|
|
||||||
c = sf.c,
|
|
||||||
$arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')),
|
|
||||||
over = function(){
|
|
||||||
var $$ = $(this), menu = getMenu($$);
|
|
||||||
clearTimeout(menu.sfTimer);
|
|
||||||
$$.showSuperfishUl().siblings().hideSuperfishUl();
|
|
||||||
},
|
|
||||||
out = function(){
|
|
||||||
var $$ = $(this), menu = getMenu($$), o = sf.op;
|
|
||||||
clearTimeout(menu.sfTimer);
|
|
||||||
menu.sfTimer=setTimeout(function(){
|
|
||||||
o.retainPath=($.inArray($$[0],o.$path)>-1);
|
|
||||||
$$.hideSuperfishUl();
|
|
||||||
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
|
|
||||||
},o.delay);
|
|
||||||
},
|
|
||||||
getMenu = function($menu){
|
|
||||||
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
|
|
||||||
sf.op = sf.o[menu.serial];
|
|
||||||
return menu;
|
|
||||||
},
|
|
||||||
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
|
|
||||||
|
|
||||||
return this.each(function() {
|
|
||||||
var s = this.serial = sf.o.length;
|
|
||||||
var o = $.extend({},sf.defaults,op);
|
|
||||||
o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
|
|
||||||
$(this).addClass([o.hoverClass,c.bcClass].join(' '))
|
|
||||||
.filter('li:has(ul)').removeClass(o.pathClass);
|
|
||||||
});
|
|
||||||
sf.o[s] = sf.op = o;
|
|
||||||
|
|
||||||
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
|
|
||||||
if (o.autoArrows) addArrow( $('>a:first-child',this) );
|
|
||||||
})
|
|
||||||
.not('.'+c.bcClass)
|
|
||||||
.hideSuperfishUl();
|
|
||||||
|
|
||||||
var $a = $('a',this);
|
|
||||||
$a.each(function(i){
|
|
||||||
var $li = $a.eq(i).parents('li');
|
|
||||||
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
|
|
||||||
});
|
|
||||||
o.onInit.call(this);
|
|
||||||
|
|
||||||
}).each(function() {
|
|
||||||
var menuClasses = [c.menuClass];
|
|
||||||
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
|
|
||||||
$(this).addClass(menuClasses.join(' '));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var sf = $.fn.superfish;
|
|
||||||
sf.o = [];
|
|
||||||
sf.op = {};
|
|
||||||
sf.IE7fix = function(){
|
|
||||||
var o = sf.op;
|
|
||||||
if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
|
|
||||||
this.toggleClass(sf.c.shadowClass+'-off');
|
|
||||||
};
|
|
||||||
sf.c = {
|
|
||||||
bcClass : 'sf-breadcrumb',
|
|
||||||
menuClass : 'sf-js-enabled',
|
|
||||||
anchorClass : 'sf-with-ul',
|
|
||||||
arrowClass : 'sf-sub-indicator',
|
|
||||||
shadowClass : 'sf-shadow'
|
|
||||||
};
|
|
||||||
sf.defaults = {
|
|
||||||
hoverClass : 'sfHover',
|
|
||||||
pathClass : 'overideThisToUse',
|
|
||||||
pathLevels : 1,
|
|
||||||
delay : 800,
|
|
||||||
animation : {opacity:'show'},
|
|
||||||
speed : 'normal',
|
|
||||||
autoArrows : true,
|
|
||||||
dropShadows : true,
|
|
||||||
disableHI : false, // true disables hoverIntent detection
|
|
||||||
onInit : function(){}, // callback functions
|
|
||||||
onBeforeShow: function(){},
|
|
||||||
onShow : function(){},
|
|
||||||
onHide : function(){}
|
|
||||||
};
|
|
||||||
$.fn.extend({
|
|
||||||
hideSuperfishUl : function(){
|
|
||||||
var o = sf.op,
|
|
||||||
not = (o.retainPath===true) ? o.$path : '';
|
|
||||||
o.retainPath = false;
|
|
||||||
var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
|
|
||||||
.find('>ul').hide().css('visibility','hidden');
|
|
||||||
o.onHide.call($ul);
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
showSuperfishUl : function(){
|
|
||||||
var o = sf.op,
|
|
||||||
sh = sf.c.shadowClass+'-off',
|
|
||||||
$ul = this.addClass(o.hoverClass)
|
|
||||||
.find('>ul:hidden').css('visibility','visible');
|
|
||||||
sf.IE7fix.call($ul);
|
|
||||||
o.onBeforeShow.call($ul);
|
|
||||||
$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Supersubs v0.2b - jQuery plugin
|
|
||||||
* Copyright (c) 2008 Joel Birch
|
|
||||||
*
|
|
||||||
* Dual licensed under the MIT and GPL licenses:
|
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
|
|
||||||
* their longest list item children. If you use this, please expect bugs and report them
|
|
||||||
* to the jQuery Google Group with the word 'Superfish' in the subject line.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
;(function($){ // $ will refer to jQuery within this closure
|
|
||||||
|
|
||||||
$.fn.supersubs = function(options){
|
|
||||||
var opts = $.extend({}, $.fn.supersubs.defaults, options);
|
|
||||||
// return original object to support chaining
|
|
||||||
return this.each(function() {
|
|
||||||
// cache selections
|
|
||||||
var $$ = $(this);
|
|
||||||
// support metadata
|
|
||||||
var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
|
|
||||||
// get the font size of menu.
|
|
||||||
// .css('fontSize') returns various results cross-browser, so measure an em dash instead
|
|
||||||
var fontsize = $('<li id="menu-fontsize">—</li>').css({
|
|
||||||
'padding' : 0,
|
|
||||||
'position' : 'absolute',
|
|
||||||
'top' : '-999em',
|
|
||||||
'width' : 'auto'
|
|
||||||
}).appendTo($$).width(); //clientWidth is faster, but was incorrect here
|
|
||||||
// remove em dash
|
|
||||||
$('#menu-fontsize').remove();
|
|
||||||
// cache all ul elements
|
|
||||||
$ULs = $$.find('ul');
|
|
||||||
// loop through each ul in menu
|
|
||||||
$ULs.each(function(i) {
|
|
||||||
// cache this ul
|
|
||||||
var $ul = $ULs.eq(i);
|
|
||||||
// get all (li) children of this ul
|
|
||||||
var $LIs = $ul.children();
|
|
||||||
// get all anchor grand-children
|
|
||||||
var $As = $LIs.children('a');
|
|
||||||
// force content to one line and save current float property
|
|
||||||
var liFloat = $LIs.css('white-space','nowrap').css('float');
|
|
||||||
// remove width restrictions and floats so elements remain vertically stacked
|
|
||||||
var emWidth = $ul.add($LIs).add($As).css({
|
|
||||||
'float' : 'none',
|
|
||||||
'width' : 'auto'
|
|
||||||
})
|
|
||||||
// this ul will now be shrink-wrapped to longest li due to position:absolute
|
|
||||||
// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
|
|
||||||
.end().end()[0].clientWidth / fontsize;
|
|
||||||
// add more width to ensure lines don't turn over at certain sizes in various browsers
|
|
||||||
emWidth += o.extraWidth;
|
|
||||||
// restrict to at least minWidth and at most maxWidth
|
|
||||||
if (emWidth > o.maxWidth) { emWidth = o.maxWidth; }
|
|
||||||
else if (emWidth < o.minWidth) { emWidth = o.minWidth; }
|
|
||||||
emWidth += 'em';
|
|
||||||
// set ul to width in ems
|
|
||||||
$ul.css('width',emWidth);
|
|
||||||
// restore li floats to avoid IE bugs
|
|
||||||
// set li width to full width of this ul
|
|
||||||
// revert white-space to normal
|
|
||||||
$LIs.css({
|
|
||||||
'float' : liFloat,
|
|
||||||
'width' : '100%',
|
|
||||||
'white-space' : 'normal'
|
|
||||||
})
|
|
||||||
// update offset position of descendant ul to reflect new width of parent
|
|
||||||
.each(function(){
|
|
||||||
var $childUl = $('>ul',this);
|
|
||||||
var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
|
|
||||||
$childUl.css(offsetDirection,$ul.width());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// expose defaults
|
|
||||||
$.fn.supersubs.defaults = {
|
|
||||||
minWidth : 9, // requires em unit.
|
|
||||||
maxWidth : 25, // requires em unit.
|
|
||||||
extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery); // plugin code ends
|
|
||||||
|
|
||||||
/**
|
|
||||||
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
|
|
||||||
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
|
||||||
*
|
|
||||||
* @param f onMouseOver function || An object with configuration options
|
|
||||||
* @param g onMouseOut function || Nothing (use configuration options object)
|
|
||||||
* @author Brian Cherne brian(at)cherne(dot)net
|
|
||||||
*/
|
|
||||||
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
|
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// this code improves bootstrap menus and adds dropdown support
|
||||||
|
jQuery(function(){
|
||||||
|
jQuery('.nav>li>a').each(function(){
|
||||||
|
if(jQuery(this).parent().find('ul').length)
|
||||||
|
jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append('<b class="caret"></b>');
|
||||||
|
});
|
||||||
|
jQuery('.nav li li').each(function(){
|
||||||
|
if(jQuery(this).find('ul').length)
|
||||||
|
jQuery(this).addClass('dropdown-submenu');
|
||||||
|
});
|
||||||
|
function hoverMenu(){
|
||||||
|
var wid = document.documentElement.clientWidth; //faster than $(window).width() and cross browser
|
||||||
|
if (wid>=980){
|
||||||
|
jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){
|
||||||
|
mi = jQuery(this).addClass('open');
|
||||||
|
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400);
|
||||||
|
}, function(){
|
||||||
|
mi = jQuery(this);
|
||||||
|
mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
hoverMenu(); // first page load
|
||||||
|
jQuery(window).resize(hoverMenu); // on resize event
|
||||||
|
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
||||||
|
// make all buttons bootstrap buttons
|
||||||
|
jQuery('button, form input[type="submit"], form input[type="button"]').addClass('btn');
|
||||||
|
});
|
||||||
@@ -5,38 +5,32 @@
|
|||||||
|
|
||||||
<h2>web2py<sup style="font-size:0.5em;">TM</sup> Download</h2>
|
<h2>web2py<sup style="font-size:0.5em;">TM</sup> Download</h2>
|
||||||
|
|
||||||
<div style="width: 90%; margin: 0 auto;">
|
<center style="padding:20px">
|
||||||
<center>
|
|
||||||
<table class="downloads">
|
<table class="downloads">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Current ({{="%s.%s.%s %s" % (version[0],version[1],version[2],version[4])}})</th>
|
<th>For Normal Users</th>
|
||||||
<th>Nightly Build (for testers)</th>
|
<th>For Testers</th>
|
||||||
<th>Trunk (for developers)</th>
|
<th>For Developers</th>
|
||||||
<th>plugin_wiki (add-on)</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/web2py_win.zip">For Windows</a></td>
|
<td><a class="btn btn-180 btn-success" href="http://www.web2py.com/examples/static/web2py_win.zip">For Windows</a></td>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/nightly/web2py_win.zip">For Windows</a></td>
|
<td><a class="btn btn-180 btn-warning" href="http://www.web2py.com/examples/static/nightly/web2py_win.zip">For Windows</a></td>
|
||||||
<td><a class="button" href="http://github.com/web2py/web2py/" target="_blank">Git Repository</a></td>
|
<td><a class="btn btn-180 btn-danger" href="http://github.com/web2py/web2py/">Git Repository</a></td>
|
||||||
<td><a class="button" href="http://web2py.com/examples/static/web2py.plugin.wiki.w2p">Download</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/web2py_osx.zip">For Mac</a></td>
|
<td><a class="btn btn-180 btn-success" href="http://www.web2py.com/examples/static/web2py_osx.zip">For Mac</a></td>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/nightly/web2py_osx.zip">For Mac</a></td>
|
<td><a class="btn btn-180 btn-warning" href="http://www.web2py.com/examples/static/nightly/web2py_osx.zip">For Mac</a></td>
|
||||||
<td><a class="button" href="http://code.google.com/p/web2py/" target="_blank">Mercurial Repository</a></td>
|
<td><a class="btn btn-180 btn-danger" href="http://code.google.com/p/web2py/">Mercurial Repository</a></td>
|
||||||
<td><a class="button" href="http://code.google.com/p/cube2py/" target="_blank">Mercurial Repository</a>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/web2py_src.zip">Source Code</a></td>
|
<td><a class="btn btn-180 btn-success" href="http://www.web2py.com/examples/static/web2py_src.zip">Source Code</a></td>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/nightly/web2py_src.zip">Source Code</a></td>
|
<td><a class="btn btn-180 btn-warning" href="http://www.web2py.com/examples/static/nightly/web2py_src.zip">Source Code</a></td>
|
||||||
<td><a class="button" href="{{=URL('static', 'epydoc/index.html')}}" target="_blank">Source Code Docs</a></td>
|
<td><a class="btn btn-180 btn-danger" href="{{=URL('static', 'epydoc/index.html')}}">Epydoc</a></td>
|
||||||
<td><a class="button" href="http://vimeo.com/13485916" target="_blank">What is plugin_wiki?</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="button" href="{{=URL('changelog')}}">Change Log</a></td>
|
<td><a class="btn btn-180 btn-success" href="https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf">Manual</a></td>
|
||||||
<td><a class="button" href="http://www.web2py.com/examples/static/nightly/tests.log">Unittest Log</a></td>
|
<td><a class="btn btn-180" href="{{=URL('changelog')}}">Change Log</a></td>
|
||||||
<td><a class="button" href="http://code.google.com/p/web2py/issues/list" target="_blank">Issue Tracker</a></td>
|
<td><a class="btn btn-180" href="http://code.google.com/p/web2py/issues/list">Report a Bug</a></td>
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</center>
|
</center>
|
||||||
@@ -64,28 +58,28 @@
|
|||||||
<p>Applications built with web2py can be released under any license the author wishes as long they do not contain web2py code. They can link unmodified web2py libraries and they can be distributed with official web2py binaries. In particular web2py applications can be distributed in closed source. The admin interface provides a button to byte-code compile.</p>
|
<p>Applications built with web2py can be released under any license the author wishes as long they do not contain web2py code. They can link unmodified web2py libraries and they can be distributed with official web2py binaries. In particular web2py applications can be distributed in closed source. The admin interface provides a button to byte-code compile.</p>
|
||||||
<p>It is fine to distribute web2py (source or compiled) with your applications as long as you make it clear in the license where your application ends and web2py starts.</p>
|
<p>It is fine to distribute web2py (source or compiled) with your applications as long as you make it clear in the license where your application ends and web2py starts.</p>
|
||||||
<p>web2py is copyrighted by Massimo Di Pierro. The web2py trademark is owned by Massimo Di Pierro.</p>
|
<p>web2py is copyrighted by Massimo Di Pierro. The web2py trademark is owned by Massimo Di Pierro.</p>
|
||||||
[<a href="{{=URL('license')}}">read more</a>]
|
<a class="btn btn-small" href="{{=URL('license')}}">read more</a>
|
||||||
|
|
||||||
<h3>Artwork</h3>
|
<h3>Artwork</h3>
|
||||||
<center>
|
<center>
|
||||||
<a href="{{=URL('static', 'images/logo_lb.png')}}"><img src="{{=URL('static', 'images/logo_lb.png')}}" width="200px"/></a>
|
<a href="{{=URL('static', 'images/logo_lb.png')}}"><img src="{{=URL('static', 'images/logo_lb.png')}}" width="200px"/></a>
|
||||||
<a href="{{=URL('static', 'images/logo_db.png')}}"><img src="{{=URL('static', '\
|
<a href="{{=URL('static', 'images/logo_db.png')}}"><img src="{{=URL('static', '\
|
||||||
images/logo_db.png')}}" width="200px"/></a>
|
images/logo_db.png')}}" width="200px"/></a>
|
||||||
<a href="{{=URL('static', 'images/logo_bw.png')}}"><img src="{{=URL('static', '\
|
<a href="{{=URL('static', 'images/logo_bw.png')}}"><img src="{{=URL('static', '\
|
||||||
images/logo_bw.png')}}" width="200px"/></a>
|
images/logo_bw.png')}}" width="200px"/></a>
|
||||||
</center>
|
</center>
|
||||||
<h3>Stickers</h3>
|
<h3>Stickers</h3>
|
||||||
<center>
|
<center>
|
||||||
<a href="{{=URL('static', 'images/Stickers1.png')}}"><img src="{{=URL('static', 'images/Stickers1.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers1.png')}}"><img src="{{=URL('static', 'images/Stickers1.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers2.png')}}"><img src="{{=URL('static', 'images/Stickers2.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers2.png')}}"><img src="{{=URL('static', 'images/Stickers2.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers3.png')}}"><img src="{{=URL('static', 'images/Stickers3.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers3.png')}}"><img src="{{=URL('static', 'images/Stickers3.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers4.png')}}"><img src="{{=URL('static', 'images/Stickers4.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers4.png')}}"><img src="{{=URL('static', 'images/Stickers4.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers5.png')}}"><img src="{{=URL('static', 'images/Stickers5.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers5.png')}}"><img src="{{=URL('static', 'images/Stickers5.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers6.png')}}"><img src="{{=URL('static', 'images/Stickers6.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers6.png')}}"><img src="{{=URL('static', 'images/Stickers6.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers7.png')}}"><img src="{{=URL('static', 'images/Stickers7.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers7.png')}}"><img src="{{=URL('static', 'images/Stickers7.png')}}" /></a>
|
||||||
<a href="{{=URL('static', 'images/Stickers8.png')}}"><img src="{{=URL('static', 'images/Stickers8.png')}}" /></a>
|
<a href="{{=URL('static', 'images/Stickers8.png')}}"><img src="{{=URL('static', 'images/Stickers8.png')}}" /></a>
|
||||||
</center>
|
</center>
|
||||||
|
<p></p>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{=URL('static', 'artwork.tar.gz')}}" >Download WEB2PY artwork pack in editable .png format</a>
|
<a href="{{=URL('static', 'artwork.tar.gz')}}" >Download WEB2PY artwork pack in editable .png format</a>
|
||||||
</p>
|
</p>
|
||||||
@@ -99,6 +93,3 @@
|
|||||||
Icon set made by <a href="http://chrfb.deviantart.com">Christian Burprich</a> licensed under a <a rel="license" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 License</a>
|
Icon set made by <a href="http://chrfb.deviantart.com">Christian Burprich</a> licensed under a <a rel="license" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 License</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{block sidebar}}{{end}}
|
|
||||||
{{block leftbadges}}{{end}}
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ def raiseexception():
|
|||||||
return 'oops'
|
return 'oops'
|
||||||
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
""".strip(),language='web2py',link=URL('global','vars'),_class='boxCode')}}
|
||||||
<p>If an exception occurs (other than HTTP) a ticket is generated and the event is logged for the administrator. These tickets and logs can be accessed, reviewed and deleted at any later time.
|
<p>If an exception occurs (other than HTTP) a ticket is generated and the event is logged for the administrator. These tickets and logs can be accessed, reviewed and deleted at any later time.
|
||||||
<br/>Try it here: <a href="/{{=request.application}}/simple_examples/raiseexception">raiseexception</a></p>
|
|
||||||
|
|
||||||
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
|
<h3>Example {{=c}}{{c+=1}}</h3><b>In controller: simple_examples.py</b>
|
||||||
{{=CODE("""
|
{{=CODE("""
|
||||||
@@ -605,7 +604,7 @@ def fade():
|
|||||||
|
|
||||||
<h3>Excel-like spreadsheet via Ajax</h3>
|
<h3>Excel-like spreadsheet via Ajax</h3>
|
||||||
Web2py includes a widget that acts like an Excel-like spreadsheet and can be used to build forms
|
Web2py includes a widget that acts like an Excel-like spreadsheet and can be used to build forms
|
||||||
[<a href="{{=URL('spreadsheet','index')}}">read more</a>].
|
<a class="btn btn-small" href="{{=URL('spreadsheet','index')}}">read more</a>.
|
||||||
|
|
||||||
<h2 id="testing_examples">Testing Examples</h2>
|
<h2 id="testing_examples">Testing Examples</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{{right_sidebar_enabled=True}}
|
|
||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
{{
|
{{
|
||||||
import random
|
import random
|
||||||
@@ -14,73 +13,70 @@ quotes = [
|
|||||||
random.shuffle(quotes)
|
random.shuffle(quotes)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<table width="100%">
|
<div class="row-fluid">
|
||||||
<tr>
|
<div class="span12">
|
||||||
<td>
|
<div class="span8">
|
||||||
<a href="http://web2py.com/book">
|
<h3>web2py<sup>TM</sup> Web Framework</h3>
|
||||||
<img src="{{=URL('static','images/book-4th.png')}}" />
|
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#Security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>.</p>
|
||||||
</a>
|
<table width="100%">
|
||||||
</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="http://link.packtpub.com/SUlnrN">
|
<a href="http://web2py.com/book">
|
||||||
<img src="{{=URL('static','images/book-recipes.png')}}" />
|
<img src="{{=URL('static','images/book-5th.png')}}" />
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="http://www.youtube.com/playlist?list=PL5E2E223FE3777851">
|
<a href="http://link.packtpub.com/SUlnrN">
|
||||||
<img src="{{=URL('static','images/videos.png')}}" />
|
<img src="{{=URL('static','images/book-recipes.png')}}" />
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<a href="http://www.youtube.com/playlist?list=PL5E2E223FE3777851">
|
||||||
|
<img src="{{=URL('static','images/videos.png')}}" />
|
||||||
|
</a>
|
||||||
<h3>WEB2PY<sup>TM</sup> WEB FRAMEWORK</h3>
|
</td>
|
||||||
<p>Free open source full-stack framework for rapid development of fast, scalable, <a href="http://www.web2py.com/book/default/chapter/01#security" target="_blank">secure</a> and portable database-driven web-based applications. Written and programmable in <a href="http://www.python.org" target="_blank">Python</a>. <a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>.
|
</tr>
|
||||||
Current version: {{="%s.%s.%s (%s) %s" % request.env.web2py_version}}</p>
|
</table>
|
||||||
|
<p>Current version: <a href="{{=URL('download')}}">{{=request.env.web2py_version}} (<a href="http://www.gnu.org/licenses/lgpl.html">LGPLv3 License</a>)</p>
|
||||||
{{block extra}}
|
|
||||||
<div class="container aboutW2P">
|
|
||||||
<div class="sixteen columns">
|
|
||||||
<div class="one-third column alpha">
|
|
||||||
<h3><a href="{{=URL('what')}}">BATTERIES INCLUDED</a></h3>
|
|
||||||
<p>Everything you need in one package including fast multi-threaded web server, SQL database and web-based interface. No third party dependencies but works with <a href={{=URL('what')}}>third party tools</a>.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="one-third column">
|
<div class="span4" style="text-align:center">
|
||||||
<h3><a href="http://web2py.com/demo_admin">WEB-BASED IDE</a></h3>
|
<a href="http://www.infoworld.com/slideshow/24605/infoworlds-2012-technology-of-the-year-award-winners-183313#slide23"><img src="{{=URL('static','images/infoworld2012.jpeg')}}" width="200px"/></a><br/>
|
||||||
<p>Create, modify, deploy and manage application from anywhere using your browser. One web2py instance can run multiple web sites using different databases. Try the <a href="http://web2py.com/demo_admin">interactive demo</a>.</p>
|
<a class="btn btn-danger" href="{{=URL('download')}}" style="margin-top:10px; width:180px; color:white">Download Now</a><br/>
|
||||||
</div>
|
<a class="btn btn-danger" href="http://web2py.com/demo_admin" style="margin-top:10px; width:180px; color:white">Online Demo</a><br/>
|
||||||
<div class="one-third column omega">
|
<a class="btn btn-danger" href="http://web2py.com/poweredby" style="margin-top:10px; width:180px; color:white">Sites Powereb by web2py</a>
|
||||||
<h3><a href="{{=URL('documentation')}}">EXTENSIVE DOCS</a></h3>
|
|
||||||
<p>Start with some <a href="{{=URL('examples')}}">quick examples</a>, then read the <a href="http://web2py.com/book" target="_blank">manual</a>, watch <a href="http://vimeo.com/album/178500" target="_blank">videos</a>, and join a <a href="{{=URL('default', 'usergroups')}}">user group</a> for discussion. Take advantage of the <a href="http://web2py.com/layouts" target="_blank">layouts</a>, <a href="http://dev.s-cubism.com/web2py_plugins" target="_blank">plugins</a>, <a href="http://www.web2py.com/appliances" target="_blank">appliances</a>, and <a href="http://web2pyslices.com" target="_blank">recipes</a>.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img class="scale-with-grid centered" src="/examples/static/images/shadow-bottom.png">
|
<div class="row-fluid">
|
||||||
<div class="container userQuotes">
|
<div class="span12">
|
||||||
<div class="sixteen columns">
|
<div class="span4">
|
||||||
<!-- img src="{{=URL('static','images/shadow-bottom.png')}}" width="100%"/ -->
|
<h3><a href="{{=URL('what')}}">Batteries Included</a></h3>
|
||||||
|
<p>Everything you need in one package including fast multi-threaded web server, SQL database and web-based interface. No third party dependencies but works with <a href={{=URL('what')}}>third party tools</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
|
<h3><a href="http://web2py.com/demo_admin">Web-Based IDE</a></h3>
|
||||||
|
<p>Create, modify, deploy and manage application from anywhere using your browser. One web2py instance can run multiple web sites using different databases. Try the <a href="http://www.web2py.com/demo_admin">interactive demo</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
|
<h3><a href="{{=URL('documentation')}}">Extensive Docs</a></h3>
|
||||||
|
<p>Start with some <a href="{{=URL('examples')}}">quick examples</a>, then read the <a href="http://www.web2py.com/book" target="_blank">manual</a>, watch <a href="http://vimeo.com/album/178500" target="_blank">videos</a>, and join a <a href="{{=URL('default', 'usergroups')}}">user group</a> for discussion. Take advantage of the <a href="http://www.web2py.com/layouts" target="_blank">layouts</a>, <a href="http://dev.s-cubism.com/web2py_plugins" target="_blank">plugins</a>, <a href="http://www.web2py.com/appliances" target="_blank">appliances</a>, and <a href="http://web2pyslices.com" target="_blank">recipes</a>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<img class="scale-with-grid centered" src="/examples/static/images/shadow-bottom.png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
{{for k,quote in enumerate(quotes[:3]):}}
|
{{for k,quote in enumerate(quotes[:3]):}}
|
||||||
<div class="one-third column {{=[' alpha', '', ' omega'][k]}}">
|
<div class="span4">
|
||||||
<em>
|
<p style="text-align: left"><em>{{=quote[0]}}</em></p>
|
||||||
<p>{{=quote[0]}}</p>
|
|
||||||
</em>
|
|
||||||
<span class="right">
|
<span class="right">
|
||||||
<a href="{{=quote[2]}}"><em>—{{=quote[1]}}</em></a>
|
<a href="{{=quote[2]}}">{{=quote[1]}}</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{block right_sidebar}}
|
|
||||||
<div class="one-third column" style="text-align:center">
|
|
||||||
<img class="scale-with-grid centered" src="{{=URL('static','images/tag-cloud-color-small.png')}}" width="300px"/>
|
|
||||||
<br/>
|
|
||||||
<a class="button" href="{{=URL('download')}}" style="width:90%">DOWNLOAD NOW</a><br/>
|
|
||||||
<a class="button" href="http://web2py.com/demo_admin" style="width:90%">ONLINE DEMO</a><br/>
|
|
||||||
<a class="button" href="http://web2py.com/poweredby" style="width:90%">SITES POWERED BY WEB2PY</a><br/>
|
|
||||||
<a class="button" href="http://www.chipin.com/contribute/id/dcd384d58839aa4d" style="width:90%">SUPPORT/DONATE</a></br>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|||||||
@@ -147,8 +147,7 @@
|
|||||||
|
|
||||||
<li><a href="http://www.python.org">Python</a> created by Guido van Rossum.</li>
|
<li><a href="http://www.python.org">Python</a> created by Guido van Rossum.</li>
|
||||||
<li>Rocket Web Server developed by Timothy Farrell.</li>
|
<li>Rocket Web Server developed by Timothy Farrell.</li>
|
||||||
<li><a href="http://www.cdolivet.com/index.php?page=editArea">EditArea</a> developed by Christophe Dolivet</li>
|
<li><a href="http://codemirror.net/">CodeMirror</a></li>
|
||||||
<li><a href="http://nicedit.com">nicEdit</a> developed by <a href="http://bkirchoff.com">Brian Kirchoff</a></li>
|
|
||||||
<li><a href="http://cheeseshop.python.org/pypi/simplejson">simplejson</a> developed by Bob Ippolito</li>
|
<li><a href="http://cheeseshop.python.org/pypi/simplejson">simplejson</a> developed by Bob Ippolito</li>
|
||||||
<li><a href="http://pyrtf.sourceforge.net/">PyRTF</a> developed by Simon Cusack and revised by Grant Edwards</li>
|
<li><a href="http://pyrtf.sourceforge.net/">PyRTF</a> developed by Simon Cusack and revised by Grant Edwards</li>
|
||||||
<li><a href="http://www.dalkescientific.com/Python/PyRSS2Gen.html">PyRSS2Gen</a> developed by Dalke Scientific Software</li>
|
<li><a href="http://www.dalkescientific.com/Python/PyRSS2Gen.html">PyRSS2Gen</a> developed by Dalke Scientific Software</li>
|
||||||
@@ -159,8 +158,8 @@
|
|||||||
<li><a href="http://jquery.com/">jQuery</a> developed by John Resig</li>
|
<li><a href="http://jquery.com/">jQuery</a> developed by John Resig</li>
|
||||||
<li>A syntax highlighter inspired by the code of <a href="http://www.petersblog.org/node/763">Peter Wilkinson</a></li>
|
<li>A syntax highlighter inspired by the code of <a href="http://www.petersblog.org/node/763">Peter Wilkinson</a></li>
|
||||||
<li><a href="https://github.com/jtauber/pyuca">pyUCA</a> developed by <a href="http://jtauber.com/blog/2006/01/27/python_unicode_collation_algorithm/">James Tauber</a></li>
|
<li><a href="https://github.com/jtauber/pyuca">pyUCA</a> developed by <a href="http://jtauber.com/blog/2006/01/27/python_unicode_collation_algorithm/">James Tauber</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
(... and other third party modules in the contrib folder).
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,46 +2,53 @@
|
|||||||
{{import cgi}}
|
{{import cgi}}
|
||||||
|
|
||||||
<div class="contentleft">
|
<div class="contentleft">
|
||||||
<h1>{{=T('Docs for')}} {{=title}}</h1>
|
<h1>{{=T('Docs for')}} {{=title}}</h1>
|
||||||
|
|
||||||
<div align="right">
|
<div align="right">
|
||||||
[ <a href="http://docs.python.org/tut/">Python Tutorial</a> ]
|
[ <a href="http://docs.python.org/tut/">Python Tutorial</a> ]
|
||||||
[ <a href="http://docs.python.org/lib/">Python Libraries</a> ]
|
[ <a href="http://docs.python.org/lib/">Python Libraries</a> ]
|
||||||
[ <a href="/{{=request.application}}/static/epydoc/index.html">web2py epydoc</a> ]
|
[ <a href="/{{=request.application}}/static/epydoc/index.html">web2py epydoc</a> ]
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>{{=T('Description')}}</h2>
|
<h2>{{=T('Description')}}</h2>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
{{if t:}}
|
{{if t:}}
|
||||||
{{=t}}{{if d:}} extends {{=d}}{{pass}}
|
{{=t}}{{if d:}} extends {{=d}}{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<br/>
|
<br/>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{if doc:}}<br/><br/>{{=CODE(str(doc),language=None,counter=None,_class='boxCode')}}{{pass}}
|
{{if doc:}}<br/><br/>{{=MARKMIN(doc)}}{{pass}}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<div class="boxInfo">
|
<div class="boxInfo">
|
||||||
|
{{if attributes:}}
|
||||||
<h2>{{=T('Attributes')}}</h2>
|
<h2>{{=T('Attributes')}}</h2>
|
||||||
|
|
||||||
{{keys=attributes.keys(); keys.sort()}}
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td colspan=2><hr/></td></tr>
|
<tr><td colspan=2><hr/></td></tr>
|
||||||
{{for a in keys:}}
|
{{for key in sorted(attributes):}}
|
||||||
{{doc1,t1,c1,d1=attributes[a]}}
|
{{doc1,t1,c1,d1=attributes[key]}}
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>{{#=a}}</b>{{=A(a,_href=URL(r=request,args=a.split('.')))}}</td>
|
<td>
|
||||||
<td>
|
{{if key.count('.')<2:}}
|
||||||
{{if t1:}}
|
{{=A(key,_rel="nofollow",_href=URL(args=key.split('.')))}}
|
||||||
{{=t1}}{{if d1:}} extends {{=d1}}{{pass}}
|
{{else:}}
|
||||||
{{if c1:}} belongs to class {{=c1}}{{pass}}
|
{{=key}}
|
||||||
<br/>
|
{{pass}}
|
||||||
{{pass}}
|
</td>
|
||||||
{{if doc1:}}{{=XML(cgi.escape(str(doc1)).replace(chr(13),'<br/>'))}}{{pass}}
|
<td>
|
||||||
|
{{if t1:}}
|
||||||
|
{{=t1}}{{if d1:}} extends {{=d1}}{{pass}}
|
||||||
|
{{if c1:}} belongs to class {{=c1}}{{pass}}
|
||||||
|
<br/>
|
||||||
|
{{pass}}
|
||||||
|
{{if doc1:}}{{=MARKMIN(doc1)}}{{pass}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan=2><hr/></td></tr>
|
<tr><td colspan=2><hr/></td></tr>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{{pass}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<!--[if HTML5]><![endif]-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||||
<!--[if lt IE 7]><html class="ie ie6 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if lt IE 7]><html class="ie ie6 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
||||||
@@ -6,139 +7,167 @@
|
|||||||
<!--[if IE 9]><html class="ie9 ie-lte9 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if IE 9]><html class="ie9 ie-lte9 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
||||||
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
|
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<title>{{=response.title or request.application}}</title>
|
||||||
|
<!--[if !HTML5]>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge{{=not request.is_local and ',chrome=1' or ''}}">
|
||||||
|
<![endif]-->
|
||||||
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
|
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
|
||||||
<!-- Always force latest IE rendering engine
|
<!-- Always force latest IE rendering engine
|
||||||
(even in intranet) & Chrome Frame
|
(even in intranet) & Chrome Frame
|
||||||
Remove this if you use the .htaccess -->
|
Remove this if you use the .htaccess -->
|
||||||
<!--[if IE]>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
<title>{{=response.title or request.application}}</title>
|
<meta charset="utf-8" />
|
||||||
|
|
||||||
<!-- http://dev.w3.org/html5/markup/meta.name.html -->
|
<!-- http://dev.w3.org/html5/markup/meta.name.html -->
|
||||||
<meta name="application-name" content="{{=request.application}}" />
|
<meta name="application-name" content="{{=request.application}}" />
|
||||||
|
|
||||||
<!-- Speaking of Google, don't forget to set your site up:
|
<!-- Speaking of Google, don't forget to set your site up:
|
||||||
http://google.com/webmasters -->
|
http://google.com/webmasters -->
|
||||||
<meta name="google-site-verification" content="" />
|
<meta name="google-site-verification" content="" />
|
||||||
|
|
||||||
<!-- Mobile Viewport Fix
|
<!-- Mobile Viewport Fix
|
||||||
j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
|
j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
|
||||||
device-width: Occupy full width of the screen in its current orientation
|
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
|
initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
|
||||||
user-scalable = yes allows the user to zoom in -->
|
user-scalable = yes allows the user to zoom in -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
<!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
|
<link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
|
||||||
<link rel="shortcut icon" href="{{=URL('static','favicon.ico')}}" type="image/x-icon">
|
<link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">
|
||||||
<link rel="apple-touch-icon" href="{{=URL('static','favicon.png')}}">
|
|
||||||
|
|
||||||
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
||||||
HTML5 elements & feature detects -->
|
HTML5 elements & feature detects -->
|
||||||
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
||||||
|
|
||||||
<!-- include stylesheets -->
|
<!-- include stylesheets -->
|
||||||
{{
|
{{
|
||||||
response.files.append(URL('static','css/skeleton.css'))
|
|
||||||
response.files.append(URL('static','css/web2py.css'))
|
response.files.append(URL('static','css/web2py.css'))
|
||||||
|
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||||
|
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
||||||
|
response.files.append(URL('static','css/web2py_bootstrap.css'))
|
||||||
response.files.append(URL('static','css/examples.css'))
|
response.files.append(URL('static','css/examples.css'))
|
||||||
response.files.append(URL('static','css/superfish.css'))
|
|
||||||
response.files.append(URL('static','js/superfish.js'))
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{include 'web2py_ajax.html'}}
|
{{include 'web2py_ajax.html'}}
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function(){jQuery('.sf-menu').superfish();});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{
|
{{
|
||||||
|
# using sidebars need to know what sidebar you want to use
|
||||||
|
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
|
||||||
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
||||||
|
middle_columns = {0:'span12',1:'span9',2:'span6'}[
|
||||||
|
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<!-- uncomment here to load jquery-ui
|
<!-- uncomment here to load jquery-ui
|
||||||
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
uncomment to load jquery-ui //-->
|
uncomment to load jquery-ui //-->
|
||||||
</style>
|
<noscript><link href="{{=URL('static', 'css/web2py_bootstrap_nojs.css')}}" rel="stylesheet" type="text/css" /></noscript>
|
||||||
|
{{block head}}{{end}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<div class="wrapper"><!-- for sticky footer -->
|
|
||||||
<div class="flash">{{=response.flash or ''}}</div>
|
|
||||||
<div class="header">
|
|
||||||
<div class="container">
|
|
||||||
<div class="sixteen columns">
|
|
||||||
<img src="{{=URL('static','images/web2py_logo.png')}}" class="logo" alt="web2py logo" />
|
|
||||||
<h5>{{=response.subtitle or ''}}</h5>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sixteen columns statusbar">
|
<body>
|
||||||
{{block statusbar}}
|
<!-- Navbar ================================================== -->
|
||||||
{{is_mobile=request.user_agent().is_mobile}}
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<div id="menu" class="clearfix">{{=MENU(response.menu,_class='mobile-menu' if is_mobile else 'sf-menu',mobile=is_mobile)}}
|
<div class="flash">{{=response.flash or ''}}</div>
|
||||||
{{end}}
|
<div class="navbar-inner">
|
||||||
<!-- AddToAny BEGIN -->
|
<div class="container">
|
||||||
<div style="float:right;padding-top:6px;" class="a2a_kit a2a_default_style">
|
<!-- the next tag is necessary for bootstrap menus, do not remove -->
|
||||||
<a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a></div>
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
|
<span class="icon-bar"></span>
|
||||||
<!-- AddToAny END -->
|
<span class="icon-bar"></span>
|
||||||
</div>
|
<span class="icon-bar"></span>
|
||||||
</div>
|
</button>
|
||||||
<div class="sixteen columns announce">
|
{{=response.logo or ''}}
|
||||||
<a href="http://www.infoworld.com/slideshow/24605/infoworlds-2012-technology-of-the-year-award-winners-183313#slide23"target="_blank">InfoWorld's 2012 Technology of the Year Award Winner</a>
|
<ul id="navbar" class="nav pull-right">{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}</ul>
|
||||||
</div>
|
<div class="nav-collapse">
|
||||||
|
{{is_mobile=request.user_agent().is_mobile}}
|
||||||
|
{{if response.menu:}}
|
||||||
|
{{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
|
||||||
|
{{pass}}
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
</div><!--/top navbar -->
|
||||||
<div class="container mainbody">
|
|
||||||
<div class="sixteen columns">
|
<div class="container">
|
||||||
<div class="{{=right_sidebar_enabled and 'two-thirds column alpha' or 'sixteen columns alpha omega'}}">
|
<!-- Masthead ================================================== -->
|
||||||
|
<header class="mastheader" id="header">
|
||||||
|
<div class="span4">
|
||||||
|
<div class="page-header">
|
||||||
|
<img src="{{=URL('static','images/web2py_logo.png')}}" class="logo" alt="web2py logo" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<section id="main" class="main row">
|
||||||
|
{{if left_sidebar_enabled:}}
|
||||||
|
<div class="span3 left-sidebar">
|
||||||
|
{{block left_sidebar}}
|
||||||
|
<h3>Left Sidebar</h3>
|
||||||
|
<p></p>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<div class="{{=middle_columns}}">
|
||||||
{{block center}}
|
{{block center}}
|
||||||
{{include}}
|
{{include}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if right_sidebar_enabled:}}
|
{{if right_sidebar_enabled:}}
|
||||||
<div class="one-third column omega">
|
<div class="span3">
|
||||||
{{block right_sidebar}}
|
{{block right_sidebar}}
|
||||||
<h3>Right Sidebar</h3>
|
<h3>Right Sidebar</h3>
|
||||||
<p></p>
|
<p></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
</div><!-- container -->
|
{{pass}}
|
||||||
{{block extra}}{{end}}
|
</section><!--/main-->
|
||||||
|
|
||||||
</div><!-- main -->
|
<!-- Footer ================================================== -->
|
||||||
|
<div class="row">
|
||||||
|
<footer class="footer span12" id="footer">
|
||||||
|
<div class="footer-content">
|
||||||
|
{{block footer}} <!-- this is default footer -->
|
||||||
|
<div id="poweredBy" class="pull-right">
|
||||||
|
{{=T('Copyright')}} © {{=request.now.year}} -
|
||||||
|
{{=T('Powered by')}}
|
||||||
|
<a href="http://www.web2py.com/">web2py</a> -
|
||||||
|
{{=T('Hosted by')}}
|
||||||
|
<a href="http://pythonanywhere.com">PythonAnywhere</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="push"></div>
|
</div> <!-- /container -->
|
||||||
</div><!-- wrapper -->
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<div class="container header">
|
|
||||||
<div class="sixteen columns">
|
|
||||||
{{block footer}} <!-- this is default footer -->
|
|
||||||
<div class="footer-content" >
|
|
||||||
{{=T('Copyright')}} © {{=request.now.year}}
|
|
||||||
- User communities in <a href="https://groups.google.com/forum/?fromgroups#!forum/web2py" target="_blank">English<a>, <a href="https://groups.google.com/forum/?fromgroups#!forum/web2py-fr" target="_blank">French</a>, <a href="https://groups.google.com/forum/?fromgroups#!forum/web2py-japan" target="_blank">Japanese</a>, <a href="https://groups.google.com/forum/?fromgroups#!forum/web2py-users-brazil" target="_blank">Portuguese</a>, and <a href="https://groups.google.com/forum/?fromgroups#!forum/web2py-usuarios" target="_blank">Spanish</a>.
|
|
||||||
<div style="float: right;">
|
|
||||||
<a href="http://www.web2py.com/" style="float: left; padding-right: 6px;">
|
|
||||||
<img style="padding-bottom: 0;" src="{{=URL('static','images/poweredby.png')}}"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div><!-- container -->
|
|
||||||
</div><!-- footer -->
|
|
||||||
|
|
||||||
|
<!-- The javascript =============================================
|
||||||
|
(Placed at the end of the document so the pages load faster) -->
|
||||||
|
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
||||||
|
<script src="{{=URL('static','js/web2py_bootstrap.js')}}"></script>
|
||||||
<!--[if lt IE 7 ]>
|
<!--[if lt IE 7 ]>
|
||||||
<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
|
<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
|
||||||
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
|
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
{{if response.google_analytics_id:}}<script>/* http://mathiasbynens.be/notes/async-analytics-snippet */ var _gaq=[['_setAccount','{{=response.google_analytics_id}}'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')) </script>{{pass}}
|
|
||||||
|
{{if response.google_analytics_id:}}
|
||||||
|
<script src="{{=URL('static','js/analytics.min.js')}}"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
analytics.initialize({
|
||||||
|
'Google Analytics':{trackingId:'{{=response.google_analytics_id}}'}
|
||||||
|
});</script>
|
||||||
|
{{pass}}
|
||||||
|
<script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
|
||||||
|
<a style="position:fixed;bottom:0;left:0;z-index:1000" href="https://groups.google.com/forum/?fromgroups#!forum/web2py" target="_blank">
|
||||||
|
<img src="{{=URL('static','images/questions.png')}}" />
|
||||||
|
</a>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
|
<style>
|
||||||
|
input {width: 70px;}
|
||||||
|
input:focus {background-color: yellow}
|
||||||
|
table, td, tr { border: 0; margin: 0; padding: 0}
|
||||||
|
</style>
|
||||||
<h1>Excel-like spreadsheet widget</h1>
|
<h1>Excel-like spreadsheet widget</h1>
|
||||||
|
|
||||||
Try insert "=r0c1+1" in cell r0c0 and "2" in r0c1. Formulas start with "=" as in Excel. You can use a subset of python commands and math function, and reference cells by r[row]c[col]. All computations are performed serverside via Ajax (input is validated for security). Cell values and formulas can be set and locked serverside. The shape of the spreadsheet can be modifed serverside and does not need to be tabular (think of it as a graph of css-friendly widgets you can place where you want). Cells can be given arbistrary names. This example is distributed with web2py so look at the source code of the example to learn more.
|
Try insert "=r0c1+1" in cell r0c0 and "2" in r0c1. Formulas start with "=" as in Excel. You can use a subset of python commands and math function, and reference cells by r[row]c[col]. All computations are performed serverside via Ajax (input is validated for security). Cell values and formulas can be set and locked serverside. The shape of the spreadsheet can be modifed serverside and does not need to be tabular (think of it as a graph of css-friendly widgets you can place where you want). Cells can be given arbistrary names. This example is distributed with web2py so look at the source code of the example to learn more.
|
||||||
|
|||||||
@@ -319,6 +319,9 @@ def state():
|
|||||||
|
|
||||||
|
|
||||||
def ccache():
|
def ccache():
|
||||||
|
cache.ram.initialize()
|
||||||
|
cache.disk.initialize()
|
||||||
|
|
||||||
form = FORM(
|
form = FORM(
|
||||||
P(TAG.BUTTON(
|
P(TAG.BUTTON(
|
||||||
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
T("Clear CACHE?"), _type="submit", _name="yes", _value="yes")),
|
||||||
@@ -385,7 +388,7 @@ def ccache():
|
|||||||
|
|
||||||
return (hours, minutes, seconds)
|
return (hours, minutes, seconds)
|
||||||
|
|
||||||
for key, value in cache.ram.storage.items():
|
for key, value in cache.ram.storage.iteritems():
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
ram['hits'] = value['hit_total'] - value['misses']
|
ram['hits'] = value['hit_total'] - value['misses']
|
||||||
ram['misses'] = value['misses']
|
ram['misses'] = value['misses']
|
||||||
|
|||||||
@@ -374,11 +374,15 @@ def check_new_version(myversion, version_URL):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
version = parse_version(urlopen(version_URL).read())
|
version = urlopen(version_URL).read()
|
||||||
except Exception:
|
pversion = parse_version(version)
|
||||||
|
pmyversion = parse_version(myversion)
|
||||||
|
except Exception,e:
|
||||||
|
import traceback
|
||||||
|
print traceback.format_exc()
|
||||||
return -1, myversion
|
return -1, myversion
|
||||||
|
|
||||||
if version > myversion:
|
if pversion[:3]+pversion[-6:] > pmyversion[:3]+pmyversion[-6:]:
|
||||||
return True, version
|
return True, version
|
||||||
else:
|
else:
|
||||||
return False, version
|
return False, version
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import thread
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
import hashlib
|
||||||
|
import datetime
|
||||||
try:
|
try:
|
||||||
import settings
|
import settings
|
||||||
have_settings = True
|
have_settings = True
|
||||||
@@ -241,7 +243,7 @@ class CacheOnDisk(CacheAbstract):
|
|||||||
|
|
||||||
This is implemented as a shelve object and it is shared by multiple web2py
|
This is implemented as a shelve object and it is shared by multiple web2py
|
||||||
processes (and threads) as long as they share the same filesystem.
|
processes (and threads) as long as they share the same filesystem.
|
||||||
The file is locked wen accessed.
|
The file is locked when accessed.
|
||||||
|
|
||||||
Disk cache provides persistance when web2py is started/stopped but it slower
|
Disk cache provides persistance when web2py is started/stopped but it slower
|
||||||
than `CacheInRam`
|
than `CacheInRam`
|
||||||
@@ -376,7 +378,6 @@ class CacheOnDisk(CacheAbstract):
|
|||||||
self._close_shelve_and_unlock()
|
self._close_shelve_and_unlock()
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
class CacheAction(object):
|
class CacheAction(object):
|
||||||
def __init__(self, func, key, time_expire, cache, cache_model):
|
def __init__(self, func, key, time_expire, cache, cache_model):
|
||||||
self.__name__ = func.__name__
|
self.__name__ = func.__name__
|
||||||
@@ -436,6 +437,89 @@ class Cache(object):
|
|||||||
# been accounted for
|
# been accounted for
|
||||||
logger.warning('no cache.disk (AttributeError)')
|
logger.warning('no cache.disk (AttributeError)')
|
||||||
|
|
||||||
|
def client(self, time_expire=DEFAULT_TIME_EXPIRE, cache_model=None,
|
||||||
|
prefix=None, session=False, vars=True, lang=True,
|
||||||
|
user_agent=False, public=True, valid_statuses=None,
|
||||||
|
quick=None):
|
||||||
|
"""
|
||||||
|
Experimental!
|
||||||
|
Currently only HTTP 1.1 compliant
|
||||||
|
reference : http://code.google.com/p/doctype-mirror/wiki/ArticleHttpCaching
|
||||||
|
time_expire: same as @cache
|
||||||
|
cache_model: same as @cache
|
||||||
|
prefix: add a prefix to the calculated key
|
||||||
|
session: adds response.session_id to the key
|
||||||
|
vars: adds request.env.query_string
|
||||||
|
lang: adds T.accepted_language
|
||||||
|
user_agent: if True, adds is_mobile and is_tablet to the key.
|
||||||
|
Pass a dict to use all the needed values (uses str(.items())) (e.g. user_agent=request.user_agent())
|
||||||
|
used only if session is not True
|
||||||
|
public: if False forces the Cache-Control to be 'private'
|
||||||
|
valid_statuses: by default only status codes starting with 1,2,3 will be cached.
|
||||||
|
pass an explicit list of statuses on which turn the cache on
|
||||||
|
quick: Session,Vars,Lang,User-agent,Public,duration:
|
||||||
|
fast overrides with initial strings, e.g. 'SVLP' or 'VLP', or 'VLP'
|
||||||
|
"""
|
||||||
|
from gluon import current
|
||||||
|
def wrap(func):
|
||||||
|
def wrapped_f():
|
||||||
|
if current.request.env.request_method == 'GET':
|
||||||
|
if time_expire:
|
||||||
|
cache_control = 'max-age=%(time_expire)s, s-maxage=%(time_expire)s' % dict(time_expire=time_expire)
|
||||||
|
if quick:
|
||||||
|
session_ = True if 'S' in quick else False
|
||||||
|
vars_ = True if 'V' in quick else False
|
||||||
|
lang_ = True if 'L' in quick else False
|
||||||
|
user_agent_ = True if 'U' in quick else False
|
||||||
|
public_ = True if 'P' in quick else False
|
||||||
|
else:
|
||||||
|
session_, vars_, lang_, user_agent_, public_ = session, vars, lang, user_agent, public
|
||||||
|
if not session_ and public_:
|
||||||
|
cache_control += ', public'
|
||||||
|
expires = (current.request.utcnow + datetime.timedelta(seconds=time_expire)).strftime('%a, %d %b %Y %H:%M:%S GMT')
|
||||||
|
vary = None
|
||||||
|
else:
|
||||||
|
cache_control += ', private'
|
||||||
|
expires = 'Fri, 01 Jan 1990 00:00:00 GMT'
|
||||||
|
if cache_model:
|
||||||
|
cache_key = [current.request.env.path_info, current.response.view]
|
||||||
|
if session_:
|
||||||
|
cache_key.append(current.response.session_id)
|
||||||
|
elif user_agent_:
|
||||||
|
if user_agent_ is True:
|
||||||
|
cache_key.append("%(is_mobile)s_%(is_tablet)s" % current.request.user_agent())
|
||||||
|
else:
|
||||||
|
cache_key.append(str(user_agent_.items()))
|
||||||
|
if vars_:
|
||||||
|
cache_key.append(current.request.env.query_string)
|
||||||
|
if lang_:
|
||||||
|
cache_key.append(current.T.accepted_language)
|
||||||
|
cache_key = hashlib.md5('__'.join(cache_key)).hexdigest()
|
||||||
|
if prefix:
|
||||||
|
cache_key = prefix + cache_key
|
||||||
|
rtn = cache_model(cache_key, lambda : func(), time_expire=time_expire)
|
||||||
|
else:
|
||||||
|
rtn = func()
|
||||||
|
send_headers = False
|
||||||
|
if isinstance(valid_statuses, list):
|
||||||
|
if current.response.status in valid_statuses:
|
||||||
|
send_headers = True
|
||||||
|
elif valid_statuses is None:
|
||||||
|
if str(current.response.status)[0] in '123':
|
||||||
|
send_headers = True
|
||||||
|
if send_headers:
|
||||||
|
current.response.headers['Pragma'] = None
|
||||||
|
current.response.headers['Expires'] = expires
|
||||||
|
current.response.headers['Cache-Control'] = cache_control
|
||||||
|
if cache_model and not send_headers:
|
||||||
|
cache_model.clear(cache_key)
|
||||||
|
return rtn
|
||||||
|
return func()
|
||||||
|
wrapped_f.__name__ = func.__name__
|
||||||
|
wrapped_f.__doc__ = func.__doc__
|
||||||
|
return wrapped_f
|
||||||
|
return wrap
|
||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
key=None,
|
key=None,
|
||||||
time_expire=DEFAULT_TIME_EXPIRE,
|
time_expire=DEFAULT_TIME_EXPIRE,
|
||||||
@@ -469,7 +553,7 @@ class Cache(object):
|
|||||||
refresh.
|
refresh.
|
||||||
|
|
||||||
If the function `f` is an action, we suggest using
|
If the function `f` is an action, we suggest using
|
||||||
`request.env.path_info` as key.
|
@cache.client instead
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def tmp(func, cache=self, cache_model=cache_model):
|
def tmp(func, cache=self, cache_model=cache_model):
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ Dependencies:
|
|||||||
import oauth2 as oauth
|
import oauth2 as oauth
|
||||||
import cgi
|
import cgi
|
||||||
|
|
||||||
from urllib2 import urlopen
|
|
||||||
import urllib2
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
|
|
||||||
from gluon import current
|
from gluon import current
|
||||||
@@ -64,9 +62,7 @@ class OAuthAccount(object):
|
|||||||
Appends the _next action to the generated url so the flows continues.
|
Appends the _next action to the generated url so the flows continues.
|
||||||
"""
|
"""
|
||||||
r = self.request
|
r = self.request
|
||||||
http_host = r.env.http_x_forwarded_for
|
http_host = r.env.http_host
|
||||||
if not http_host:
|
|
||||||
http_host = r.env.http_host
|
|
||||||
|
|
||||||
url_scheme = r.env.wsgi_url_scheme
|
url_scheme = r.env.wsgi_url_scheme
|
||||||
if next:
|
if next:
|
||||||
|
|||||||
@@ -103,9 +103,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
r = current.request
|
r = current.request
|
||||||
http_host = r.env.http_x_forwarded_for
|
http_host = r.env.http_host
|
||||||
if not http_host:
|
|
||||||
http_host = r.env.http_host
|
|
||||||
|
|
||||||
if r.env.https == 'on':
|
if r.env.https == 'on':
|
||||||
url_scheme = 'https'
|
url_scheme = 'https'
|
||||||
@@ -163,7 +161,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
open_url = None
|
open_url = None
|
||||||
opener = self.__build_url_opener(self.token_url)
|
opener = self.__build_url_opener(self.token_url)
|
||||||
try:
|
try:
|
||||||
open_url = opener.open(self.token_url, urlencode(data))
|
open_url = opener.open(self.token_url, urlencode(data), self.socket_timeout)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
tmp = e.read()
|
tmp = e.read()
|
||||||
raise Exception(tmp)
|
raise Exception(tmp)
|
||||||
@@ -208,7 +206,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
|
|
||||||
def __init__(self, g=None,
|
def __init__(self, g=None,
|
||||||
client_id=None, client_secret=None,
|
client_id=None, client_secret=None,
|
||||||
auth_url=None, token_url=None, **args):
|
auth_url=None, token_url=None, socket_timeout=60, **args):
|
||||||
"""
|
"""
|
||||||
first argument is unused. Here only for legacy reasons.
|
first argument is unused. Here only for legacy reasons.
|
||||||
"""
|
"""
|
||||||
@@ -224,6 +222,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
self.auth_url = auth_url
|
self.auth_url = auth_url
|
||||||
self.token_url = token_url
|
self.token_url = token_url
|
||||||
self.args = args
|
self.args = args
|
||||||
|
self.socket_timeout = socket_timeout
|
||||||
|
|
||||||
def login_url(self, next="/"):
|
def login_url(self, next="/"):
|
||||||
self.__oauth_login(next)
|
self.__oauth_login(next)
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ Supported DAL URI strings:
|
|||||||
'firebird_embedded://username:password@c://path'
|
'firebird_embedded://username:password@c://path'
|
||||||
'informix://user:password@server:3050/database'
|
'informix://user:password@server:3050/database'
|
||||||
'informixu://user:password@server:3050/database' # unicode informix
|
'informixu://user:password@server:3050/database' # unicode informix
|
||||||
|
'ingres://database' # or use an ODBC connection string, e.g. 'ingres://dsn=dsn_name'
|
||||||
'google:datastore' # for google app engine datastore
|
'google:datastore' # for google app engine datastore
|
||||||
'google:sql' # for google app engine with sql (mysql compatible)
|
'google:sql' # for google app engine with sql (mysql compatible)
|
||||||
'teradata://DSN=dsn;UID=user;PWD=pass; DATABASE=database' # experimental
|
'teradata://DSN=dsn;UID=user;PWD=pass; DATABASE=database' # experimental
|
||||||
@@ -350,8 +351,9 @@ if not 'google' in DRIVERS:
|
|||||||
DRIVERS.append('MSSQL(pyodbc)')
|
DRIVERS.append('MSSQL(pyodbc)')
|
||||||
DRIVERS.append('DB2(pyodbc)')
|
DRIVERS.append('DB2(pyodbc)')
|
||||||
DRIVERS.append('Teradata(pyodbc)')
|
DRIVERS.append('Teradata(pyodbc)')
|
||||||
|
DRIVERS.append('Ingres(pyodbc)')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
LOGGER.debug('no MSSQL/DB2/Teradata driver pyodbc')
|
LOGGER.debug('no MSSQL/DB2/Teradata/Ingres driver pyodbc')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import Sybase
|
import Sybase
|
||||||
@@ -413,13 +415,6 @@ if not 'google' in DRIVERS:
|
|||||||
LOGGER.debug('no SQLite/PostgreSQL driver zxJDBC')
|
LOGGER.debug('no SQLite/PostgreSQL driver zxJDBC')
|
||||||
is_jdbc = False
|
is_jdbc = False
|
||||||
|
|
||||||
try:
|
|
||||||
import ingresdbi
|
|
||||||
DRIVERS.append('Ingres(ingresdbi)')
|
|
||||||
except ImportError:
|
|
||||||
LOGGER.debug('no Ingres driver ingresdbi')
|
|
||||||
# NOTE could try JDBC.......
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import couchdb
|
import couchdb
|
||||||
DRIVERS.append('CouchDB(couchdb)')
|
DRIVERS.append('CouchDB(couchdb)')
|
||||||
@@ -2664,11 +2659,11 @@ class PostgreSQLAdapter(BaseAdapter):
|
|||||||
|
|
||||||
def CONTAINS(self,first,second,case_sensitive=False):
|
def CONTAINS(self,first,second,case_sensitive=False):
|
||||||
if first.type in ('string','text', 'json'):
|
if first.type in ('string','text', 'json'):
|
||||||
key = '%'+str(second).replace('%','%%')+'%'
|
second = '%'+str(second).replace('%','%%')+'%'
|
||||||
elif first.type.startswith('list:'):
|
elif first.type.startswith('list:'):
|
||||||
key = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
|
second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
|
||||||
op = case_sensitive and self.LIKE or self.ILIKE
|
op = case_sensitive and self.LIKE or self.ILIKE
|
||||||
return op(first,key)
|
return op(first,second)
|
||||||
|
|
||||||
# GIS functions
|
# GIS functions
|
||||||
|
|
||||||
@@ -3455,9 +3450,9 @@ class FireBirdAdapter(BaseAdapter):
|
|||||||
|
|
||||||
def CONTAINS(self, first, second, case_sensitive=False):
|
def CONTAINS(self, first, second, case_sensitive=False):
|
||||||
if first.type in ('string','text'):
|
if first.type in ('string','text'):
|
||||||
key = str(second).replace('%','%%')
|
second = str(second).replace('%','%%')
|
||||||
elif first.type.startswith('list:'):
|
elif first.type.startswith('list:'):
|
||||||
key = '|'+str(second).replace('|','||').replace('%','%%')+'|'
|
second = '|'+str(second).replace('|','||').replace('%','%%')+'|'
|
||||||
return self.CONTAINING(first,second)
|
return self.CONTAINING(first,second)
|
||||||
|
|
||||||
def _drop(self,table,mode):
|
def _drop(self,table,mode):
|
||||||
@@ -3862,7 +3857,7 @@ INGRES_SEQNAME='ii***lineitemsequence' # NOTE invalid database object name
|
|||||||
# to be a delimited identifier)
|
# to be a delimited identifier)
|
||||||
|
|
||||||
class IngresAdapter(BaseAdapter):
|
class IngresAdapter(BaseAdapter):
|
||||||
drivers = ('ingresdbi',)
|
drivers = ('pyodbc',)
|
||||||
|
|
||||||
types = {
|
types = {
|
||||||
'boolean': 'CHAR(1)',
|
'boolean': 'CHAR(1)',
|
||||||
@@ -3913,6 +3908,7 @@ class IngresAdapter(BaseAdapter):
|
|||||||
adapter_args={}, do_connect=True, after_connection=None):
|
adapter_args={}, do_connect=True, after_connection=None):
|
||||||
self.db = db
|
self.db = db
|
||||||
self.dbengine = "ingres"
|
self.dbengine = "ingres"
|
||||||
|
self._driver = pyodbc
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
if do_connect: self.find_driver(adapter_args,uri)
|
if do_connect: self.find_driver(adapter_args,uri)
|
||||||
self.pool_size = pool_size
|
self.pool_size = pool_size
|
||||||
@@ -3920,22 +3916,27 @@ class IngresAdapter(BaseAdapter):
|
|||||||
self.db_codec = db_codec
|
self.db_codec = db_codec
|
||||||
self._after_connection = after_connection
|
self._after_connection = after_connection
|
||||||
self.find_or_make_work_folder()
|
self.find_or_make_work_folder()
|
||||||
connstr = self._uri.split(':', 1)[1]
|
connstr = uri.split(':', 1)[1]
|
||||||
# Simple URI processing
|
# Simple URI processing
|
||||||
connstr = connstr.lstrip()
|
connstr = connstr.lstrip()
|
||||||
while connstr.startswith('/'):
|
while connstr.startswith('/'):
|
||||||
connstr = connstr[1:]
|
connstr = connstr[1:]
|
||||||
database_name=connstr # Assume only (local) dbname is passed in
|
if '=' in connstr:
|
||||||
vnode = '(local)'
|
# Assume we have a regular ODBC connection string and just use it
|
||||||
servertype = 'ingres'
|
ruri = connstr
|
||||||
trace = (0, None) # No tracing
|
else:
|
||||||
driver_args.update(database=database_name,
|
# Assume only (local) dbname is passed in with OS auth
|
||||||
vnode=vnode,
|
database_name = connstr
|
||||||
servertype=servertype,
|
default_driver_name = 'Ingres'
|
||||||
trace=trace)
|
vnode = '(local)'
|
||||||
def connector(driver_args=driver_args):
|
servertype = 'ingres'
|
||||||
return self.driver.connect(**driver_args)
|
ruri = 'Driver={%s};Server=%s;Database=%s' % (default_driver_name, vnode, database_name)
|
||||||
|
def connector(cnxn=ruri,driver_args=driver_args):
|
||||||
|
return self.driver.connect(cnxn,**driver_args)
|
||||||
|
|
||||||
self.connector = connector
|
self.connector = connector
|
||||||
|
|
||||||
|
# TODO if version is >= 10, set types['id'] to Identity column, see http://community.actian.com/wiki/Using_Ingres_Identity_Columns
|
||||||
if do_connect: self.reconnect()
|
if do_connect: self.reconnect()
|
||||||
|
|
||||||
def create_sequence_and_triggers(self, query, table, **args):
|
def create_sequence_and_triggers(self, query, table, **args):
|
||||||
@@ -3961,12 +3962,12 @@ class IngresAdapter(BaseAdapter):
|
|||||||
return int(self.cursor.fetchone()[0]) # don't really need int type cast here...
|
return int(self.cursor.fetchone()[0]) # don't really need int type cast here...
|
||||||
|
|
||||||
def integrity_error_class(self):
|
def integrity_error_class(self):
|
||||||
return ingresdbi.IntegrityError
|
return self._driver.IntegrityError
|
||||||
|
|
||||||
|
|
||||||
class IngresUnicodeAdapter(IngresAdapter):
|
class IngresUnicodeAdapter(IngresAdapter):
|
||||||
|
|
||||||
drivers = ('ingresdbi',)
|
drivers = ('pyodbc',)
|
||||||
|
|
||||||
types = {
|
types = {
|
||||||
'boolean': 'CHAR(1)',
|
'boolean': 'CHAR(1)',
|
||||||
@@ -4464,7 +4465,7 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
|||||||
adapter_args={}, do_connect=True, after_connection=None):
|
adapter_args={}, do_connect=True, after_connection=None):
|
||||||
self.types.update({
|
self.types.update({
|
||||||
'boolean': gae.BooleanProperty,
|
'boolean': gae.BooleanProperty,
|
||||||
'string': (lambda: gae.StringProperty(multiline=True)),
|
'string': (lambda **kwargs: gae.StringProperty(multiline=True, **kwargs)),
|
||||||
'text': gae.TextProperty,
|
'text': gae.TextProperty,
|
||||||
'json': gae.TextProperty,
|
'json': gae.TextProperty,
|
||||||
'password': gae.StringProperty,
|
'password': gae.StringProperty,
|
||||||
@@ -4480,9 +4481,9 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
|||||||
'datetime': gae.DateTimeProperty,
|
'datetime': gae.DateTimeProperty,
|
||||||
'id': None,
|
'id': None,
|
||||||
'reference': gae.IntegerProperty,
|
'reference': gae.IntegerProperty,
|
||||||
'list:string': (lambda: gae.StringListProperty(default=None)),
|
'list:string': (lambda **kwargs: gae.StringListProperty(default=None, **kwargs)),
|
||||||
'list:integer': (lambda: gae.ListProperty(int,default=None)),
|
'list:integer': (lambda **kwargs: gae.ListProperty(int,default=None, **kwargs)),
|
||||||
'list:reference': (lambda: gae.ListProperty(int,default=None)),
|
'list:reference': (lambda **kwargs: gae.ListProperty(int,default=None, **kwargs)),
|
||||||
})
|
})
|
||||||
self.db = db
|
self.db = db
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
@@ -4505,7 +4506,7 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
|
|||||||
if isinstance(polymodel,Table) and field.name in polymodel.fields():
|
if isinstance(polymodel,Table) and field.name in polymodel.fields():
|
||||||
continue
|
continue
|
||||||
attr = {}
|
attr = {}
|
||||||
if isinstance(field.custom_qaulifier, dict):
|
if isinstance(field.custom_qualifier, dict):
|
||||||
#this is custom properties to add to the GAE field declartion
|
#this is custom properties to add to the GAE field declartion
|
||||||
attr = field.custom_qualifier
|
attr = field.custom_qualifier
|
||||||
field_type = field.type
|
field_type = field.type
|
||||||
@@ -9234,7 +9235,11 @@ class Field(Expression):
|
|||||||
dest_file.close()
|
dest_file.close()
|
||||||
return newfilename
|
return newfilename
|
||||||
|
|
||||||
def retrieve(self, name, path=None):
|
def retrieve(self, name, path=None, nameonly=False):
|
||||||
|
"""
|
||||||
|
if nameonly==True return (filename, fullfilename) instead of
|
||||||
|
(filename, stream)
|
||||||
|
"""
|
||||||
self_uploadfield = self.uploadfield
|
self_uploadfield = self.uploadfield
|
||||||
if self.custom_retrieve:
|
if self.custom_retrieve:
|
||||||
return self.custom_retrieve(name, path)
|
return self.custom_retrieve(name, path)
|
||||||
@@ -9262,7 +9267,12 @@ class Field(Expression):
|
|||||||
stream = self.uploadfs.open(name, 'rb')
|
stream = self.uploadfs.open(name, 'rb')
|
||||||
else:
|
else:
|
||||||
# ## if file is on regular filesystem
|
# ## if file is on regular filesystem
|
||||||
stream = pjoin(file_properties['path'], name)
|
# this is intentially a sting with filename and not a stream
|
||||||
|
# this propagates and allows stream_file_or_304_or_206 to be called
|
||||||
|
fullname = pjoin(file_properties['path'],name)
|
||||||
|
if nameonly:
|
||||||
|
return (filename, fullname)
|
||||||
|
stream = open(fullname,'rb')
|
||||||
return (filename, stream)
|
return (filename, stream)
|
||||||
|
|
||||||
def retrieve_file_properties(self, name, path=None):
|
def retrieve_file_properties(self, name, path=None):
|
||||||
@@ -9535,6 +9545,10 @@ class Query(object):
|
|||||||
newd[k] = loop(v.__dict__)
|
newd[k] = loop(v.__dict__)
|
||||||
elif isinstance(v, SERIALIZABLE_TYPES):
|
elif isinstance(v, SERIALIZABLE_TYPES):
|
||||||
newd[k] = v
|
newd[k] = v
|
||||||
|
elif isinstance(v, (datetime.date,
|
||||||
|
datetime.time,
|
||||||
|
datetime.datetime)):
|
||||||
|
newd[k] = unicode(v)
|
||||||
elif k == "op":
|
elif k == "op":
|
||||||
if callable(v):
|
if callable(v):
|
||||||
newd[k] = v.__name__
|
newd[k] = v.__name__
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ __all__ = [
|
|||||||
|
|
||||||
def parse_semantic(version="Version 1.99.0-rc.1+timestamp.2011.09.19.08.23.26"):
|
def parse_semantic(version="Version 1.99.0-rc.1+timestamp.2011.09.19.08.23.26"):
|
||||||
"http://semver.org/"
|
"http://semver.org/"
|
||||||
re_version = re.compile('Version (\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
|
re_version = re.compile('(\d+)\.(\d+)\.(\d+)(\-(?P<pre>[^\s+]*))?(\+(?P<build>\S*))')
|
||||||
m = re_version.match(version)
|
m = re_version.match(version.strip().split()[-1])
|
||||||
if not m:
|
if not m:
|
||||||
return None
|
return None
|
||||||
a, b, c = int(m.group(1)), int(m.group(2)), int(m.group(3))
|
a, b, c = int(m.group(1)), int(m.group(2)), int(m.group(3))
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ current = threading.local() # thread-local storage for request-scope globals
|
|||||||
css_template = '<link href="%s" rel="stylesheet" type="text/css" />'
|
css_template = '<link href="%s" rel="stylesheet" type="text/css" />'
|
||||||
js_template = '<script src="%s" type="text/javascript"></script>'
|
js_template = '<script src="%s" type="text/javascript"></script>'
|
||||||
coffee_template = '<script src="%s" type="text/coffee"></script>'
|
coffee_template = '<script src="%s" type="text/coffee"></script>'
|
||||||
|
typescript_template = '<script src="%s" type="text/typescript"></script>'
|
||||||
less_template = '<link href="%s" rel="stylesheet/less" type="text/css" />'
|
less_template = '<link href="%s" rel="stylesheet/less" type="text/css" />'
|
||||||
css_inline = '<style type="text/css">\n%s\n</style>'
|
css_inline = '<style type="text/css">\n%s\n</style>'
|
||||||
js_inline = '<script type="text/javascript">\n%s\n</script>'
|
js_inline = '<script type="text/javascript">\n%s\n</script>'
|
||||||
@@ -292,6 +293,9 @@ class Response(Storage):
|
|||||||
s += js_template % item
|
s += js_template % item
|
||||||
elif f.endswith('.coffee'):
|
elif f.endswith('.coffee'):
|
||||||
s += coffee_template % item
|
s += coffee_template % item
|
||||||
|
elif f.endswith('.ts'):
|
||||||
|
# http://www.typescriptlang.org/
|
||||||
|
s += typescript_template % item
|
||||||
elif f.endswith('.less'):
|
elif f.endswith('.less'):
|
||||||
s += less_template % item
|
s += less_template % item
|
||||||
elif isinstance(item, (list, tuple)):
|
elif isinstance(item, (list, tuple)):
|
||||||
@@ -400,7 +404,7 @@ class Response(Storage):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise HTTP(404)
|
raise HTTP(404)
|
||||||
try:
|
try:
|
||||||
(filename, stream) = field.retrieve(name)
|
(filename, stream) = field.retrieve(name,nameonly=True)
|
||||||
except IOError:
|
except IOError:
|
||||||
raise HTTP(404)
|
raise HTTP(404)
|
||||||
headers = self.headers
|
headers = self.headers
|
||||||
|
|||||||
@@ -887,9 +887,8 @@ class DIV(XmlComponent):
|
|||||||
|
|
||||||
# get the attributes for this component
|
# get the attributes for this component
|
||||||
# (they start with '_', others may have special meanings)
|
# (they start with '_', others may have special meanings)
|
||||||
fa = ''
|
attr = []
|
||||||
for key in sorted(self.attributes):
|
for key, value in self.attributes.iteritems():
|
||||||
value = self[key]
|
|
||||||
if key[:1] != '_':
|
if key[:1] != '_':
|
||||||
continue
|
continue
|
||||||
name = key[1:]
|
name = key[1:]
|
||||||
@@ -897,8 +896,16 @@ class DIV(XmlComponent):
|
|||||||
value = name
|
value = name
|
||||||
elif value is False or value is None:
|
elif value is False or value is None:
|
||||||
continue
|
continue
|
||||||
|
attr.append((name, value))
|
||||||
|
data = self.attributes.get('data',{})
|
||||||
|
for key, value in data.iteritems():
|
||||||
|
name = 'data-' + key
|
||||||
|
value = data[key]
|
||||||
|
attr.append((name,value))
|
||||||
|
attr.sort()
|
||||||
|
fa = ''
|
||||||
|
for name,value in attr:
|
||||||
fa += ' %s="%s"' % (name, xmlescape(value, True))
|
fa += ' %s="%s"' % (name, xmlescape(value, True))
|
||||||
|
|
||||||
# get the xml for the inner components
|
# get the xml for the inner components
|
||||||
co = join([xmlescape(component) for component in
|
co = join([xmlescape(component) for component in
|
||||||
self.components])
|
self.components])
|
||||||
@@ -1479,7 +1486,7 @@ class A(DIV):
|
|||||||
self['_href'] = self['_href'] or '#null'
|
self['_href'] = self['_href'] or '#null'
|
||||||
elif self['callback']:
|
elif self['callback']:
|
||||||
returnfalse = "var e = arguments[0] || window.event; e.cancelBubble=true; if (e.stopPropagation) {e.stopPropagation(); e.stopImmediatePropagation(); e.preventDefault();}"
|
returnfalse = "var e = arguments[0] || window.event; e.cancelBubble=true; if (e.stopPropagation) {e.stopPropagation(); e.stopImmediatePropagation(); e.preventDefault();}"
|
||||||
if d:
|
if d and not self['noconfirm']:
|
||||||
self['_onclick'] = "if(confirm(w2p_ajax_confirm_message||'Are you sure you want to delete this object?')){ajax('%s',[],'%s');%s};%s" % \
|
self['_onclick'] = "if(confirm(w2p_ajax_confirm_message||'Are you sure you want to delete this object?')){ajax('%s',[],'%s');%s};%s" % \
|
||||||
(self['callback'], self['target'] or '', d, returnfalse)
|
(self['callback'], self['target'] or '', d, returnfalse)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -237,7 +237,8 @@ def read_possible_languages_aux(langdir):
|
|||||||
construct_plural_form) # construct_plural_form() for current language
|
construct_plural_form) # construct_plural_form() for current language
|
||||||
|
|
||||||
plurals = {}
|
plurals = {}
|
||||||
flist = oslistdir(langdir)
|
flist = oslistdir(langdir) if isdir(langdir) else []
|
||||||
|
|
||||||
# scan languages directory for plural dict files:
|
# scan languages directory for plural dict files:
|
||||||
for pname in flist:
|
for pname in flist:
|
||||||
if regex_plural_file.match(pname):
|
if regex_plural_file.match(pname):
|
||||||
|
|||||||
@@ -102,16 +102,14 @@ requests = 0 # gc timer
|
|||||||
# pattern used to validate client address
|
# pattern used to validate client address
|
||||||
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?') # ## to account for IPV6
|
regex_client = re.compile('[\w\-:]+(\.[\w\-]+)*\.?') # ## to account for IPV6
|
||||||
|
|
||||||
#try:
|
try:
|
||||||
if 1:
|
|
||||||
version_info = open(pjoin(global_settings.gluon_parent, 'VERSION'), 'r')
|
version_info = open(pjoin(global_settings.gluon_parent, 'VERSION'), 'r')
|
||||||
raw_version_string = version_info.read().strip()
|
raw_version_string = version_info.read().split()[-1].strip()
|
||||||
version_info.close()
|
version_info.close()
|
||||||
global_settings.web2py_version = parse_version(raw_version_string)
|
global_settings.web2py_version = raw_version_string
|
||||||
#except:
|
web2py_version = global_settings.web2py_version
|
||||||
# raise RuntimeError("Cannot determine web2py version")
|
except:
|
||||||
|
raise RuntimeError("Cannot determine web2py version")
|
||||||
web2py_version = global_settings.web2py_version
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import rocket
|
import rocket
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ from settings import global_settings
|
|||||||
|
|
||||||
logger = logging.getLogger("web2py.cron")
|
logger = logging.getLogger("web2py.cron")
|
||||||
_cron_stopping = False
|
_cron_stopping = False
|
||||||
|
_cron_subprocs = []
|
||||||
|
|
||||||
|
|
||||||
def absolute_path_link(path):
|
def absolute_path_link(path):
|
||||||
@@ -42,7 +43,8 @@ def stopcron():
|
|||||||
"graceful shutdown of cron"
|
"graceful shutdown of cron"
|
||||||
global _cron_stopping
|
global _cron_stopping
|
||||||
_cron_stopping = True
|
_cron_stopping = True
|
||||||
|
while _cron_subprocs:
|
||||||
|
_cron_subprocs.pop().terminate()
|
||||||
|
|
||||||
class extcron(threading.Thread):
|
class extcron(threading.Thread):
|
||||||
|
|
||||||
@@ -232,6 +234,7 @@ class cronlauncher(threading.Thread):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
import subprocess
|
import subprocess
|
||||||
|
global _cron_subprocs
|
||||||
if isinstance(self.cmd, (list, tuple)):
|
if isinstance(self.cmd, (list, tuple)):
|
||||||
cmd = self.cmd
|
cmd = self.cmd
|
||||||
else:
|
else:
|
||||||
@@ -241,6 +244,7 @@ class cronlauncher(threading.Thread):
|
|||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
shell=self.shell)
|
shell=self.shell)
|
||||||
|
_cron_subprocs.append(proc)
|
||||||
(stdoutdata, stderrdata) = proc.communicate()
|
(stdoutdata, stderrdata) = proc.communicate()
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
|||||||
@@ -286,9 +286,9 @@ jQuery.fn.grow_input = function() {
|
|||||||
function pe(ul, e) {
|
function pe(ul, e) {
|
||||||
var new_line = ml(ul);
|
var new_line = ml(ul);
|
||||||
rel(ul);
|
rel(ul);
|
||||||
if ($(e.target).parent().is(':visible')) {
|
if (jQuery(e.target).parent().is(':visible')) {
|
||||||
//make sure we didn't delete the element before we insert after
|
//make sure we didn't delete the element before we insert after
|
||||||
new_line.insertAfter($(e.target).parent());
|
new_line.insertAfter(jQuery(e.target).parent());
|
||||||
} else {
|
} else {
|
||||||
//the line we clicked on was deleted, just add to end of list
|
//the line we clicked on was deleted, just add to end of list
|
||||||
new_line.appendTo(ul);
|
new_line.appendTo(ul);
|
||||||
@@ -299,7 +299,7 @@ function pe(ul, e) {
|
|||||||
function rl(ul, e) {
|
function rl(ul, e) {
|
||||||
if (jQuery(ul).children().length > 1) {
|
if (jQuery(ul).children().length > 1) {
|
||||||
//only remove if we have more than 1 item so the list is never empty
|
//only remove if we have more than 1 item so the list is never empty
|
||||||
$(e.target).parent().remove();
|
jQuery(e.target).parent().remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function ml(ul) {
|
function ml(ul) {
|
||||||
@@ -1760,7 +1760,8 @@ class SQLFORM(FORM):
|
|||||||
editargs={},
|
editargs={},
|
||||||
viewargs={},
|
viewargs={},
|
||||||
buttons_placement = 'right',
|
buttons_placement = 'right',
|
||||||
links_placement = 'right'
|
links_placement = 'right',
|
||||||
|
noconfirm=False
|
||||||
):
|
):
|
||||||
|
|
||||||
# jQuery UI ThemeRoller classes (empty if ui is disabled)
|
# jQuery UI ThemeRoller classes (empty if ui is disabled)
|
||||||
@@ -1816,7 +1817,7 @@ class SQLFORM(FORM):
|
|||||||
|
|
||||||
def url(**b):
|
def url(**b):
|
||||||
b['args'] = args + b.get('args', [])
|
b['args'] = args + b.get('args', [])
|
||||||
localvars = request.vars.copy()
|
localvars = request.get_vars.copy()
|
||||||
localvars.update(b.get('vars', {}))
|
localvars.update(b.get('vars', {}))
|
||||||
b['vars'] = localvars
|
b['vars'] = localvars
|
||||||
b['hash_vars'] = False
|
b['hash_vars'] = False
|
||||||
@@ -1825,7 +1826,7 @@ class SQLFORM(FORM):
|
|||||||
|
|
||||||
def url2(**b):
|
def url2(**b):
|
||||||
b['args'] = request.args + b.get('args', [])
|
b['args'] = request.args + b.get('args', [])
|
||||||
localvars = request.vars.copy()
|
localvars = request.get_vars.copy()
|
||||||
localvars.update(b.get('vars', {}))
|
localvars.update(b.get('vars', {}))
|
||||||
b['vars'] = localvars
|
b['vars'] = localvars
|
||||||
b['hash_vars'] = False
|
b['hash_vars'] = False
|
||||||
@@ -1849,7 +1850,7 @@ class SQLFORM(FORM):
|
|||||||
|
|
||||||
def gridbutton(buttonclass='buttonadd', buttontext=T('Add'),
|
def gridbutton(buttonclass='buttonadd', buttontext=T('Add'),
|
||||||
buttonurl=url(args=[]), callback=None,
|
buttonurl=url(args=[]), callback=None,
|
||||||
delete=None, trap=True):
|
delete=None, trap=True, noconfirm=None):
|
||||||
if showbuttontext:
|
if showbuttontext:
|
||||||
return A(SPAN(_class=ui.get(buttonclass)),
|
return A(SPAN(_class=ui.get(buttonclass)),
|
||||||
SPAN(T(buttontext), _title=buttontext,
|
SPAN(T(buttontext), _title=buttontext,
|
||||||
@@ -1857,12 +1858,14 @@ class SQLFORM(FORM):
|
|||||||
_href=buttonurl,
|
_href=buttonurl,
|
||||||
callback=callback,
|
callback=callback,
|
||||||
delete=delete,
|
delete=delete,
|
||||||
|
noconfirm=noconfirm,
|
||||||
_class=trap_class(ui.get('button'), trap))
|
_class=trap_class(ui.get('button'), trap))
|
||||||
else:
|
else:
|
||||||
return A(SPAN(_class=ui.get(buttonclass)),
|
return A(SPAN(_class=ui.get(buttonclass)),
|
||||||
_href=buttonurl,
|
_href=buttonurl,
|
||||||
callback=callback,
|
callback=callback,
|
||||||
delete=delete,
|
delete=delete,
|
||||||
|
noconfirm=noconfirm,
|
||||||
_title=buttontext,
|
_title=buttontext,
|
||||||
_class=trap_class(ui.get('buttontext'), trap))
|
_class=trap_class(ui.get('buttontext'), trap))
|
||||||
|
|
||||||
@@ -2056,7 +2059,8 @@ class SQLFORM(FORM):
|
|||||||
elif not request.vars.records:
|
elif not request.vars.records:
|
||||||
request.vars.records = []
|
request.vars.records = []
|
||||||
|
|
||||||
session['_web2py_grid_referrer_' + formname] = url2(vars=request.vars)
|
session['_web2py_grid_referrer_' + formname] = \
|
||||||
|
url2(vars=request.get_vars)
|
||||||
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
||||||
error = None
|
error = None
|
||||||
if create:
|
if create:
|
||||||
@@ -2341,6 +2345,7 @@ class SQLFORM(FORM):
|
|||||||
'buttondelete', 'Delete',
|
'buttondelete', 'Delete',
|
||||||
url(args=['delete', tablename, id]),
|
url(args=['delete', tablename, id]),
|
||||||
callback=url(args=['delete', tablename, id]),
|
callback=url(args=['delete', tablename, id]),
|
||||||
|
noconfirm=noconfirm,
|
||||||
delete='tr'))
|
delete='tr'))
|
||||||
if buttons_placement in ['right', 'both']:
|
if buttons_placement in ['right', 'both']:
|
||||||
trcols.append(row_buttons)
|
trcols.append(row_buttons)
|
||||||
@@ -2458,6 +2463,16 @@ class SQLFORM(FORM):
|
|||||||
if constraints is None:
|
if constraints is None:
|
||||||
constraints = {}
|
constraints = {}
|
||||||
field = None
|
field = None
|
||||||
|
name = None
|
||||||
|
def format(table,row):
|
||||||
|
if not row:
|
||||||
|
return 'Unknown'
|
||||||
|
elif isinstance(table._format,str):
|
||||||
|
return table._format % row
|
||||||
|
elif callable(table._format):
|
||||||
|
return table._format(row)
|
||||||
|
else:
|
||||||
|
return '#'+str(row.id)
|
||||||
try:
|
try:
|
||||||
nargs = len(args) + 1
|
nargs = len(args) + 1
|
||||||
previous_tablename, previous_fieldname, previous_id = \
|
previous_tablename, previous_fieldname, previous_id = \
|
||||||
@@ -2484,14 +2499,7 @@ class SQLFORM(FORM):
|
|||||||
raise HTTP(400)
|
raise HTTP(400)
|
||||||
previous_tablename, previous_fieldname, previous_id = \
|
previous_tablename, previous_fieldname, previous_id = \
|
||||||
tablename, fieldname, id
|
tablename, fieldname, id
|
||||||
try:
|
name = format(db[referee],record)
|
||||||
format = db[referee]._format
|
|
||||||
if callable(format):
|
|
||||||
name = format(record)
|
|
||||||
else:
|
|
||||||
name = format % record
|
|
||||||
except TypeError:
|
|
||||||
name = id
|
|
||||||
breadcrumbs.append(
|
breadcrumbs.append(
|
||||||
LI(A(T(db[referee]._plural),
|
LI(A(T(db[referee]._plural),
|
||||||
_class=trap_class(),
|
_class=trap_class(),
|
||||||
@@ -2553,13 +2561,27 @@ class SQLFORM(FORM):
|
|||||||
grid = SQLFORM.grid(query, args=request.args[:nargs], links=links,
|
grid = SQLFORM.grid(query, args=request.args[:nargs], links=links,
|
||||||
links_in_grid=links_in_grid,
|
links_in_grid=links_in_grid,
|
||||||
user_signature=user_signature, **kwargs)
|
user_signature=user_signature, **kwargs)
|
||||||
|
|
||||||
if isinstance(grid, DIV):
|
if isinstance(grid, DIV):
|
||||||
header = table._plural + (field and ' for ' + field.label or '')
|
header = table._plural
|
||||||
breadcrumbs.append(LI(A(T(header), _class=trap_class(),
|
next = grid.create_form or grid.update_form or grid.view_form
|
||||||
_href=url()), _class='active w2p_grid_breadcrumb_elem'))
|
breadcrumbs.append(LI(
|
||||||
|
A(T(header), _class=trap_class(),_href=url()),
|
||||||
|
SPAN(divider, _class='divider') if next else '',
|
||||||
|
_class='active w2p_grid_breadcrumb_elem'))
|
||||||
|
if grid.create_form:
|
||||||
|
header = T('New %s' % table._singular)
|
||||||
|
elif grid.update_form:
|
||||||
|
header = T('Edit %s' % format(table,grid.update_form.record))
|
||||||
|
elif grid.view_form:
|
||||||
|
header = T('View %s' % format(table,grid.view_form.record))
|
||||||
|
if next:
|
||||||
|
breadcrumbs.append(LI(
|
||||||
|
A(T(header), _class=trap_class(),_href=url()),
|
||||||
|
_class='active w2p_grid_breadcrumb_elem'))
|
||||||
grid.insert(
|
grid.insert(
|
||||||
0, DIV(UL(*breadcrumbs, **{'_class': breadcrumbs_class}),
|
0, DIV(UL(*breadcrumbs, **{'_class': breadcrumbs_class}),
|
||||||
_class='web2py_breadcrumbs'))
|
_class='web2py_breadcrumbs'))
|
||||||
return grid
|
return grid
|
||||||
|
|
||||||
|
|
||||||
@@ -2994,4 +3016,3 @@ class ExporterJSON(ExportClass):
|
|||||||
return self.rows.as_json()
|
return self.rows.as_json()
|
||||||
else:
|
else:
|
||||||
return 'null'
|
return 'null'
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import urllib
|
|||||||
import urllib2
|
import urllib2
|
||||||
import Cookie
|
import Cookie
|
||||||
import cStringIO
|
import cStringIO
|
||||||
from email import MIMEBase, MIMEMultipart, MIMEText, Encoders, Header, message_from_string
|
from email import MIMEBase, MIMEMultipart, MIMEText, Encoders, Header, message_from_string, Charset
|
||||||
|
|
||||||
from gluon.contenttype import contenttype
|
from gluon.contenttype import contenttype
|
||||||
from gluon.storage import Storage, StorageList, Settings, Messages
|
from gluon.storage import Storage, StorageList, Settings, Messages
|
||||||
@@ -348,6 +348,9 @@ class Mail(object):
|
|||||||
self.error: Exception message or None if above was successful
|
self.error: Exception message or None if above was successful
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# We don't want to use base64 encoding for unicode mail
|
||||||
|
Charset.add_charset('utf-8', Charset.QP, Charset.QP, 'utf-8')
|
||||||
|
|
||||||
def encode_header(key):
|
def encode_header(key):
|
||||||
if [c for c in key if 32 > ord(c) or ord(c) > 127]:
|
if [c for c in key if 32 > ord(c) or ord(c) > 127]:
|
||||||
return Header.Header(key.encode('utf-8'), 'utf-8')
|
return Header.Header(key.encode('utf-8'), 'utf-8')
|
||||||
@@ -1752,19 +1755,45 @@ class Auth(object):
|
|||||||
self.add_membership(self.settings.everybody_group_id, user_id)
|
self.add_membership(self.settings.everybody_group_id, user_id)
|
||||||
return user
|
return user
|
||||||
|
|
||||||
def basic(self):
|
def basic(self, basic_auth_realm=False):
|
||||||
"""
|
"""
|
||||||
perform basic login.
|
perform basic login.
|
||||||
|
|
||||||
|
:param basic_auth_realm: optional basic http authentication realm.
|
||||||
|
:type basic_auth_realm: str or unicode or function or callable or boolean.
|
||||||
|
|
||||||
reads current.request.env.http_authorization
|
reads current.request.env.http_authorization
|
||||||
and returns basic_allowed,basic_accepted,user
|
and returns basic_allowed,basic_accepted,user.
|
||||||
|
|
||||||
|
if basic_auth_realm is defined is a callable it's return value
|
||||||
|
is used to set the basic authentication realm, if it's a string
|
||||||
|
its content is used instead. Otherwise basic authentication realm
|
||||||
|
is set to the application name.
|
||||||
|
If basic_auth_realm is None or False (the default) the behavior
|
||||||
|
is to skip sending any challenge.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if not self.settings.allow_basic_login:
|
if not self.settings.allow_basic_login:
|
||||||
return (False, False, False)
|
return (False, False, False)
|
||||||
basic = current.request.env.http_authorization
|
basic = current.request.env.http_authorization
|
||||||
|
if basic_auth_realm:
|
||||||
|
if callable(basic_auth_realm):
|
||||||
|
basic_auth_realm = basic_auth_auth()
|
||||||
|
elif isinstance(basic_auth_realm, (unicode, str)):
|
||||||
|
basic_realm = unicode(basic_auth_realm)
|
||||||
|
elif basic_auth_realm is True:
|
||||||
|
basic_realm = u'' + current.request.application
|
||||||
|
http_401 = HTTP(401, u'Not Authorized',
|
||||||
|
**{'WWW-Authenticate': u'Basic realm="' + basic_realm + '"'})
|
||||||
if not basic or not basic[:6].lower() == 'basic ':
|
if not basic or not basic[:6].lower() == 'basic ':
|
||||||
|
if basic_auth_realm:
|
||||||
|
raise http_401
|
||||||
return (True, False, False)
|
return (True, False, False)
|
||||||
(username, password) = base64.b64decode(basic[6:]).split(':')
|
(username, sep, password) = base64.b64decode(basic[6:]).partition(':')
|
||||||
return (True, True, self.login_bare(username, password))
|
is_valid_user = sep and self.login_bare(username, password)
|
||||||
|
if not is_valid_user and basic_auth_realm:
|
||||||
|
raise http_401
|
||||||
|
return (True, True, is_valid_user)
|
||||||
|
|
||||||
def login_user(self, user):
|
def login_user(self, user):
|
||||||
"""
|
"""
|
||||||
@@ -4402,9 +4431,9 @@ class Service(object):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
request = current.request
|
||||||
|
response = current.response
|
||||||
if not data:
|
if not data:
|
||||||
request = current.request
|
|
||||||
response = current.response
|
|
||||||
response.headers['Content-Type'] = 'application/json; charset=utf-8'
|
response.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||||
try:
|
try:
|
||||||
data = json_parser.loads(request.body.read())
|
data = json_parser.loads(request.body.read())
|
||||||
|
|||||||
@@ -171,19 +171,29 @@ class IS_MATCH(Validator):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, expression, error_message='invalid expression',
|
def __init__(self, expression, error_message='invalid expression',
|
||||||
strict=False, search=False, extract=False):
|
strict=False, search=False, extract=False,
|
||||||
|
unicode=False):
|
||||||
if strict or not search:
|
if strict or not search:
|
||||||
if not expression.startswith('^'):
|
if not expression.startswith('^'):
|
||||||
expression = '^(%s)' % expression
|
expression = '^(%s)' % expression
|
||||||
if strict:
|
if strict:
|
||||||
if not expression.endswith('$'):
|
if not expression.endswith('$'):
|
||||||
expression = '(%s)$' % expression
|
expression = '(%s)$' % expression
|
||||||
self.regex = re.compile(expression)
|
if unicode:
|
||||||
|
if not isinstance(expression,unicode):
|
||||||
|
expression = expression.decode('utf8')
|
||||||
|
self.regex = re.compile(expression,re.UNICODE)
|
||||||
|
else:
|
||||||
|
self.regex = re.compile(expression)
|
||||||
self.error_message = error_message
|
self.error_message = error_message
|
||||||
self.extract = extract
|
self.extract = extract
|
||||||
|
self.unicode = unicode
|
||||||
|
|
||||||
def __call__(self, value):
|
def __call__(self, value):
|
||||||
match = self.regex.search(value)
|
if self.unicode and not isinstance(value,unicode):
|
||||||
|
match = self.regex.search(str(value).decode('utf8'))
|
||||||
|
else:
|
||||||
|
match = self.regex.search(str(value))
|
||||||
if match is not None:
|
if match is not None:
|
||||||
return (self.extract and match.group() or value, None)
|
return (self.extract and match.group() or value, None)
|
||||||
return (value, translate(self.error_message))
|
return (value, translate(self.error_message))
|
||||||
|
|||||||
@@ -434,6 +434,10 @@ class web2pyDialog(object):
|
|||||||
self.try_stop_scheduler(t)
|
self.try_stop_scheduler(t)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
newcron.stopcron()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
self.server.stop()
|
self.server.stop()
|
||||||
except:
|
except:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ data = re.compile('\*/\s+/\*').sub(' ', data)
|
|||||||
data = re.compile('[ ]+\n').sub('\n', data)
|
data = re.compile('[ ]+\n').sub('\n', data)
|
||||||
data = re.compile('\n\s*/[\*]+(?P<a>.*?)[\*]+/', re.DOTALL).sub(
|
data = re.compile('\n\s*/[\*]+(?P<a>.*?)[\*]+/', re.DOTALL).sub(
|
||||||
'\n/*\g<a>*/\n', data)
|
'\n/*\g<a>*/\n', data)
|
||||||
data = re.compile('[ \t]+(?P<a>\S.+?){').sub('\g<a>{', data)
|
data = re.compile('[ \t]+(?P<a>\S.+?){').sub(' \g<a>{', data)
|
||||||
data = data.replace('}', '}\n')
|
data = data.replace('}', '}\n')
|
||||||
|
|
||||||
print data
|
print data
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ a2enmod proxy
|
|||||||
a2enmod proxy_http
|
a2enmod proxy_http
|
||||||
a2enmod headers
|
a2enmod headers
|
||||||
a2enmod expires
|
a2enmod expires
|
||||||
|
a2enmod wsgi
|
||||||
mkdir /etc/apache2/ssl
|
mkdir /etc/apache2/ssl
|
||||||
|
|
||||||
echo "creating a self signed certificate"
|
echo "creating a self signed certificate"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import sys
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
Author: Christopher Steel on behalf of Voice of Access
|
Author: Christopher Steel on behalf of Voice of Access
|
||||||
Copyright: Copyrighted (c) by Massimo Di Pierro (2007-2011)
|
Copyright: Copyrighted (c) by Massimo Di Pierro (2007-2013)
|
||||||
|
|
||||||
web2py_clone becomes part of the web2py distribution available
|
web2py_clone becomes part of the web2py distribution available
|
||||||
on Pypi via 'pip install web2py'
|
on Pypi via 'pip install web2py'
|
||||||
|
|||||||