1 | from mako import runtime, filters, cache |
---|
2 | UNDEFINED = runtime.UNDEFINED |
---|
3 | __M_dict_builtin = dict |
---|
4 | __M_locals_builtin = locals |
---|
5 | _magic_number = 5 |
---|
6 | _modified_time = 1287725326.8172879 |
---|
7 | _template_filename=u'templates/base_panels.mako' |
---|
8 | _template_uri=u'/base_panels.mako' |
---|
9 | _template_cache=cache.Cache(__name__, _modified_time) |
---|
10 | _source_encoding=None |
---|
11 | _exports = ['message_box_content', 'overlay', 'late_javascripts', 'stylesheets', 'init', 'masthead', 'javascripts'] |
---|
12 | |
---|
13 | |
---|
14 | def render_body(context,**pageargs): |
---|
15 | context.caller_stack._push_frame() |
---|
16 | try: |
---|
17 | __M_locals = __M_dict_builtin(pageargs=pageargs) |
---|
18 | self = context.get('self', UNDEFINED) |
---|
19 | __M_writer = context.writer() |
---|
20 | # SOURCE LINE 2 |
---|
21 | __M_writer(u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n') |
---|
22 | # SOURCE LINE 4 |
---|
23 | |
---|
24 | self.has_left_panel=True |
---|
25 | self.has_right_panel=True |
---|
26 | self.message_box_visible=False |
---|
27 | self.overlay_visible=False |
---|
28 | self.message_box_class="" |
---|
29 | self.active_view=None |
---|
30 | self.body_class="" |
---|
31 | |
---|
32 | |
---|
33 | # SOURCE LINE 12 |
---|
34 | __M_writer(u'\n \n') |
---|
35 | # SOURCE LINE 16 |
---|
36 | __M_writer(u'\n\n') |
---|
37 | # SOURCE LINE 37 |
---|
38 | __M_writer(u'\n\n') |
---|
39 | # SOURCE LINE 48 |
---|
40 | __M_writer(u'\n\n') |
---|
41 | # SOURCE LINE 151 |
---|
42 | __M_writer(u'\n\n') |
---|
43 | # SOURCE LINE 156 |
---|
44 | __M_writer(u'\n\n') |
---|
45 | # SOURCE LINE 191 |
---|
46 | __M_writer(u'\n\n') |
---|
47 | # SOURCE LINE 195 |
---|
48 | __M_writer(u'\n\n') |
---|
49 | # SOURCE LINE 198 |
---|
50 | __M_writer(u'<html>\n ') |
---|
51 | # SOURCE LINE 199 |
---|
52 | __M_writer(unicode(self.init())) |
---|
53 | __M_writer(u' \n <head>\n <title>') |
---|
54 | # SOURCE LINE 201 |
---|
55 | __M_writer(unicode(self.title())) |
---|
56 | __M_writer(u'</title>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n ') |
---|
57 | # SOURCE LINE 203 |
---|
58 | __M_writer(unicode(self.stylesheets())) |
---|
59 | __M_writer(u'\n ') |
---|
60 | # SOURCE LINE 204 |
---|
61 | __M_writer(unicode(self.javascripts())) |
---|
62 | __M_writer(u'\n </head>\n \n <body scroll="no" class="') |
---|
63 | # SOURCE LINE 207 |
---|
64 | __M_writer(unicode(self.body_class)) |
---|
65 | __M_writer(u'">\n\t<div id="everything" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-width: 600px;">\n') |
---|
66 | # SOURCE LINE 210 |
---|
67 | __M_writer(u' <div id="background"></div>\n') |
---|
68 | # SOURCE LINE 212 |
---|
69 | __M_writer(u' <div id="masthead">\n ') |
---|
70 | # SOURCE LINE 213 |
---|
71 | __M_writer(unicode(self.masthead())) |
---|
72 | __M_writer(u'\n </div>\n <div id="messagebox" class="panel-') |
---|
73 | # SOURCE LINE 215 |
---|
74 | __M_writer(unicode(self.message_box_class)) |
---|
75 | __M_writer(u'-message">\n') |
---|
76 | # SOURCE LINE 216 |
---|
77 | if self.message_box_visible: |
---|
78 | # SOURCE LINE 217 |
---|
79 | __M_writer(u' ') |
---|
80 | __M_writer(unicode(self.message_box_content())) |
---|
81 | __M_writer(u'\n') |
---|
82 | # SOURCE LINE 219 |
---|
83 | __M_writer(u' </div>\n ') |
---|
84 | # SOURCE LINE 220 |
---|
85 | __M_writer(unicode(self.overlay())) |
---|
86 | __M_writer(u'\n') |
---|
87 | # SOURCE LINE 221 |
---|
88 | if self.has_left_panel: |
---|
89 | # SOURCE LINE 222 |
---|
90 | __M_writer(u' <div id="left">\n ') |
---|
91 | # SOURCE LINE 223 |
---|
92 | __M_writer(unicode(self.left_panel())) |
---|
93 | __M_writer(u'\n </div>\n <div id="left-border">\n <div id="left-border-inner" style="display: none;"></div>\n </div>\n') |
---|
94 | # SOURCE LINE 229 |
---|
95 | __M_writer(u' <div id="center">\n ') |
---|
96 | # SOURCE LINE 230 |
---|
97 | __M_writer(unicode(self.center_panel())) |
---|
98 | __M_writer(u'\n </div>\n') |
---|
99 | # SOURCE LINE 232 |
---|
100 | if self.has_right_panel: |
---|
101 | # SOURCE LINE 233 |
---|
102 | __M_writer(u' <div id="right-border"><div id="right-border-inner" style="display: none;"></div></div>\n <div id="right">\n ') |
---|
103 | # SOURCE LINE 235 |
---|
104 | __M_writer(unicode(self.right_panel())) |
---|
105 | __M_writer(u'\n </div>\n') |
---|
106 | # SOURCE LINE 238 |
---|
107 | __M_writer(u'\t</div>\n') |
---|
108 | # SOURCE LINE 240 |
---|
109 | __M_writer(u' </body>\n') |
---|
110 | # SOURCE LINE 243 |
---|
111 | __M_writer(u' ') |
---|
112 | __M_writer(unicode(self.late_javascripts())) |
---|
113 | __M_writer(u'\n</html>\n') |
---|
114 | return '' |
---|
115 | finally: |
---|
116 | context.caller_stack._pop_frame() |
---|
117 | |
---|
118 | |
---|
119 | def render_message_box_content(context): |
---|
120 | context.caller_stack._push_frame() |
---|
121 | try: |
---|
122 | __M_writer = context.writer() |
---|
123 | # SOURCE LINE 194 |
---|
124 | __M_writer(u'\n') |
---|
125 | return '' |
---|
126 | finally: |
---|
127 | context.caller_stack._pop_frame() |
---|
128 | |
---|
129 | |
---|
130 | def render_overlay(context,title='',content=''): |
---|
131 | context.caller_stack._push_frame() |
---|
132 | try: |
---|
133 | self = context.get('self', UNDEFINED) |
---|
134 | __M_writer = context.writer() |
---|
135 | # SOURCE LINE 158 |
---|
136 | __M_writer(u'\n ') |
---|
137 | # SOURCE LINE 159 |
---|
138 | __M_writer(u'\n ') |
---|
139 | # SOURCE LINE 160 |
---|
140 | __M_writer(u'\n\n <div id="overlay"\n') |
---|
141 | # SOURCE LINE 163 |
---|
142 | if not self.overlay_visible: |
---|
143 | # SOURCE LINE 164 |
---|
144 | __M_writer(u' style="display: none;"\n') |
---|
145 | # SOURCE LINE 166 |
---|
146 | __M_writer(u' >\n') |
---|
147 | # SOURCE LINE 168 |
---|
148 | __M_writer(u' <div id="overlay-background" style="position: absolute; width: 100%; height: 100%;"></div>\n \n') |
---|
149 | # SOURCE LINE 171 |
---|
150 | __M_writer(u' <table class="dialog-box-container" border="0" cellpadding="0" cellspacing="0"\n') |
---|
151 | # SOURCE LINE 172 |
---|
152 | if not self.overlay_visible: |
---|
153 | # SOURCE LINE 173 |
---|
154 | __M_writer(u' style="display: none;"\n') |
---|
155 | # SOURCE LINE 175 |
---|
156 | __M_writer(u' ><tr><td>\n <div class="dialog-box-wrapper">\n <div class="dialog-box">\n <div class="unified-panel-header">\n <div class="unified-panel-header-inner"><span class=\'title\'>') |
---|
157 | # SOURCE LINE 179 |
---|
158 | __M_writer(unicode(title)) |
---|
159 | __M_writer(u'</span></div>\n </div>\n <div class="body">') |
---|
160 | # SOURCE LINE 181 |
---|
161 | __M_writer(unicode(content)) |
---|
162 | __M_writer(u'</div>\n <div>\n <div class="buttons" style="display: none; float: right;"></div>\n <div class="extra_buttons" style="display: none; padding: 5px;"></div>\n <div style="clear: both;"></div>\n </div>\n </div>\n </div>\n </td></tr></table>\n </div>\n') |
---|
163 | return '' |
---|
164 | finally: |
---|
165 | context.caller_stack._pop_frame() |
---|
166 | |
---|
167 | |
---|
168 | def render_late_javascripts(context): |
---|
169 | context.caller_stack._push_frame() |
---|
170 | try: |
---|
171 | h = context.get('h', UNDEFINED) |
---|
172 | self = context.get('self', UNDEFINED) |
---|
173 | __M_writer = context.writer() |
---|
174 | # SOURCE LINE 51 |
---|
175 | __M_writer(u'\n') |
---|
176 | # SOURCE LINE 54 |
---|
177 | __M_writer(u' ') |
---|
178 | __M_writer(unicode(h.js( 'jquery.event.drag', 'jquery.event.hover', 'jquery.form', 'jquery.rating', 'galaxy.base', 'galaxy.panels' ))) |
---|
179 | __M_writer(u'\n <script type="text/javascript">\n \n ensure_dd_helper();\n \n') |
---|
180 | # SOURCE LINE 59 |
---|
181 | if self.has_left_panel: |
---|
182 | # SOURCE LINE 60 |
---|
183 | __M_writer(u' var lp = make_left_panel( $("#left"), $("#center"), $("#left-border" ) );\n force_left_panel = lp.force_panel;\n') |
---|
184 | # SOURCE LINE 63 |
---|
185 | __M_writer(u' \n') |
---|
186 | # SOURCE LINE 64 |
---|
187 | if self.has_right_panel: |
---|
188 | # SOURCE LINE 65 |
---|
189 | __M_writer(u' var rp = make_right_panel( $("#right"), $("#center"), $("#right-border" ) );\n handle_minwidth_hint = rp.handle_minwidth_hint;\n force_right_panel = rp.force_panel;\n') |
---|
190 | # SOURCE LINE 69 |
---|
191 | __M_writer(u' \n </script>\n') |
---|
192 | # SOURCE LINE 72 |
---|
193 | __M_writer(u' <![if !IE]>\n <script type="text/javascript">\n var upload_form_error = function( msg ) {\n if ( ! $("iframe#galaxy_main").contents().find("body").find("div[class=\'errormessage\']").size() ) {\n $("iframe#galaxy_main").contents().find("body").prepend( \'<div class="errormessage" name="upload_error">\' + msg + \'</div><p/>\' );\n } else {\n $("iframe#galaxy_main").contents().find("body").find("div[class=\'errormessage\']").text( msg );\n }\n }\n jQuery( function() {\n $("iframe#galaxy_main").load( function() {\n $(this).contents().find("form").each( function() { \n if ( $(this).find("input[galaxy-ajax-upload]").length > 0 ){\n $(this).submit( function() {\n // Only bother using a hidden iframe if there\'s a file (e.g. big data) upload\n var file_upload = false;\n $(this).find("input[galaxy-ajax-upload]").each( function() {\n if ( $(this).val() != \'\' ) {\n file_upload = true;\n }\n });\n if ( ! file_upload ) {\n return true;\n }\n // Make a synchronous request to create the datasets first\n var async_datasets;\n var upload_error = false;\n $.ajax( {\n async: false,\n type: "POST",\n url: "') |
---|
194 | # SOURCE LINE 102 |
---|
195 | __M_writer(unicode(h.url_for(controller='/tool_runner', action='upload_async_create'))) |
---|
196 | __M_writer(u'",\n data: $(this).formSerialize(),\n dataType: "json",\n success: function(array_obj, status) {\n if (array_obj.length > 0) {\n if (array_obj[0] == \'error\') {\n upload_error = true;\n upload_form_error(array_obj[1]);\n } else {\n async_datasets = array_obj.join();\n }\n } else {\n // ( gvk 1/22/10 ) FIXME: this block is never entered, so there may be a bug somewhere\n // I\'ve done some debugging like checking to see if array_obj is undefined, but have not\n // tracked down the behavior that will result in this block being entered. I believe the\n // intent was to have this block entered if the upload button is clicked on the upload\n // form but no file was selected.\n upload_error = true;\n upload_form_error( \'No data was entered in the upload form. You may choose to upload a file, paste some data directly in the data box, or enter URL(s) to fetch data.\' );\n }\n }\n } );\n if (upload_error == true) {\n return false;\n } else {\n $(this).find("input[name=async_datasets]").val( async_datasets );\n $(this).append("<input type=\'hidden\' name=\'ajax_upload\' value=\'true\'>");\n }\n // iframe submit is required for nginx (otherwise the encoding is wrong)\n $(this).ajaxSubmit( { iframe: true } );\n if ( $(this).find("input[name=\'folder_id\']").val() != undefined ) {\n var library_id = $(this).find("input[name=\'library_id\']").val();\n var show_deleted = $(this).find("input[name=\'show_deleted\']").val();\n if ( location.pathname.indexOf( \'admin\' ) != -1 ) {\n $("iframe#galaxy_main").attr("src","') |
---|
197 | # SOURCE LINE 136 |
---|
198 | __M_writer(unicode(h.url_for( controller='library_common', action='browse_library' ))) |
---|
199 | __M_writer(u'?cntrller=library_admin&id=" + library_id + "&created_ldda_ids=" + async_datasets + "&show_deleted=" + show_deleted);\n } else {\n $("iframe#galaxy_main").attr("src","') |
---|
200 | # SOURCE LINE 138 |
---|
201 | __M_writer(unicode(h.url_for( controller='library_common', action='browse_library' ))) |
---|
202 | __M_writer(u'?cntrller=library&id=" + library_id + "&created_ldda_ids=" + async_datasets + "&show_deleted=" + show_deleted);\n }\n } else {\n $("iframe#galaxy_main").attr("src","') |
---|
203 | # SOURCE LINE 141 |
---|
204 | __M_writer(unicode(h.url_for(controller='tool_runner', action='upload_async_message'))) |
---|
205 | __M_writer(u'");\n }\n return false;\n });\n }\n });\n });\n });\n </script>\n <![endif]>\n') |
---|
206 | return '' |
---|
207 | finally: |
---|
208 | context.caller_stack._pop_frame() |
---|
209 | |
---|
210 | |
---|
211 | def render_stylesheets(context): |
---|
212 | context.caller_stack._push_frame() |
---|
213 | try: |
---|
214 | h = context.get('h', UNDEFINED) |
---|
215 | self = context.get('self', UNDEFINED) |
---|
216 | __M_writer = context.writer() |
---|
217 | # SOURCE LINE 19 |
---|
218 | __M_writer(u'\n ') |
---|
219 | # SOURCE LINE 20 |
---|
220 | __M_writer(unicode(h.css('base','panel_layout','jquery.rating'))) |
---|
221 | __M_writer(u'\n <style type="text/css">\n #center {\n') |
---|
222 | # SOURCE LINE 23 |
---|
223 | if not self.has_left_panel: |
---|
224 | # SOURCE LINE 24 |
---|
225 | __M_writer(u' left: 0;\n') |
---|
226 | # SOURCE LINE 26 |
---|
227 | if not self.has_right_panel: |
---|
228 | # SOURCE LINE 27 |
---|
229 | __M_writer(u' right: 0;\n') |
---|
230 | # SOURCE LINE 29 |
---|
231 | __M_writer(u' }\n') |
---|
232 | # SOURCE LINE 30 |
---|
233 | if self.message_box_visible: |
---|
234 | # SOURCE LINE 31 |
---|
235 | __M_writer(u' #left, #left-border, #center, #right-border, #right\n {\n top: 64px;\n }\n') |
---|
236 | # SOURCE LINE 36 |
---|
237 | __M_writer(u' </style>\n') |
---|
238 | return '' |
---|
239 | finally: |
---|
240 | context.caller_stack._pop_frame() |
---|
241 | |
---|
242 | |
---|
243 | def render_init(context): |
---|
244 | context.caller_stack._push_frame() |
---|
245 | try: |
---|
246 | __M_writer = context.writer() |
---|
247 | # SOURCE LINE 14 |
---|
248 | __M_writer(u'\n') |
---|
249 | return '' |
---|
250 | finally: |
---|
251 | context.caller_stack._pop_frame() |
---|
252 | |
---|
253 | |
---|
254 | def render_masthead(context): |
---|
255 | context.caller_stack._push_frame() |
---|
256 | try: |
---|
257 | __M_writer = context.writer() |
---|
258 | # SOURCE LINE 154 |
---|
259 | __M_writer(u'\n') |
---|
260 | return '' |
---|
261 | finally: |
---|
262 | context.caller_stack._pop_frame() |
---|
263 | |
---|
264 | |
---|
265 | def render_javascripts(context): |
---|
266 | context.caller_stack._push_frame() |
---|
267 | try: |
---|
268 | h = context.get('h', UNDEFINED) |
---|
269 | __M_writer = context.writer() |
---|
270 | # SOURCE LINE 40 |
---|
271 | __M_writer(u'\n <!--[if lt IE 7]>\n ') |
---|
272 | # SOURCE LINE 42 |
---|
273 | __M_writer(unicode(h.js( 'IE7', 'ie7-recalc' ))) |
---|
274 | __M_writer(u'\n <![endif]-->\n <script type="text/javascript">\n var image_path = \'') |
---|
275 | # SOURCE LINE 45 |
---|
276 | __M_writer(unicode(h.url_for("/static/images"))) |
---|
277 | __M_writer(u"';\n </script>\n ") |
---|
278 | # SOURCE LINE 47 |
---|
279 | __M_writer(unicode(h.js( 'jquery' ))) |
---|
280 | __M_writer(u'\n') |
---|
281 | return '' |
---|
282 | finally: |
---|
283 | context.caller_stack._pop_frame() |
---|
284 | |
---|
285 | |
---|