more changes

This commit is contained in:
Tim Bentley 2013-03-15 08:40:00 +00:00
parent 3c32bc7501
commit d04dbd791f
5 changed files with 3 additions and 19 deletions

View File

@ -33,7 +33,7 @@
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
<title>${title}</title>
<link rel="stylesheet" href="/files/jquery.mobile.css" />
<link rel="stylesheet" href="/files/openlp.css" />
<link rel="stylesheet" href="/files/login.css" />
<link rel="shortcut icon" type="image/x-icon" href="/files/images/favicon.ico">
<script type="text/javascript" src="/files/jquery.js"></script>
<script type="text/javascript" src="/files/openlp.js"></script>

View File

@ -36,11 +36,3 @@
.ui-li .ui-btn-text a.ui-link-inherit{
white-space: normal;
}
.ui-page{
padding: 100px 100px 100px 100px;
width: 300px;
}
.ui-input-text{
width: 30px;
}

View File

@ -359,5 +359,5 @@ $.ajaxSetup({cache: false});
$("#search").live("pageinit", function (event) {
OpenLP.getSearchablePlugins();
});
setInterval("OpenLP.pollServer();", 500);
setInterval("OpenLP.pollServer();", 5000);
OpenLP.pollServer();

View File

@ -75,12 +75,9 @@ def check_auth(*args, **kwargs):
for condition in conditions:
# A condition is just a callable that returns true or false
if not condition():
print "r1"
raise cherrypy.HTTPRedirect("/auth/login")
else:
print "r2"
raise cherrypy.HTTPRedirect("/auth/login")
print "r3"
cherrypy.tools.auth = cherrypy.Tool('before_handler', check_auth)

View File

@ -144,8 +144,6 @@ class HttpServer(object):
self.plugin = plugin
self.html_dir = os.path.join(AppLocation.get_directory(AppLocation.PluginsDir), u'remotes', u'html')
self.connections = []
self.current_item = None
self.current_slide = None
self.conf = {'/files': {u'tools.staticdir.on': True,
u'tools.staticdir.dir': self.html_dir}}
self.start_server()
@ -177,8 +175,6 @@ class HttpServer(object):
# Turn off the flood of access messages cause by poll
cherrypy.log.access_log.propagate = False
cherrypy.engine.start()
Registry().register_function(u'slidecontroller_live_changed', self.slide_change)
Registry().register_function(u'slidecontroller_live_started', self.item_change)
log.debug(u'TCP listening on port %d' % port)
def close(self):
@ -481,8 +477,7 @@ class HttpConnection(object):
if action == u'list':
cherrypy.response.headers['Content-Type'] = u'application/json'
return json.dumps({u'results': {u'items': self._get_service_items()}})
else:
event += u'_item'
event += u'_item'
if self.url_params and self.url_params.get(u'data'):
try:
data = json.loads(self.url_params[u'data'][0])