From 55f6f6386f169409477fd31a72f89de6f7192b86 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 6 Aug 2010 12:01:56 +0200 Subject: Gregy's settings page + TheBrayns new icons --- module/PluginManager.py | 4 +- module/plugins/hooks/MultiHome.py | 2 +- module/setup.py | 85 ++++++++++----- module/web/media/default/css/default.css | 120 ++++++++++++++++------ module/web/media/default/img/control_add.png | Bin 0 -> 446 bytes module/web/media/default/img/control_add_blue.png | Bin 0 -> 845 bytes module/web/templates/default/base.html | 6 +- module/web/templates/default/settings.html | 101 +++++++++++------- 8 files changed, 218 insertions(+), 100 deletions(-) create mode 100644 module/web/media/default/img/control_add.png create mode 100644 module/web/media/default/img/control_add_blue.png diff --git a/module/PluginManager.py b/module/PluginManager.py index e2e3c934b..6cff2d50f 100644 --- a/module/PluginManager.py +++ b/module/PluginManager.py @@ -129,8 +129,8 @@ class PluginManager(): config = self.reConfig.findall(content) if config: - config = [ [y.strip() for y in x.replace("'","").replace('"',"").replace(")","").split(",") if y.strip()] for x in config[0].split("(") if x.strip()] - + config = [ [y.strip() for y in x.replace("'","").replace('"',"").replace(")","").split(",")] for x in config[0].split("(") if x.strip()] + for item in config: self.core.config.addPluginConfig([name]+item) diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index 023a282bb..9e2bcbe5f 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -24,7 +24,7 @@ class MultiHome(Hook): __name__ = "MultiHome" __version__ = "0.1" __description__ = """ip address changer""" - __config__ = [ ("activated", "bool", "Activated" , "True"), + __config__ = [ ("activated", "bool", "Activated" , "False"), ("interfaces", "str", "Interfaces" , "") ] __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") diff --git a/module/setup.py b/module/setup.py index 93cde8a0d..ac2bb57c2 100644 --- a/module/setup.py +++ b/module/setup.py @@ -58,12 +58,12 @@ class Setup(): print "" print _("When you are ready for system check, hit enter.") raw_input() - + basic, ssl, captcha, gui, web = self.system_check() print "" if not basic: - print _("You need pycurl and python 2.5 or 2.6 to run pyLoad.") + print _("You need pycurl, sqlite and python 2.5, 2.6 or 2.7 to run pyLoad.") print _("Please correct this and re run pyLoad.") print _("Setup will now close.") raw_input() @@ -72,24 +72,55 @@ class Setup(): raw_input(_("System check finished, hit enter to see your status report.")) print "" print _("## Status ##") - - print _("py-crypto available") if self.check_module("Crypto") else _("no py-crypto available") - print _("You need this if you want to decrypt container files.") - print "" - print _("SSL available") if ssl else _("no SSL available") - print _("This is needed if you want to establish a secure connection to core or webinterface.") - print _("If you only want to access locally to pyLoad ssl is not usefull.") print "" - print _("Captcha Recognition available") if captcha else _("no Captcha Recognition available") - print _("Only needed for some hosters and as freeuser.") - print "" - print _("Gui available") if gui else _("Gui not available") - print _("The Graphical User Interface.") - print "" - print _("Webinterface available") if web else _("no Webinterface available") - print _("Gives abillity to control pyLoad with your webbrowser.") + + + avail = [] + if self.check_module("Crypto"): avail.append(_("container decrypting")) + if ssl: avail.append(_("ssl connection")) + if captcha: avail.append(_("automatic captcha decryption")) + if gui: avail.append(_("GUI")) + if web: avail.append(_("Webinterface")) + + string = "" + + for av in avail: + string += ", "+av + + print _("Features available:") + string[1:] print "" - print _("You can abort the setup now and fix some dependicies if you want.") + + if len(avail) < 5: + print _("Featues missing: ") + print + + if not self.check_module("Crypto"): + print _("no py-crypto available") + print _("You need this if you want to decrypt container files.") + print "" + + if not ssl: + print _("no SSL available") + print _("This is needed if you want to establish a secure connection to core or webinterface.") + print _("If you only want to access locally to pyLoad ssl is not usefull.") + print "" + + if not captcha: + print _("no Captcha Recognition available") + print _("Only needed for some hosters and as freeuser.") + print "" + + if not gui: + print _("Gui not available") + print _("The Graphical User Interface.") + print "" + + if not web: + print _("no Webinterface available") + print _("Gives abillity to control pyLoad with your webbrowser.") + print "" + + print _("You can abort the setup now and fix some dependicies if you want.") con = self.ask(_("Continue with setup?"), "y", bool=True) @@ -146,11 +177,16 @@ class Setup(): curl = self.check_module("pycurl") self.print_dep("pycurl", curl) - crypto = self.check_module("Crypto") - self.print_dep("pycrypto", crypto) + sqlite = self.check_module("sqlite3") + self.print_dep("sqlite3", sqlite) - basic = python and curl + basic = python and curl and sqlite + print "" + + crypto = self.check_module("Crypto") + self.print_dep("pycrypto", crypto) + ssl = self.check_module("OpenSSL") self.print_dep("OpenSSL", ssl) @@ -162,8 +198,8 @@ class Setup(): tesser = self.check_prog(["tesseract", "-v"]) self.print_dep("tesseract", tesser) - gocr = self.check_prog(["gocr", "-h"]) - self.print_dep("gocr", gocr) + #gocr = self.check_prog(["gocr", "-h"]) + #self.print_dep("gocr", gocr) captcha = pil and tesser @@ -175,7 +211,7 @@ class Setup(): print "" web = self.check_module("django") - sqlite = self.check_module("sqlite3") + try: import django @@ -190,7 +226,6 @@ class Setup(): web = False self.print_dep("django", web) - self.print_dep("sqlite3", sqlite) web = web and sqlite return (basic, ssl, captcha, gui, web) diff --git a/module/web/media/default/css/default.css b/module/web/media/default/css/default.css index 692202bb2..346c1eb23 100644 --- a/module/web/media/default/css/default.css +++ b/module/web/media/default/css/default.css @@ -1010,11 +1010,15 @@ a.backlink { a.play { background:transparent url(/media/default/img/control_play.png) 0px 1px no-repeat; } -a.time { +.time { background:transparent url(/media/default/img/status_None.png) 0px 1px no-repeat; + padding: 2px 0px 2px 18px; + margin: 0px 3px; } -a.reconnect { +.reconnect { background:transparent url(/media/default/img/reconnect.png) 0px 1px no-repeat; + padding: 2px 0px 2px 18px; + margin: 0px 3px; } a.play:hover { background:transparent url(/media/default/img/control_play_blue.png) 0px 1px no-repeat; @@ -1038,6 +1042,12 @@ a.stop { a.stop:hover { background:transparent url(/media/default/img/control_stop_blue.png) 0px 1px no-repeat; } +a.add { + background:transparent url(/media/default/img/control_add.png) 0px 1px no-repeat; +} +a.add:hover { + background:transparent url(/media/default/img/control_add_blue.png) 0px 1px no-repeat; +} a.cog { background:transparent url(/media/default/img/cog.png) 0px 1px no-repeat; } @@ -1531,66 +1541,108 @@ div.codearea pre span.Preprc { font-weight: normal; } -#horizontalForm fieldset -{ - display: block; - margin: 0 0 3em 0; - padding: 0 1em 1em 1em; -} -#horizontalForm fieldset.radio +.clearer { - margin: 1em 0 2em 0; + clear: both; + height: 1px; } -#horizontalForm fieldset.radio input +.left { - clear: both; float: left; - width: auto; } -#horizontalForm fieldset.radio label +.right { - font-weight: normal; + float: right; } -#horizontalForm input + +.setfield { - display: block; - width: 15em; + display: table-cell; } -#horizontalForm input.submit +#tabsback { - clear: both; + background-color: #525252; + margin: 0px; + padding: 6px 4px 1px 4px; + + border-top-right-radius: 30px; + border-top-left-radius: 3px; + -moz-border-radius-topright: 30px; + -moz-border-radius-topleft: 3px; +} +ul#tabs +{ + list-style-type: none; + margin:0px; + padding: 0px 40px 0px 0px; +} +ul#tabs li +{ + display: inline; + margin-left: 8px; } +ul#tabs li a +{ + color: #42454a; + background-color: #eaeaea; + border: 1px solid #c9c3ba; + border-bottom: none; + padding: 2px 4px 2px 4px; + margin: 0px; + text-decoration: none; -#horizontalForm label + outline: 0; + border-radius: 4px; + -moz-border-radius: 4px; +} + +ul#tabs li a.selected, ul#tabs li a:hover { - float: left; - display: block; - margin: 1em 1em 0 0; - font-weight: bold; + color: #000; + background-color: white; + padding: 2px 4px 6px 4px; + + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 0px; } -#horizontalForm select +ul#tabs li a:hover { - display: block; + background-color: #f1f4ee; } -.clearer +ul#tabs li a.selected { - clear: both; - height: 1px; + font-weight: bold; } -.left +div.tabContent { - float: left; + border: 2px solid #525252; + margin: 0px 0px 0px 0px; + padding: 0px; + +} +div.tabContent.hide +{ + display: none; } -.right +.settable { - float: right; + margin: 20px; + border: none; } +.settable td +{ + border: none; + margin: 0px; + padding: 5px; +} \ No newline at end of file diff --git a/module/web/media/default/img/control_add.png b/module/web/media/default/img/control_add.png new file mode 100644 index 000000000..d39886893 Binary files /dev/null and b/module/web/media/default/img/control_add.png differ diff --git a/module/web/media/default/img/control_add_blue.png b/module/web/media/default/img/control_add_blue.png new file mode 100644 index 000000000..d11b7f41d Binary files /dev/null and b/module/web/media/default/img/control_add_blue.png differ diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 112875cc0..fd18aee84 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -263,14 +263,14 @@ function AddBox()
  • {% trans "Play" %}
  • {% trans "Cancel" %}
  • {% trans "Stop" %}
  • -
  • {% trans "Add" %}
  • +
  • {% trans "Add" %}
  • {% endif %} {% if perms.pyload.can_see_dl %}