fixws and 'new' button in grid query

This commit is contained in:
Massimo Di Pierro
2011-12-05 11:39:42 -06:00
parent 01f6f82cdf
commit d281acb421
305 changed files with 8352 additions and 8032 deletions
+2
View File
@@ -63,3 +63,5 @@ PLUGINS_APP = 'http://web2py.com/plugins'
# set the language
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
T.force(request.cookies['adminLanguage'].value)
+2
View File
@@ -24,3 +24,5 @@ from gluon.languages import findT, update_all_languages
from gluon.myregex import *
from gluon.restricted import *
from gluon.compileapp import compile_application, remove_compiled_application
+7 -5
View File
@@ -77,9 +77,9 @@ def read_hosts_deny():
int(fields[2].strip()) # last attempts
)
portalocker.unlock(f)
f.close()
f.close()
return hosts
def write_hosts_deny(denied_hosts):
f = open(deny_file, 'w')
portalocker.lock(f, portalocker.LOCK_EX)
@@ -88,7 +88,7 @@ def write_hosts_deny(denied_hosts):
line = '%s %s %s\n' % (key, val[0], val[1])
f.write(line)
portalocker.unlock(f)
f.close()
f.close()
def login_record(success=True):
denied_hosts = read_hosts_deny()
@@ -101,11 +101,11 @@ def login_record(success=True):
and val[0] >= allowed_number_of_attempts:
return val[0] # locked out
time.sleep(2**val[0])
val = (val[0]+1,int(time.time()))
val = (val[0]+1,int(time.time()))
denied_hosts[request.client] = val
write_hosts_deny(denied_hosts)
return val[0]
# ###########################################################
# ## session expiration
@@ -144,3 +144,5 @@ if request.controller=='appadmin' and DEMO_MODE:
session.flash = 'Appadmin disabled in demo mode'
redirect(URL('default','sites'))
+4 -2
View File
@@ -7,10 +7,10 @@ def button(href, label):
def button_enable(href, app):
if os.path.exists(os.path.join(apath(app,r=request),'DISABLED')):
label = SPAN(T('Enable'),_style='color:red')
label = SPAN(T('Enable'),_style='color:red')
else:
label = SPAN(T('Disable'),_style='color:green')
id = 'enable_'+app
id = 'enable_'+app
return A(label,_class='button',_id=id,callback=href,target=id)
def sp_button(href, label):
@@ -21,3 +21,5 @@ def helpicon():
def searchbox(elementid):
return TAG[''](LABEL(IMG(_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
+3 -1
View File
@@ -9,7 +9,7 @@ if MULTI_USER_MODE:
crud = Crud(globals(),db) # for CRUD helpers using auth
service = Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
plugins = PluginManager()
mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server
mail.settings.sender = 'you@gmail.com' # your email
mail.settings.login = 'username:password' # your credentials or None
@@ -38,3 +38,5 @@ def is_manager():
return True
else:
return False
+2
View File
@@ -31,3 +31,5 @@ if os.path.exists('applications/examples'):
response.menu.append((T('Help'), False, URL('examples','default','index')))
else:
response.menu.append((T('Help'), False, 'http://web2py.com/examples'))
@@ -2,3 +2,5 @@ response.files.append(URL('static','plugin_multiselect/jquery.dimensions.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.css'))
response.files.append(URL('static','plugin_multiselect/start.js'))