author | Fabien Ninoles <fabien@tzone.org> |
Sun, 28 Dec 2008 15:21:49 -0500 | |
changeset 64 | f1b93ddec9e0 |
parent 58 | 004a32370ba5 |
child 74 | 6784c4350b41 |
permissions | -rwxr-xr-x |
31
cee64de4e7e0
[svn r1575] Move index.py generic functions into a separate library.
fabien
parents:
diff
changeset
|
1 |
#!/usr/bin/python |
cee64de4e7e0
[svn r1575] Move index.py generic functions into a separate library.
fabien
parents:
diff
changeset
|
2 |
|
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
3 |
from dynamic import do_dynamic |
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
4 |
from folders import do_folders |
38
c30e2402deca
[svn r1582] Add some user preferences support (kw sorting and kw select box size).
fabien
parents:
31
diff
changeset
|
5 |
|
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
51
diff
changeset
|
6 |
def load_index(db, prefs, form, status, status_msg): |
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
7 |
if form: |
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
8 |
if form.has_key('view'): |
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
9 |
if form['view'].value == 'folder': |
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
51
diff
changeset
|
10 |
do_folders(db, prefs, form, status, status_msg) |
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
11 |
else: |
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
51
diff
changeset
|
12 |
do_dynamic(db, prefs, form, status, status_msg) |
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
13 |
return |
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
14 |
if prefs['default_view'] == 0: |
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
51
diff
changeset
|
15 |
do_dynamic(db, prefs, form, status, status_msg) |
47
2781ac85b807
[svn r1604] Implement default_view preferences, which move things around a lot.
fabien
parents:
45
diff
changeset
|
16 |
else: |
58
004a32370ba5
Correct some bugs and make keywords edition with the new action
fabien@tzone.org
parents:
51
diff
changeset
|
17 |
do_folders(db, prefs, form, status, status_msg) |