summaryrefslogtreecommitdiffstats
path: root/pyload/webui/app
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-19 20:54:41 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-19 20:54:41 +0200
commit5645ae5a454b95245813c78ff2da541ec648441f (patch)
treeaef7b4aebf11e9f10872b6fc314b2e45344be7e1 /pyload/webui/app
parentSpare code cosmetics (6) (diff)
parentfix typo (diff)
downloadpyload-5645ae5a454b95245813c78ff2da541ec648441f.tar.xz
Merge pull request #9 from ardi69/0.4.10
sorted config in webui ("Activated" always on top)
Diffstat (limited to 'pyload/webui/app')
-rw-r--r--pyload/webui/app/json.py7
-rw-r--r--pyload/webui/app/pyloadweb.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/pyload/webui/app/json.py b/pyload/webui/app/json.py
index d4af40dee..30778f1f7 100644
--- a/pyload/webui/app/json.py
+++ b/pyload/webui/app/json.py
@@ -203,7 +203,7 @@ def edit_package():
id = int(request.forms.get("pack_id"))
data = {"name": request.forms.get("pack_name").decode("utf8", "ignore"),
"folder": request.forms.get("pack_folder").decode("utf8", "ignore"),
- "password": request.forms.get("pack_pws").decode("utf8", "ignore")}
+ "password": request.forms.get("pack_pws").decode("utf8", "ignore")}
PYLOAD.setPackageData(id, data)
return {"response": "success"}
@@ -250,7 +250,8 @@ def load_config(category, section):
option['value'] = decode(option['value'])
- return render_to_response("settings_item.html", {"skey": section, "section": conf[section]})
+ return render_to_response("settings_item.html", {"sorted_conf": lambda c: sorted(c.items(), key=lambda i: i[1]['idx'] if i[0] not in ("desc", "outline") else 0),
+ "skey": section, "section": conf[section]})
@route('/json/save_config/<category>', method='POST')
@@ -300,7 +301,7 @@ def update_accounts():
elif action == "limitdl" and value.isdigit():
PYLOAD.updateAccount(plugin, user, options={"limitDL": [value]})
elif action == "delete":
- deleted.append((plugin,user))
+ deleted.append((plugin, user))
PYLOAD.removeAccount(plugin, user)
diff --git a/pyload/webui/app/pyloadweb.py b/pyload/webui/app/pyloadweb.py
index b3baed3eb..154409655 100644
--- a/pyload/webui/app/pyloadweb.py
+++ b/pyload/webui/app/pyloadweb.py
@@ -471,7 +471,7 @@ def logs(item=-1):
'reversed': reversed, 'perpage': perpage, 'perpage_p': sorted(perpage_p),
'iprev': 1 if item - perpage < 1 else item - perpage,
'inext': (item + perpage) if item + perpage < len(log) else item,
- 'color_template': color_template},
+ 'color_template': color_template.title()},
[pre_processor])