~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-03-15 09:00:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:703
tutorial: (Python + Javascript)
    Added JS function "set_saved_status", which can activate and deactivate
    the save button.
    Modifying the text field now creates a Save timer which takes 10 seconds
    to elapse, then auto-saves the field.
    The save button is only enabled if the text has been modified since
    saving.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enable_debuginfo = False
8
8
 
9
9
# Allow App objects
10
 
# Note: icon is a string of a file basename. The icon files are found in
 
10
# Notes:
 
11
# desc is a full description for the front page. It isn't required
 
12
# unless this app is in apps_on_home_page.
 
13
# icon is a string of a file basename. The icon files are found in
11
14
# app_icon_dir, defined below.
12
15
class App:
13
 
    def __init__(self, dir, name, icon = None, requireauth = True,
14
 
        hashelp = False):
 
16
    def __init__(self, dir, name, desc=None, icon = None,
 
17
        requireauth = True, hashelp = False):
15
18
        self.dir = dir
16
19
        self.name = name
 
20
        self.desc = desc
17
21
        self.icon = icon
18
22
        self.requireauth = requireauth
19
23
        self.hashelp = hashelp
20
24
    def __repr__(self):
21
 
        return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
22
 
            ", icon=" + repr(self.icon) +
23
 
            ", requireauth=" + repr(self.requireauth) + ", hashelp="
24
 
            + repr(self.hashelp) + ")")
 
25
        return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
 
26
                "hashelp=%s)" % (repr(self.dir), repr(self.name),
 
27
                repr(self.desc), repr(self.icon), repr(self.requireauth),
 
28
                repr(self.hashelp)))
25
29
 
26
30
# Directory where app icons are stored, relative to the IVLE root.
27
31
app_icon_dir = "media/images/apps"
32
36
# of the site). This is the app's URL name.
33
37
# Note that if this app requires authentication, the user will first be
34
38
# presented with the login screen.
35
 
default_app = "files"
 
39
default_app = "home"
36
40
# Which application to use for "public host" URLs.
37
41
# (See conf.py)
38
42
public_app = "serve"
40
44
# Application definitions
41
45
 
42
46
app_browser =   App(dir = "browser",
43
 
                    name = "File Browser",
 
47
                    name = "Files",
 
48
                    desc = "Gives you access to all of your files and lets "
 
49
                           "you download, upload, edit and run them.",
44
50
                    icon = "browser.png",
45
51
                    requireauth = True,
46
52
                    hashelp = True)
47
53
 
48
 
app_editor =   App(dir = "editor",
49
 
                    name = "Text Editor",
50
 
                    icon = "editor.png",
51
 
                    requireauth = True,
52
 
                    hashelp = True)
53
 
 
54
54
app_fileservice = App(dir = "fileservice",
55
55
                    name = "File Service (AJAX server)",
56
56
                    requireauth = True,
58
58
 
59
59
app_console =     App(dir = "console",
60
60
                    name = "Console",
 
61
                    desc = "A Python console where you can try out code "
 
62
                           "without having to save and run it.",
61
63
                    icon = "console.png",
62
64
                    requireauth = True,
63
65
                    hashelp = True)
68
70
                    hashelp = False)
69
71
 
70
72
app_tutorial =     App(dir = "tutorial",
71
 
                    name = "Tutorial",
 
73
                    name = "Worksheets",
 
74
                    desc = "Online tutorials and exercises for lab work.",
72
75
                    icon = "tutorial.png",
73
76
                    requireauth = True,
74
77
                    hashelp = True)
90
93
 
91
94
app_help =      App(dir = "help",
92
95
                    name = "Help",
 
96
                    desc = "IVLE help pages",
93
97
                    icon = "help.png",
94
98
                    requireauth = True,
95
99
                    hashelp = False)
101
105
 
102
106
app_forum = App(dir = "forum",
103
107
                    name = "Forum",
 
108
                    desc = "Discussion boards for material relating to "
 
109
                           "Informatics, IVLE and Python.",
104
110
                    icon = "forum.png",
105
111
                    requireauth = True,
106
112
                    hashelp = False)
110
116
                    requireauth = False,
111
117
                    hashelp = False)
112
118
 
 
119
app_settings = App(dir = "settings",
 
120
                    name = "Account Settings",
 
121
                    icon = "settings.png",
 
122
                    requireauth = True,
 
123
                    hashelp = True)
 
124
 
113
125
app_userservice = App(dir = "userservice",
114
126
                    name = "User Management Service",
115
127
                    requireauth = False,
116
128
                    hashelp = False)
117
129
 
 
130
app_diff = App(dir = "diff",
 
131
                    name = "Diff",
 
132
                    #icon = "forum.png",
 
133
                    requireauth = True,
 
134
                    hashelp = False)
 
135
 
 
136
app_subjects = App(dir = "subjects",
 
137
                    name = "Subjects",
 
138
                    desc = "Announcements and information about the subjects "
 
139
                           "you are enrolled in.",
 
140
                    icon = "subjects.png",
 
141
                    requireauth = False,
 
142
                    hashelp = False)
 
143
 
 
144
app_home = App(dir = "home",
 
145
                    name = "Home",
 
146
                    desc = "IVLE home page",
 
147
                    icon = "home.png",
 
148
                    requireauth = True,
 
149
                    hashelp = False)
 
150
 
118
151
# Mapping URL names to apps
119
152
 
120
153
app_url = {
121
154
    "files" : app_browser,
122
 
    "edit" : app_editor,
123
155
    "fileservice" : app_fileservice,
124
156
    "console" : app_console,
125
157
    "consoleservice" : app_consoleservice,
130
162
    "help" : app_help,
131
163
    "forum" : app_forum,
132
164
    "tos" : app_tos,
 
165
    "settings" : app_settings,
133
166
    "userservice" : app_userservice,
 
167
    "diff" : app_diff,
 
168
    "subjects" : app_subjects,
 
169
    "home" : app_home,
134
170
}
135
171
if enable_debuginfo:
136
172
    app_url["debuginfo"] = app_debuginfo
139
175
# (The others are hidden unless they are linked to)
140
176
# Note: The values in this list are the URL names as seen in app_url.
141
177
 
142
 
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]
 
178
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
 
179
                "forum", "help"]
 
180
 
 
181
# List of apps that go in the list on the home page
 
182
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]