From: yomguy <> Date: Tue, 21 Sep 2010 13:32:56 +0000 (+0000) Subject: - fix HTML and CSS bugs X-Git-Tag: 1.0~160 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1ba13c4504cdb061e6b4d75aba703fb4483e3498;p=telecaster-server.git - fix HTML and CSS bugs - put webview out main method --- diff --git a/css/telecaster.css b/css/telecaster.css index b8c6e6a..5dc55cb 100644 --- a/css/telecaster.css +++ b/css/telecaster.css @@ -13,9 +13,9 @@ div.header { div.title_main { margin-left:42px; margin-top:-26px; - padding: 0.em; + padding: 0em; font-size: 1.5em; - /* text-decoration: underline; */ + /*text-decoration: underline;*/ } div.bg { background-color: #FFFFFF; diff --git a/station.py b/station.py index 7c77c3d..3d3a1f9 100644 --- a/station.py +++ b/station.py @@ -229,6 +229,6 @@ class Station(Conference): def stop(self): self.rec_stop() - time.sleep(1) + time.sleep(3) self.deefuzzer_stop() self.del_lock() diff --git a/telecaster.py b/telecaster.py index 20df966..f69e327 100755 --- a/telecaster.py +++ b/telecaster.py @@ -68,25 +68,25 @@ class TeleCaster: if not os.path.exists(self.user_dir): os.makedirs(self.user_dir) self.lock_file = self.user_dir + os.sep + 'telecaster.lock' + self.form = WebView(self.conf, version) def main(self): edcast_pid = get_pid('edcast_jack', self.uid) deefuzzer_pid = get_pid('/usr/bin/deefuzzer', self.uid) writing = edcast_pid != [] casting = deefuzzer_pid != [] - form = WebView(self.conf, version) - if deefuzzer_pid == [] and form.has_key("action") and \ - form.has_key("department") and form.has_key("conference") and \ - form.has_key("professor") and form.has_key("comment") and \ - form["action"].value == "start": + if deefuzzer_pid == [] and self.form.has_key("action") and \ + self.form.has_key("department") and self.form.has_key("conference") and \ + self.form.has_key("professor") and self.form.has_key("comment") and \ + self.form["action"].value == "start": self.conference_dict = {'title': self.title, - 'department': form.getfirst("department"), - 'conference': form.getfirst("conference"), - 'session': form.getfirst("session"), - 'professor': form.getfirst("professor"), - 'comment': form.getfirst("comment")} + 'department': self.form.getfirst("department"), + 'conference': self.form.getfirst("conference"), + 'session': self.form.getfirst("session"), + 'professor': self.form.getfirst("professor"), + 'comment': self.form.getfirst("comment")} s = Station(self.conf_file, self.conference_dict, self.lock_file) s.start() @@ -94,12 +94,12 @@ class TeleCaster: time.sleep(2) self.main() - elif deefuzzer_pid != [] and os.path.exists(self.lock_file) and not form.has_key("action"): + elif deefuzzer_pid != [] and os.path.exists(self.lock_file) and not self.form.has_key("action"): self.conference_dict = get_conference_from_lock(self.lock_file) - form.stop_form(self.conference_dict, writing, casting) + self.form.stop_form(self.conference_dict, writing, casting) self.logger.write_info('page stop') - elif deefuzzer_pid and form.has_key("action") and form["action"].value == "stop": + elif deefuzzer_pid and self.form.has_key("action") and self.form["action"].value == "stop": if os.path.exists(self.lock_file): self.conference_dict = get_conference_from_lock(self.lock_file) s = Station(self.conf_file, self.conference_dict, self.lock_file) @@ -109,7 +109,7 @@ class TeleCaster: self.main() elif deefuzzer_pid == []: - form.start_form(writing, casting) + self.form.start_form(writing, casting) self.logger.write_info('page start') diff --git a/webview.py b/webview.py index cce7e0d..215934f 100644 --- a/webview.py +++ b/webview.py @@ -101,6 +101,7 @@ class WebView(FieldStorage): print "" + def javascript(self): print '" - + + def sub_header(self): if self.refresh: print "" - print "\n" - #print "" print "" print "
" print "
" - print "" + print "\"logo_telecaster\"" print "
 TeleCaster - Audio Web Live Recording
" print "
" @@ -211,17 +211,20 @@ class WebView(FieldStorage): pass print "JACK audio server : " print "%s" % jackd_info - print "
" + print "
" if self.writing: - print "" + print "" else: - print "" - print "
" + print "" + print "
" + print " " + print "
" if self.casting: - print "" + print "" else: - print "" + print "" print "
" + print "" print "" print "
" @@ -232,20 +235,22 @@ class WebView(FieldStorage): self.refresh = False self.header() + self.javascript() + self.sub_header() self.hardware_data() - print "
" + print "" print "
" print "" print "" print "" print "" print "" print "" @@ -283,7 +288,9 @@ class WebView(FieldStorage): self.refresh = True self.header() + self.sub_header() self.hardware_data() + print "" print "
" print "
Titre : "+self.title+"
Département :
Conférence :
" print "" @@ -295,16 +302,15 @@ class WebView(FieldStorage): print "
Titre : "+self.title+"
" print "
" print "
" - print "" print "
" - print "" + print "" print "\"\"Play" print "" print "\"\"Archives" print "\"\"Trash" print "
" - print "" print "
" + print "" self.colophon() self.footer()