diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-26 23:33:55 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-26 23:33:55 +0100 |
commit | 0541a50bae77fca45c9b6d633b39595b4d933103 (patch) | |
tree | 61ec45609ef6168b7c69fc39a66916acc9fa466b /module | |
parent | fix ssl deactivation for server selector (diff) | |
download | pyload-0541a50bae77fca45c9b6d633b39595b4d933103.tar.xz |
little fixes, added pyload logo as svg
Diffstat (limited to 'module')
-rw-r--r-- | module/PluginManager.py | 2 | ||||
-rw-r--r-- | module/web/ServerThread.py | 1 | ||||
-rw-r--r-- | module/web/static/css/default/dashboard.less | 1 | ||||
-rw-r--r-- | module/web/static/js/utils/animations.js | 24 | ||||
-rw-r--r-- | module/web/static/js/views/packageView.js | 16 |
5 files changed, 27 insertions, 17 deletions
diff --git a/module/PluginManager.py b/module/PluginManager.py index d74123040..f5a3fe31d 100644 --- a/module/PluginManager.py +++ b/module/PluginManager.py @@ -177,7 +177,7 @@ class PluginManager: if "pattern" in attrs and attrs["pattern"]: try: - plugin_re = re.compile(attrs["pattern"]) + plugin_re = re.compile(attrs["pattern"], re.I) except: self.logDebug(folder, name, "Invalid regexp pattern '%s'" % attrs["pattern"]) plugin_re = self.NO_MATCH diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index b83864d86..a86ecca70 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -119,6 +119,7 @@ class WebServer(threading.Thread): elif not self.https: self.cert = self.key = None # This implicitly disables SSL # there is no extra argument for the server adapter + # TODO: check for openSSL ? # Now instantiate the serverAdapter server = server(self.host, self.port, self.key, self.cert, 6, self.debug) # todo, num_connections diff --git a/module/web/static/css/default/dashboard.less b/module/web/static/css/default/dashboard.less index 764fbfa96..0c749eb36 100644 --- a/module/web/static/css/default/dashboard.less +++ b/module/web/static/css/default/dashboard.less @@ -55,7 +55,6 @@ .package-view {
margin-bottom: 3px;
- overflow: hidden;
}
.package-view > div {
diff --git a/module/web/static/js/utils/animations.js b/module/web/static/js/utils/animations.js index aa48c6f00..657bd2bec 100644 --- a/module/web/static/js/utils/animations.js +++ b/module/web/static/js/utils/animations.js @@ -1,7 +1,31 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) { + // Adds an element and computes its height, which is saved as data attribute + // Important function to have slide animations + jQuery.fn.appendWithHeight = function(element, hide) { + var o = jQuery(this[0]); + + // TODO: additionally it could be placed out of viewport first + // The real height can only be retrieved when element is on DOM and display:true + element.css('visibility', 'hidden'); + o.append(element); + + var height = element.height(); + + // Hide the element + if (hide === true) { + element.hide(); + element.height(0); + } + + element.css('visibility', ''); + element.data('height', height); + + return this; + }; // TODO: sloppy chaining + // // in functions not possible without previous out jQuery.fn.zapIn = function(speed, easing, callback) { diff --git a/module/web/static/js/views/packageView.js b/module/web/static/js/views/packageView.js index 5d8aa7738..2c1541c7f 100644 --- a/module/web/static/js/views/packageView.js +++ b/module/web/static/js/views/packageView.js @@ -53,22 +53,8 @@ define(['jquery', 'views/abstract/itemView', 'underscore', 'views/fileView'], ul.append(new fileView({model: file}).render().el); }); - // TODO: additionally it could be placed out of viewport first - // The real height can only be retrieved when element is on DOM and display:true - ul.css('visibility', 'hidden'); - this.$el.append(ul); - - var height = ul.height(); - // Hide the element when not expanded - if (!this.expanded) { - ul.hide(); - ul.height(0); - } - - ul.css('visibility', ''); - ul.data('height', height); - console.log(ul.data("height")); + this.$el.appendWithHeight(ul, !this.expanded); this.ul = ul; } |