Show More
The requested changes are too big and content was truncated. Show full diff
@@ -0,0 +1,82 b'' | |||||
|
1 | """Utility function for installing MathJax javascript library into | |||
|
2 | the notebook's 'static' directory, for offline use. | |||
|
3 | ||||
|
4 | Authors: | |||
|
5 | ||||
|
6 | * Min RK | |||
|
7 | """ | |||
|
8 | ||||
|
9 | #----------------------------------------------------------------------------- | |||
|
10 | # Copyright (C) 2008-2011 The IPython Development Team | |||
|
11 | # | |||
|
12 | # Distributed under the terms of the BSD License. The full license is in | |||
|
13 | # the file COPYING, distributed as part of this software. | |||
|
14 | #----------------------------------------------------------------------------- | |||
|
15 | ||||
|
16 | #----------------------------------------------------------------------------- | |||
|
17 | # Imports | |||
|
18 | #----------------------------------------------------------------------------- | |||
|
19 | ||||
|
20 | import os | |||
|
21 | import shutil | |||
|
22 | import urllib2 | |||
|
23 | import tempfile | |||
|
24 | import tarfile | |||
|
25 | ||||
|
26 | from IPython.frontend.html import notebook as nbmod | |||
|
27 | ||||
|
28 | #----------------------------------------------------------------------------- | |||
|
29 | # Imports | |||
|
30 | #----------------------------------------------------------------------------- | |||
|
31 | ||||
|
32 | def install_mathjax(tag='v1.1', replace=False): | |||
|
33 | """Download and install MathJax for offline use. | |||
|
34 | ||||
|
35 | This will install mathjax to the 'static' dir in the IPython notebook | |||
|
36 | package, so it will fail if the caller does not have write access | |||
|
37 | to that location. | |||
|
38 | ||||
|
39 | MathJax is a ~15MB download, and ~150MB installed. | |||
|
40 | ||||
|
41 | Parameters | |||
|
42 | ---------- | |||
|
43 | ||||
|
44 | replace : bool [False] | |||
|
45 | Whether to remove and replace an existing install. | |||
|
46 | tag : str ['v1.1'] | |||
|
47 | Which tag to download. Default is 'v1.1', the current stable release, | |||
|
48 | but alternatives include 'v1.1a' and 'master'. | |||
|
49 | """ | |||
|
50 | mathjax_url = "https://github.com/mathjax/MathJax/tarball/%s"%tag | |||
|
51 | ||||
|
52 | nbdir = os.path.dirname(os.path.abspath(nbmod.__file__)) | |||
|
53 | static = os.path.join(nbdir, 'static') | |||
|
54 | dest = os.path.join(static, 'mathjax') | |||
|
55 | ||||
|
56 | # check for existence and permissions | |||
|
57 | if not os.access(static, os.W_OK): | |||
|
58 | raise IOError("Need have write access to %s"%static) | |||
|
59 | if os.path.exists(dest): | |||
|
60 | if replace: | |||
|
61 | if not os.access(dest, os.W_OK): | |||
|
62 | raise IOError("Need have write access to %s"%dest) | |||
|
63 | print "removing previous MathJax install" | |||
|
64 | shutil.rmtree(dest) | |||
|
65 | else: | |||
|
66 | print "offline MathJax apparently already installed" | |||
|
67 | return | |||
|
68 | ||||
|
69 | # download mathjax | |||
|
70 | print "Downloading mathjax source..." | |||
|
71 | response = urllib2.urlopen(mathjax_url) | |||
|
72 | print "done" | |||
|
73 | # use 'r|gz' stream mode, because socket file-like objects can't seek: | |||
|
74 | tar = tarfile.open(fileobj=response.fp, mode='r|gz') | |||
|
75 | topdir = tar.firstmember.path | |||
|
76 | print "Extracting to %s"%dest | |||
|
77 | tar.extractall(static) | |||
|
78 | # it will be mathjax-MathJax-<sha>, rename to just mathjax | |||
|
79 | os.rename(os.path.join(static, topdir), dest) | |||
|
80 | ||||
|
81 | ||||
|
82 | __all__ = ['install_mathjax'] |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 |
@@ -0,0 +1,334 b'' | |||||
|
1 | """Tornado handlers for the notebook. | |||
|
2 | ||||
|
3 | Authors: | |||
|
4 | ||||
|
5 | * Brian Granger | |||
|
6 | """ | |||
|
7 | ||||
|
8 | #----------------------------------------------------------------------------- | |||
|
9 | # Copyright (C) 2008-2011 The IPython Development Team | |||
|
10 | # | |||
|
11 | # Distributed under the terms of the BSD License. The full license is in | |||
|
12 | # the file COPYING, distributed as part of this software. | |||
|
13 | #----------------------------------------------------------------------------- | |||
|
14 | ||||
|
15 | #----------------------------------------------------------------------------- | |||
|
16 | # Imports | |||
|
17 | #----------------------------------------------------------------------------- | |||
|
18 | ||||
|
19 | from tornado import web | |||
|
20 | from tornado import websocket | |||
|
21 | ||||
|
22 | from zmq.eventloop import ioloop | |||
|
23 | from zmq.utils import jsonapi | |||
|
24 | ||||
|
25 | from IPython.zmq.session import Session | |||
|
26 | ||||
|
27 | try: | |||
|
28 | from docutils.core import publish_string | |||
|
29 | except ImportError: | |||
|
30 | publish_string = None | |||
|
31 | ||||
|
32 | ||||
|
33 | ||||
|
34 | #----------------------------------------------------------------------------- | |||
|
35 | # Top-level handlers | |||
|
36 | #----------------------------------------------------------------------------- | |||
|
37 | ||||
|
38 | ||||
|
39 | class NBBrowserHandler(web.RequestHandler): | |||
|
40 | def get(self): | |||
|
41 | nbm = self.application.notebook_manager | |||
|
42 | project = nbm.notebook_dir | |||
|
43 | self.render('nbbrowser.html', project=project) | |||
|
44 | ||||
|
45 | ||||
|
46 | class NewHandler(web.RequestHandler): | |||
|
47 | def get(self): | |||
|
48 | notebook_id = self.application.notebook_manager.new_notebook() | |||
|
49 | self.render('notebook.html', notebook_id=notebook_id) | |||
|
50 | ||||
|
51 | ||||
|
52 | class NamedNotebookHandler(web.RequestHandler): | |||
|
53 | def get(self, notebook_id): | |||
|
54 | nbm = self.application.notebook_manager | |||
|
55 | if not nbm.notebook_exists(notebook_id): | |||
|
56 | raise web.HTTPError(404) | |||
|
57 | self.render('notebook.html', notebook_id=notebook_id) | |||
|
58 | ||||
|
59 | ||||
|
60 | #----------------------------------------------------------------------------- | |||
|
61 | # Kernel handlers | |||
|
62 | #----------------------------------------------------------------------------- | |||
|
63 | ||||
|
64 | ||||
|
65 | class MainKernelHandler(web.RequestHandler): | |||
|
66 | ||||
|
67 | def get(self): | |||
|
68 | km = self.application.kernel_manager | |||
|
69 | self.finish(jsonapi.dumps(km.kernel_ids)) | |||
|
70 | ||||
|
71 | def post(self): | |||
|
72 | km = self.application.kernel_manager | |||
|
73 | notebook_id = self.get_argument('notebook', default=None) | |||
|
74 | kernel_id = km.start_kernel(notebook_id) | |||
|
75 | ws_url = self.application.ipython_app.get_ws_url() | |||
|
76 | data = {'ws_url':ws_url,'kernel_id':kernel_id} | |||
|
77 | self.set_header('Location', '/'+kernel_id) | |||
|
78 | self.finish(jsonapi.dumps(data)) | |||
|
79 | ||||
|
80 | ||||
|
81 | class KernelHandler(web.RequestHandler): | |||
|
82 | ||||
|
83 | SUPPORTED_METHODS = ('DELETE') | |||
|
84 | ||||
|
85 | def delete(self, kernel_id): | |||
|
86 | km = self.application.kernel_manager | |||
|
87 | km.kill_kernel(kernel_id) | |||
|
88 | self.set_status(204) | |||
|
89 | self.finish() | |||
|
90 | ||||
|
91 | ||||
|
92 | class KernelActionHandler(web.RequestHandler): | |||
|
93 | ||||
|
94 | def post(self, kernel_id, action): | |||
|
95 | km = self.application.kernel_manager | |||
|
96 | if action == 'interrupt': | |||
|
97 | km.interrupt_kernel(kernel_id) | |||
|
98 | self.set_status(204) | |||
|
99 | if action == 'restart': | |||
|
100 | new_kernel_id = km.restart_kernel(kernel_id) | |||
|
101 | ws_url = self.application.ipython_app.get_ws_url() | |||
|
102 | data = {'ws_url':ws_url,'kernel_id':new_kernel_id} | |||
|
103 | self.set_header('Location', '/'+new_kernel_id) | |||
|
104 | self.write(jsonapi.dumps(data)) | |||
|
105 | self.finish() | |||
|
106 | ||||
|
107 | ||||
|
108 | class ZMQStreamHandler(websocket.WebSocketHandler): | |||
|
109 | ||||
|
110 | def _reserialize_reply(self, msg_list): | |||
|
111 | """Reserialize a reply message using JSON. | |||
|
112 | ||||
|
113 | This takes the msg list from the ZMQ socket, unserializes it using | |||
|
114 | self.session and then serializes the result using JSON. This method | |||
|
115 | should be used by self._on_zmq_reply to build messages that can | |||
|
116 | be sent back to the browser. | |||
|
117 | """ | |||
|
118 | idents, msg_list = self.session.feed_identities(msg_list) | |||
|
119 | msg = self.session.unserialize(msg_list) | |||
|
120 | try: | |||
|
121 | msg['header'].pop('date') | |||
|
122 | except KeyError: | |||
|
123 | pass | |||
|
124 | try: | |||
|
125 | msg['parent_header'].pop('date') | |||
|
126 | except KeyError: | |||
|
127 | pass | |||
|
128 | msg.pop('buffers') | |||
|
129 | return jsonapi.dumps(msg) | |||
|
130 | ||||
|
131 | def _on_zmq_reply(self, msg_list): | |||
|
132 | try: | |||
|
133 | msg = self._reserialize_reply(msg_list) | |||
|
134 | except: | |||
|
135 | self.application.kernel_manager.log.critical("Malformed message: %r" % msg_list) | |||
|
136 | else: | |||
|
137 | self.write_message(msg) | |||
|
138 | ||||
|
139 | ||||
|
140 | class IOPubHandler(ZMQStreamHandler): | |||
|
141 | ||||
|
142 | def initialize(self, *args, **kwargs): | |||
|
143 | self._kernel_alive = True | |||
|
144 | self._beating = False | |||
|
145 | self.iopub_stream = None | |||
|
146 | self.hb_stream = None | |||
|
147 | ||||
|
148 | def open(self, kernel_id): | |||
|
149 | km = self.application.kernel_manager | |||
|
150 | self.kernel_id = kernel_id | |||
|
151 | self.session = Session() | |||
|
152 | self.time_to_dead = km.time_to_dead | |||
|
153 | try: | |||
|
154 | self.iopub_stream = km.create_iopub_stream(kernel_id) | |||
|
155 | self.hb_stream = km.create_hb_stream(kernel_id) | |||
|
156 | except web.HTTPError: | |||
|
157 | # WebSockets don't response to traditional error codes so we | |||
|
158 | # close the connection. | |||
|
159 | if not self.stream.closed(): | |||
|
160 | self.stream.close() | |||
|
161 | else: | |||
|
162 | self.iopub_stream.on_recv(self._on_zmq_reply) | |||
|
163 | self.start_hb(self.kernel_died) | |||
|
164 | ||||
|
165 | def on_close(self): | |||
|
166 | # This method can be called twice, once by self.kernel_died and once | |||
|
167 | # from the WebSocket close event. If the WebSocket connection is | |||
|
168 | # closed before the ZMQ streams are setup, they could be None. | |||
|
169 | self.stop_hb() | |||
|
170 | if self.iopub_stream is not None and not self.iopub_stream.closed(): | |||
|
171 | self.iopub_stream.on_recv(None) | |||
|
172 | self.iopub_stream.close() | |||
|
173 | if self.hb_stream is not None and not self.hb_stream.closed(): | |||
|
174 | self.hb_stream.close() | |||
|
175 | ||||
|
176 | def start_hb(self, callback): | |||
|
177 | """Start the heartbeating and call the callback if the kernel dies.""" | |||
|
178 | if not self._beating: | |||
|
179 | self._kernel_alive = True | |||
|
180 | ||||
|
181 | def ping_or_dead(): | |||
|
182 | if self._kernel_alive: | |||
|
183 | self._kernel_alive = False | |||
|
184 | self.hb_stream.send(b'ping') | |||
|
185 | else: | |||
|
186 | try: | |||
|
187 | callback() | |||
|
188 | except: | |||
|
189 | pass | |||
|
190 | finally: | |||
|
191 | self._hb_periodic_callback.stop() | |||
|
192 | ||||
|
193 | def beat_received(msg): | |||
|
194 | self._kernel_alive = True | |||
|
195 | ||||
|
196 | self.hb_stream.on_recv(beat_received) | |||
|
197 | self._hb_periodic_callback = ioloop.PeriodicCallback(ping_or_dead, self.time_to_dead*1000) | |||
|
198 | self._hb_periodic_callback.start() | |||
|
199 | self._beating= True | |||
|
200 | ||||
|
201 | def stop_hb(self): | |||
|
202 | """Stop the heartbeating and cancel all related callbacks.""" | |||
|
203 | if self._beating: | |||
|
204 | self._hb_periodic_callback.stop() | |||
|
205 | if not self.hb_stream.closed(): | |||
|
206 | self.hb_stream.on_recv(None) | |||
|
207 | ||||
|
208 | def kernel_died(self): | |||
|
209 | self.application.kernel_manager.delete_mapping_for_kernel(self.kernel_id) | |||
|
210 | self.write_message( | |||
|
211 | {'header': {'msg_type': 'status'}, | |||
|
212 | 'parent_header': {}, | |||
|
213 | 'content': {'execution_state':'dead'} | |||
|
214 | } | |||
|
215 | ) | |||
|
216 | self.on_close() | |||
|
217 | ||||
|
218 | ||||
|
219 | class ShellHandler(ZMQStreamHandler): | |||
|
220 | ||||
|
221 | def initialize(self, *args, **kwargs): | |||
|
222 | self.shell_stream = None | |||
|
223 | ||||
|
224 | def open(self, kernel_id): | |||
|
225 | km = self.application.kernel_manager | |||
|
226 | self.max_msg_size = km.max_msg_size | |||
|
227 | self.kernel_id = kernel_id | |||
|
228 | try: | |||
|
229 | self.shell_stream = km.create_shell_stream(kernel_id) | |||
|
230 | except web.HTTPError: | |||
|
231 | # WebSockets don't response to traditional error codes so we | |||
|
232 | # close the connection. | |||
|
233 | if not self.stream.closed(): | |||
|
234 | self.stream.close() | |||
|
235 | else: | |||
|
236 | self.session = Session() | |||
|
237 | self.shell_stream.on_recv(self._on_zmq_reply) | |||
|
238 | ||||
|
239 | def on_message(self, msg): | |||
|
240 | if len(msg) < self.max_msg_size: | |||
|
241 | msg = jsonapi.loads(msg) | |||
|
242 | self.session.send(self.shell_stream, msg) | |||
|
243 | ||||
|
244 | def on_close(self): | |||
|
245 | # Make sure the stream exists and is not already closed. | |||
|
246 | if self.shell_stream is not None and not self.shell_stream.closed(): | |||
|
247 | self.shell_stream.close() | |||
|
248 | ||||
|
249 | ||||
|
250 | #----------------------------------------------------------------------------- | |||
|
251 | # Notebook web service handlers | |||
|
252 | #----------------------------------------------------------------------------- | |||
|
253 | ||||
|
254 | class NotebookRootHandler(web.RequestHandler): | |||
|
255 | ||||
|
256 | def get(self): | |||
|
257 | nbm = self.application.notebook_manager | |||
|
258 | files = nbm.list_notebooks() | |||
|
259 | self.finish(jsonapi.dumps(files)) | |||
|
260 | ||||
|
261 | def post(self): | |||
|
262 | nbm = self.application.notebook_manager | |||
|
263 | body = self.request.body.strip() | |||
|
264 | format = self.get_argument('format', default='json') | |||
|
265 | name = self.get_argument('name', default=None) | |||
|
266 | if body: | |||
|
267 | notebook_id = nbm.save_new_notebook(body, name=name, format=format) | |||
|
268 | else: | |||
|
269 | notebook_id = nbm.new_notebook() | |||
|
270 | self.set_header('Location', '/'+notebook_id) | |||
|
271 | self.finish(jsonapi.dumps(notebook_id)) | |||
|
272 | ||||
|
273 | ||||
|
274 | class NotebookHandler(web.RequestHandler): | |||
|
275 | ||||
|
276 | SUPPORTED_METHODS = ('GET', 'PUT', 'DELETE') | |||
|
277 | ||||
|
278 | def get(self, notebook_id): | |||
|
279 | nbm = self.application.notebook_manager | |||
|
280 | format = self.get_argument('format', default='json') | |||
|
281 | last_mod, name, data = nbm.get_notebook(notebook_id, format) | |||
|
282 | if format == u'json': | |||
|
283 | self.set_header('Content-Type', 'application/json') | |||
|
284 | self.set_header('Content-Disposition','attachment; filename="%s.ipynb"' % name) | |||
|
285 | elif format == u'py': | |||
|
286 | self.set_header('Content-Type', 'application/x-python') | |||
|
287 | self.set_header('Content-Disposition','attachment; filename="%s.py"' % name) | |||
|
288 | self.set_header('Last-Modified', last_mod) | |||
|
289 | self.finish(data) | |||
|
290 | ||||
|
291 | def put(self, notebook_id): | |||
|
292 | nbm = self.application.notebook_manager | |||
|
293 | format = self.get_argument('format', default='json') | |||
|
294 | name = self.get_argument('name', default=None) | |||
|
295 | nbm.save_notebook(notebook_id, self.request.body, name=name, format=format) | |||
|
296 | self.set_status(204) | |||
|
297 | self.finish() | |||
|
298 | ||||
|
299 | def delete(self, notebook_id): | |||
|
300 | nbm = self.application.notebook_manager | |||
|
301 | nbm.delete_notebook(notebook_id) | |||
|
302 | self.set_status(204) | |||
|
303 | self.finish() | |||
|
304 | ||||
|
305 | #----------------------------------------------------------------------------- | |||
|
306 | # RST web service handlers | |||
|
307 | #----------------------------------------------------------------------------- | |||
|
308 | ||||
|
309 | ||||
|
310 | class RSTHandler(web.RequestHandler): | |||
|
311 | ||||
|
312 | def post(self): | |||
|
313 | if publish_string is None: | |||
|
314 | raise web.HTTPError(503) | |||
|
315 | body = self.request.body.strip() | |||
|
316 | source = body | |||
|
317 | # template_path=os.path.join(os.path.dirname(__file__), u'templates', u'rst_template.html') | |||
|
318 | defaults = {'file_insertion_enabled': 0, | |||
|
319 | 'raw_enabled': 0, | |||
|
320 | '_disable_config': 1, | |||
|
321 | 'stylesheet_path': 0 | |||
|
322 | # 'template': template_path | |||
|
323 | } | |||
|
324 | try: | |||
|
325 | html = publish_string(source, writer_name='html', | |||
|
326 | settings_overrides=defaults | |||
|
327 | ) | |||
|
328 | except: | |||
|
329 | raise web.HTTPError(400) | |||
|
330 | print html | |||
|
331 | self.set_header('Content-Type', 'text/html') | |||
|
332 | self.finish(html) | |||
|
333 | ||||
|
334 |
@@ -0,0 +1,325 b'' | |||||
|
1 | """A kernel manager for multiple kernels. | |||
|
2 | ||||
|
3 | Authors: | |||
|
4 | ||||
|
5 | * Brian Granger | |||
|
6 | """ | |||
|
7 | ||||
|
8 | #----------------------------------------------------------------------------- | |||
|
9 | # Copyright (C) 2008-2011 The IPython Development Team | |||
|
10 | # | |||
|
11 | # Distributed under the terms of the BSD License. The full license is in | |||
|
12 | # the file COPYING, distributed as part of this software. | |||
|
13 | #----------------------------------------------------------------------------- | |||
|
14 | ||||
|
15 | #----------------------------------------------------------------------------- | |||
|
16 | # Imports | |||
|
17 | #----------------------------------------------------------------------------- | |||
|
18 | ||||
|
19 | import signal | |||
|
20 | import sys | |||
|
21 | import uuid | |||
|
22 | ||||
|
23 | import zmq | |||
|
24 | from zmq.eventloop.zmqstream import ZMQStream | |||
|
25 | ||||
|
26 | from tornado import web | |||
|
27 | ||||
|
28 | from IPython.config.configurable import LoggingConfigurable | |||
|
29 | from IPython.zmq.ipkernel import launch_kernel | |||
|
30 | from IPython.utils.traitlets import Instance, Dict, List, Unicode, Float, Int | |||
|
31 | ||||
|
32 | #----------------------------------------------------------------------------- | |||
|
33 | # Classes | |||
|
34 | #----------------------------------------------------------------------------- | |||
|
35 | ||||
|
36 | class DuplicateKernelError(Exception): | |||
|
37 | pass | |||
|
38 | ||||
|
39 | ||||
|
40 | class KernelManager(LoggingConfigurable): | |||
|
41 | """A class for managing multiple kernels.""" | |||
|
42 | ||||
|
43 | context = Instance('zmq.Context') | |||
|
44 | def _context_default(self): | |||
|
45 | return zmq.Context.instance() | |||
|
46 | ||||
|
47 | _kernels = Dict() | |||
|
48 | ||||
|
49 | @property | |||
|
50 | def kernel_ids(self): | |||
|
51 | """Return a list of the kernel ids of the active kernels.""" | |||
|
52 | return self._kernels.keys() | |||
|
53 | ||||
|
54 | def __len__(self): | |||
|
55 | """Return the number of running kernels.""" | |||
|
56 | return len(self.kernel_ids) | |||
|
57 | ||||
|
58 | def __contains__(self, kernel_id): | |||
|
59 | if kernel_id in self.kernel_ids: | |||
|
60 | return True | |||
|
61 | else: | |||
|
62 | return False | |||
|
63 | ||||
|
64 | def start_kernel(self, **kwargs): | |||
|
65 | """Start a new kernel.""" | |||
|
66 | kernel_id = unicode(uuid.uuid4()) | |||
|
67 | (process, shell_port, iopub_port, stdin_port, hb_port) = launch_kernel(**kwargs) | |||
|
68 | # Store the information for contacting the kernel. This assumes the kernel is | |||
|
69 | # running on localhost. | |||
|
70 | d = dict( | |||
|
71 | process = process, | |||
|
72 | stdin_port = stdin_port, | |||
|
73 | iopub_port = iopub_port, | |||
|
74 | shell_port = shell_port, | |||
|
75 | hb_port = hb_port, | |||
|
76 | ip = '127.0.0.1' | |||
|
77 | ) | |||
|
78 | self._kernels[kernel_id] = d | |||
|
79 | return kernel_id | |||
|
80 | ||||
|
81 | def kill_kernel(self, kernel_id): | |||
|
82 | """Kill a kernel by its kernel uuid. | |||
|
83 | ||||
|
84 | Parameters | |||
|
85 | ========== | |||
|
86 | kernel_id : uuid | |||
|
87 | The id of the kernel to kill. | |||
|
88 | """ | |||
|
89 | kernel_process = self.get_kernel_process(kernel_id) | |||
|
90 | if kernel_process is not None: | |||
|
91 | # Attempt to kill the kernel. | |||
|
92 | try: | |||
|
93 | kernel_process.kill() | |||
|
94 | except OSError, e: | |||
|
95 | # In Windows, we will get an Access Denied error if the process | |||
|
96 | # has already terminated. Ignore it. | |||
|
97 | if not (sys.platform == 'win32' and e.winerror == 5): | |||
|
98 | raise | |||
|
99 | del self._kernels[kernel_id] | |||
|
100 | ||||
|
101 | def interrupt_kernel(self, kernel_id): | |||
|
102 | """Interrupt (SIGINT) the kernel by its uuid. | |||
|
103 | ||||
|
104 | Parameters | |||
|
105 | ========== | |||
|
106 | kernel_id : uuid | |||
|
107 | The id of the kernel to interrupt. | |||
|
108 | """ | |||
|
109 | kernel_process = self.get_kernel_process(kernel_id) | |||
|
110 | if kernel_process is not None: | |||
|
111 | if sys.platform == 'win32': | |||
|
112 | from parentpoller import ParentPollerWindows as Poller | |||
|
113 | Poller.send_interrupt(kernel_process.win32_interrupt_event) | |||
|
114 | else: | |||
|
115 | kernel_process.send_signal(signal.SIGINT) | |||
|
116 | ||||
|
117 | ||||
|
118 | def signal_kernel(self, kernel_id, signum): | |||
|
119 | """ Sends a signal to the kernel by its uuid. | |||
|
120 | ||||
|
121 | Note that since only SIGTERM is supported on Windows, this function | |||
|
122 | is only useful on Unix systems. | |||
|
123 | ||||
|
124 | Parameters | |||
|
125 | ========== | |||
|
126 | kernel_id : uuid | |||
|
127 | The id of the kernel to signal. | |||
|
128 | """ | |||
|
129 | kernel_process = self.get_kernel_process(kernel_id) | |||
|
130 | if kernel_process is not None: | |||
|
131 | kernel_process.send_signal(signum) | |||
|
132 | ||||
|
133 | def get_kernel_process(self, kernel_id): | |||
|
134 | """Get the process object for a kernel by its uuid. | |||
|
135 | ||||
|
136 | Parameters | |||
|
137 | ========== | |||
|
138 | kernel_id : uuid | |||
|
139 | The id of the kernel. | |||
|
140 | """ | |||
|
141 | d = self._kernels.get(kernel_id) | |||
|
142 | if d is not None: | |||
|
143 | return d['process'] | |||
|
144 | else: | |||
|
145 | raise KeyError("Kernel with id not found: %s" % kernel_id) | |||
|
146 | ||||
|
147 | def get_kernel_ports(self, kernel_id): | |||
|
148 | """Return a dictionary of ports for a kernel. | |||
|
149 | ||||
|
150 | Parameters | |||
|
151 | ========== | |||
|
152 | kernel_id : uuid | |||
|
153 | The id of the kernel. | |||
|
154 | ||||
|
155 | Returns | |||
|
156 | ======= | |||
|
157 | port_dict : dict | |||
|
158 | A dict of key, value pairs where the keys are the names | |||
|
159 | (stdin_port,iopub_port,shell_port) and the values are the | |||
|
160 | integer port numbers for those channels. | |||
|
161 | """ | |||
|
162 | d = self._kernels.get(kernel_id) | |||
|
163 | if d is not None: | |||
|
164 | dcopy = d.copy() | |||
|
165 | dcopy.pop('process') | |||
|
166 | dcopy.pop('ip') | |||
|
167 | return dcopy | |||
|
168 | else: | |||
|
169 | raise KeyError("Kernel with id not found: %s" % kernel_id) | |||
|
170 | ||||
|
171 | def get_kernel_ip(self, kernel_id): | |||
|
172 | """Return ip address for a kernel. | |||
|
173 | ||||
|
174 | Parameters | |||
|
175 | ========== | |||
|
176 | kernel_id : uuid | |||
|
177 | The id of the kernel. | |||
|
178 | ||||
|
179 | Returns | |||
|
180 | ======= | |||
|
181 | ip : str | |||
|
182 | The ip address of the kernel. | |||
|
183 | """ | |||
|
184 | d = self._kernels.get(kernel_id) | |||
|
185 | if d is not None: | |||
|
186 | return d['ip'] | |||
|
187 | else: | |||
|
188 | raise KeyError("Kernel with id not found: %s" % kernel_id) | |||
|
189 | ||||
|
190 | def create_connected_stream(self, ip, port, socket_type): | |||
|
191 | sock = self.context.socket(socket_type) | |||
|
192 | addr = "tcp://%s:%i" % (ip, port) | |||
|
193 | self.log.info("Connecting to: %s" % addr) | |||
|
194 | sock.connect(addr) | |||
|
195 | return ZMQStream(sock) | |||
|
196 | ||||
|
197 | def create_iopub_stream(self, kernel_id): | |||
|
198 | ip = self.get_kernel_ip(kernel_id) | |||
|
199 | ports = self.get_kernel_ports(kernel_id) | |||
|
200 | iopub_stream = self.create_connected_stream(ip, ports['iopub_port'], zmq.SUB) | |||
|
201 | iopub_stream.socket.setsockopt(zmq.SUBSCRIBE, b'') | |||
|
202 | return iopub_stream | |||
|
203 | ||||
|
204 | def create_shell_stream(self, kernel_id): | |||
|
205 | ip = self.get_kernel_ip(kernel_id) | |||
|
206 | ports = self.get_kernel_ports(kernel_id) | |||
|
207 | shell_stream = self.create_connected_stream(ip, ports['shell_port'], zmq.XREQ) | |||
|
208 | return shell_stream | |||
|
209 | ||||
|
210 | def create_hb_stream(self, kernel_id): | |||
|
211 | ip = self.get_kernel_ip(kernel_id) | |||
|
212 | ports = self.get_kernel_ports(kernel_id) | |||
|
213 | hb_stream = self.create_connected_stream(ip, ports['hb_port'], zmq.REQ) | |||
|
214 | return hb_stream | |||
|
215 | ||||
|
216 | ||||
|
217 | class MappingKernelManager(KernelManager): | |||
|
218 | """A KernelManager that handles notebok mapping and HTTP error handling""" | |||
|
219 | ||||
|
220 | kernel_argv = List(Unicode) | |||
|
221 | kernel_manager = Instance(KernelManager) | |||
|
222 | time_to_dead = Float(3.0, config=True, help="""Kernel heartbeat interval in seconds.""") | |||
|
223 | max_msg_size = Int(65536, config=True, help=""" | |||
|
224 | The max raw message size accepted from the browser | |||
|
225 | over a WebSocket connection. | |||
|
226 | """) | |||
|
227 | ||||
|
228 | _notebook_mapping = Dict() | |||
|
229 | ||||
|
230 | #------------------------------------------------------------------------- | |||
|
231 | # Methods for managing kernels and sessions | |||
|
232 | #------------------------------------------------------------------------- | |||
|
233 | ||||
|
234 | def kernel_for_notebook(self, notebook_id): | |||
|
235 | """Return the kernel_id for a notebook_id or None.""" | |||
|
236 | return self._notebook_mapping.get(notebook_id) | |||
|
237 | ||||
|
238 | def set_kernel_for_notebook(self, notebook_id, kernel_id): | |||
|
239 | """Associate a notebook with a kernel.""" | |||
|
240 | if notebook_id is not None: | |||
|
241 | self._notebook_mapping[notebook_id] = kernel_id | |||
|
242 | ||||
|
243 | def notebook_for_kernel(self, kernel_id): | |||
|
244 | """Return the notebook_id for a kernel_id or None.""" | |||
|
245 | notebook_ids = [k for k, v in self._notebook_mapping.iteritems() if v == kernel_id] | |||
|
246 | if len(notebook_ids) == 1: | |||
|
247 | return notebook_ids[0] | |||
|
248 | else: | |||
|
249 | return None | |||
|
250 | ||||
|
251 | def delete_mapping_for_kernel(self, kernel_id): | |||
|
252 | """Remove the kernel/notebook mapping for kernel_id.""" | |||
|
253 | notebook_id = self.notebook_for_kernel(kernel_id) | |||
|
254 | if notebook_id is not None: | |||
|
255 | del self._notebook_mapping[notebook_id] | |||
|
256 | ||||
|
257 | def start_kernel(self, notebook_id=None): | |||
|
258 | """Start a kernel for a notebok an return its kernel_id. | |||
|
259 | ||||
|
260 | Parameters | |||
|
261 | ---------- | |||
|
262 | notebook_id : uuid | |||
|
263 | The uuid of the notebook to associate the new kernel with. If this | |||
|
264 | is not None, this kernel will be persistent whenever the notebook | |||
|
265 | requests a kernel. | |||
|
266 | """ | |||
|
267 | kernel_id = self.kernel_for_notebook(notebook_id) | |||
|
268 | if kernel_id is None: | |||
|
269 | kwargs = dict() | |||
|
270 | kwargs['extra_arguments'] = self.kernel_argv | |||
|
271 | kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs) | |||
|
272 | self.set_kernel_for_notebook(notebook_id, kernel_id) | |||
|
273 | self.log.info("Kernel started: %s" % kernel_id) | |||
|
274 | self.log.debug("Kernel args: %r" % kwargs) | |||
|
275 | else: | |||
|
276 | self.log.info("Using existing kernel: %s" % kernel_id) | |||
|
277 | return kernel_id | |||
|
278 | ||||
|
279 | def kill_kernel(self, kernel_id): | |||
|
280 | """Kill a kernel and remove its notebook association.""" | |||
|
281 | if kernel_id not in self: | |||
|
282 | raise web.HTTPError(404) | |||
|
283 | super(MappingKernelManager, self).kill_kernel(kernel_id) | |||
|
284 | self.delete_mapping_for_kernel(kernel_id) | |||
|
285 | self.log.info("Kernel killed: %s" % kernel_id) | |||
|
286 | ||||
|
287 | def interrupt_kernel(self, kernel_id): | |||
|
288 | """Interrupt a kernel.""" | |||
|
289 | if kernel_id not in self: | |||
|
290 | raise web.HTTPError(404) | |||
|
291 | super(MappingKernelManager, self).interrupt_kernel(kernel_id) | |||
|
292 | self.log.info("Kernel interrupted: %s" % kernel_id) | |||
|
293 | ||||
|
294 | def restart_kernel(self, kernel_id): | |||
|
295 | """Restart a kernel while keeping clients connected.""" | |||
|
296 | if kernel_id not in self: | |||
|
297 | raise web.HTTPError(404) | |||
|
298 | ||||
|
299 | # Get the notebook_id to preserve the kernel/notebook association. | |||
|
300 | notebook_id = self.notebook_for_kernel(kernel_id) | |||
|
301 | # Create the new kernel first so we can move the clients over. | |||
|
302 | new_kernel_id = self.start_kernel() | |||
|
303 | # Now kill the old kernel. | |||
|
304 | self.kill_kernel(kernel_id) | |||
|
305 | # Now save the new kernel/notebook association. We have to save it | |||
|
306 | # after the old kernel is killed as that will delete the mapping. | |||
|
307 | self.set_kernel_for_notebook(notebook_id, new_kernel_id) | |||
|
308 | self.log.info("Kernel restarted: %s" % new_kernel_id) | |||
|
309 | return new_kernel_id | |||
|
310 | ||||
|
311 | def create_iopub_stream(self, kernel_id): | |||
|
312 | if kernel_id not in self: | |||
|
313 | raise web.HTTPError(404) | |||
|
314 | return super(MappingKernelManager, self).create_iopub_stream(kernel_id) | |||
|
315 | ||||
|
316 | def create_shell_stream(self, kernel_id): | |||
|
317 | if kernel_id not in self: | |||
|
318 | raise web.HTTPError(404) | |||
|
319 | return super(MappingKernelManager, self).create_shell_stream(kernel_id) | |||
|
320 | ||||
|
321 | def create_hb_stream(self, kernel_id): | |||
|
322 | if kernel_id not in self: | |||
|
323 | raise web.HTTPError(404) | |||
|
324 | return super(MappingKernelManager, self).create_hb_stream(kernel_id) | |||
|
325 |
@@ -0,0 +1,277 b'' | |||||
|
1 | """A tornado based IPython notebook server. | |||
|
2 | ||||
|
3 | Authors: | |||
|
4 | ||||
|
5 | * Brian Granger | |||
|
6 | """ | |||
|
7 | ||||
|
8 | #----------------------------------------------------------------------------- | |||
|
9 | # Copyright (C) 2008-2011 The IPython Development Team | |||
|
10 | # | |||
|
11 | # Distributed under the terms of the BSD License. The full license is in | |||
|
12 | # the file COPYING, distributed as part of this software. | |||
|
13 | #----------------------------------------------------------------------------- | |||
|
14 | ||||
|
15 | #----------------------------------------------------------------------------- | |||
|
16 | # Imports | |||
|
17 | #----------------------------------------------------------------------------- | |||
|
18 | ||||
|
19 | import errno | |||
|
20 | import logging | |||
|
21 | import os | |||
|
22 | import signal | |||
|
23 | import socket | |||
|
24 | import sys | |||
|
25 | ||||
|
26 | import zmq | |||
|
27 | ||||
|
28 | # Install the pyzmq ioloop. This has to be done before anything else from | |||
|
29 | # tornado is imported. | |||
|
30 | from zmq.eventloop import ioloop | |||
|
31 | import tornado.ioloop | |||
|
32 | tornado.ioloop = ioloop | |||
|
33 | ||||
|
34 | from tornado import httpserver | |||
|
35 | from tornado import web | |||
|
36 | ||||
|
37 | from .kernelmanager import MappingKernelManager | |||
|
38 | from .handlers import ( | |||
|
39 | NBBrowserHandler, NewHandler, NamedNotebookHandler, | |||
|
40 | MainKernelHandler, KernelHandler, KernelActionHandler, IOPubHandler, | |||
|
41 | ShellHandler, NotebookRootHandler, NotebookHandler, RSTHandler | |||
|
42 | ) | |||
|
43 | from .notebookmanager import NotebookManager | |||
|
44 | ||||
|
45 | from IPython.core.application import BaseIPythonApplication | |||
|
46 | from IPython.core.profiledir import ProfileDir | |||
|
47 | from IPython.zmq.session import Session | |||
|
48 | from IPython.zmq.zmqshell import ZMQInteractiveShell | |||
|
49 | from IPython.zmq.ipkernel import ( | |||
|
50 | flags as ipkernel_flags, | |||
|
51 | aliases as ipkernel_aliases, | |||
|
52 | IPKernelApp | |||
|
53 | ) | |||
|
54 | from IPython.utils.traitlets import Dict, Unicode, Int, List, Enum | |||
|
55 | ||||
|
56 | #----------------------------------------------------------------------------- | |||
|
57 | # Module globals | |||
|
58 | #----------------------------------------------------------------------------- | |||
|
59 | ||||
|
60 | _kernel_id_regex = r"(?P<kernel_id>\w+-\w+-\w+-\w+-\w+)" | |||
|
61 | _kernel_action_regex = r"(?P<action>restart|interrupt)" | |||
|
62 | _notebook_id_regex = r"(?P<notebook_id>\w+-\w+-\w+-\w+-\w+)" | |||
|
63 | ||||
|
64 | LOCALHOST = '127.0.0.1' | |||
|
65 | ||||
|
66 | _examples = """ | |||
|
67 | ipython notebook # start the notebook | |||
|
68 | ipython notebook --profile=sympy # use the sympy profile | |||
|
69 | ipython notebook --pylab=inline # pylab in inline plotting mode | |||
|
70 | ipython notebook --certfile=mycert.pem # use SSL/TLS certificate | |||
|
71 | ipython notebook --port=5555 --ip=* # Listen on port 5555, all interfaces | |||
|
72 | """ | |||
|
73 | ||||
|
74 | #----------------------------------------------------------------------------- | |||
|
75 | # The Tornado web application | |||
|
76 | #----------------------------------------------------------------------------- | |||
|
77 | ||||
|
78 | class NotebookWebApplication(web.Application): | |||
|
79 | ||||
|
80 | def __init__(self, ipython_app, kernel_manager, notebook_manager, log): | |||
|
81 | handlers = [ | |||
|
82 | (r"/", NBBrowserHandler), | |||
|
83 | (r"/new", NewHandler), | |||
|
84 | (r"/%s" % _notebook_id_regex, NamedNotebookHandler), | |||
|
85 | (r"/kernels", MainKernelHandler), | |||
|
86 | (r"/kernels/%s" % _kernel_id_regex, KernelHandler), | |||
|
87 | (r"/kernels/%s/%s" % (_kernel_id_regex, _kernel_action_regex), KernelActionHandler), | |||
|
88 | (r"/kernels/%s/iopub" % _kernel_id_regex, IOPubHandler), | |||
|
89 | (r"/kernels/%s/shell" % _kernel_id_regex, ShellHandler), | |||
|
90 | (r"/notebooks", NotebookRootHandler), | |||
|
91 | (r"/notebooks/%s" % _notebook_id_regex, NotebookHandler), | |||
|
92 | (r"/rstservice/render", RSTHandler) | |||
|
93 | ] | |||
|
94 | settings = dict( | |||
|
95 | template_path=os.path.join(os.path.dirname(__file__), "templates"), | |||
|
96 | static_path=os.path.join(os.path.dirname(__file__), "static"), | |||
|
97 | ) | |||
|
98 | web.Application.__init__(self, handlers, **settings) | |||
|
99 | ||||
|
100 | self.kernel_manager = kernel_manager | |||
|
101 | self.log = log | |||
|
102 | self.notebook_manager = notebook_manager | |||
|
103 | self.ipython_app = ipython_app | |||
|
104 | ||||
|
105 | ||||
|
106 | #----------------------------------------------------------------------------- | |||
|
107 | # Aliases and Flags | |||
|
108 | #----------------------------------------------------------------------------- | |||
|
109 | ||||
|
110 | flags = dict(ipkernel_flags) | |||
|
111 | ||||
|
112 | # the flags that are specific to the frontend | |||
|
113 | # these must be scrubbed before being passed to the kernel, | |||
|
114 | # or it will raise an error on unrecognized flags | |||
|
115 | notebook_flags = [] | |||
|
116 | ||||
|
117 | aliases = dict(ipkernel_aliases) | |||
|
118 | ||||
|
119 | aliases.update({ | |||
|
120 | 'ip': 'IPythonNotebookApp.ip', | |||
|
121 | 'port': 'IPythonNotebookApp.port', | |||
|
122 | 'keyfile': 'IPythonNotebookApp.keyfile', | |||
|
123 | 'certfile': 'IPythonNotebookApp.certfile', | |||
|
124 | 'ws-hostname': 'IPythonNotebookApp.ws_hostname', | |||
|
125 | 'notebook-dir': 'NotebookManager.notebook_dir' | |||
|
126 | }) | |||
|
127 | ||||
|
128 | notebook_aliases = [u'port', u'ip', u'keyfile', u'certfile', u'ws-hostname', | |||
|
129 | u'notebook-dir'] | |||
|
130 | ||||
|
131 | #----------------------------------------------------------------------------- | |||
|
132 | # IPythonNotebookApp | |||
|
133 | #----------------------------------------------------------------------------- | |||
|
134 | ||||
|
135 | class IPythonNotebookApp(BaseIPythonApplication): | |||
|
136 | ||||
|
137 | name = 'ipython-notebook' | |||
|
138 | default_config_file_name='ipython_notebook_config.py' | |||
|
139 | ||||
|
140 | description = """ | |||
|
141 | The IPython HTML Notebook. | |||
|
142 | ||||
|
143 | This launches a Tornado based HTML Notebook Server that serves up an | |||
|
144 | HTML5/Javascript Notebook client. | |||
|
145 | """ | |||
|
146 | examples = _examples | |||
|
147 | ||||
|
148 | classes = [IPKernelApp, ZMQInteractiveShell, ProfileDir, Session, | |||
|
149 | MappingKernelManager, NotebookManager] | |||
|
150 | flags = Dict(flags) | |||
|
151 | aliases = Dict(aliases) | |||
|
152 | ||||
|
153 | kernel_argv = List(Unicode) | |||
|
154 | ||||
|
155 | log_level = Enum((0,10,20,30,40,50,'DEBUG','INFO','WARN','ERROR','CRITICAL'), | |||
|
156 | default_value=logging.INFO, | |||
|
157 | config=True, | |||
|
158 | help="Set the log level by value or name.") | |||
|
159 | ||||
|
160 | # Network related information. | |||
|
161 | ||||
|
162 | ip = Unicode(LOCALHOST, config=True, | |||
|
163 | help="The IP address the notebook server will listen on." | |||
|
164 | ) | |||
|
165 | ||||
|
166 | def _ip_changed(self, name, old, new): | |||
|
167 | if new == u'*': self.ip = u'' | |||
|
168 | ||||
|
169 | port = Int(8888, config=True, | |||
|
170 | help="The port the notebook server will listen on." | |||
|
171 | ) | |||
|
172 | ||||
|
173 | ws_hostname = Unicode(LOCALHOST, config=True, | |||
|
174 | help="""The FQDN or IP for WebSocket connections. The default will work | |||
|
175 | fine when the server is listening on localhost, but this needs to | |||
|
176 | be set if the ip option is used. It will be used as the hostname part | |||
|
177 | of the WebSocket url: ws://hostname/path.""" | |||
|
178 | ) | |||
|
179 | ||||
|
180 | certfile = Unicode(u'', config=True, | |||
|
181 | help="""The full path to an SSL/TLS certificate file.""" | |||
|
182 | ) | |||
|
183 | ||||
|
184 | keyfile = Unicode(u'', config=True, | |||
|
185 | help="""The full path to a private key file for usage with SSL/TLS.""" | |||
|
186 | ) | |||
|
187 | ||||
|
188 | def get_ws_url(self): | |||
|
189 | """Return the WebSocket URL for this server.""" | |||
|
190 | if self.certfile: | |||
|
191 | prefix = u'wss://' | |||
|
192 | else: | |||
|
193 | prefix = u'ws://' | |||
|
194 | return prefix + self.ws_hostname + u':' + unicode(self.port) | |||
|
195 | ||||
|
196 | def parse_command_line(self, argv=None): | |||
|
197 | super(IPythonNotebookApp, self).parse_command_line(argv) | |||
|
198 | if argv is None: | |||
|
199 | argv = sys.argv[1:] | |||
|
200 | ||||
|
201 | self.kernel_argv = list(argv) # copy | |||
|
202 | # Kernel should inherit default config file from frontend | |||
|
203 | self.kernel_argv.append("--KernelApp.parent_appname='%s'"%self.name) | |||
|
204 | # Scrub frontend-specific flags | |||
|
205 | for a in argv: | |||
|
206 | if a.startswith('-') and a.lstrip('-') in notebook_flags: | |||
|
207 | self.kernel_argv.remove(a) | |||
|
208 | for a in argv: | |||
|
209 | if a.startswith('-'): | |||
|
210 | alias = a.lstrip('-').split('=')[0] | |||
|
211 | if alias in notebook_aliases: | |||
|
212 | self.kernel_argv.remove(a) | |||
|
213 | ||||
|
214 | def init_configurables(self): | |||
|
215 | # Don't let Qt or ZMQ swallow KeyboardInterupts. | |||
|
216 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |||
|
217 | ||||
|
218 | # Create a KernelManager and start a kernel. | |||
|
219 | self.kernel_manager = MappingKernelManager( | |||
|
220 | config=self.config, log=self.log, kernel_argv=self.kernel_argv | |||
|
221 | ) | |||
|
222 | self.notebook_manager = NotebookManager(config=self.config, log=self.log) | |||
|
223 | self.notebook_manager.list_notebooks() | |||
|
224 | ||||
|
225 | def init_logging(self): | |||
|
226 | super(IPythonNotebookApp, self).init_logging() | |||
|
227 | # This prevents double log messages because tornado use a root logger that | |||
|
228 | # self.log is a child of. The logging module dipatches log messages to a log | |||
|
229 | # and all of its ancenstors until propagate is set to False. | |||
|
230 | self.log.propagate = False | |||
|
231 | ||||
|
232 | def initialize(self, argv=None): | |||
|
233 | super(IPythonNotebookApp, self).initialize(argv) | |||
|
234 | self.init_configurables() | |||
|
235 | self.web_app = NotebookWebApplication( | |||
|
236 | self, self.kernel_manager, self.notebook_manager, self.log | |||
|
237 | ) | |||
|
238 | if self.certfile: | |||
|
239 | ssl_options = dict(certfile=self.certfile) | |||
|
240 | if self.keyfile: | |||
|
241 | ssl_options['keyfile'] = self.keyfile | |||
|
242 | else: | |||
|
243 | ssl_options = None | |||
|
244 | self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options) | |||
|
245 | if ssl_options is None and not self.ip: | |||
|
246 | self.log.critical('WARNING: the notebook server is listening on all IP addresses ' | |||
|
247 | 'but not using any encryption or authentication. This is highly ' | |||
|
248 | 'insecure and not recommended.') | |||
|
249 | ||||
|
250 | # Try random ports centered around the default. | |||
|
251 | from random import randint | |||
|
252 | n = 50 # Max number of attempts, keep reasonably large. | |||
|
253 | for port in [self.port] + [self.port + randint(-2*n, 2*n) for i in range(n)]: | |||
|
254 | try: | |||
|
255 | self.http_server.listen(port, self.ip) | |||
|
256 | except socket.error, e: | |||
|
257 | if e.errno != errno.EADDRINUSE: | |||
|
258 | raise | |||
|
259 | self.log.info('The port %i is already in use, trying another random port.' % port) | |||
|
260 | else: | |||
|
261 | self.port = port | |||
|
262 | break | |||
|
263 | ||||
|
264 | def start(self): | |||
|
265 | ip = self.ip if self.ip else '[all ip addresses on your system]' | |||
|
266 | self.log.info("The IPython Notebook is running at: http://%s:%i" % (ip, self.port)) | |||
|
267 | ioloop.IOLoop.instance().start() | |||
|
268 | ||||
|
269 | #----------------------------------------------------------------------------- | |||
|
270 | # Main entry point | |||
|
271 | #----------------------------------------------------------------------------- | |||
|
272 | ||||
|
273 | def launch_new_instance(): | |||
|
274 | app = IPythonNotebookApp() | |||
|
275 | app.initialize() | |||
|
276 | app.start() | |||
|
277 |
@@ -0,0 +1,219 b'' | |||||
|
1 | """A notebook manager that uses the local file system for storage. | |||
|
2 | ||||
|
3 | Authors: | |||
|
4 | ||||
|
5 | * Brian Granger | |||
|
6 | """ | |||
|
7 | ||||
|
8 | #----------------------------------------------------------------------------- | |||
|
9 | # Copyright (C) 2008-2011 The IPython Development Team | |||
|
10 | # | |||
|
11 | # Distributed under the terms of the BSD License. The full license is in | |||
|
12 | # the file COPYING, distributed as part of this software. | |||
|
13 | #----------------------------------------------------------------------------- | |||
|
14 | ||||
|
15 | #----------------------------------------------------------------------------- | |||
|
16 | # Imports | |||
|
17 | #----------------------------------------------------------------------------- | |||
|
18 | ||||
|
19 | import datetime | |||
|
20 | import os | |||
|
21 | import uuid | |||
|
22 | import glob | |||
|
23 | ||||
|
24 | from tornado import web | |||
|
25 | ||||
|
26 | from IPython.config.configurable import LoggingConfigurable | |||
|
27 | from IPython.nbformat import current | |||
|
28 | from IPython.utils.traitlets import Unicode, List, Dict | |||
|
29 | ||||
|
30 | ||||
|
31 | #----------------------------------------------------------------------------- | |||
|
32 | # Code | |||
|
33 | #----------------------------------------------------------------------------- | |||
|
34 | ||||
|
35 | ||||
|
36 | class NotebookManager(LoggingConfigurable): | |||
|
37 | ||||
|
38 | notebook_dir = Unicode(os.getcwd(), config=True, help=""" | |||
|
39 | The directory to use for notebooks. | |||
|
40 | """) | |||
|
41 | filename_ext = Unicode(u'.ipynb') | |||
|
42 | allowed_formats = List([u'json',u'py']) | |||
|
43 | ||||
|
44 | # Map notebook_ids to notebook names | |||
|
45 | mapping = Dict() | |||
|
46 | # Map notebook names to notebook_ids | |||
|
47 | rev_mapping = Dict() | |||
|
48 | ||||
|
49 | def list_notebooks(self): | |||
|
50 | """List all notebooks in the notebook dir. | |||
|
51 | ||||
|
52 | This returns a list of dicts of the form:: | |||
|
53 | ||||
|
54 | dict(notebook_id=notebook,name=name) | |||
|
55 | """ | |||
|
56 | names = glob.glob(os.path.join(self.notebook_dir, | |||
|
57 | '*' + self.filename_ext)) | |||
|
58 | names = [os.path.splitext(os.path.basename(name))[0] | |||
|
59 | for name in names] | |||
|
60 | ||||
|
61 | data = [] | |||
|
62 | for name in names: | |||
|
63 | if name not in self.rev_mapping: | |||
|
64 | notebook_id = self.new_notebook_id(name) | |||
|
65 | else: | |||
|
66 | notebook_id = self.rev_mapping[name] | |||
|
67 | data.append(dict(notebook_id=notebook_id,name=name)) | |||
|
68 | data = sorted(data, key=lambda item: item['name']) | |||
|
69 | return data | |||
|
70 | ||||
|
71 | def new_notebook_id(self, name): | |||
|
72 | """Generate a new notebook_id for a name and store its mappings.""" | |||
|
73 | notebook_id = unicode(uuid.uuid5(uuid.NAMESPACE_URL, | |||
|
74 | 'file://'+self.get_path_by_name(name).encode('utf-8'))) | |||
|
75 | self.mapping[notebook_id] = name | |||
|
76 | self.rev_mapping[name] = notebook_id | |||
|
77 | return notebook_id | |||
|
78 | ||||
|
79 | def delete_notebook_id(self, notebook_id): | |||
|
80 | """Delete a notebook's id only. This doesn't delete the actual notebook.""" | |||
|
81 | name = self.mapping[notebook_id] | |||
|
82 | del self.mapping[notebook_id] | |||
|
83 | del self.rev_mapping[name] | |||
|
84 | ||||
|
85 | def notebook_exists(self, notebook_id): | |||
|
86 | """Does a notebook exist?""" | |||
|
87 | if notebook_id not in self.mapping: | |||
|
88 | return False | |||
|
89 | path = self.get_path_by_name(self.mapping[notebook_id]) | |||
|
90 | return os.path.isfile(path) | |||
|
91 | ||||
|
92 | def find_path(self, notebook_id): | |||
|
93 | """Return a full path to a notebook given its notebook_id.""" | |||
|
94 | try: | |||
|
95 | name = self.mapping[notebook_id] | |||
|
96 | except KeyError: | |||
|
97 | raise web.HTTPError(404) | |||
|
98 | return self.get_path_by_name(name) | |||
|
99 | ||||
|
100 | def get_path_by_name(self, name): | |||
|
101 | """Return a full path to a notebook given its name.""" | |||
|
102 | filename = name + self.filename_ext | |||
|
103 | path = os.path.join(self.notebook_dir, filename) | |||
|
104 | return path | |||
|
105 | ||||
|
106 | def get_notebook(self, notebook_id, format=u'json'): | |||
|
107 | """Get the representation of a notebook in format by notebook_id.""" | |||
|
108 | format = unicode(format) | |||
|
109 | if format not in self.allowed_formats: | |||
|
110 | raise web.HTTPError(415) | |||
|
111 | last_modified, nb = self.get_notebook_object(notebook_id) | |||
|
112 | data = current.writes(nb, format) | |||
|
113 | name = nb.get('name','notebook') | |||
|
114 | return last_modified, name, data | |||
|
115 | ||||
|
116 | def get_notebook_object(self, notebook_id): | |||
|
117 | """Get the NotebookNode representation of a notebook by notebook_id.""" | |||
|
118 | path = self.find_path(notebook_id) | |||
|
119 | if not os.path.isfile(path): | |||
|
120 | raise web.HTTPError(404) | |||
|
121 | info = os.stat(path) | |||
|
122 | last_modified = datetime.datetime.utcfromtimestamp(info.st_mtime) | |||
|
123 | with open(path,'r') as f: | |||
|
124 | s = f.read() | |||
|
125 | try: | |||
|
126 | # v1 and v2 and json in the .ipynb files. | |||
|
127 | nb = current.reads(s, u'json') | |||
|
128 | except: | |||
|
129 | raise web.HTTPError(404) | |||
|
130 | if 'name' not in nb: | |||
|
131 | nb.name = os.path.split(path)[-1].split(u'.')[0] | |||
|
132 | return last_modified, nb | |||
|
133 | ||||
|
134 | def save_new_notebook(self, data, name=None, format=u'json'): | |||
|
135 | """Save a new notebook and return its notebook_id. | |||
|
136 | ||||
|
137 | If a name is passed in, it overrides any values in the notebook data | |||
|
138 | and the value in the data is updated to use that value. | |||
|
139 | """ | |||
|
140 | if format not in self.allowed_formats: | |||
|
141 | raise web.HTTPError(415) | |||
|
142 | ||||
|
143 | try: | |||
|
144 | nb = current.reads(data, format) | |||
|
145 | except: | |||
|
146 | raise web.HTTPError(400) | |||
|
147 | ||||
|
148 | if name is None: | |||
|
149 | try: | |||
|
150 | name = nb.metadata.name | |||
|
151 | except AttributeError: | |||
|
152 | raise web.HTTPError(400) | |||
|
153 | nb.metadata.name = name | |||
|
154 | ||||
|
155 | notebook_id = self.new_notebook_id(name) | |||
|
156 | self.save_notebook_object(notebook_id, nb) | |||
|
157 | return notebook_id | |||
|
158 | ||||
|
159 | def save_notebook(self, notebook_id, data, name=None, format=u'json'): | |||
|
160 | """Save an existing notebook by notebook_id.""" | |||
|
161 | if format not in self.allowed_formats: | |||
|
162 | raise web.HTTPError(415) | |||
|
163 | ||||
|
164 | try: | |||
|
165 | nb = current.reads(data, format) | |||
|
166 | except: | |||
|
167 | raise web.HTTPError(400) | |||
|
168 | ||||
|
169 | if name is not None: | |||
|
170 | nb.metadata.name = name | |||
|
171 | self.save_notebook_object(notebook_id, nb) | |||
|
172 | ||||
|
173 | def save_notebook_object(self, notebook_id, nb): | |||
|
174 | """Save an existing notebook object by notebook_id.""" | |||
|
175 | if notebook_id not in self.mapping: | |||
|
176 | raise web.HTTPError(404) | |||
|
177 | old_name = self.mapping[notebook_id] | |||
|
178 | try: | |||
|
179 | new_name = nb.metadata.name | |||
|
180 | except AttributeError: | |||
|
181 | raise web.HTTPError(400) | |||
|
182 | path = self.get_path_by_name(new_name) | |||
|
183 | try: | |||
|
184 | with open(path,'w') as f: | |||
|
185 | current.write(nb, f, u'json') | |||
|
186 | except: | |||
|
187 | raise web.HTTPError(400) | |||
|
188 | if old_name != new_name: | |||
|
189 | old_path = self.get_path_by_name(old_name) | |||
|
190 | if os.path.isfile(old_path): | |||
|
191 | os.unlink(old_path) | |||
|
192 | self.mapping[notebook_id] = new_name | |||
|
193 | self.rev_mapping[new_name] = notebook_id | |||
|
194 | ||||
|
195 | def delete_notebook(self, notebook_id): | |||
|
196 | """Delete notebook by notebook_id.""" | |||
|
197 | path = self.find_path(notebook_id) | |||
|
198 | if not os.path.isfile(path): | |||
|
199 | raise web.HTTPError(404) | |||
|
200 | os.unlink(path) | |||
|
201 | self.delete_notebook_id(notebook_id) | |||
|
202 | ||||
|
203 | def new_notebook(self): | |||
|
204 | """Create a new notebook and returns its notebook_id.""" | |||
|
205 | i = 0 | |||
|
206 | while True: | |||
|
207 | name = u'Untitled%i' % i | |||
|
208 | path = self.get_path_by_name(name) | |||
|
209 | if not os.path.isfile(path): | |||
|
210 | break | |||
|
211 | else: | |||
|
212 | i = i+1 | |||
|
213 | notebook_id = self.new_notebook_id(name) | |||
|
214 | metadata = current.new_metadata(name=name) | |||
|
215 | nb = current.new_notebook(metadata=metadata) | |||
|
216 | with open(path,'w') as f: | |||
|
217 | current.write(nb, f, u'json') | |||
|
218 | return notebook_id | |||
|
219 |
@@ -0,0 +1,19 b'' | |||||
|
1 | Copyright (C) 2011 by Marijn Haverbeke <marijnh@gmail.com> | |||
|
2 | ||||
|
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | |||
|
4 | of this software and associated documentation files (the "Software"), to deal | |||
|
5 | in the Software without restriction, including without limitation the rights | |||
|
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
|
7 | copies of the Software, and to permit persons to whom the Software is | |||
|
8 | furnished to do so, subject to the following conditions: | |||
|
9 | ||||
|
10 | The above copyright notice and this permission notice shall be included in | |||
|
11 | all copies or substantial portions of the Software. | |||
|
12 | ||||
|
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
|
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
|
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
|
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
|
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
|
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
|
19 | THE SOFTWARE. |
@@ -0,0 +1,6 b'' | |||||
|
1 | # CodeMirror 2 | |||
|
2 | ||||
|
3 | CodeMirror 2 is a rewrite of [CodeMirror | |||
|
4 | 1](http://github.com/marijnh/CodeMirror). The docs live | |||
|
5 | [here](http://codemirror.net/manual.html), and the project page is | |||
|
6 | [http://codemirror.net/](http://codemirror.net/). |
@@ -0,0 +1,17 b'' | |||||
|
1 | <?xml version="1.0" encoding="utf-8"?> | |||
|
2 | <notebook> | |||
|
3 | <name>Untitled0</name> | |||
|
4 | <id>29302174-c688-4580-b694-1e786ef3ca1f</id> | |||
|
5 | <nbformat>2</nbformat> | |||
|
6 | <worksheets> | |||
|
7 | <worksheet> | |||
|
8 | <cells> | |||
|
9 | <codecell> | |||
|
10 | <input /> | |||
|
11 | <language>python</language> | |||
|
12 | <outputs /> | |||
|
13 | </codecell> | |||
|
14 | </cells> | |||
|
15 | </worksheet> | |||
|
16 | </worksheets> | |||
|
17 | </notebook> |
@@ -0,0 +1,67 b'' | |||||
|
1 | .CodeMirror { | |||
|
2 | line-height: 1em; | |||
|
3 | font-family: monospace; | |||
|
4 | } | |||
|
5 | ||||
|
6 | .CodeMirror-scroll { | |||
|
7 | overflow: auto; | |||
|
8 | height: 300px; | |||
|
9 | /* This is needed to prevent an IE[67] bug where the scrolled content | |||
|
10 | is visible outside of the scrolling box. */ | |||
|
11 | position: relative; | |||
|
12 | } | |||
|
13 | ||||
|
14 | .CodeMirror-gutter { | |||
|
15 | position: absolute; left: 0; top: 0; | |||
|
16 | background-color: #f7f7f7; | |||
|
17 | border-right: 1px solid #eee; | |||
|
18 | min-width: 2em; | |||
|
19 | height: 100%; | |||
|
20 | } | |||
|
21 | .CodeMirror-gutter-text { | |||
|
22 | color: #aaa; | |||
|
23 | text-align: right; | |||
|
24 | padding: .4em .2em .4em .4em; | |||
|
25 | } | |||
|
26 | .CodeMirror-lines { | |||
|
27 | padding: .4em; | |||
|
28 | } | |||
|
29 | ||||
|
30 | .CodeMirror pre { | |||
|
31 | -moz-border-radius: 0; | |||
|
32 | -webkit-border-radius: 0; | |||
|
33 | -o-border-radius: 0; | |||
|
34 | border-radius: 0; | |||
|
35 | border-width: 0; margin: 0; padding: 0; background: transparent; | |||
|
36 | font-family: inherit; | |||
|
37 | font-size: inherit; | |||
|
38 | padding: 0; margin: 0; | |||
|
39 | white-space: pre; | |||
|
40 | word-wrap: normal; | |||
|
41 | } | |||
|
42 | ||||
|
43 | .CodeMirror textarea { | |||
|
44 | font-family: inherit !important; | |||
|
45 | font-size: inherit !important; | |||
|
46 | } | |||
|
47 | ||||
|
48 | .CodeMirror-cursor { | |||
|
49 | z-index: 10; | |||
|
50 | position: absolute; | |||
|
51 | visibility: hidden; | |||
|
52 | border-left: 1px solid black !important; | |||
|
53 | } | |||
|
54 | .CodeMirror-focused .CodeMirror-cursor { | |||
|
55 | visibility: visible; | |||
|
56 | } | |||
|
57 | ||||
|
58 | span.CodeMirror-selected { | |||
|
59 | background: #ccc !important; | |||
|
60 | color: HighlightText !important; | |||
|
61 | } | |||
|
62 | .CodeMirror-focused span.CodeMirror-selected { | |||
|
63 | background: Highlight !important; | |||
|
64 | } | |||
|
65 | ||||
|
66 | .CodeMirror-matchingbracket {color: #0f0 !important;} | |||
|
67 | .CodeMirror-nonmatchingbracket {color: #f22 !important;} |
This diff has been collapsed as it changes many lines, (2144 lines changed) Show them Hide them | |||||
@@ -0,0 +1,2144 b'' | |||||
|
1 | // All functions that need access to the editor's state live inside | |||
|
2 | // the CodeMirror function. Below that, at the bottom of the file, | |||
|
3 | // some utilities are defined. | |||
|
4 | ||||
|
5 | // CodeMirror is the only global var we claim | |||
|
6 | var CodeMirror = (function() { | |||
|
7 | // This is the function that produces an editor instance. It's | |||
|
8 | // closure is used to store the editor state. | |||
|
9 | function CodeMirror(place, givenOptions) { | |||
|
10 | // Determine effective options based on given values and defaults. | |||
|
11 | var options = {}, defaults = CodeMirror.defaults; | |||
|
12 | for (var opt in defaults) | |||
|
13 | if (defaults.hasOwnProperty(opt)) | |||
|
14 | options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt]; | |||
|
15 | ||||
|
16 | var targetDocument = options["document"]; | |||
|
17 | // The element in which the editor lives. | |||
|
18 | var wrapper = targetDocument.createElement("div"); | |||
|
19 | wrapper.className = "CodeMirror"; | |||
|
20 | // This mess creates the base DOM structure for the editor. | |||
|
21 | wrapper.innerHTML = | |||
|
22 | '<div style="overflow: hidden; position: relative; width: 1px; height: 0px;">' + // Wraps and hides input textarea | |||
|
23 | '<textarea style="position: absolute; width: 2px;" wrap="off"></textarea></div>' + | |||
|
24 | '<div class="CodeMirror-scroll cm-s-' + options.theme + '">' + | |||
|
25 | '<div style="position: relative">' + // Set to the height of the text, causes scrolling | |||
|
26 | '<div style="position: absolute; height: 0; width: 0; overflow: hidden;"></div>' + | |||
|
27 | '<div style="position: relative">' + // Moved around its parent to cover visible view | |||
|
28 | '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' + | |||
|
29 | // Provides positioning relative to (visible) text origin | |||
|
30 | '<div class="CodeMirror-lines"><div style="position: relative">' + | |||
|
31 | '<pre class="CodeMirror-cursor"> </pre>' + // Absolutely positioned blinky cursor | |||
|
32 | '<div></div>' + // This DIV contains the actual code | |||
|
33 | '</div></div></div></div></div>'; | |||
|
34 | if (place.appendChild) place.appendChild(wrapper); else place(wrapper); | |||
|
35 | // I've never seen more elegant code in my life. | |||
|
36 | var inputDiv = wrapper.firstChild, input = inputDiv.firstChild, | |||
|
37 | scroller = wrapper.lastChild, code = scroller.firstChild, | |||
|
38 | measure = code.firstChild, mover = measure.nextSibling, | |||
|
39 | gutter = mover.firstChild, gutterText = gutter.firstChild, | |||
|
40 | lineSpace = gutter.nextSibling.firstChild, | |||
|
41 | cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling; | |||
|
42 | if (options.tabindex != null) input.tabindex = options.tabindex; | |||
|
43 | if (!options.gutter && !options.lineNumbers) gutter.style.display = "none"; | |||
|
44 | ||||
|
45 | // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval. | |||
|
46 | var poll = new Delayed(), highlight = new Delayed(), blinker; | |||
|
47 | ||||
|
48 | // mode holds a mode API object. lines an array of Line objects | |||
|
49 | // (see Line constructor), work an array of lines that should be | |||
|
50 | // parsed, and history the undo history (instance of History | |||
|
51 | // constructor). | |||
|
52 | var mode, lines = [new Line("")], work, history = new History(), focused; | |||
|
53 | loadMode(); | |||
|
54 | // The selection. These are always maintained to point at valid | |||
|
55 | // positions. Inverted is used to remember that the user is | |||
|
56 | // selecting bottom-to-top. | |||
|
57 | var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false}; | |||
|
58 | // Selection-related flags. shiftSelecting obviously tracks | |||
|
59 | // whether the user is holding shift. reducedSelection is a hack | |||
|
60 | // to get around the fact that we can't create inverted | |||
|
61 | // selections. See below. | |||
|
62 | var shiftSelecting, reducedSelection, lastDoubleClick; | |||
|
63 | // Variables used by startOperation/endOperation to track what | |||
|
64 | // happened during the operation. | |||
|
65 | var updateInput, changes, textChanged, selectionChanged, leaveInputAlone; | |||
|
66 | // Current visible range (may be bigger than the view window). | |||
|
67 | var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null; | |||
|
68 | // editing will hold an object describing the things we put in the | |||
|
69 | // textarea, to help figure out whether something changed. | |||
|
70 | // bracketHighlighted is used to remember that a backet has been | |||
|
71 | // marked. | |||
|
72 | var editing, bracketHighlighted; | |||
|
73 | // Tracks the maximum line length so that the horizontal scrollbar | |||
|
74 | // can be kept static when scrolling. | |||
|
75 | var maxLine = "", maxWidth; | |||
|
76 | ||||
|
77 | // Initialize the content. | |||
|
78 | operation(function(){setValue(options.value || ""); updateInput = false;})(); | |||
|
79 | ||||
|
80 | // Register our event handlers. | |||
|
81 | connect(scroller, "mousedown", operation(onMouseDown)); | |||
|
82 | // Gecko browsers fire contextmenu *after* opening the menu, at | |||
|
83 | // which point we can't mess with it anymore. Context menu is | |||
|
84 | // handled in onMouseDown for Gecko. | |||
|
85 | if (!gecko) connect(scroller, "contextmenu", onContextMenu); | |||
|
86 | connect(code, "dblclick", operation(onDblClick)); | |||
|
87 | connect(scroller, "scroll", function() {updateDisplay([]); if (options.onScroll) options.onScroll(instance);}); | |||
|
88 | connect(window, "resize", function() {updateDisplay(true);}); | |||
|
89 | connect(input, "keyup", operation(onKeyUp)); | |||
|
90 | connect(input, "keydown", operation(onKeyDown)); | |||
|
91 | connect(input, "keypress", operation(onKeyPress)); | |||
|
92 | connect(input, "focus", onFocus); | |||
|
93 | connect(input, "blur", onBlur); | |||
|
94 | ||||
|
95 | connect(scroller, "dragenter", e_stop); | |||
|
96 | connect(scroller, "dragover", e_stop); | |||
|
97 | connect(scroller, "drop", operation(onDrop)); | |||
|
98 | connect(scroller, "paste", function(){focusInput(); fastPoll();}); | |||
|
99 | connect(input, "paste", function(){fastPoll();}); | |||
|
100 | connect(input, "cut", function(){fastPoll();}); | |||
|
101 | ||||
|
102 | // IE throws unspecified error in certain cases, when | |||
|
103 | // trying to access activeElement before onload | |||
|
104 | var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { } | |||
|
105 | if (hasFocus) setTimeout(onFocus, 20); | |||
|
106 | else onBlur(); | |||
|
107 | ||||
|
108 | function isLine(l) {return l >= 0 && l < lines.length;} | |||
|
109 | // The instance object that we'll return. Mostly calls out to | |||
|
110 | // local functions in the CodeMirror function. Some do some extra | |||
|
111 | // range checking and/or clipping. operation is used to wrap the | |||
|
112 | // call so that changes it makes are tracked, and the display is | |||
|
113 | // updated afterwards. | |||
|
114 | var instance = { | |||
|
115 | getValue: getValue, | |||
|
116 | setValue: operation(setValue), | |||
|
117 | getSelection: getSelection, | |||
|
118 | replaceSelection: operation(replaceSelection), | |||
|
119 | focus: function(){focusInput(); onFocus(); fastPoll();}, | |||
|
120 | setOption: function(option, value) { | |||
|
121 | options[option] = value; | |||
|
122 | if (option == "lineNumbers" || option == "gutter") gutterChanged(); | |||
|
123 | else if (option == "mode" || option == "indentUnit") loadMode(); | |||
|
124 | else if (option == "readOnly" && value == "nocursor") input.blur(); | |||
|
125 | else if (option == "theme") scroller.className = scroller.className.replace(/cm-s-\w+/, "cm-s-" + value); | |||
|
126 | }, | |||
|
127 | getOption: function(option) {return options[option];}, | |||
|
128 | undo: operation(undo), | |||
|
129 | redo: operation(redo), | |||
|
130 | indentLine: operation(function(n) {if (isLine(n)) indentLine(n, "smart");}), | |||
|
131 | historySize: function() {return {undo: history.done.length, redo: history.undone.length};}, | |||
|
132 | matchBrackets: operation(function(){matchBrackets(true);}), | |||
|
133 | getTokenAt: function(pos) { | |||
|
134 | pos = clipPos(pos); | |||
|
135 | return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch); | |||
|
136 | }, | |||
|
137 | getStateAfter: function(line) { | |||
|
138 | line = clipLine(line == null ? lines.length - 1: line); | |||
|
139 | return getStateBefore(line + 1); | |||
|
140 | }, | |||
|
141 | cursorCoords: function(start){ | |||
|
142 | if (start == null) start = sel.inverted; | |||
|
143 | return pageCoords(start ? sel.from : sel.to); | |||
|
144 | }, | |||
|
145 | charCoords: function(pos){return pageCoords(clipPos(pos));}, | |||
|
146 | coordsChar: function(coords) { | |||
|
147 | var off = eltOffset(lineSpace); | |||
|
148 | var line = clipLine(Math.min(lines.length - 1, showingFrom + Math.floor((coords.y - off.top) / lineHeight()))); | |||
|
149 | return clipPos({line: line, ch: charFromX(clipLine(line), coords.x - off.left)}); | |||
|
150 | }, | |||
|
151 | getSearchCursor: function(query, pos, caseFold) {return new SearchCursor(query, pos, caseFold);}, | |||
|
152 | markText: operation(function(a, b, c){return operation(markText(a, b, c));}), | |||
|
153 | setMarker: addGutterMarker, | |||
|
154 | clearMarker: removeGutterMarker, | |||
|
155 | setLineClass: operation(setLineClass), | |||
|
156 | lineInfo: lineInfo, | |||
|
157 | addWidget: function(pos, node, scroll, where) { | |||
|
158 | pos = localCoords(clipPos(pos)); | |||
|
159 | var top = pos.yBot, left = pos.x; | |||
|
160 | node.style.position = "absolute"; | |||
|
161 | code.appendChild(node); | |||
|
162 | node.style.left = left + "px"; | |||
|
163 | if (where == "over") top = pos.y; | |||
|
164 | else if (where == "near") { | |||
|
165 | var vspace = Math.max(scroller.offsetHeight, lines.length * lineHeight()), | |||
|
166 | hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft(); | |||
|
167 | if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight) | |||
|
168 | top = pos.y - node.offsetHeight; | |||
|
169 | if (left + node.offsetWidth > hspace) | |||
|
170 | left = hspace - node.offsetWidth; | |||
|
171 | } | |||
|
172 | node.style.top = (top + paddingTop()) + "px"; | |||
|
173 | node.style.left = (left + paddingLeft()) + "px"; | |||
|
174 | if (scroll) | |||
|
175 | scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight); | |||
|
176 | }, | |||
|
177 | ||||
|
178 | lineCount: function() {return lines.length;}, | |||
|
179 | getCursor: function(start) { | |||
|
180 | if (start == null) start = sel.inverted; | |||
|
181 | return copyPos(start ? sel.from : sel.to); | |||
|
182 | }, | |||
|
183 | somethingSelected: function() {return !posEq(sel.from, sel.to);}, | |||
|
184 | setCursor: operation(function(line, ch) { | |||
|
185 | if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch); | |||
|
186 | else setCursor(line, ch); | |||
|
187 | }), | |||
|
188 | setSelection: operation(function(from, to) {setSelection(clipPos(from), clipPos(to || from));}), | |||
|
189 | getLine: function(line) {if (isLine(line)) return lines[line].text;}, | |||
|
190 | setLine: operation(function(line, text) { | |||
|
191 | if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: lines[line].text.length}); | |||
|
192 | }), | |||
|
193 | removeLine: operation(function(line) { | |||
|
194 | if (isLine(line)) replaceRange("", {line: line, ch: 0}, clipPos({line: line+1, ch: 0})); | |||
|
195 | }), | |||
|
196 | replaceRange: operation(replaceRange), | |||
|
197 | getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));}, | |||
|
198 | ||||
|
199 | operation: function(f){return operation(f)();}, | |||
|
200 | refresh: function(){updateDisplay(true);}, | |||
|
201 | getInputField: function(){return input;}, | |||
|
202 | getWrapperElement: function(){return wrapper;}, | |||
|
203 | getScrollerElement: function(){return scroller;} | |||
|
204 | }; | |||
|
205 | ||||
|
206 | function setValue(code) { | |||
|
207 | history = null; | |||
|
208 | var top = {line: 0, ch: 0}; | |||
|
209 | updateLines(top, {line: lines.length - 1, ch: lines[lines.length-1].text.length}, | |||
|
210 | splitLines(code), top, top); | |||
|
211 | history = new History(); | |||
|
212 | } | |||
|
213 | function getValue(code) { | |||
|
214 | var text = []; | |||
|
215 | for (var i = 0, l = lines.length; i < l; ++i) | |||
|
216 | text.push(lines[i].text); | |||
|
217 | return text.join("\n"); | |||
|
218 | } | |||
|
219 | ||||
|
220 | function onMouseDown(e) { | |||
|
221 | // Check whether this is a click in a widget | |||
|
222 | for (var n = e_target(e); n != wrapper; n = n.parentNode) | |||
|
223 | if (n.parentNode == code && n != mover) return; | |||
|
224 | var ld = lastDoubleClick; lastDoubleClick = null; | |||
|
225 | // First, see if this is a click in the gutter | |||
|
226 | for (var n = e_target(e); n != wrapper; n = n.parentNode) | |||
|
227 | if (n.parentNode == gutterText) { | |||
|
228 | if (options.onGutterClick) | |||
|
229 | options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom); | |||
|
230 | return e_preventDefault(e); | |||
|
231 | } | |||
|
232 | ||||
|
233 | var start = posFromMouse(e); | |||
|
234 | ||||
|
235 | switch (e_button(e)) { | |||
|
236 | case 3: | |||
|
237 | if (gecko && !mac) onContextMenu(e); | |||
|
238 | return; | |||
|
239 | case 2: | |||
|
240 | if (start) setCursor(start.line, start.ch, true); | |||
|
241 | return; | |||
|
242 | } | |||
|
243 | // For button 1, if it was clicked inside the editor | |||
|
244 | // (posFromMouse returning non-null), we have to adjust the | |||
|
245 | // selection. | |||
|
246 | if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;} | |||
|
247 | ||||
|
248 | if (!focused) onFocus(); | |||
|
249 | e_preventDefault(e); | |||
|
250 | if (ld && +new Date - ld < 400) return selectLine(start.line); | |||
|
251 | ||||
|
252 | setCursor(start.line, start.ch, true); | |||
|
253 | var last = start, going; | |||
|
254 | // And then we have to see if it's a drag event, in which case | |||
|
255 | // the dragged-over text must be selected. | |||
|
256 | function end() { | |||
|
257 | focusInput(); | |||
|
258 | updateInput = true; | |||
|
259 | move(); up(); | |||
|
260 | } | |||
|
261 | function extend(e) { | |||
|
262 | var cur = posFromMouse(e, true); | |||
|
263 | if (cur && !posEq(cur, last)) { | |||
|
264 | if (!focused) onFocus(); | |||
|
265 | last = cur; | |||
|
266 | setSelectionUser(start, cur); | |||
|
267 | updateInput = false; | |||
|
268 | var visible = visibleLines(); | |||
|
269 | if (cur.line >= visible.to || cur.line < visible.from) | |||
|
270 | going = setTimeout(operation(function(){extend(e);}), 150); | |||
|
271 | } | |||
|
272 | } | |||
|
273 | ||||
|
274 | var move = connect(targetDocument, "mousemove", operation(function(e) { | |||
|
275 | clearTimeout(going); | |||
|
276 | e_preventDefault(e); | |||
|
277 | extend(e); | |||
|
278 | }), true); | |||
|
279 | var up = connect(targetDocument, "mouseup", operation(function(e) { | |||
|
280 | clearTimeout(going); | |||
|
281 | var cur = posFromMouse(e); | |||
|
282 | if (cur) setSelectionUser(start, cur); | |||
|
283 | e_preventDefault(e); | |||
|
284 | end(); | |||
|
285 | }), true); | |||
|
286 | } | |||
|
287 | function onDblClick(e) { | |||
|
288 | var pos = posFromMouse(e); | |||
|
289 | if (!pos) return; | |||
|
290 | selectWordAt(pos); | |||
|
291 | e_preventDefault(e); | |||
|
292 | lastDoubleClick = +new Date; | |||
|
293 | } | |||
|
294 | function onDrop(e) { | |||
|
295 | e.preventDefault(); | |||
|
296 | var pos = posFromMouse(e, true), files = e.dataTransfer.files; | |||
|
297 | if (!pos || options.readOnly) return; | |||
|
298 | if (files && files.length && window.FileReader && window.File) { | |||
|
299 | function loadFile(file, i) { | |||
|
300 | var reader = new FileReader; | |||
|
301 | reader.onload = function() { | |||
|
302 | text[i] = reader.result; | |||
|
303 | if (++read == n) replaceRange(text.join(""), clipPos(pos), clipPos(pos)); | |||
|
304 | }; | |||
|
305 | reader.readAsText(file); | |||
|
306 | } | |||
|
307 | var n = files.length, text = Array(n), read = 0; | |||
|
308 | for (var i = 0; i < n; ++i) loadFile(files[i], i); | |||
|
309 | } | |||
|
310 | else { | |||
|
311 | try { | |||
|
312 | var text = e.dataTransfer.getData("Text"); | |||
|
313 | if (text) replaceRange(text, pos, pos); | |||
|
314 | } | |||
|
315 | catch(e){} | |||
|
316 | } | |||
|
317 | } | |||
|
318 | function onKeyDown(e) { | |||
|
319 | if (!focused) onFocus(); | |||
|
320 | ||||
|
321 | var code = e.keyCode; | |||
|
322 | // IE does strange things with escape. | |||
|
323 | if (ie && code == 27) { e.returnValue = false; } | |||
|
324 | // Tries to detect ctrl on non-mac, cmd on mac. | |||
|
325 | var mod = (mac ? e.metaKey : e.ctrlKey) && !e.altKey, anyMod = e.ctrlKey || e.altKey || e.metaKey; | |||
|
326 | if (code == 16 || e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from); | |||
|
327 | else shiftSelecting = null; | |||
|
328 | // First give onKeyEvent option a chance to handle this. | |||
|
329 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; | |||
|
330 | ||||
|
331 | if (code == 33 || code == 34) {scrollPage(code == 34); return e_preventDefault(e);} // page up/down | |||
|
332 | if (mod && ((code == 36 || code == 35) || // ctrl-home/end | |||
|
333 | mac && (code == 38 || code == 40))) { // cmd-up/down | |||
|
334 | scrollEnd(code == 36 || code == 38); return e_preventDefault(e); | |||
|
335 | } | |||
|
336 | if (mod && code == 65) {selectAll(); return e_preventDefault(e);} // ctrl-a | |||
|
337 | if (!options.readOnly) { | |||
|
338 | if (!anyMod && code == 13) {return;} // enter | |||
|
339 | if (!anyMod && code == 9 && handleTab(e.shiftKey)) return e_preventDefault(e); // tab | |||
|
340 | if (mod && code == 90) {undo(); return e_preventDefault(e);} // ctrl-z | |||
|
341 | if (mod && ((e.shiftKey && code == 90) || code == 89)) {redo(); return e_preventDefault(e);} // ctrl-shift-z, ctrl-y | |||
|
342 | } | |||
|
343 | ||||
|
344 | // Key id to use in the movementKeys map. We also pass it to | |||
|
345 | // fastPoll in order to 'self learn'. We need this because | |||
|
346 | // reducedSelection, the hack where we collapse the selection to | |||
|
347 | // its start when it is inverted and a movement key is pressed | |||
|
348 | // (and later restore it again), shouldn't be used for | |||
|
349 | // non-movement keys. | |||
|
350 | curKeyId = (mod ? "c" : "") + code; | |||
|
351 | if (sel.inverted && movementKeys.hasOwnProperty(curKeyId)) { | |||
|
352 | var range = selRange(input); | |||
|
353 | if (range) { | |||
|
354 | reducedSelection = {anchor: range.start}; | |||
|
355 | setSelRange(input, range.start, range.start); | |||
|
356 | } | |||
|
357 | } | |||
|
358 | fastPoll(curKeyId); | |||
|
359 | } | |||
|
360 | function onKeyUp(e) { | |||
|
361 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; | |||
|
362 | if (reducedSelection) { | |||
|
363 | reducedSelection = null; | |||
|
364 | updateInput = true; | |||
|
365 | } | |||
|
366 | if (e.keyCode == 16) shiftSelecting = null; | |||
|
367 | } | |||
|
368 | function onKeyPress(e) { | |||
|
369 | if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; | |||
|
370 | if (options.electricChars && mode.electricChars) { | |||
|
371 | var ch = String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode); | |||
|
372 | if (mode.electricChars.indexOf(ch) > -1) | |||
|
373 | setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50); | |||
|
374 | } | |||
|
375 | var code = e.keyCode; | |||
|
376 | // Re-stop tab and enter. Necessary on some browsers. | |||
|
377 | if (code == 13) {if (!options.readOnly) handleEnter(); e_preventDefault(e);} | |||
|
378 | else if (!e.ctrlKey && !e.altKey && !e.metaKey && code == 9 && options.tabMode != "default") e_preventDefault(e); | |||
|
379 | else fastPoll(curKeyId); | |||
|
380 | } | |||
|
381 | ||||
|
382 | function onFocus() { | |||
|
383 | if (options.readOnly == "nocursor") return; | |||
|
384 | if (!focused) { | |||
|
385 | if (options.onFocus) options.onFocus(instance); | |||
|
386 | focused = true; | |||
|
387 | if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1) | |||
|
388 | wrapper.className += " CodeMirror-focused"; | |||
|
389 | if (!leaveInputAlone) prepareInput(); | |||
|
390 | } | |||
|
391 | slowPoll(); | |||
|
392 | restartBlink(); | |||
|
393 | } | |||
|
394 | function onBlur() { | |||
|
395 | if (focused) { | |||
|
396 | if (options.onBlur) options.onBlur(instance); | |||
|
397 | focused = false; | |||
|
398 | wrapper.className = wrapper.className.replace(" CodeMirror-focused", ""); | |||
|
399 | } | |||
|
400 | clearInterval(blinker); | |||
|
401 | setTimeout(function() {if (!focused) shiftSelecting = null;}, 150); | |||
|
402 | } | |||
|
403 | ||||
|
404 | // Replace the range from from to to by the strings in newText. | |||
|
405 | // Afterwards, set the selection to selFrom, selTo. | |||
|
406 | function updateLines(from, to, newText, selFrom, selTo) { | |||
|
407 | if (history) { | |||
|
408 | var old = []; | |||
|
409 | for (var i = from.line, e = to.line + 1; i < e; ++i) old.push(lines[i].text); | |||
|
410 | history.addChange(from.line, newText.length, old); | |||
|
411 | while (history.done.length > options.undoDepth) history.done.shift(); | |||
|
412 | } | |||
|
413 | updateLinesNoUndo(from, to, newText, selFrom, selTo); | |||
|
414 | } | |||
|
415 | function unredoHelper(from, to) { | |||
|
416 | var change = from.pop(); | |||
|
417 | if (change) { | |||
|
418 | var replaced = [], end = change.start + change.added; | |||
|
419 | for (var i = change.start; i < end; ++i) replaced.push(lines[i].text); | |||
|
420 | to.push({start: change.start, added: change.old.length, old: replaced}); | |||
|
421 | var pos = clipPos({line: change.start + change.old.length - 1, | |||
|
422 | ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])}); | |||
|
423 | updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos); | |||
|
424 | updateInput = true; | |||
|
425 | } | |||
|
426 | } | |||
|
427 | function undo() {unredoHelper(history.done, history.undone);} | |||
|
428 | function redo() {unredoHelper(history.undone, history.done);} | |||
|
429 | ||||
|
430 | function updateLinesNoUndo(from, to, newText, selFrom, selTo) { | |||
|
431 | var recomputeMaxLength = false, maxLineLength = maxLine.length; | |||
|
432 | for (var i = from.line; i <= to.line; ++i) { | |||
|
433 | if (lines[i].text.length == maxLineLength) {recomputeMaxLength = true; break;} | |||
|
434 | } | |||
|
435 | ||||
|
436 | var nlines = to.line - from.line, firstLine = lines[from.line], lastLine = lines[to.line]; | |||
|
437 | // First adjust the line structure, taking some care to leave highlighting intact. | |||
|
438 | if (firstLine == lastLine) { | |||
|
439 | if (newText.length == 1) | |||
|
440 | firstLine.replace(from.ch, to.ch, newText[0]); | |||
|
441 | else { | |||
|
442 | lastLine = firstLine.split(to.ch, newText[newText.length-1]); | |||
|
443 | var spliceargs = [from.line + 1, nlines]; | |||
|
444 | firstLine.replace(from.ch, firstLine.text.length, newText[0]); | |||
|
445 | for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i])); | |||
|
446 | spliceargs.push(lastLine); | |||
|
447 | lines.splice.apply(lines, spliceargs); | |||
|
448 | } | |||
|
449 | } | |||
|
450 | else if (newText.length == 1) { | |||
|
451 | firstLine.replace(from.ch, firstLine.text.length, newText[0] + lastLine.text.slice(to.ch)); | |||
|
452 | lines.splice(from.line + 1, nlines); | |||
|
453 | } | |||
|
454 | else { | |||
|
455 | var spliceargs = [from.line + 1, nlines - 1]; | |||
|
456 | firstLine.replace(from.ch, firstLine.text.length, newText[0]); | |||
|
457 | lastLine.replace(0, to.ch, newText[newText.length-1]); | |||
|
458 | for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i])); | |||
|
459 | lines.splice.apply(lines, spliceargs); | |||
|
460 | } | |||
|
461 | ||||
|
462 | ||||
|
463 | for (var i = from.line, e = i + newText.length; i < e; ++i) { | |||
|
464 | var l = lines[i].text; | |||
|
465 | if (l.length > maxLineLength) { | |||
|
466 | maxLine = l; maxLineLength = l.length; maxWidth = null; | |||
|
467 | recomputeMaxLength = false; | |||
|
468 | } | |||
|
469 | } | |||
|
470 | if (recomputeMaxLength) { | |||
|
471 | maxLineLength = 0; maxLine = ""; maxWidth = null; | |||
|
472 | for (var i = 0, e = lines.length; i < e; ++i) { | |||
|
473 | var l = lines[i].text; | |||
|
474 | if (l.length > maxLineLength) { | |||
|
475 | maxLineLength = l.length; maxLine = l; | |||
|
476 | } | |||
|
477 | } | |||
|
478 | } | |||
|
479 | ||||
|
480 | // Add these lines to the work array, so that they will be | |||
|
481 | // highlighted. Adjust work lines if lines were added/removed. | |||
|
482 | var newWork = [], lendiff = newText.length - nlines - 1; | |||
|
483 | for (var i = 0, l = work.length; i < l; ++i) { | |||
|
484 | var task = work[i]; | |||
|
485 | if (task < from.line) newWork.push(task); | |||
|
486 | else if (task > to.line) newWork.push(task + lendiff); | |||
|
487 | } | |||
|
488 | if (newText.length < 5) { | |||
|
489 | highlightLines(from.line, from.line + newText.length); | |||
|
490 | newWork.push(from.line + newText.length); | |||
|
491 | } else { | |||
|
492 | newWork.push(from.line); | |||
|
493 | } | |||
|
494 | work = newWork; | |||
|
495 | startWorker(100); | |||
|
496 | // Remember that these lines changed, for updating the display | |||
|
497 | changes.push({from: from.line, to: to.line + 1, diff: lendiff}); | |||
|
498 | textChanged = {from: from, to: to, text: newText}; | |||
|
499 | ||||
|
500 | // Update the selection | |||
|
501 | function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;} | |||
|
502 | setSelection(selFrom, selTo, updateLine(sel.from.line), updateLine(sel.to.line)); | |||
|
503 | ||||
|
504 | // Make sure the scroll-size div has the correct height. | |||
|
505 | code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px"; | |||
|
506 | } | |||
|
507 | ||||
|
508 | function replaceRange(code, from, to) { | |||
|
509 | from = clipPos(from); | |||
|
510 | if (!to) to = from; else to = clipPos(to); | |||
|
511 | code = splitLines(code); | |||
|
512 | function adjustPos(pos) { | |||
|
513 | if (posLess(pos, from)) return pos; | |||
|
514 | if (!posLess(to, pos)) return end; | |||
|
515 | var line = pos.line + code.length - (to.line - from.line) - 1; | |||
|
516 | var ch = pos.ch; | |||
|
517 | if (pos.line == to.line) | |||
|
518 | ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0)); | |||
|
519 | return {line: line, ch: ch}; | |||
|
520 | } | |||
|
521 | var end; | |||
|
522 | replaceRange1(code, from, to, function(end1) { | |||
|
523 | end = end1; | |||
|
524 | return {from: adjustPos(sel.from), to: adjustPos(sel.to)}; | |||
|
525 | }); | |||
|
526 | return end; | |||
|
527 | } | |||
|
528 | function replaceSelection(code, collapse) { | |||
|
529 | replaceRange1(splitLines(code), sel.from, sel.to, function(end) { | |||
|
530 | if (collapse == "end") return {from: end, to: end}; | |||
|
531 | else if (collapse == "start") return {from: sel.from, to: sel.from}; | |||
|
532 | else return {from: sel.from, to: end}; | |||
|
533 | }); | |||
|
534 | } | |||
|
535 | function replaceRange1(code, from, to, computeSel) { | |||
|
536 | var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length; | |||
|
537 | var newSel = computeSel({line: from.line + code.length - 1, ch: endch}); | |||
|
538 | updateLines(from, to, code, newSel.from, newSel.to); | |||
|
539 | } | |||
|
540 | ||||
|
541 | function getRange(from, to) { | |||
|
542 | var l1 = from.line, l2 = to.line; | |||
|
543 | if (l1 == l2) return lines[l1].text.slice(from.ch, to.ch); | |||
|
544 | var code = [lines[l1].text.slice(from.ch)]; | |||
|
545 | for (var i = l1 + 1; i < l2; ++i) code.push(lines[i].text); | |||
|
546 | code.push(lines[l2].text.slice(0, to.ch)); | |||
|
547 | return code.join("\n"); | |||
|
548 | } | |||
|
549 | function getSelection() { | |||
|
550 | return getRange(sel.from, sel.to); | |||
|
551 | } | |||
|
552 | ||||
|
553 | var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll | |||
|
554 | function slowPoll() { | |||
|
555 | if (pollingFast) return; | |||
|
556 | poll.set(2000, function() { | |||
|
557 | startOperation(); | |||
|
558 | readInput(); | |||
|
559 | if (focused) slowPoll(); | |||
|
560 | endOperation(); | |||
|
561 | }); | |||
|
562 | } | |||
|
563 | function fastPoll(keyId) { | |||
|
564 | var missed = false; | |||
|
565 | pollingFast = true; | |||
|
566 | function p() { | |||
|
567 | startOperation(); | |||
|
568 | var changed = readInput(); | |||
|
569 | if (changed == "moved" && keyId) movementKeys[keyId] = true; | |||
|
570 | if (!changed && !missed) {missed = true; poll.set(80, p);} | |||
|
571 | else {pollingFast = false; slowPoll();} | |||
|
572 | endOperation(); | |||
|
573 | } | |||
|
574 | poll.set(20, p); | |||
|
575 | } | |||
|
576 | ||||
|
577 | // Inspects the textarea, compares its state (content, selection) | |||
|
578 | // to the data in the editing variable, and updates the editor | |||
|
579 | // content or cursor if something changed. | |||
|
580 | function readInput() { | |||
|
581 | if (leaveInputAlone || !focused) return; | |||
|
582 | var changed = false, text = input.value, sr = selRange(input); | |||
|
583 | if (!sr) return false; | |||
|
584 | var changed = editing.text != text, rs = reducedSelection; | |||
|
585 | var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end); | |||
|
586 | if (!moved && !rs) return false; | |||
|
587 | if (changed) { | |||
|
588 | shiftSelecting = reducedSelection = null; | |||
|
589 | if (options.readOnly) {updateInput = true; return "changed";} | |||
|
590 | } | |||
|
591 | ||||
|
592 | // Compute selection start and end based on start/end offsets in textarea | |||
|
593 | function computeOffset(n, startLine) { | |||
|
594 | var pos = 0; | |||
|
595 | for (;;) { | |||
|
596 | var found = text.indexOf("\n", pos); | |||
|
597 | if (found == -1 || (text.charAt(found-1) == "\r" ? found - 1 : found) >= n) | |||
|
598 | return {line: startLine, ch: n - pos}; | |||
|
599 | ++startLine; | |||
|
600 | pos = found + 1; | |||
|
601 | } | |||
|
602 | } | |||
|
603 | var from = computeOffset(sr.start, editing.from), | |||
|
604 | to = computeOffset(sr.end, editing.from); | |||
|
605 | // Here we have to take the reducedSelection hack into account, | |||
|
606 | // so that you can, for example, press shift-up at the start of | |||
|
607 | // your selection and have the right thing happen. | |||
|
608 | if (rs) { | |||
|
609 | var head = sr.start == rs.anchor ? to : from; | |||
|
610 | var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to; | |||
|
611 | if (sel.inverted = posLess(head, tail)) { from = head; to = tail; } | |||
|
612 | else { reducedSelection = null; from = tail; to = head; } | |||
|
613 | } | |||
|
614 | ||||
|
615 | // In some cases (cursor on same line as before), we don't have | |||
|
616 | // to update the textarea content at all. | |||
|
617 | if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting) | |||
|
618 | updateInput = false; | |||
|
619 | ||||
|
620 | // Magic mess to extract precise edited range from the changed | |||
|
621 | // string. | |||
|
622 | if (changed) { | |||
|
623 | var start = 0, end = text.length, len = Math.min(end, editing.text.length); | |||
|
624 | var c, line = editing.from, nl = -1; | |||
|
625 | while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) { | |||
|
626 | ++start; | |||
|
627 | if (c == "\n") {line++; nl = start;} | |||
|
628 | } | |||
|
629 | var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length; | |||
|
630 | for (;;) { | |||
|
631 | c = editing.text.charAt(edend); | |||
|
632 | if (text.charAt(end) != c) {++end; ++edend; break;} | |||
|
633 | if (c == "\n") endline--; | |||
|
634 | if (edend <= start || end <= start) break; | |||
|
635 | --end; --edend; | |||
|
636 | } | |||
|
637 | var nl = editing.text.lastIndexOf("\n", edend - 1), endch = nl == -1 ? edend : edend - nl - 1; | |||
|
638 | updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to); | |||
|
639 | if (line != endline || from.line != line) updateInput = true; | |||
|
640 | } | |||
|
641 | else setSelection(from, to); | |||
|
642 | ||||
|
643 | editing.text = text; editing.start = sr.start; editing.end = sr.end; | |||
|
644 | return changed ? "changed" : moved ? "moved" : false; | |||
|
645 | } | |||
|
646 | ||||
|
647 | // Set the textarea content and selection range to match the | |||
|
648 | // editor state. | |||
|
649 | function prepareInput() { | |||
|
650 | var text = []; | |||
|
651 | var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2); | |||
|
652 | for (var i = from; i < to; ++i) text.push(lines[i].text); | |||
|
653 | text = input.value = text.join(lineSep); | |||
|
654 | var startch = sel.from.ch, endch = sel.to.ch; | |||
|
655 | for (var i = from; i < sel.from.line; ++i) | |||
|
656 | startch += lineSep.length + lines[i].text.length; | |||
|
657 | for (var i = from; i < sel.to.line; ++i) | |||
|
658 | endch += lineSep.length + lines[i].text.length; | |||
|
659 | editing = {text: text, from: from, to: to, start: startch, end: endch}; | |||
|
660 | setSelRange(input, startch, reducedSelection ? startch : endch); | |||
|
661 | } | |||
|
662 | function focusInput() { | |||
|
663 | if (options.readOnly != "nocursor") input.focus(); | |||
|
664 | } | |||
|
665 | ||||
|
666 | function scrollCursorIntoView() { | |||
|
667 | var cursor = localCoords(sel.inverted ? sel.from : sel.to); | |||
|
668 | return scrollIntoView(cursor.x, cursor.y, cursor.x, cursor.yBot); | |||
|
669 | } | |||
|
670 | function scrollIntoView(x1, y1, x2, y2) { | |||
|
671 | var pl = paddingLeft(), pt = paddingTop(), lh = lineHeight(); | |||
|
672 | y1 += pt; y2 += pt; x1 += pl; x2 += pl; | |||
|
673 | var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true; | |||
|
674 | if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1 - 2*lh); scrolled = true;} | |||
|
675 | else if (y2 > screentop + screen) {scroller.scrollTop = y2 + lh - screen; scrolled = true;} | |||
|
676 | ||||
|
677 | var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft; | |||
|
678 | if (x1 < screenleft) { | |||
|
679 | if (x1 < 50) x1 = 0; | |||
|
680 | scroller.scrollLeft = Math.max(0, x1 - 10); | |||
|
681 | scrolled = true; | |||
|
682 | } | |||
|
683 | else if (x2 > screenw + screenleft) { | |||
|
684 | scroller.scrollLeft = x2 + 10 - screenw; | |||
|
685 | scrolled = true; | |||
|
686 | if (x2 > code.clientWidth) result = false; | |||
|
687 | } | |||
|
688 | if (scrolled && options.onScroll) options.onScroll(instance); | |||
|
689 | return result; | |||
|
690 | } | |||
|
691 | ||||
|
692 | function visibleLines() { | |||
|
693 | var lh = lineHeight(), top = scroller.scrollTop - paddingTop(); | |||
|
694 | return {from: Math.min(lines.length, Math.max(0, Math.floor(top / lh))), | |||
|
695 | to: Math.min(lines.length, Math.ceil((top + scroller.clientHeight) / lh))}; | |||
|
696 | } | |||
|
697 | // Uses a set of changes plus the current scroll position to | |||
|
698 | // determine which DOM updates have to be made, and makes the | |||
|
699 | // updates. | |||
|
700 | function updateDisplay(changes) { | |||
|
701 | if (!scroller.clientWidth) { | |||
|
702 | showingFrom = showingTo = 0; | |||
|
703 | return; | |||
|
704 | } | |||
|
705 | // First create a range of theoretically intact lines, and punch | |||
|
706 | // holes in that using the change info. | |||
|
707 | var intact = changes === true ? [] : [{from: showingFrom, to: showingTo, domStart: 0}]; | |||
|
708 | for (var i = 0, l = changes.length || 0; i < l; ++i) { | |||
|
709 | var change = changes[i], intact2 = [], diff = change.diff || 0; | |||
|
710 | for (var j = 0, l2 = intact.length; j < l2; ++j) { | |||
|
711 | var range = intact[j]; | |||
|
712 | if (change.to <= range.from) | |||
|
713 | intact2.push({from: range.from + diff, to: range.to + diff, domStart: range.domStart}); | |||
|
714 | else if (range.to <= change.from) | |||
|
715 | intact2.push(range); | |||
|
716 | else { | |||
|
717 | if (change.from > range.from) | |||
|
718 | intact2.push({from: range.from, to: change.from, domStart: range.domStart}) | |||
|
719 | if (change.to < range.to) | |||
|
720 | intact2.push({from: change.to + diff, to: range.to + diff, | |||
|
721 | domStart: range.domStart + (change.to - range.from)}); | |||
|
722 | } | |||
|
723 | } | |||
|
724 | intact = intact2; | |||
|
725 | } | |||
|
726 | ||||
|
727 | // Then, determine which lines we'd want to see, and which | |||
|
728 | // updates have to be made to get there. | |||
|
729 | var visible = visibleLines(); | |||
|
730 | var from = Math.min(showingFrom, Math.max(visible.from - 3, 0)), | |||
|
731 | to = Math.min(lines.length, Math.max(showingTo, visible.to + 3)), | |||
|
732 | updates = [], domPos = 0, domEnd = showingTo - showingFrom, pos = from, changedLines = 0; | |||
|
733 | ||||
|
734 | for (var i = 0, l = intact.length; i < l; ++i) { | |||
|
735 | var range = intact[i]; | |||
|
736 | if (range.to <= from) continue; | |||
|
737 | if (range.from >= to) break; | |||
|
738 | if (range.domStart > domPos || range.from > pos) { | |||
|
739 | updates.push({from: pos, to: range.from, domSize: range.domStart - domPos, domStart: domPos}); | |||
|
740 | changedLines += range.from - pos; | |||
|
741 | } | |||
|
742 | pos = range.to; | |||
|
743 | domPos = range.domStart + (range.to - range.from); | |||
|
744 | } | |||
|
745 | if (domPos != domEnd || pos != to) { | |||
|
746 | changedLines += Math.abs(to - pos); | |||
|
747 | updates.push({from: pos, to: to, domSize: domEnd - domPos, domStart: domPos}); | |||
|
748 | } | |||
|
749 | ||||
|
750 | if (!updates.length) return; | |||
|
751 | lineDiv.style.display = "none"; | |||
|
752 | // If more than 30% of the screen needs update, just do a full | |||
|
753 | // redraw (which is quicker than patching) | |||
|
754 | if (changedLines > (visible.to - visible.from) * .3) | |||
|
755 | refreshDisplay(from = Math.max(visible.from - 10, 0), to = Math.min(visible.to + 7, lines.length)); | |||
|
756 | // Otherwise, only update the stuff that needs updating. | |||
|
757 | else | |||
|
758 | patchDisplay(updates); | |||
|
759 | lineDiv.style.display = ""; | |||
|
760 | ||||
|
761 | // Position the mover div to align with the lines it's supposed | |||
|
762 | // to be showing (which will cover the visible display) | |||
|
763 | var different = from != showingFrom || to != showingTo || lastHeight != scroller.clientHeight; | |||
|
764 | showingFrom = from; showingTo = to; | |||
|
765 | mover.style.top = (from * lineHeight()) + "px"; | |||
|
766 | if (different) { | |||
|
767 | lastHeight = scroller.clientHeight; | |||
|
768 | code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px"; | |||
|
769 | updateGutter(); | |||
|
770 | } | |||
|
771 | ||||
|
772 | if (maxWidth == null) maxWidth = stringWidth(maxLine); | |||
|
773 | if (maxWidth > scroller.clientWidth) { | |||
|
774 | lineSpace.style.width = maxWidth + "px"; | |||
|
775 | // Needed to prevent odd wrapping/hiding of widgets placed in here. | |||
|
776 | code.style.width = ""; | |||
|
777 | code.style.width = scroller.scrollWidth + "px"; | |||
|
778 | } else { | |||
|
779 | lineSpace.style.width = code.style.width = ""; | |||
|
780 | } | |||
|
781 | ||||
|
782 | // Since this is all rather error prone, it is honoured with the | |||
|
783 | // only assertion in the whole file. | |||
|
784 | if (lineDiv.childNodes.length != showingTo - showingFrom) | |||
|
785 | throw new Error("BAD PATCH! " + JSON.stringify(updates) + " size=" + (showingTo - showingFrom) + | |||
|
786 | " nodes=" + lineDiv.childNodes.length); | |||
|
787 | updateCursor(); | |||
|
788 | } | |||
|
789 | ||||
|
790 | function refreshDisplay(from, to) { | |||
|
791 | var html = [], start = {line: from, ch: 0}, inSel = posLess(sel.from, start) && !posLess(sel.to, start); | |||
|
792 | for (var i = from; i < to; ++i) { | |||
|
793 | var ch1 = null, ch2 = null; | |||
|
794 | if (inSel) { | |||
|
795 | ch1 = 0; | |||
|
796 | if (sel.to.line == i) {inSel = false; ch2 = sel.to.ch;} | |||
|
797 | } | |||
|
798 | else if (sel.from.line == i) { | |||
|
799 | if (sel.to.line == i) {ch1 = sel.from.ch; ch2 = sel.to.ch;} | |||
|
800 | else {inSel = true; ch1 = sel.from.ch;} | |||
|
801 | } | |||
|
802 | html.push(lines[i].getHTML(ch1, ch2, true)); | |||
|
803 | } | |||
|
804 | lineDiv.innerHTML = html.join(""); | |||
|
805 | } | |||
|
806 | function patchDisplay(updates) { | |||
|
807 | // Slightly different algorithm for IE (badInnerHTML), since | |||
|
808 | // there .innerHTML on PRE nodes is dumb, and discards | |||
|
809 | // whitespace. | |||
|
810 | var sfrom = sel.from.line, sto = sel.to.line, off = 0, | |||
|
811 | scratch = badInnerHTML && targetDocument.createElement("div"); | |||
|
812 | for (var i = 0, e = updates.length; i < e; ++i) { | |||
|
813 | var rec = updates[i]; | |||
|
814 | var extra = (rec.to - rec.from) - rec.domSize; | |||
|
815 | var nodeAfter = lineDiv.childNodes[rec.domStart + rec.domSize + off] || null; | |||
|
816 | if (badInnerHTML) | |||
|
817 | for (var j = Math.max(-extra, rec.domSize); j > 0; --j) | |||
|
818 | lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild); | |||
|
819 | else if (extra) { | |||
|
820 | for (var j = Math.max(0, extra); j > 0; --j) | |||
|
821 | lineDiv.insertBefore(targetDocument.createElement("pre"), nodeAfter); | |||
|
822 | for (var j = Math.max(0, -extra); j > 0; --j) | |||
|
823 | lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild); | |||
|
824 | } | |||
|
825 | var node = lineDiv.childNodes[rec.domStart + off], inSel = sfrom < rec.from && sto >= rec.from; | |||
|
826 | for (var j = rec.from; j < rec.to; ++j) { | |||
|
827 | var ch1 = null, ch2 = null; | |||
|
828 | if (inSel) { | |||
|
829 | ch1 = 0; | |||
|
830 | if (sto == j) {inSel = false; ch2 = sel.to.ch;} | |||
|
831 | } | |||
|
832 | else if (sfrom == j) { | |||
|
833 | if (sto == j) {ch1 = sel.from.ch; ch2 = sel.to.ch;} | |||
|
834 | else {inSel = true; ch1 = sel.from.ch;} | |||
|
835 | } | |||
|
836 | if (badInnerHTML) { | |||
|
837 | scratch.innerHTML = lines[j].getHTML(ch1, ch2, true); | |||
|
838 | lineDiv.insertBefore(scratch.firstChild, nodeAfter); | |||
|
839 | } | |||
|
840 | else { | |||
|
841 | node.innerHTML = lines[j].getHTML(ch1, ch2, false); | |||
|
842 | node.className = lines[j].className || ""; | |||
|
843 | node = node.nextSibling; | |||
|
844 | } | |||
|
845 | } | |||
|
846 | off += extra; | |||
|
847 | } | |||
|
848 | } | |||
|
849 | ||||
|
850 | function updateGutter() { | |||
|
851 | if (!options.gutter && !options.lineNumbers) return; | |||
|
852 | var hText = mover.offsetHeight, hEditor = scroller.clientHeight; | |||
|
853 | gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px"; | |||
|
854 | var html = []; | |||
|
855 | for (var i = showingFrom; i < Math.max(showingTo, showingFrom + 1); ++i) { | |||
|
856 | var marker = lines[i].gutterMarker; | |||
|
857 | var text = options.lineNumbers ? i + options.firstLineNumber : null; | |||
|
858 | if (marker && marker.text) | |||
|
859 | text = marker.text.replace("%N%", text != null ? text : ""); | |||
|
860 | else if (text == null) | |||
|
861 | text = "\u00a0"; | |||
|
862 | html.push((marker && marker.style ? '<pre class="' + marker.style + '">' : "<pre>"), text, "</pre>"); | |||
|
863 | } | |||
|
864 | gutter.style.display = "none"; | |||
|
865 | gutterText.innerHTML = html.join(""); | |||
|
866 | var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = ""; | |||
|
867 | while (val.length + pad.length < minwidth) pad += "\u00a0"; | |||
|
868 | if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild); | |||
|
869 | gutter.style.display = ""; | |||
|
870 | lineSpace.style.marginLeft = gutter.offsetWidth + "px"; | |||
|
871 | } | |||
|
872 | function updateCursor() { | |||
|
873 | var head = sel.inverted ? sel.from : sel.to, lh = lineHeight(); | |||
|
874 | var x = charX(head.line, head.ch) + "px", y = (head.line - showingFrom) * lh + "px"; | |||
|
875 | inputDiv.style.top = (head.line * lh - scroller.scrollTop) + "px"; | |||
|
876 | if (posEq(sel.from, sel.to)) { | |||
|
877 | cursor.style.top = y; cursor.style.left = x; | |||
|
878 | cursor.style.display = ""; | |||
|
879 | } | |||
|
880 | else cursor.style.display = "none"; | |||
|
881 | } | |||
|
882 | ||||
|
883 | function setSelectionUser(from, to) { | |||
|
884 | var sh = shiftSelecting && clipPos(shiftSelecting); | |||
|
885 | if (sh) { | |||
|
886 | if (posLess(sh, from)) from = sh; | |||
|
887 | else if (posLess(to, sh)) to = sh; | |||
|
888 | } | |||
|
889 | setSelection(from, to); | |||
|
890 | } | |||
|
891 | // Update the selection. Last two args are only used by | |||
|
892 | // updateLines, since they have to be expressed in the line | |||
|
893 | // numbers before the update. | |||
|
894 | function setSelection(from, to, oldFrom, oldTo) { | |||
|
895 | if (posEq(sel.from, from) && posEq(sel.to, to)) return; | |||
|
896 | if (posLess(to, from)) {var tmp = to; to = from; from = tmp;} | |||
|
897 | ||||
|
898 | if (posEq(from, to)) sel.inverted = false; | |||
|
899 | else if (posEq(from, sel.to)) sel.inverted = false; | |||
|
900 | else if (posEq(to, sel.from)) sel.inverted = true; | |||
|
901 | ||||
|
902 | // Some ugly logic used to only mark the lines that actually did | |||
|
903 | // see a change in selection as changed, rather than the whole | |||
|
904 | // selected range. | |||
|
905 | if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;} | |||
|
906 | if (posEq(from, to)) { | |||
|
907 | if (!posEq(sel.from, sel.to)) | |||
|
908 | changes.push({from: oldFrom, to: oldTo + 1}); | |||
|
909 | } | |||
|
910 | else if (posEq(sel.from, sel.to)) { | |||
|
911 | changes.push({from: from.line, to: to.line + 1}); | |||
|
912 | } | |||
|
913 | else { | |||
|
914 | if (!posEq(from, sel.from)) { | |||
|
915 | if (from.line < oldFrom) | |||
|
916 | changes.push({from: from.line, to: Math.min(to.line, oldFrom) + 1}); | |||
|
917 | else | |||
|
918 | changes.push({from: oldFrom, to: Math.min(oldTo, from.line) + 1}); | |||
|
919 | } | |||
|
920 | if (!posEq(to, sel.to)) { | |||
|
921 | if (to.line < oldTo) | |||
|
922 | changes.push({from: Math.max(oldFrom, from.line), to: oldTo + 1}); | |||
|
923 | else | |||
|
924 | changes.push({from: Math.max(from.line, oldTo), to: to.line + 1}); | |||
|
925 | } | |||
|
926 | } | |||
|
927 | sel.from = from; sel.to = to; | |||
|
928 | selectionChanged = true; | |||
|
929 | } | |||
|
930 | function setCursor(line, ch, user) { | |||
|
931 | var pos = clipPos({line: line, ch: ch || 0}); | |||
|
932 | (user ? setSelectionUser : setSelection)(pos, pos); | |||
|
933 | } | |||
|
934 | ||||
|
935 | function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));} | |||
|
936 | function clipPos(pos) { | |||
|
937 | if (pos.line < 0) return {line: 0, ch: 0}; | |||
|
938 | if (pos.line >= lines.length) return {line: lines.length-1, ch: lines[lines.length-1].text.length}; | |||
|
939 | var ch = pos.ch, linelen = lines[pos.line].text.length; | |||
|
940 | if (ch == null || ch > linelen) return {line: pos.line, ch: linelen}; | |||
|
941 | else if (ch < 0) return {line: pos.line, ch: 0}; | |||
|
942 | else return pos; | |||
|
943 | } | |||
|
944 | ||||
|
945 | function scrollPage(down) { | |||
|
946 | var linesPerPage = Math.floor(scroller.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to; | |||
|
947 | setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch, true); | |||
|
948 | } | |||
|
949 | function scrollEnd(top) { | |||
|
950 | var pos = top ? {line: 0, ch: 0} : {line: lines.length - 1, ch: lines[lines.length-1].text.length}; | |||
|
951 | setSelectionUser(pos, pos); | |||
|
952 | } | |||
|
953 | function selectAll() { | |||
|
954 | var endLine = lines.length - 1; | |||
|
955 | setSelection({line: 0, ch: 0}, {line: endLine, ch: lines[endLine].text.length}); | |||
|
956 | } | |||
|
957 | function selectWordAt(pos) { | |||
|
958 | var line = lines[pos.line].text; | |||
|
959 | var start = pos.ch, end = pos.ch; | |||
|
960 | while (start > 0 && /\w/.test(line.charAt(start - 1))) --start; | |||
|
961 | while (end < line.length && /\w/.test(line.charAt(end))) ++end; | |||
|
962 | setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end}); | |||
|
963 | } | |||
|
964 | function selectLine(line) { | |||
|
965 | setSelectionUser({line: line, ch: 0}, {line: line, ch: lines[line].text.length}); | |||
|
966 | } | |||
|
967 | function handleEnter() { | |||
|
968 | replaceSelection("\n", "end"); | |||
|
969 | if (options.enterMode != "flat") | |||
|
970 | indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart"); | |||
|
971 | } | |||
|
972 | function handleTab(shift) { | |||
|
973 | function indentSelected(mode) { | |||
|
974 | if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode); | |||
|
975 | var e = sel.to.line - (sel.to.ch ? 0 : 1); | |||
|
976 | for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode); | |||
|
977 | } | |||
|
978 | shiftSelecting = null; | |||
|
979 | switch (options.tabMode) { | |||
|
980 | case "default": | |||
|
981 | return false; | |||
|
982 | case "indent": | |||
|
983 | indentSelected("smart"); | |||
|
984 | break; | |||
|
985 | case "classic": | |||
|
986 | if (posEq(sel.from, sel.to)) { | |||
|
987 | if (shift) indentLine(sel.from.line, "smart"); | |||
|
988 | else replaceSelection("\t", "end"); | |||
|
989 | break; | |||
|
990 | } | |||
|
991 | case "shift": | |||
|
992 | indentSelected(shift ? "subtract" : "add"); | |||
|
993 | break; | |||
|
994 | } | |||
|
995 | return true; | |||
|
996 | } | |||
|
997 | ||||
|
998 | function indentLine(n, how) { | |||
|
999 | if (how == "smart") { | |||
|
1000 | if (!mode.indent) how = "prev"; | |||
|
1001 | else var state = getStateBefore(n); | |||
|
1002 | } | |||
|
1003 | ||||
|
1004 | var line = lines[n], curSpace = line.indentation(), curSpaceString = line.text.match(/^\s*/)[0], indentation; | |||
|
1005 | if (how == "prev") { | |||
|
1006 | if (n) indentation = lines[n-1].indentation(); | |||
|
1007 | else indentation = 0; | |||
|
1008 | } | |||
|
1009 | else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length)); | |||
|
1010 | else if (how == "add") indentation = curSpace + options.indentUnit; | |||
|
1011 | else if (how == "subtract") indentation = curSpace - options.indentUnit; | |||
|
1012 | indentation = Math.max(0, indentation); | |||
|
1013 | var diff = indentation - curSpace; | |||
|
1014 | ||||
|
1015 | if (!diff) { | |||
|
1016 | if (sel.from.line != n && sel.to.line != n) return; | |||
|
1017 | var indentString = curSpaceString; | |||
|
1018 | } | |||
|
1019 | else { | |||
|
1020 | var indentString = "", pos = 0; | |||
|
1021 | if (options.indentWithTabs) | |||
|
1022 | for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} | |||
|
1023 | while (pos < indentation) {++pos; indentString += " ";} | |||
|
1024 | } | |||
|
1025 | ||||
|
1026 | replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length}); | |||
|
1027 | } | |||
|
1028 | ||||
|
1029 | function loadMode() { | |||
|
1030 | mode = CodeMirror.getMode(options, options.mode); | |||
|
1031 | for (var i = 0, l = lines.length; i < l; ++i) | |||
|
1032 | lines[i].stateAfter = null; | |||
|
1033 | work = [0]; | |||
|
1034 | startWorker(); | |||
|
1035 | } | |||
|
1036 | function gutterChanged() { | |||
|
1037 | var visible = options.gutter || options.lineNumbers; | |||
|
1038 | gutter.style.display = visible ? "" : "none"; | |||
|
1039 | if (visible) updateGutter(); | |||
|
1040 | else lineDiv.parentNode.style.marginLeft = 0; | |||
|
1041 | } | |||
|
1042 | ||||
|
1043 | function markText(from, to, className) { | |||
|
1044 | from = clipPos(from); to = clipPos(to); | |||
|
1045 | var accum = []; | |||
|
1046 | function add(line, from, to, className) { | |||
|
1047 | var line = lines[line], mark = line.addMark(from, to, className); | |||
|
1048 | mark.line = line; | |||
|
1049 | accum.push(mark); | |||
|
1050 | } | |||
|
1051 | if (from.line == to.line) add(from.line, from.ch, to.ch, className); | |||
|
1052 | else { | |||
|
1053 | add(from.line, from.ch, null, className); | |||
|
1054 | for (var i = from.line + 1, e = to.line; i < e; ++i) | |||
|
1055 | add(i, 0, null, className); | |||
|
1056 | add(to.line, 0, to.ch, className); | |||
|
1057 | } | |||
|
1058 | changes.push({from: from.line, to: to.line + 1}); | |||
|
1059 | return function() { | |||
|
1060 | var start, end; | |||
|
1061 | for (var i = 0; i < accum.length; ++i) { | |||
|
1062 | var mark = accum[i], found = indexOf(lines, mark.line); | |||
|
1063 | mark.line.removeMark(mark); | |||
|
1064 | if (found > -1) { | |||
|
1065 | if (start == null) start = found; | |||
|
1066 | end = found; | |||
|
1067 | } | |||
|
1068 | } | |||
|
1069 | if (start != null) changes.push({from: start, to: end + 1}); | |||
|
1070 | }; | |||
|
1071 | } | |||
|
1072 | ||||
|
1073 | function addGutterMarker(line, text, className) { | |||
|
1074 | if (typeof line == "number") line = lines[clipLine(line)]; | |||
|
1075 | line.gutterMarker = {text: text, style: className}; | |||
|
1076 | updateGutter(); | |||
|
1077 | return line; | |||
|
1078 | } | |||
|
1079 | function removeGutterMarker(line) { | |||
|
1080 | if (typeof line == "number") line = lines[clipLine(line)]; | |||
|
1081 | line.gutterMarker = null; | |||
|
1082 | updateGutter(); | |||
|
1083 | } | |||
|
1084 | function setLineClass(line, className) { | |||
|
1085 | if (typeof line == "number") { | |||
|
1086 | var no = line; | |||
|
1087 | line = lines[clipLine(line)]; | |||
|
1088 | } | |||
|
1089 | else { | |||
|
1090 | var no = indexOf(lines, line); | |||
|
1091 | if (no == -1) return null; | |||
|
1092 | } | |||
|
1093 | if (line.className != className) { | |||
|
1094 | line.className = className; | |||
|
1095 | changes.push({from: no, to: no + 1}); | |||
|
1096 | } | |||
|
1097 | return line; | |||
|
1098 | } | |||
|
1099 | ||||
|
1100 | function lineInfo(line) { | |||
|
1101 | if (typeof line == "number") { | |||
|
1102 | var n = line; | |||
|
1103 | line = lines[line]; | |||
|
1104 | if (!line) return null; | |||
|
1105 | } | |||
|
1106 | else { | |||
|
1107 | var n = indexOf(lines, line); | |||
|
1108 | if (n == -1) return null; | |||
|
1109 | } | |||
|
1110 | var marker = line.gutterMarker; | |||
|
1111 | return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style}; | |||
|
1112 | } | |||
|
1113 | ||||
|
1114 | function stringWidth(str) { | |||
|
1115 | measure.innerHTML = "<pre><span>x</span></pre>"; | |||
|
1116 | measure.firstChild.firstChild.firstChild.nodeValue = str; | |||
|
1117 | return measure.firstChild.firstChild.offsetWidth || 10; | |||
|
1118 | } | |||
|
1119 | // These are used to go from pixel positions to character | |||
|
1120 | // positions, taking varying character widths into account. | |||
|
1121 | function charX(line, pos) { | |||
|
1122 | if (pos == 0) return 0; | |||
|
1123 | measure.innerHTML = "<pre><span>" + lines[line].getHTML(null, null, false, pos) + "</span></pre>"; | |||
|
1124 | return measure.firstChild.firstChild.offsetWidth; | |||
|
1125 | } | |||
|
1126 | function charFromX(line, x) { | |||
|
1127 | if (x <= 0) return 0; | |||
|
1128 | var lineObj = lines[line], text = lineObj.text; | |||
|
1129 | function getX(len) { | |||
|
1130 | measure.innerHTML = "<pre><span>" + lineObj.getHTML(null, null, false, len) + "</span></pre>"; | |||
|
1131 | return measure.firstChild.firstChild.offsetWidth; | |||
|
1132 | } | |||
|
1133 | var from = 0, fromX = 0, to = text.length, toX; | |||
|
1134 | // Guess a suitable upper bound for our search. | |||
|
1135 | var estimated = Math.min(to, Math.ceil(x / stringWidth("x"))); | |||
|
1136 | for (;;) { | |||
|
1137 | var estX = getX(estimated); | |||
|
1138 | if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2)); | |||
|
1139 | else {toX = estX; to = estimated; break;} | |||
|
1140 | } | |||
|
1141 | if (x > toX) return to; | |||
|
1142 | // Try to guess a suitable lower bound as well. | |||
|
1143 | estimated = Math.floor(to * 0.8); estX = getX(estimated); | |||
|
1144 | if (estX < x) {from = estimated; fromX = estX;} | |||
|
1145 | // Do a binary search between these bounds. | |||
|
1146 | for (;;) { | |||
|
1147 | if (to - from <= 1) return (toX - x > x - fromX) ? from : to; | |||
|
1148 | var middle = Math.ceil((from + to) / 2), middleX = getX(middle); | |||
|
1149 | if (middleX > x) {to = middle; toX = middleX;} | |||
|
1150 | else {from = middle; fromX = middleX;} | |||
|
1151 | } | |||
|
1152 | } | |||
|
1153 | ||||
|
1154 | function localCoords(pos, inLineWrap) { | |||
|
1155 | var lh = lineHeight(), line = pos.line - (inLineWrap ? showingFrom : 0); | |||
|
1156 | return {x: charX(pos.line, pos.ch), y: line * lh, yBot: (line + 1) * lh}; | |||
|
1157 | } | |||
|
1158 | function pageCoords(pos) { | |||
|
1159 | var local = localCoords(pos, true), off = eltOffset(lineSpace); | |||
|
1160 | return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot}; | |||
|
1161 | } | |||
|
1162 | ||||
|
1163 | function lineHeight() { | |||
|
1164 | var nlines = lineDiv.childNodes.length; | |||
|
1165 | if (nlines) return (lineDiv.offsetHeight / nlines) || 1; | |||
|
1166 | measure.innerHTML = "<pre>x</pre>"; | |||
|
1167 | return measure.firstChild.offsetHeight || 1; | |||
|
1168 | } | |||
|
1169 | function paddingTop() {return lineSpace.offsetTop;} | |||
|
1170 | function paddingLeft() {return lineSpace.offsetLeft;} | |||
|
1171 | ||||
|
1172 | function posFromMouse(e, liberal) { | |||
|
1173 | var offW = eltOffset(scroller, true), x, y; | |||
|
1174 | // Fails unpredictably on IE[67] when mouse is dragged around quickly. | |||
|
1175 | try { x = e.clientX; y = e.clientY; } catch (e) { return null; } | |||
|
1176 | // This is a mess of a heuristic to try and determine whether a | |||
|
1177 | // scroll-bar was clicked or not, and to return null if one was | |||
|
1178 | // (and !liberal). | |||
|
1179 | if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight)) | |||
|
1180 | return null; | |||
|
1181 | var offL = eltOffset(lineSpace, true); | |||
|
1182 | var line = showingFrom + Math.floor((y - offL.top) / lineHeight()); | |||
|
1183 | return clipPos({line: line, ch: charFromX(clipLine(line), x - offL.left)}); | |||
|
1184 | } | |||
|
1185 | function onContextMenu(e) { | |||
|
1186 | var pos = posFromMouse(e); | |||
|
1187 | if (!pos || window.opera) return; // Opera is difficult. | |||
|
1188 | if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) | |||
|
1189 | operation(setCursor)(pos.line, pos.ch); | |||
|
1190 | ||||
|
1191 | var oldCSS = input.style.cssText; | |||
|
1192 | inputDiv.style.position = "absolute"; | |||
|
1193 | input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e_pageY(e) - 1) + | |||
|
1194 | "px; left: " + (e_pageX(e) - 1) + "px; z-index: 1000; background: white; " + | |||
|
1195 | "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; | |||
|
1196 | leaveInputAlone = true; | |||
|
1197 | var val = input.value = getSelection(); | |||
|
1198 | focusInput(); | |||
|
1199 | setSelRange(input, 0, input.value.length); | |||
|
1200 | function rehide() { | |||
|
1201 | var newVal = splitLines(input.value).join("\n"); | |||
|
1202 | if (newVal != val) operation(replaceSelection)(newVal, "end"); | |||
|
1203 | inputDiv.style.position = "relative"; | |||
|
1204 | input.style.cssText = oldCSS; | |||
|
1205 | leaveInputAlone = false; | |||
|
1206 | prepareInput(); | |||
|
1207 | slowPoll(); | |||
|
1208 | } | |||
|
1209 | ||||
|
1210 | if (gecko) { | |||
|
1211 | e_stop(e); | |||
|
1212 | var mouseup = connect(window, "mouseup", function() { | |||
|
1213 | mouseup(); | |||
|
1214 | setTimeout(rehide, 20); | |||
|
1215 | }, true); | |||
|
1216 | } | |||
|
1217 | else { | |||
|
1218 | setTimeout(rehide, 50); | |||
|
1219 | } | |||
|
1220 | } | |||
|
1221 | ||||
|
1222 | // Cursor-blinking | |||
|
1223 | function restartBlink() { | |||
|
1224 | clearInterval(blinker); | |||
|
1225 | var on = true; | |||
|
1226 | cursor.style.visibility = ""; | |||
|
1227 | blinker = setInterval(function() { | |||
|
1228 | cursor.style.visibility = (on = !on) ? "" : "hidden"; | |||
|
1229 | }, 650); | |||
|
1230 | } | |||
|
1231 | ||||
|
1232 | var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; | |||
|
1233 | function matchBrackets(autoclear) { | |||
|
1234 | var head = sel.inverted ? sel.from : sel.to, line = lines[head.line], pos = head.ch - 1; | |||
|
1235 | var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; | |||
|
1236 | if (!match) return; | |||
|
1237 | var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles; | |||
|
1238 | for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2) | |||
|
1239 | if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;} | |||
|
1240 | ||||
|
1241 | var stack = [line.text.charAt(pos)], re = /[(){}[\]]/; | |||
|
1242 | function scan(line, from, to) { | |||
|
1243 | if (!line.text) return; | |||
|
1244 | var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur; | |||
|
1245 | for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) { | |||
|
1246 | var text = st[i]; | |||
|
1247 | if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;} | |||
|
1248 | for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) { | |||
|
1249 | if (pos >= from && pos < to && re.test(cur = text.charAt(j))) { | |||
|
1250 | var match = matching[cur]; | |||
|
1251 | if (match.charAt(1) == ">" == forward) stack.push(cur); | |||
|
1252 | else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false}; | |||
|
1253 | else if (!stack.length) return {pos: pos, match: true}; | |||
|
1254 | } | |||
|
1255 | } | |||
|
1256 | } | |||
|
1257 | } | |||
|
1258 | for (var i = head.line, e = forward ? Math.min(i + 100, lines.length) : Math.max(-1, i - 100); i != e; i+=d) { | |||
|
1259 | var line = lines[i], first = i == head.line; | |||
|
1260 | var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length); | |||
|
1261 | if (found) break; | |||
|
1262 | } | |||
|
1263 | if (!found) found = {pos: null, match: false}; | |||
|
1264 | var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; | |||
|
1265 | var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style), | |||
|
1266 | two = found.pos != null | |||
|
1267 | ? markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style) | |||
|
1268 | : function() {}; | |||
|
1269 | var clear = operation(function(){one(); two();}); | |||
|
1270 | if (autoclear) setTimeout(clear, 800); | |||
|
1271 | else bracketHighlighted = clear; | |||
|
1272 | } | |||
|
1273 | ||||
|
1274 | // Finds the line to start with when starting a parse. Tries to | |||
|
1275 | // find a line with a stateAfter, so that it can start with a | |||
|
1276 | // valid state. If that fails, it returns the line with the | |||
|
1277 | // smallest indentation, which tends to need the least context to | |||
|
1278 | // parse correctly. | |||
|
1279 | function findStartLine(n) { | |||
|
1280 | var minindent, minline; | |||
|
1281 | for (var search = n, lim = n - 40; search > lim; --search) { | |||
|
1282 | if (search == 0) return 0; | |||
|
1283 | var line = lines[search-1]; | |||
|
1284 | if (line.stateAfter) return search; | |||
|
1285 | var indented = line.indentation(); | |||
|
1286 | if (minline == null || minindent > indented) { | |||
|
1287 | minline = search; | |||
|
1288 | minindent = indented; | |||
|
1289 | } | |||
|
1290 | } | |||
|
1291 | return minline; | |||
|
1292 | } | |||
|
1293 | function getStateBefore(n) { | |||
|
1294 | var start = findStartLine(n), state = start && lines[start-1].stateAfter; | |||
|
1295 | if (!state) state = startState(mode); | |||
|
1296 | else state = copyState(mode, state); | |||
|
1297 | for (var i = start; i < n; ++i) { | |||
|
1298 | var line = lines[i]; | |||
|
1299 | line.highlight(mode, state); | |||
|
1300 | line.stateAfter = copyState(mode, state); | |||
|
1301 | } | |||
|
1302 | if (n < lines.length && !lines[n].stateAfter) work.push(n); | |||
|
1303 | return state; | |||
|
1304 | } | |||
|
1305 | function highlightLines(start, end) { | |||
|
1306 | var state = getStateBefore(start); | |||
|
1307 | for (var i = start; i < end; ++i) { | |||
|
1308 | var line = lines[i]; | |||
|
1309 | line.highlight(mode, state); | |||
|
1310 | line.stateAfter = copyState(mode, state); | |||
|
1311 | } | |||
|
1312 | } | |||
|
1313 | function highlightWorker() { | |||
|
1314 | var end = +new Date + options.workTime; | |||
|
1315 | var foundWork = work.length; | |||
|
1316 | while (work.length) { | |||
|
1317 | if (!lines[showingFrom].stateAfter) var task = showingFrom; | |||
|
1318 | else var task = work.pop(); | |||
|
1319 | if (task >= lines.length) continue; | |||
|
1320 | var start = findStartLine(task), state = start && lines[start-1].stateAfter; | |||
|
1321 | if (state) state = copyState(mode, state); | |||
|
1322 | else state = startState(mode); | |||
|
1323 | ||||
|
1324 | var unchanged = 0, compare = mode.compareStates; | |||
|
1325 | for (var i = start, l = lines.length; i < l; ++i) { | |||
|
1326 | var line = lines[i], hadState = line.stateAfter; | |||
|
1327 | if (+new Date > end) { | |||
|
1328 | work.push(i); | |||
|
1329 | startWorker(options.workDelay); | |||
|
1330 | changes.push({from: task, to: i + 1}); | |||
|
1331 | return; | |||
|
1332 | } | |||
|
1333 | var changed = line.highlight(mode, state); | |||
|
1334 | line.stateAfter = copyState(mode, state); | |||
|
1335 | if (compare) { | |||
|
1336 | if (hadState && compare(hadState, state)) break; | |||
|
1337 | } else { | |||
|
1338 | if (changed || !hadState) unchanged = 0; | |||
|
1339 | else if (++unchanged > 3) break; | |||
|
1340 | } | |||
|
1341 | } | |||
|
1342 | changes.push({from: task, to: i + 1}); | |||
|
1343 | } | |||
|
1344 | if (foundWork && options.onHighlightComplete) | |||
|
1345 | options.onHighlightComplete(instance); | |||
|
1346 | } | |||
|
1347 | function startWorker(time) { | |||
|
1348 | if (!work.length) return; | |||
|
1349 | highlight.set(time, operation(highlightWorker)); | |||
|
1350 | } | |||
|
1351 | ||||
|
1352 | // Operations are used to wrap changes in such a way that each | |||
|
1353 | // change won't have to update the cursor and display (which would | |||
|
1354 | // be awkward, slow, and error-prone), but instead updates are | |||
|
1355 | // batched and then all combined and executed at once. | |||
|
1356 | function startOperation() { | |||
|
1357 | updateInput = null; changes = []; textChanged = selectionChanged = false; | |||
|
1358 | } | |||
|
1359 | function endOperation() { | |||
|
1360 | var reScroll = false; | |||
|
1361 | if (selectionChanged) reScroll = !scrollCursorIntoView(); | |||
|
1362 | if (changes.length) updateDisplay(changes); | |||
|
1363 | else if (selectionChanged) updateCursor(); | |||
|
1364 | if (reScroll) scrollCursorIntoView(); | |||
|
1365 | if (selectionChanged) restartBlink(); | |||
|
1366 | ||||
|
1367 | // updateInput can be set to a boolean value to force/prevent an | |||
|
1368 | // update. | |||
|
1369 | if (focused && !leaveInputAlone && | |||
|
1370 | (updateInput === true || (updateInput !== false && selectionChanged))) | |||
|
1371 | prepareInput(); | |||
|
1372 | ||||
|
1373 | if (selectionChanged && options.matchBrackets) | |||
|
1374 | setTimeout(operation(function() { | |||
|
1375 | if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;} | |||
|
1376 | matchBrackets(false); | |||
|
1377 | }), 20); | |||
|
1378 | var tc = textChanged; // textChanged can be reset by cursoractivity callback | |||
|
1379 | if (selectionChanged && options.onCursorActivity) | |||
|
1380 | options.onCursorActivity(instance); | |||
|
1381 | if (tc && options.onChange && instance) | |||
|
1382 | options.onChange(instance, tc); | |||
|
1383 | } | |||
|
1384 | var nestedOperation = 0; | |||
|
1385 | function operation(f) { | |||
|
1386 | return function() { | |||
|
1387 | if (!nestedOperation++) startOperation(); | |||
|
1388 | try {var result = f.apply(this, arguments);} | |||
|
1389 | finally {if (!--nestedOperation) endOperation();} | |||
|
1390 | return result; | |||
|
1391 | }; | |||
|
1392 | } | |||
|
1393 | ||||
|
1394 | function SearchCursor(query, pos, caseFold) { | |||
|
1395 | this.atOccurrence = false; | |||
|
1396 | if (caseFold == null) caseFold = typeof query == "string" && query == query.toLowerCase(); | |||
|
1397 | ||||
|
1398 | if (pos && typeof pos == "object") pos = clipPos(pos); | |||
|
1399 | else pos = {line: 0, ch: 0}; | |||
|
1400 | this.pos = {from: pos, to: pos}; | |||
|
1401 | ||||
|
1402 | // The matches method is filled in based on the type of query. | |||
|
1403 | // It takes a position and a direction, and returns an object | |||
|
1404 | // describing the next occurrence of the query, or null if no | |||
|
1405 | // more matches were found. | |||
|
1406 | if (typeof query != "string") // Regexp match | |||
|
1407 | this.matches = function(reverse, pos) { | |||
|
1408 | if (reverse) { | |||
|
1409 | var line = lines[pos.line].text.slice(0, pos.ch), match = line.match(query), start = 0; | |||
|
1410 | while (match) { | |||
|
1411 | var ind = line.indexOf(match[0]); | |||
|
1412 | start += ind; | |||
|
1413 | line = line.slice(ind + 1); | |||
|
1414 | var newmatch = line.match(query); | |||
|
1415 | if (newmatch) match = newmatch; | |||
|
1416 | else break; | |||
|
1417 | start++; | |||
|
1418 | } | |||
|
1419 | } | |||
|
1420 | else { | |||
|
1421 | var line = lines[pos.line].text.slice(pos.ch), match = line.match(query), | |||
|
1422 | start = match && pos.ch + line.indexOf(match[0]); | |||
|
1423 | } | |||
|
1424 | if (match) | |||
|
1425 | return {from: {line: pos.line, ch: start}, | |||
|
1426 | to: {line: pos.line, ch: start + match[0].length}, | |||
|
1427 | match: match}; | |||
|
1428 | }; | |||
|
1429 | else { // String query | |||
|
1430 | if (caseFold) query = query.toLowerCase(); | |||
|
1431 | var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;}; | |||
|
1432 | var target = query.split("\n"); | |||
|
1433 | // Different methods for single-line and multi-line queries | |||
|
1434 | if (target.length == 1) | |||
|
1435 | this.matches = function(reverse, pos) { | |||
|
1436 | var line = fold(lines[pos.line].text), len = query.length, match; | |||
|
1437 | if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1) | |||
|
1438 | : (match = line.indexOf(query, pos.ch)) != -1) | |||
|
1439 | return {from: {line: pos.line, ch: match}, | |||
|
1440 | to: {line: pos.line, ch: match + len}}; | |||
|
1441 | }; | |||
|
1442 | else | |||
|
1443 | this.matches = function(reverse, pos) { | |||
|
1444 | var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(lines[ln].text); | |||
|
1445 | var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); | |||
|
1446 | if (reverse ? offsetA >= pos.ch || offsetA != match.length | |||
|
1447 | : offsetA <= pos.ch || offsetA != line.length - match.length) | |||
|
1448 | return; | |||
|
1449 | for (;;) { | |||
|
1450 | if (reverse ? !ln : ln == lines.length - 1) return; | |||
|
1451 | line = fold(lines[ln += reverse ? -1 : 1].text); | |||
|
1452 | match = target[reverse ? --idx : ++idx]; | |||
|
1453 | if (idx > 0 && idx < target.length - 1) { | |||
|
1454 | if (line != match) return; | |||
|
1455 | else continue; | |||
|
1456 | } | |||
|
1457 | var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); | |||
|
1458 | if (reverse ? offsetB != line.length - match.length : offsetB != match.length) | |||
|
1459 | return; | |||
|
1460 | var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB}; | |||
|
1461 | return {from: reverse ? end : start, to: reverse ? start : end}; | |||
|
1462 | } | |||
|
1463 | }; | |||
|
1464 | } | |||
|
1465 | } | |||
|
1466 | ||||
|
1467 | SearchCursor.prototype = { | |||
|
1468 | findNext: function() {return this.find(false);}, | |||
|
1469 | findPrevious: function() {return this.find(true);}, | |||
|
1470 | ||||
|
1471 | find: function(reverse) { | |||
|
1472 | var self = this, pos = clipPos(reverse ? this.pos.from : this.pos.to); | |||
|
1473 | function savePosAndFail(line) { | |||
|
1474 | var pos = {line: line, ch: 0}; | |||
|
1475 | self.pos = {from: pos, to: pos}; | |||
|
1476 | self.atOccurrence = false; | |||
|
1477 | return false; | |||
|
1478 | } | |||
|
1479 | ||||
|
1480 | for (;;) { | |||
|
1481 | if (this.pos = this.matches(reverse, pos)) { | |||
|
1482 | this.atOccurrence = true; | |||
|
1483 | return this.pos.match || true; | |||
|
1484 | } | |||
|
1485 | if (reverse) { | |||
|
1486 | if (!pos.line) return savePosAndFail(0); | |||
|
1487 | pos = {line: pos.line-1, ch: lines[pos.line-1].text.length}; | |||
|
1488 | } | |||
|
1489 | else { | |||
|
1490 | if (pos.line == lines.length - 1) return savePosAndFail(lines.length); | |||
|
1491 | pos = {line: pos.line+1, ch: 0}; | |||
|
1492 | } | |||
|
1493 | } | |||
|
1494 | }, | |||
|
1495 | ||||
|
1496 | from: function() {if (this.atOccurrence) return copyPos(this.pos.from);}, | |||
|
1497 | to: function() {if (this.atOccurrence) return copyPos(this.pos.to);}, | |||
|
1498 | ||||
|
1499 | replace: function(newText) { | |||
|
1500 | var self = this; | |||
|
1501 | if (this.atOccurrence) | |||
|
1502 | operation(function() { | |||
|
1503 | self.pos.to = replaceRange(newText, self.pos.from, self.pos.to); | |||
|
1504 | })(); | |||
|
1505 | } | |||
|
1506 | }; | |||
|
1507 | ||||
|
1508 | for (var ext in extensions) | |||
|
1509 | if (extensions.propertyIsEnumerable(ext) && | |||
|
1510 | !instance.propertyIsEnumerable(ext)) | |||
|
1511 | instance[ext] = extensions[ext]; | |||
|
1512 | return instance; | |||
|
1513 | } // (end of function CodeMirror) | |||
|
1514 | ||||
|
1515 | // The default configuration options. | |||
|
1516 | CodeMirror.defaults = { | |||
|
1517 | value: "", | |||
|
1518 | mode: null, | |||
|
1519 | theme: "default", | |||
|
1520 | indentUnit: 2, | |||
|
1521 | indentWithTabs: false, | |||
|
1522 | tabMode: "classic", | |||
|
1523 | enterMode: "indent", | |||
|
1524 | electricChars: true, | |||
|
1525 | onKeyEvent: null, | |||
|
1526 | lineNumbers: false, | |||
|
1527 | gutter: false, | |||
|
1528 | firstLineNumber: 1, | |||
|
1529 | readOnly: false, | |||
|
1530 | onChange: null, | |||
|
1531 | onCursorActivity: null, | |||
|
1532 | onGutterClick: null, | |||
|
1533 | onHighlightComplete: null, | |||
|
1534 | onFocus: null, onBlur: null, onScroll: null, | |||
|
1535 | matchBrackets: false, | |||
|
1536 | workTime: 100, | |||
|
1537 | workDelay: 200, | |||
|
1538 | undoDepth: 40, | |||
|
1539 | tabindex: null, | |||
|
1540 | document: window.document | |||
|
1541 | }; | |||
|
1542 | ||||
|
1543 | // Known modes, by name and by MIME | |||
|
1544 | var modes = {}, mimeModes = {}; | |||
|
1545 | CodeMirror.defineMode = function(name, mode) { | |||
|
1546 | if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; | |||
|
1547 | modes[name] = mode; | |||
|
1548 | }; | |||
|
1549 | CodeMirror.defineMIME = function(mime, spec) { | |||
|
1550 | mimeModes[mime] = spec; | |||
|
1551 | }; | |||
|
1552 | CodeMirror.getMode = function(options, spec) { | |||
|
1553 | if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) | |||
|
1554 | spec = mimeModes[spec]; | |||
|
1555 | if (typeof spec == "string") | |||
|
1556 | var mname = spec, config = {}; | |||
|
1557 | else if (spec != null) | |||
|
1558 | var mname = spec.name, config = spec; | |||
|
1559 | var mfactory = modes[mname]; | |||
|
1560 | if (!mfactory) { | |||
|
1561 | if (window.console) console.warn("No mode " + mname + " found, falling back to plain text."); | |||
|
1562 | return CodeMirror.getMode(options, "text/plain"); | |||
|
1563 | } | |||
|
1564 | return mfactory(options, config || {}); | |||
|
1565 | }; | |||
|
1566 | CodeMirror.listModes = function() { | |||
|
1567 | var list = []; | |||
|
1568 | for (var m in modes) | |||
|
1569 | if (modes.propertyIsEnumerable(m)) list.push(m); | |||
|
1570 | return list; | |||
|
1571 | }; | |||
|
1572 | CodeMirror.listMIMEs = function() { | |||
|
1573 | var list = []; | |||
|
1574 | for (var m in mimeModes) | |||
|
1575 | if (mimeModes.propertyIsEnumerable(m)) list.push(m); | |||
|
1576 | return list; | |||
|
1577 | }; | |||
|
1578 | ||||
|
1579 | var extensions = {}; | |||
|
1580 | CodeMirror.defineExtension = function(name, func) { | |||
|
1581 | extensions[name] = func; | |||
|
1582 | }; | |||
|
1583 | ||||
|
1584 | CodeMirror.fromTextArea = function(textarea, options) { | |||
|
1585 | if (!options) options = {}; | |||
|
1586 | options.value = textarea.value; | |||
|
1587 | if (!options.tabindex && textarea.tabindex) | |||
|
1588 | options.tabindex = textarea.tabindex; | |||
|
1589 | ||||
|
1590 | function save() {textarea.value = instance.getValue();} | |||
|
1591 | if (textarea.form) { | |||
|
1592 | // Deplorable hack to make the submit method do the right thing. | |||
|
1593 | var rmSubmit = connect(textarea.form, "submit", save, true); | |||
|
1594 | if (typeof textarea.form.submit == "function") { | |||
|
1595 | var realSubmit = textarea.form.submit; | |||
|
1596 | function wrappedSubmit() { | |||
|
1597 | save(); | |||
|
1598 | textarea.form.submit = realSubmit; | |||
|
1599 | textarea.form.submit(); | |||
|
1600 | textarea.form.submit = wrappedSubmit; | |||
|
1601 | } | |||
|
1602 | textarea.form.submit = wrappedSubmit; | |||
|
1603 | } | |||
|
1604 | } | |||
|
1605 | ||||
|
1606 | textarea.style.display = "none"; | |||
|
1607 | var instance = CodeMirror(function(node) { | |||
|
1608 | textarea.parentNode.insertBefore(node, textarea.nextSibling); | |||
|
1609 | }, options); | |||
|
1610 | instance.save = save; | |||
|
1611 | instance.toTextArea = function() { | |||
|
1612 | save(); | |||
|
1613 | textarea.parentNode.removeChild(instance.getWrapperElement()); | |||
|
1614 | textarea.style.display = ""; | |||
|
1615 | if (textarea.form) { | |||
|
1616 | rmSubmit(); | |||
|
1617 | if (typeof textarea.form.submit == "function") | |||
|
1618 | textarea.form.submit = realSubmit; | |||
|
1619 | } | |||
|
1620 | }; | |||
|
1621 | return instance; | |||
|
1622 | }; | |||
|
1623 | ||||
|
1624 | // Utility functions for working with state. Exported because modes | |||
|
1625 | // sometimes need to do this. | |||
|
1626 | function copyState(mode, state) { | |||
|
1627 | if (state === true) return state; | |||
|
1628 | if (mode.copyState) return mode.copyState(state); | |||
|
1629 | var nstate = {}; | |||
|
1630 | for (var n in state) { | |||
|
1631 | var val = state[n]; | |||
|
1632 | if (val instanceof Array) val = val.concat([]); | |||
|
1633 | nstate[n] = val; | |||
|
1634 | } | |||
|
1635 | return nstate; | |||
|
1636 | } | |||
|
1637 | CodeMirror.startState = startState; | |||
|
1638 | function startState(mode, a1, a2) { | |||
|
1639 | return mode.startState ? mode.startState(a1, a2) : true; | |||
|
1640 | } | |||
|
1641 | CodeMirror.copyState = copyState; | |||
|
1642 | ||||
|
1643 | // The character stream used by a mode's parser. | |||
|
1644 | function StringStream(string) { | |||
|
1645 | this.pos = this.start = 0; | |||
|
1646 | this.string = string; | |||
|
1647 | } | |||
|
1648 | StringStream.prototype = { | |||
|
1649 | eol: function() {return this.pos >= this.string.length;}, | |||
|
1650 | sol: function() {return this.pos == 0;}, | |||
|
1651 | peek: function() {return this.string.charAt(this.pos);}, | |||
|
1652 | next: function() { | |||
|
1653 | if (this.pos < this.string.length) | |||
|
1654 | return this.string.charAt(this.pos++); | |||
|
1655 | }, | |||
|
1656 | eat: function(match) { | |||
|
1657 | var ch = this.string.charAt(this.pos); | |||
|
1658 | if (typeof match == "string") var ok = ch == match; | |||
|
1659 | else var ok = ch && (match.test ? match.test(ch) : match(ch)); | |||
|
1660 | if (ok) {++this.pos; return ch;} | |||
|
1661 | }, | |||
|
1662 | eatWhile: function(match) { | |||
|
1663 | var start = this.start; | |||
|
1664 | while (this.eat(match)){} | |||
|
1665 | return this.pos > start; | |||
|
1666 | }, | |||
|
1667 | eatSpace: function() { | |||
|
1668 | var start = this.pos; | |||
|
1669 | while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; | |||
|
1670 | return this.pos > start; | |||
|
1671 | }, | |||
|
1672 | skipToEnd: function() {this.pos = this.string.length;}, | |||
|
1673 | skipTo: function(ch) { | |||
|
1674 | var found = this.string.indexOf(ch, this.pos); | |||
|
1675 | if (found > -1) {this.pos = found; return true;} | |||
|
1676 | }, | |||
|
1677 | backUp: function(n) {this.pos -= n;}, | |||
|
1678 | column: function() {return countColumn(this.string, this.start);}, | |||
|
1679 | indentation: function() {return countColumn(this.string);}, | |||
|
1680 | match: function(pattern, consume, caseInsensitive) { | |||
|
1681 | if (typeof pattern == "string") { | |||
|
1682 | function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} | |||
|
1683 | if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { | |||
|
1684 | if (consume !== false) this.pos += pattern.length; | |||
|
1685 | return true; | |||
|
1686 | } | |||
|
1687 | } | |||
|
1688 | else { | |||
|
1689 | var match = this.string.slice(this.pos).match(pattern); | |||
|
1690 | if (match && consume !== false) this.pos += match[0].length; | |||
|
1691 | return match; | |||
|
1692 | } | |||
|
1693 | }, | |||
|
1694 | current: function(){return this.string.slice(this.start, this.pos);} | |||
|
1695 | }; | |||
|
1696 | CodeMirror.StringStream = StringStream; | |||
|
1697 | ||||
|
1698 | // Line objects. These hold state related to a line, including | |||
|
1699 | // highlighting info (the styles array). | |||
|
1700 | function Line(text, styles) { | |||
|
1701 | this.styles = styles || [text, null]; | |||
|
1702 | this.stateAfter = null; | |||
|
1703 | this.text = text; | |||
|
1704 | this.marked = this.gutterMarker = this.className = null; | |||
|
1705 | } | |||
|
1706 | Line.prototype = { | |||
|
1707 | // Replace a piece of a line, keeping the styles around it intact. | |||
|
1708 | replace: function(from, to, text) { | |||
|
1709 | var st = [], mk = this.marked; | |||
|
1710 | copyStyles(0, from, this.styles, st); | |||
|
1711 | if (text) st.push(text, null); | |||
|
1712 | copyStyles(to, this.text.length, this.styles, st); | |||
|
1713 | this.styles = st; | |||
|
1714 | this.text = this.text.slice(0, from) + text + this.text.slice(to); | |||
|
1715 | this.stateAfter = null; | |||
|
1716 | if (mk) { | |||
|
1717 | var diff = text.length - (to - from), end = this.text.length; | |||
|
1718 | function fix(n) {return n <= Math.min(to, to + diff) ? n : n + diff;} | |||
|
1719 | for (var i = 0; i < mk.length; ++i) { | |||
|
1720 | var mark = mk[i], del = false; | |||
|
1721 | if (mark.from >= end) del = true; | |||
|
1722 | else {mark.from = fix(mark.from); if (mark.to != null) mark.to = fix(mark.to);} | |||
|
1723 | if (del || mark.from >= mark.to) {mk.splice(i, 1); i--;} | |||
|
1724 | } | |||
|
1725 | } | |||
|
1726 | }, | |||
|
1727 | // Split a line in two, again keeping styles intact. | |||
|
1728 | split: function(pos, textBefore) { | |||
|
1729 | var st = [textBefore, null]; | |||
|
1730 | copyStyles(pos, this.text.length, this.styles, st); | |||
|
1731 | return new Line(textBefore + this.text.slice(pos), st); | |||
|
1732 | }, | |||
|
1733 | addMark: function(from, to, style) { | |||
|
1734 | var mk = this.marked, mark = {from: from, to: to, style: style}; | |||
|
1735 | if (this.marked == null) this.marked = []; | |||
|
1736 | this.marked.push(mark); | |||
|
1737 | this.marked.sort(function(a, b){return a.from - b.from;}); | |||
|
1738 | return mark; | |||
|
1739 | }, | |||
|
1740 | removeMark: function(mark) { | |||
|
1741 | var mk = this.marked; | |||
|
1742 | if (!mk) return; | |||
|
1743 | for (var i = 0; i < mk.length; ++i) | |||
|
1744 | if (mk[i] == mark) {mk.splice(i, 1); break;} | |||
|
1745 | }, | |||
|
1746 | // Run the given mode's parser over a line, update the styles | |||
|
1747 | // array, which contains alternating fragments of text and CSS | |||
|
1748 | // classes. | |||
|
1749 | highlight: function(mode, state) { | |||
|
1750 | var stream = new StringStream(this.text), st = this.styles, pos = 0; | |||
|
1751 | var changed = false, curWord = st[0], prevWord; | |||
|
1752 | if (this.text == "" && mode.blankLine) mode.blankLine(state); | |||
|
1753 | while (!stream.eol()) { | |||
|
1754 | var style = mode.token(stream, state); | |||
|
1755 | var substr = this.text.slice(stream.start, stream.pos); | |||
|
1756 | stream.start = stream.pos; | |||
|
1757 | if (pos && st[pos-1] == style) | |||
|
1758 | st[pos-2] += substr; | |||
|
1759 | else if (substr) { | |||
|
1760 | if (!changed && (st[pos+1] != style || (pos && st[pos-2] != prevWord))) changed = true; | |||
|
1761 | st[pos++] = substr; st[pos++] = style; | |||
|
1762 | prevWord = curWord; curWord = st[pos]; | |||
|
1763 | } | |||
|
1764 | // Give up when line is ridiculously long | |||
|
1765 | if (stream.pos > 5000) { | |||
|
1766 | st[pos++] = this.text.slice(stream.pos); st[pos++] = null; | |||
|
1767 | break; | |||
|
1768 | } | |||
|
1769 | } | |||
|
1770 | if (st.length != pos) {st.length = pos; changed = true;} | |||
|
1771 | if (pos && st[pos-2] != prevWord) changed = true; | |||
|
1772 | // Short lines with simple highlights always count as changed, | |||
|
1773 | // because they are likely to highlight the same way in various | |||
|
1774 | // contexts. | |||
|
1775 | return changed || (st.length < 5 && this.text.length < 10); | |||
|
1776 | }, | |||
|
1777 | // Fetch the parser token for a given character. Useful for hacks | |||
|
1778 | // that want to inspect the mode state (say, for completion). | |||
|
1779 | getTokenAt: function(mode, state, ch) { | |||
|
1780 | var txt = this.text, stream = new StringStream(txt); | |||
|
1781 | while (stream.pos < ch && !stream.eol()) { | |||
|
1782 | stream.start = stream.pos; | |||
|
1783 | var style = mode.token(stream, state); | |||
|
1784 | } | |||
|
1785 | return {start: stream.start, | |||
|
1786 | end: stream.pos, | |||
|
1787 | string: stream.current(), | |||
|
1788 | className: style || null, | |||
|
1789 | state: state}; | |||
|
1790 | }, | |||
|
1791 | indentation: function() {return countColumn(this.text);}, | |||
|
1792 | // Produces an HTML fragment for the line, taking selection, | |||
|
1793 | // marking, and highlighting into account. | |||
|
1794 | getHTML: function(sfrom, sto, includePre, endAt) { | |||
|
1795 | var html = []; | |||
|
1796 | if (includePre) | |||
|
1797 | html.push(this.className ? '<pre class="' + this.className + '">': "<pre>"); | |||
|
1798 | function span(text, style) { | |||
|
1799 | if (!text) return; | |||
|
1800 | if (style) html.push('<span class="', style, '">', htmlEscape(text), "</span>"); | |||
|
1801 | else html.push(htmlEscape(text)); | |||
|
1802 | } | |||
|
1803 | var st = this.styles, allText = this.text, marked = this.marked; | |||
|
1804 | if (sfrom == sto) sfrom = null; | |||
|
1805 | var len = allText.length; | |||
|
1806 | if (endAt != null) len = Math.min(endAt, len); | |||
|
1807 | ||||
|
1808 | if (!allText && endAt == null) | |||
|
1809 | span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null); | |||
|
1810 | else if (!marked && sfrom == null) | |||
|
1811 | for (var i = 0, ch = 0; ch < len; i+=2) { | |||
|
1812 | var str = st[i], l = str.length; | |||
|
1813 | if (ch + l > len) str = str.slice(0, len - ch); | |||
|
1814 | ch += l; | |||
|
1815 | span(str, "cm-" + st[i+1]); | |||
|
1816 | } | |||
|
1817 | else { | |||
|
1818 | var pos = 0, i = 0, text = "", style, sg = 0; | |||
|
1819 | var markpos = -1, mark = null; | |||
|
1820 | function nextMark() { | |||
|
1821 | if (marked) { | |||
|
1822 | markpos += 1; | |||
|
1823 | mark = (markpos < marked.length) ? marked[markpos] : null; | |||
|
1824 | } | |||
|
1825 | } | |||
|
1826 | nextMark(); | |||
|
1827 | while (pos < len) { | |||
|
1828 | var upto = len; | |||
|
1829 | var extraStyle = ""; | |||
|
1830 | if (sfrom != null) { | |||
|
1831 | if (sfrom > pos) upto = sfrom; | |||
|
1832 | else if (sto == null || sto > pos) { | |||
|
1833 | extraStyle = " CodeMirror-selected"; | |||
|
1834 | if (sto != null) upto = Math.min(upto, sto); | |||
|
1835 | } | |||
|
1836 | } | |||
|
1837 | while (mark && mark.to != null && mark.to <= pos) nextMark(); | |||
|
1838 | if (mark) { | |||
|
1839 | if (mark.from > pos) upto = Math.min(upto, mark.from); | |||
|
1840 | else { | |||
|
1841 | extraStyle += " " + mark.style; | |||
|
1842 | if (mark.to != null) upto = Math.min(upto, mark.to); | |||
|
1843 | } | |||
|
1844 | } | |||
|
1845 | for (;;) { | |||
|
1846 | var end = pos + text.length; | |||
|
1847 | var appliedStyle = style; | |||
|
1848 | if (extraStyle) appliedStyle = style ? style + extraStyle : extraStyle; | |||
|
1849 | span(end > upto ? text.slice(0, upto - pos) : text, appliedStyle); | |||
|
1850 | if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} | |||
|
1851 | pos = end; | |||
|
1852 | text = st[i++]; style = "cm-" + st[i++]; | |||
|
1853 | } | |||
|
1854 | } | |||
|
1855 | if (sfrom != null && sto == null) span(" ", "CodeMirror-selected"); | |||
|
1856 | } | |||
|
1857 | if (includePre) html.push("</pre>"); | |||
|
1858 | return html.join(""); | |||
|
1859 | } | |||
|
1860 | }; | |||
|
1861 | // Utility used by replace and split above | |||
|
1862 | function copyStyles(from, to, source, dest) { | |||
|
1863 | for (var i = 0, pos = 0, state = 0; pos < to; i+=2) { | |||
|
1864 | var part = source[i], end = pos + part.length; | |||
|
1865 | if (state == 0) { | |||
|
1866 | if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]); | |||
|
1867 | if (end >= from) state = 1; | |||
|
1868 | } | |||
|
1869 | else if (state == 1) { | |||
|
1870 | if (end > to) dest.push(part.slice(0, to - pos), source[i+1]); | |||
|
1871 | else dest.push(part, source[i+1]); | |||
|
1872 | } | |||
|
1873 | pos = end; | |||
|
1874 | } | |||
|
1875 | } | |||
|
1876 | ||||
|
1877 | // The history object 'chunks' changes that are made close together | |||
|
1878 | // and at almost the same time into bigger undoable units. | |||
|
1879 | function History() { | |||
|
1880 | this.time = 0; | |||
|
1881 | this.done = []; this.undone = []; | |||
|
1882 | } | |||
|
1883 | History.prototype = { | |||
|
1884 | addChange: function(start, added, old) { | |||
|
1885 | this.undone.length = 0; | |||
|
1886 | var time = +new Date, last = this.done[this.done.length - 1]; | |||
|
1887 | if (time - this.time > 400 || !last || | |||
|
1888 | last.start > start + added || last.start + last.added < start - last.added + last.old.length) | |||
|
1889 | this.done.push({start: start, added: added, old: old}); | |||
|
1890 | else { | |||
|
1891 | var oldoff = 0; | |||
|
1892 | if (start < last.start) { | |||
|
1893 | for (var i = last.start - start - 1; i >= 0; --i) | |||
|
1894 | last.old.unshift(old[i]); | |||
|
1895 | last.added += last.start - start; | |||
|
1896 | last.start = start; | |||
|
1897 | } | |||
|
1898 | else if (last.start < start) { | |||
|
1899 | oldoff = start - last.start; | |||
|
1900 | added += oldoff; | |||
|
1901 | } | |||
|
1902 | for (var i = last.added - oldoff, e = old.length; i < e; ++i) | |||
|
1903 | last.old.push(old[i]); | |||
|
1904 | if (last.added < added) last.added = added; | |||
|
1905 | } | |||
|
1906 | this.time = time; | |||
|
1907 | } | |||
|
1908 | }; | |||
|
1909 | ||||
|
1910 | function stopMethod() {e_stop(this);} | |||
|
1911 | // Ensure an event has a stop method. | |||
|
1912 | function addStop(event) { | |||
|
1913 | if (!event.stop) event.stop = stopMethod; | |||
|
1914 | return event; | |||
|
1915 | } | |||
|
1916 | ||||
|
1917 | function e_preventDefault(e) { | |||
|
1918 | if (e.preventDefault) e.preventDefault(); | |||
|
1919 | else e.returnValue = false; | |||
|
1920 | } | |||
|
1921 | function e_stopPropagation(e) { | |||
|
1922 | if (e.stopPropagation) e.stopPropagation(); | |||
|
1923 | else e.cancelBubble = true; | |||
|
1924 | } | |||
|
1925 | function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} | |||
|
1926 | function e_target(e) {return e.target || e.srcElement;} | |||
|
1927 | function e_button(e) { | |||
|
1928 | if (e.which) return e.which; | |||
|
1929 | else if (e.button & 1) return 1; | |||
|
1930 | else if (e.button & 2) return 3; | |||
|
1931 | else if (e.button & 4) return 2; | |||
|
1932 | } | |||
|
1933 | function e_pageX(e) { | |||
|
1934 | if (e.pageX != null) return e.pageX; | |||
|
1935 | var doc = e_target(e).ownerDocument; | |||
|
1936 | return e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; | |||
|
1937 | } | |||
|
1938 | function e_pageY(e) { | |||
|
1939 | if (e.pageY != null) return e.pageY; | |||
|
1940 | var doc = e_target(e).ownerDocument; | |||
|
1941 | return e.clientY + doc.body.scrollTop + doc.documentElement.scrollTop; | |||
|
1942 | } | |||
|
1943 | ||||
|
1944 | // Event handler registration. If disconnect is true, it'll return a | |||
|
1945 | // function that unregisters the handler. | |||
|
1946 | function connect(node, type, handler, disconnect) { | |||
|
1947 | function wrapHandler(event) {handler(event || window.event);} | |||
|
1948 | if (typeof node.addEventListener == "function") { | |||
|
1949 | node.addEventListener(type, wrapHandler, false); | |||
|
1950 | if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);}; | |||
|
1951 | } | |||
|
1952 | else { | |||
|
1953 | node.attachEvent("on" + type, wrapHandler); | |||
|
1954 | if (disconnect) return function() {node.detachEvent("on" + type, wrapHandler);}; | |||
|
1955 | } | |||
|
1956 | } | |||
|
1957 | ||||
|
1958 | function Delayed() {this.id = null;} | |||
|
1959 | Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}}; | |||
|
1960 | ||||
|
1961 | // Some IE versions don't preserve whitespace when setting the | |||
|
1962 | // innerHTML of a PRE tag. | |||
|
1963 | var badInnerHTML = (function() { | |||
|
1964 | var pre = document.createElement("pre"); | |||
|
1965 | pre.innerHTML = " "; return !pre.innerHTML; | |||
|
1966 | })(); | |||
|
1967 | ||||
|
1968 | var gecko = /gecko\/\d{7}/i.test(navigator.userAgent); | |||
|
1969 | var ie = /MSIE \d/.test(navigator.userAgent); | |||
|
1970 | var safari = /Apple Computer/.test(navigator.vendor); | |||
|
1971 | ||||
|
1972 | var lineSep = "\n"; | |||
|
1973 | // Feature-detect whether newlines in textareas are converted to \r\n | |||
|
1974 | (function () { | |||
|
1975 | var te = document.createElement("textarea"); | |||
|
1976 | te.value = "foo\nbar"; | |||
|
1977 | if (te.value.indexOf("\r") > -1) lineSep = "\r\n"; | |||
|
1978 | }()); | |||
|
1979 | ||||
|
1980 | var tabSize = 8; | |||
|
1981 | var mac = /Mac/.test(navigator.platform); | |||
|
1982 | var movementKeys = {}; | |||
|
1983 | for (var i = 35; i <= 40; ++i) | |||
|
1984 | movementKeys[i] = movementKeys["c" + i] = true; | |||
|
1985 | ||||
|
1986 | // Counts the column offset in a string, taking tabs into account. | |||
|
1987 | // Used mostly to find indentation. | |||
|
1988 | function countColumn(string, end) { | |||
|
1989 | if (end == null) { | |||
|
1990 | end = string.search(/[^\s\u00a0]/); | |||
|
1991 | if (end == -1) end = string.length; | |||
|
1992 | } | |||
|
1993 | for (var i = 0, n = 0; i < end; ++i) { | |||
|
1994 | if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); | |||
|
1995 | else ++n; | |||
|
1996 | } | |||
|
1997 | return n; | |||
|
1998 | } | |||
|
1999 | ||||
|
2000 | function computedStyle(elt) { | |||
|
2001 | if (elt.currentStyle) return elt.currentStyle; | |||
|
2002 | return window.getComputedStyle(elt, null); | |||
|
2003 | } | |||
|
2004 | // Find the position of an element by following the offsetParent chain. | |||
|
2005 | // If screen==true, it returns screen (rather than page) coordinates. | |||
|
2006 | function eltOffset(node, screen) { | |||
|
2007 | var doc = node.ownerDocument.body; | |||
|
2008 | var x = 0, y = 0, skipDoc = false; | |||
|
2009 | for (var n = node; n; n = n.offsetParent) { | |||
|
2010 | x += n.offsetLeft; y += n.offsetTop; | |||
|
2011 | if (screen && computedStyle(n).position == "fixed") | |||
|
2012 | skipDoc = true; | |||
|
2013 | } | |||
|
2014 | var e = screen && !skipDoc ? null : doc; | |||
|
2015 | for (var n = node.parentNode; n != e; n = n.parentNode) | |||
|
2016 | if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;} | |||
|
2017 | return {left: x, top: y}; | |||
|
2018 | } | |||
|
2019 | // Get a node's text content. | |||
|
2020 | function eltText(node) { | |||
|
2021 | return node.textContent || node.innerText || node.nodeValue || ""; | |||
|
2022 | } | |||
|
2023 | ||||
|
2024 | // Operations on {line, ch} objects. | |||
|
2025 | function posEq(a, b) {return a.line == b.line && a.ch == b.ch;} | |||
|
2026 | function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} | |||
|
2027 | function copyPos(x) {return {line: x.line, ch: x.ch};} | |||
|
2028 | ||||
|
2029 | var escapeElement = document.createElement("div"); | |||
|
2030 | function htmlEscape(str) { | |||
|
2031 | escapeElement.innerText = escapeElement.textContent = str; | |||
|
2032 | return escapeElement.innerHTML; | |||
|
2033 | } | |||
|
2034 | CodeMirror.htmlEscape = htmlEscape; | |||
|
2035 | ||||
|
2036 | // Used to position the cursor after an undo/redo by finding the | |||
|
2037 | // last edited character. | |||
|
2038 | function editEnd(from, to) { | |||
|
2039 | if (!to) return from ? from.length : 0; | |||
|
2040 | if (!from) return to.length; | |||
|
2041 | for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j) | |||
|
2042 | if (from.charAt(i) != to.charAt(j)) break; | |||
|
2043 | return j + 1; | |||
|
2044 | } | |||
|
2045 | ||||
|
2046 | function indexOf(collection, elt) { | |||
|
2047 | if (collection.indexOf) return collection.indexOf(elt); | |||
|
2048 | for (var i = 0, e = collection.length; i < e; ++i) | |||
|
2049 | if (collection[i] == elt) return i; | |||
|
2050 | return -1; | |||
|
2051 | } | |||
|
2052 | ||||
|
2053 | // See if "".split is the broken IE version, if so, provide an | |||
|
2054 | // alternative way to split lines. | |||
|
2055 | var splitLines, selRange, setSelRange; | |||
|
2056 | if ("\n\nb".split(/\n/).length != 3) | |||
|
2057 | splitLines = function(string) { | |||
|
2058 | var pos = 0, nl, result = []; | |||
|
2059 | while ((nl = string.indexOf("\n", pos)) > -1) { | |||
|
2060 | result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl)); | |||
|
2061 | pos = nl + 1; | |||
|
2062 | } | |||
|
2063 | result.push(string.slice(pos)); | |||
|
2064 | return result; | |||
|
2065 | }; | |||
|
2066 | else | |||
|
2067 | splitLines = function(string){return string.split(/\r?\n/);}; | |||
|
2068 | CodeMirror.splitLines = splitLines; | |||
|
2069 | ||||
|
2070 | // Sane model of finding and setting the selection in a textarea | |||
|
2071 | if (window.getSelection) { | |||
|
2072 | selRange = function(te) { | |||
|
2073 | try {return {start: te.selectionStart, end: te.selectionEnd};} | |||
|
2074 | catch(e) {return null;} | |||
|
2075 | }; | |||
|
2076 | if (safari) | |||
|
2077 | // On Safari, selection set with setSelectionRange are in a sort | |||
|
2078 | // of limbo wrt their anchor. If you press shift-left in them, | |||
|
2079 | // the anchor is put at the end, and the selection expanded to | |||
|
2080 | // the left. If you press shift-right, the anchor ends up at the | |||
|
2081 | // front. This is not what CodeMirror wants, so it does a | |||
|
2082 | // spurious modify() call to get out of limbo. | |||
|
2083 | setSelRange = function(te, start, end) { | |||
|
2084 | if (start == end) | |||
|
2085 | te.setSelectionRange(start, end); | |||
|
2086 | else { | |||
|
2087 | te.setSelectionRange(start, end - 1); | |||
|
2088 | window.getSelection().modify("extend", "forward", "character"); | |||
|
2089 | } | |||
|
2090 | }; | |||
|
2091 | else | |||
|
2092 | setSelRange = function(te, start, end) { | |||
|
2093 | try {te.setSelectionRange(start, end);} | |||
|
2094 | catch(e) {} // Fails on Firefox when textarea isn't part of the document | |||
|
2095 | }; | |||
|
2096 | } | |||
|
2097 | // IE model. Don't ask. | |||
|
2098 | else { | |||
|
2099 | selRange = function(te) { | |||
|
2100 | try {var range = te.ownerDocument.selection.createRange();} | |||
|
2101 | catch(e) {return null;} | |||
|
2102 | if (!range || range.parentElement() != te) return null; | |||
|
2103 | var val = te.value, len = val.length, localRange = te.createTextRange(); | |||
|
2104 | localRange.moveToBookmark(range.getBookmark()); | |||
|
2105 | var endRange = te.createTextRange(); | |||
|
2106 | endRange.collapse(false); | |||
|
2107 | ||||
|
2108 | if (localRange.compareEndPoints("StartToEnd", endRange) > -1) | |||
|
2109 | return {start: len, end: len}; | |||
|
2110 | ||||
|
2111 | var start = -localRange.moveStart("character", -len); | |||
|
2112 | for (var i = val.indexOf("\r"); i > -1 && i < start; i = val.indexOf("\r", i+1), start++) {} | |||
|
2113 | ||||
|
2114 | if (localRange.compareEndPoints("EndToEnd", endRange) > -1) | |||
|
2115 | return {start: start, end: len}; | |||
|
2116 | ||||
|
2117 | var end = -localRange.moveEnd("character", -len); | |||
|
2118 | for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {} | |||
|
2119 | return {start: start, end: end}; | |||
|
2120 | }; | |||
|
2121 | setSelRange = function(te, start, end) { | |||
|
2122 | var range = te.createTextRange(); | |||
|
2123 | range.collapse(true); | |||
|
2124 | var endrange = range.duplicate(); | |||
|
2125 | var newlines = 0, txt = te.value; | |||
|
2126 | for (var pos = txt.indexOf("\n"); pos > -1 && pos < start; pos = txt.indexOf("\n", pos + 1)) | |||
|
2127 | ++newlines; | |||
|
2128 | range.move("character", start - newlines); | |||
|
2129 | for (; pos > -1 && pos < end; pos = txt.indexOf("\n", pos + 1)) | |||
|
2130 | ++newlines; | |||
|
2131 | endrange.move("character", end - newlines); | |||
|
2132 | range.setEndPoint("EndToEnd", endrange); | |||
|
2133 | range.select(); | |||
|
2134 | }; | |||
|
2135 | } | |||
|
2136 | ||||
|
2137 | CodeMirror.defineMode("null", function() { | |||
|
2138 | return {token: function(stream) {stream.skipToEnd();}}; | |||
|
2139 | }); | |||
|
2140 | CodeMirror.defineMIME("text/plain", "null"); | |||
|
2141 | ||||
|
2142 | return CodeMirror; | |||
|
2143 | })() | |||
|
2144 | ; No newline at end of file |
@@ -0,0 +1,51 b'' | |||||
|
1 | // Utility function that allows modes to be combined. The mode given | |||
|
2 | // as the base argument takes care of most of the normal mode | |||
|
3 | // functionality, but a second (typically simple) mode is used, which | |||
|
4 | // can override the style of text. Both modes get to parse all of the | |||
|
5 | // text, but when both assign a non-null style to a piece of code, the | |||
|
6 | // overlay wins, unless the combine argument was true, in which case | |||
|
7 | // the styles are combined. | |||
|
8 | ||||
|
9 | CodeMirror.overlayParser = function(base, overlay, combine) { | |||
|
10 | return { | |||
|
11 | startState: function() { | |||
|
12 | return { | |||
|
13 | base: CodeMirror.startState(base), | |||
|
14 | overlay: CodeMirror.startState(overlay), | |||
|
15 | basePos: 0, baseCur: null, | |||
|
16 | overlayPos: 0, overlayCur: null | |||
|
17 | }; | |||
|
18 | }, | |||
|
19 | copyState: function(state) { | |||
|
20 | return { | |||
|
21 | base: CodeMirror.copyState(base, state.base), | |||
|
22 | overlay: CodeMirror.copyState(overlay, state.overlay), | |||
|
23 | basePos: state.basePos, baseCur: null, | |||
|
24 | overlayPos: state.overlayPos, overlayCur: null | |||
|
25 | }; | |||
|
26 | }, | |||
|
27 | ||||
|
28 | token: function(stream, state) { | |||
|
29 | if (stream.start == state.basePos) { | |||
|
30 | state.baseCur = base.token(stream, state.base); | |||
|
31 | state.basePos = stream.pos; | |||
|
32 | } | |||
|
33 | if (stream.start == state.overlayPos) { | |||
|
34 | stream.pos = stream.start; | |||
|
35 | state.overlayCur = overlay.token(stream, state.overlay); | |||
|
36 | state.overlayPos = stream.pos; | |||
|
37 | } | |||
|
38 | stream.pos = Math.min(state.basePos, state.overlayPos); | |||
|
39 | if (stream.eol()) state.basePos = state.overlayPos = 0; | |||
|
40 | ||||
|
41 | if (state.overlayCur == null) return state.baseCur; | |||
|
42 | if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur; | |||
|
43 | else return state.overlayCur; | |||
|
44 | }, | |||
|
45 | ||||
|
46 | indent: function(state, textAfter) { | |||
|
47 | return base.indent(state.base, textAfter); | |||
|
48 | }, | |||
|
49 | electricChars: base.electricChars | |||
|
50 | }; | |||
|
51 | }; |
@@ -0,0 +1,27 b'' | |||||
|
1 | CodeMirror.runMode = function(string, modespec, callback) { | |||
|
2 | var mode = CodeMirror.getMode({indentUnit: 2}, modespec); | |||
|
3 | var isNode = callback.nodeType == 1; | |||
|
4 | if (isNode) { | |||
|
5 | var node = callback, accum = []; | |||
|
6 | callback = function(string, style) { | |||
|
7 | if (string == "\n") | |||
|
8 | accum.push("<br>"); | |||
|
9 | else if (style) | |||
|
10 | accum.push("<span class=\"cm-" + CodeMirror.htmlEscape(style) + "\">" + CodeMirror.htmlEscape(string) + "</span>"); | |||
|
11 | else | |||
|
12 | accum.push(CodeMirror.htmlEscape(string)); | |||
|
13 | } | |||
|
14 | } | |||
|
15 | var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); | |||
|
16 | for (var i = 0, e = lines.length; i < e; ++i) { | |||
|
17 | if (i) callback("\n"); | |||
|
18 | var stream = new CodeMirror.StringStream(lines[i]); | |||
|
19 | while (!stream.eol()) { | |||
|
20 | var style = mode.token(stream, state); | |||
|
21 | callback(stream.current(), style); | |||
|
22 | stream.start = stream.pos; | |||
|
23 | } | |||
|
24 | } | |||
|
25 | if (isNode) | |||
|
26 | node.innerHTML = accum.join(""); | |||
|
27 | }; |
@@ -0,0 +1,124 b'' | |||||
|
1 | CodeMirror.defineMode("css", function(config) { | |||
|
2 | var indentUnit = config.indentUnit, type; | |||
|
3 | function ret(style, tp) {type = tp; return style;} | |||
|
4 | ||||
|
5 | function tokenBase(stream, state) { | |||
|
6 | var ch = stream.next(); | |||
|
7 | if (ch == "@") {stream.eatWhile(/\w/); return ret("meta", stream.current());} | |||
|
8 | else if (ch == "/" && stream.eat("*")) { | |||
|
9 | state.tokenize = tokenCComment; | |||
|
10 | return tokenCComment(stream, state); | |||
|
11 | } | |||
|
12 | else if (ch == "<" && stream.eat("!")) { | |||
|
13 | state.tokenize = tokenSGMLComment; | |||
|
14 | return tokenSGMLComment(stream, state); | |||
|
15 | } | |||
|
16 | else if (ch == "=") ret(null, "compare"); | |||
|
17 | else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); | |||
|
18 | else if (ch == "\"" || ch == "'") { | |||
|
19 | state.tokenize = tokenString(ch); | |||
|
20 | return state.tokenize(stream, state); | |||
|
21 | } | |||
|
22 | else if (ch == "#") { | |||
|
23 | stream.eatWhile(/\w/); | |||
|
24 | return ret("atom", "hash"); | |||
|
25 | } | |||
|
26 | else if (ch == "!") { | |||
|
27 | stream.match(/^\s*\w*/); | |||
|
28 | return ret("keyword", "important"); | |||
|
29 | } | |||
|
30 | else if (/\d/.test(ch)) { | |||
|
31 | stream.eatWhile(/[\w.%]/); | |||
|
32 | return ret("number", "unit"); | |||
|
33 | } | |||
|
34 | else if (/[,.+>*\/]/.test(ch)) { | |||
|
35 | return ret(null, "select-op"); | |||
|
36 | } | |||
|
37 | else if (/[;{}:\[\]]/.test(ch)) { | |||
|
38 | return ret(null, ch); | |||
|
39 | } | |||
|
40 | else { | |||
|
41 | stream.eatWhile(/[\w\\\-_]/); | |||
|
42 | return ret("variable", "variable"); | |||
|
43 | } | |||
|
44 | } | |||
|
45 | ||||
|
46 | function tokenCComment(stream, state) { | |||
|
47 | var maybeEnd = false, ch; | |||
|
48 | while ((ch = stream.next()) != null) { | |||
|
49 | if (maybeEnd && ch == "/") { | |||
|
50 | state.tokenize = tokenBase; | |||
|
51 | break; | |||
|
52 | } | |||
|
53 | maybeEnd = (ch == "*"); | |||
|
54 | } | |||
|
55 | return ret("comment", "comment"); | |||
|
56 | } | |||
|
57 | ||||
|
58 | function tokenSGMLComment(stream, state) { | |||
|
59 | var dashes = 0, ch; | |||
|
60 | while ((ch = stream.next()) != null) { | |||
|
61 | if (dashes >= 2 && ch == ">") { | |||
|
62 | state.tokenize = tokenBase; | |||
|
63 | break; | |||
|
64 | } | |||
|
65 | dashes = (ch == "-") ? dashes + 1 : 0; | |||
|
66 | } | |||
|
67 | return ret("comment", "comment"); | |||
|
68 | } | |||
|
69 | ||||
|
70 | function tokenString(quote) { | |||
|
71 | return function(stream, state) { | |||
|
72 | var escaped = false, ch; | |||
|
73 | while ((ch = stream.next()) != null) { | |||
|
74 | if (ch == quote && !escaped) | |||
|
75 | break; | |||
|
76 | escaped = !escaped && ch == "\\"; | |||
|
77 | } | |||
|
78 | if (!escaped) state.tokenize = tokenBase; | |||
|
79 | return ret("string", "string"); | |||
|
80 | }; | |||
|
81 | } | |||
|
82 | ||||
|
83 | return { | |||
|
84 | startState: function(base) { | |||
|
85 | return {tokenize: tokenBase, | |||
|
86 | baseIndent: base || 0, | |||
|
87 | stack: []}; | |||
|
88 | }, | |||
|
89 | ||||
|
90 | token: function(stream, state) { | |||
|
91 | if (stream.eatSpace()) return null; | |||
|
92 | var style = state.tokenize(stream, state); | |||
|
93 | ||||
|
94 | var context = state.stack[state.stack.length-1]; | |||
|
95 | if (type == "hash" && context == "rule") style = "atom"; | |||
|
96 | else if (style == "variable") { | |||
|
97 | if (context == "rule") style = "number"; | |||
|
98 | else if (!context || context == "@media{") style = "tag"; | |||
|
99 | } | |||
|
100 | ||||
|
101 | if (context == "rule" && /^[\{\};]$/.test(type)) | |||
|
102 | state.stack.pop(); | |||
|
103 | if (type == "{") { | |||
|
104 | if (context == "@media") state.stack[state.stack.length-1] = "@media{"; | |||
|
105 | else state.stack.push("{"); | |||
|
106 | } | |||
|
107 | else if (type == "}") state.stack.pop(); | |||
|
108 | else if (type == "@media") state.stack.push("@media"); | |||
|
109 | else if (context == "{" && type != "comment") state.stack.push("rule"); | |||
|
110 | return style; | |||
|
111 | }, | |||
|
112 | ||||
|
113 | indent: function(state, textAfter) { | |||
|
114 | var n = state.stack.length; | |||
|
115 | if (/^\}/.test(textAfter)) | |||
|
116 | n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; | |||
|
117 | return state.baseIndent + n * indentUnit; | |||
|
118 | }, | |||
|
119 | ||||
|
120 | electricChars: "}" | |||
|
121 | }; | |||
|
122 | }); | |||
|
123 | ||||
|
124 | CodeMirror.defineMIME("text/css", "css"); |
@@ -0,0 +1,56 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: CSS mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="css.js"></script> | |||
|
8 | <link rel="stylesheet" href="../../theme/default.css"> | |||
|
9 | <style>.CodeMirror {background: #f8f8f8;}</style> | |||
|
10 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
11 | </head> | |||
|
12 | <body> | |||
|
13 | <h1>CodeMirror 2: CSS mode</h1> | |||
|
14 | <form><textarea id="code" name="code"> | |||
|
15 | /* Some example CSS */ | |||
|
16 | ||||
|
17 | @import url("something.css"); | |||
|
18 | ||||
|
19 | body { | |||
|
20 | margin: 0; | |||
|
21 | padding: 3em 6em; | |||
|
22 | font-family: tahoma, arial, sans-serif; | |||
|
23 | color: #000; | |||
|
24 | } | |||
|
25 | ||||
|
26 | #navigation a { | |||
|
27 | font-weight: bold; | |||
|
28 | text-decoration: none !important; | |||
|
29 | } | |||
|
30 | ||||
|
31 | h1 { | |||
|
32 | font-size: 2.5em; | |||
|
33 | } | |||
|
34 | ||||
|
35 | h2 { | |||
|
36 | font-size: 1.7em; | |||
|
37 | } | |||
|
38 | ||||
|
39 | h1:before, h2:before { | |||
|
40 | content: "::"; | |||
|
41 | } | |||
|
42 | ||||
|
43 | code { | |||
|
44 | font-family: courier, monospace; | |||
|
45 | font-size: 80%; | |||
|
46 | color: #418A8A; | |||
|
47 | } | |||
|
48 | </textarea></form> | |||
|
49 | <script> | |||
|
50 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), {}); | |||
|
51 | </script> | |||
|
52 | ||||
|
53 | <p><strong>MIME types defined:</strong> <code>text/css</code>.</p> | |||
|
54 | ||||
|
55 | </body> | |||
|
56 | </html> |
@@ -0,0 +1,79 b'' | |||||
|
1 | CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { | |||
|
2 | var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true}); | |||
|
3 | var jsMode = CodeMirror.getMode(config, "javascript"); | |||
|
4 | var cssMode = CodeMirror.getMode(config, "css"); | |||
|
5 | ||||
|
6 | function html(stream, state) { | |||
|
7 | var style = htmlMode.token(stream, state.htmlState); | |||
|
8 | if (style == "tag" && stream.current() == ">" && state.htmlState.context) { | |||
|
9 | if (/^script$/i.test(state.htmlState.context.tagName)) { | |||
|
10 | state.token = javascript; | |||
|
11 | state.localState = jsMode.startState(htmlMode.indent(state.htmlState, "")); | |||
|
12 | state.mode = "javascript"; | |||
|
13 | } | |||
|
14 | else if (/^style$/i.test(state.htmlState.context.tagName)) { | |||
|
15 | state.token = css; | |||
|
16 | state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); | |||
|
17 | state.mode = "css"; | |||
|
18 | } | |||
|
19 | } | |||
|
20 | return style; | |||
|
21 | } | |||
|
22 | function maybeBackup(stream, pat, style) { | |||
|
23 | var cur = stream.current(); | |||
|
24 | var close = cur.search(pat); | |||
|
25 | if (close > -1) stream.backUp(cur.length - close); | |||
|
26 | return style; | |||
|
27 | } | |||
|
28 | function javascript(stream, state) { | |||
|
29 | if (stream.match(/^<\/\s*script\s*>/i, false)) { | |||
|
30 | state.token = html; | |||
|
31 | state.curState = null; | |||
|
32 | state.mode = "html"; | |||
|
33 | return html(stream, state); | |||
|
34 | } | |||
|
35 | return maybeBackup(stream, /<\/\s*script\s*>/, | |||
|
36 | jsMode.token(stream, state.localState)); | |||
|
37 | } | |||
|
38 | function css(stream, state) { | |||
|
39 | if (stream.match(/^<\/\s*style\s*>/i, false)) { | |||
|
40 | state.token = html; | |||
|
41 | state.localState = null; | |||
|
42 | state.mode = "html"; | |||
|
43 | return html(stream, state); | |||
|
44 | } | |||
|
45 | return maybeBackup(stream, /<\/\s*style\s*>/, | |||
|
46 | cssMode.token(stream, state.localState)); | |||
|
47 | } | |||
|
48 | ||||
|
49 | return { | |||
|
50 | startState: function() { | |||
|
51 | var state = htmlMode.startState(); | |||
|
52 | return {token: html, localState: null, mode: "html", htmlState: state}; | |||
|
53 | }, | |||
|
54 | ||||
|
55 | copyState: function(state) { | |||
|
56 | if (state.localState) | |||
|
57 | var local = CodeMirror.copyState(state.token == css ? cssMode : jsMode, state.localState); | |||
|
58 | return {token: state.token, localState: local, mode: state.mode, | |||
|
59 | htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; | |||
|
60 | }, | |||
|
61 | ||||
|
62 | token: function(stream, state) { | |||
|
63 | return state.token(stream, state); | |||
|
64 | }, | |||
|
65 | ||||
|
66 | indent: function(state, textAfter) { | |||
|
67 | if (state.token == html || /^\s*<\//.test(textAfter)) | |||
|
68 | return htmlMode.indent(state.htmlState, textAfter); | |||
|
69 | else if (state.token == javascript) | |||
|
70 | return jsMode.indent(state.localState, textAfter); | |||
|
71 | else | |||
|
72 | return cssMode.indent(state.localState, textAfter); | |||
|
73 | }, | |||
|
74 | ||||
|
75 | electricChars: "/{}:" | |||
|
76 | } | |||
|
77 | }); | |||
|
78 | ||||
|
79 | CodeMirror.defineMIME("text/html", "htmlmixed"); |
@@ -0,0 +1,52 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: HTML mixed mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="../xml/xml.js"></script> | |||
|
8 | <script src="../javascript/javascript.js"></script> | |||
|
9 | <script src="../css/css.js"></script> | |||
|
10 | <link rel="stylesheet" href="../../theme/default.css"> | |||
|
11 | <script src="htmlmixed.js"></script> | |||
|
12 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
13 | <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |||
|
14 | </head> | |||
|
15 | <body> | |||
|
16 | <h1>CodeMirror 2: HTML mixed mode</h1> | |||
|
17 | <form><textarea id="code" name="code"> | |||
|
18 | <html style="color: green"> | |||
|
19 | <!-- this is a comment --> | |||
|
20 | <head> | |||
|
21 | <title>Mixed HTML Example</title> | |||
|
22 | <style type="text/css"> | |||
|
23 | h1 {font-family: comic sans; color: #f0f;} | |||
|
24 | div {background: yellow !important;} | |||
|
25 | body { | |||
|
26 | max-width: 50em; | |||
|
27 | margin: 1em 2em 1em 5em; | |||
|
28 | } | |||
|
29 | </style> | |||
|
30 | </head> | |||
|
31 | <body> | |||
|
32 | <h1>Mixed HTML Example</h1> | |||
|
33 | <script> | |||
|
34 | function jsFunc(arg1, arg2) { | |||
|
35 | if (arg1 && arg2) document.body.innerHTML = "achoo"; | |||
|
36 | } | |||
|
37 | </script> | |||
|
38 | </body> | |||
|
39 | </html> | |||
|
40 | </textarea></form> | |||
|
41 | <script> | |||
|
42 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "text/html", tabMode: "indent"}); | |||
|
43 | </script> | |||
|
44 | ||||
|
45 | <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p> | |||
|
46 | ||||
|
47 | <p><strong>MIME types defined:</strong> <code>text/html</code> | |||
|
48 | (redefined, only takes effect if you load this parser after the | |||
|
49 | XML parser).</p> | |||
|
50 | ||||
|
51 | </body> | |||
|
52 | </html> |
@@ -0,0 +1,78 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: JavaScript mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="javascript.js"></script> | |||
|
8 | <link rel="stylesheet" href="../../theme/default.css"> | |||
|
9 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
10 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |||
|
11 | </head> | |||
|
12 | <body> | |||
|
13 | <h1>CodeMirror 2: JavaScript mode</h1> | |||
|
14 | ||||
|
15 | <div><textarea id="code" name="code"> | |||
|
16 | // Demo code (the actual new parser character stream implementation) | |||
|
17 | ||||
|
18 | function StringStream(string) { | |||
|
19 | this.pos = 0; | |||
|
20 | this.string = string; | |||
|
21 | } | |||
|
22 | ||||
|
23 | StringStream.prototype = { | |||
|
24 | done: function() {return this.pos >= this.string.length;}, | |||
|
25 | peek: function() {return this.string.charAt(this.pos);}, | |||
|
26 | next: function() { | |||
|
27 | if (this.pos < this.string.length) | |||
|
28 | return this.string.charAt(this.pos++); | |||
|
29 | }, | |||
|
30 | eat: function(match) { | |||
|
31 | var ch = this.string.charAt(this.pos); | |||
|
32 | if (typeof match == "string") var ok = ch == match; | |||
|
33 | else var ok = ch && match.test ? match.test(ch) : match(ch); | |||
|
34 | if (ok) {this.pos++; return ch;} | |||
|
35 | }, | |||
|
36 | eatWhile: function(match) { | |||
|
37 | var start = this.pos; | |||
|
38 | while (this.eat(match)); | |||
|
39 | if (this.pos > start) return this.string.slice(start, this.pos); | |||
|
40 | }, | |||
|
41 | backUp: function(n) {this.pos -= n;}, | |||
|
42 | column: function() {return this.pos;}, | |||
|
43 | eatSpace: function() { | |||
|
44 | var start = this.pos; | |||
|
45 | while (/\s/.test(this.string.charAt(this.pos))) this.pos++; | |||
|
46 | return this.pos - start; | |||
|
47 | }, | |||
|
48 | match: function(pattern, consume, caseInsensitive) { | |||
|
49 | if (typeof pattern == "string") { | |||
|
50 | function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} | |||
|
51 | if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { | |||
|
52 | if (consume !== false) this.pos += str.length; | |||
|
53 | return true; | |||
|
54 | } | |||
|
55 | } | |||
|
56 | else { | |||
|
57 | var match = this.string.slice(this.pos).match(pattern); | |||
|
58 | if (match && consume !== false) this.pos += match[0].length; | |||
|
59 | return match; | |||
|
60 | } | |||
|
61 | } | |||
|
62 | }; | |||
|
63 | </textarea></div> | |||
|
64 | ||||
|
65 | <script> | |||
|
66 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | |||
|
67 | lineNumbers: true, | |||
|
68 | matchBrackets: true | |||
|
69 | }); | |||
|
70 | </script> | |||
|
71 | ||||
|
72 | <p>JavaScript mode supports a single configuration | |||
|
73 | option, <code>json</code>, which will set the mode to expect JSON | |||
|
74 | data rather than a JavaScript program.</p> | |||
|
75 | ||||
|
76 | <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>.</p> | |||
|
77 | </body> | |||
|
78 | </html> |
@@ -0,0 +1,348 b'' | |||||
|
1 | CodeMirror.defineMode("javascript", function(config, parserConfig) { | |||
|
2 | var indentUnit = config.indentUnit; | |||
|
3 | var jsonMode = parserConfig.json; | |||
|
4 | ||||
|
5 | // Tokenizer | |||
|
6 | ||||
|
7 | var keywords = function(){ | |||
|
8 | function kw(type) {return {type: type, style: "keyword"};} | |||
|
9 | var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); | |||
|
10 | var operator = kw("operator"), atom = {type: "atom", style: "atom"}; | |||
|
11 | return { | |||
|
12 | "if": A, "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, | |||
|
13 | "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, | |||
|
14 | "var": kw("var"), "function": kw("function"), "catch": kw("catch"), | |||
|
15 | "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), | |||
|
16 | "in": operator, "typeof": operator, "instanceof": operator, | |||
|
17 | "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom | |||
|
18 | }; | |||
|
19 | }(); | |||
|
20 | ||||
|
21 | var isOperatorChar = /[+\-*&%=<>!?|]/; | |||
|
22 | ||||
|
23 | function chain(stream, state, f) { | |||
|
24 | state.tokenize = f; | |||
|
25 | return f(stream, state); | |||
|
26 | } | |||
|
27 | ||||
|
28 | function nextUntilUnescaped(stream, end) { | |||
|
29 | var escaped = false, next; | |||
|
30 | while ((next = stream.next()) != null) { | |||
|
31 | if (next == end && !escaped) | |||
|
32 | return false; | |||
|
33 | escaped = !escaped && next == "\\"; | |||
|
34 | } | |||
|
35 | return escaped; | |||
|
36 | } | |||
|
37 | ||||
|
38 | // Used as scratch variables to communicate multiple values without | |||
|
39 | // consing up tons of objects. | |||
|
40 | var type, content; | |||
|
41 | function ret(tp, style, cont) { | |||
|
42 | type = tp; content = cont; | |||
|
43 | return style; | |||
|
44 | } | |||
|
45 | ||||
|
46 | function jsTokenBase(stream, state) { | |||
|
47 | var ch = stream.next(); | |||
|
48 | if (ch == '"' || ch == "'") | |||
|
49 | return chain(stream, state, jsTokenString(ch)); | |||
|
50 | else if (/[\[\]{}\(\),;\:\.]/.test(ch)) | |||
|
51 | return ret(ch); | |||
|
52 | else if (ch == "0" && stream.eat(/x/i)) { | |||
|
53 | stream.eatWhile(/[\da-f]/i); | |||
|
54 | return ret("number", "number"); | |||
|
55 | } | |||
|
56 | else if (/\d/.test(ch)) { | |||
|
57 | stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/); | |||
|
58 | return ret("number", "number"); | |||
|
59 | } | |||
|
60 | else if (ch == "/") { | |||
|
61 | if (stream.eat("*")) { | |||
|
62 | return chain(stream, state, jsTokenComment); | |||
|
63 | } | |||
|
64 | else if (stream.eat("/")) { | |||
|
65 | stream.skipToEnd(); | |||
|
66 | return ret("comment", "comment"); | |||
|
67 | } | |||
|
68 | else if (state.reAllowed) { | |||
|
69 | nextUntilUnescaped(stream, "/"); | |||
|
70 | stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla | |||
|
71 | return ret("regexp", "string"); | |||
|
72 | } | |||
|
73 | else { | |||
|
74 | stream.eatWhile(isOperatorChar); | |||
|
75 | return ret("operator", null, stream.current()); | |||
|
76 | } | |||
|
77 | } | |||
|
78 | else if (isOperatorChar.test(ch)) { | |||
|
79 | stream.eatWhile(isOperatorChar); | |||
|
80 | return ret("operator", null, stream.current()); | |||
|
81 | } | |||
|
82 | else { | |||
|
83 | stream.eatWhile(/[\w\$_]/); | |||
|
84 | var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; | |||
|
85 | return known ? ret(known.type, known.style, word) : | |||
|
86 | ret("variable", "variable", word); | |||
|
87 | } | |||
|
88 | } | |||
|
89 | ||||
|
90 | function jsTokenString(quote) { | |||
|
91 | return function(stream, state) { | |||
|
92 | if (!nextUntilUnescaped(stream, quote)) | |||
|
93 | state.tokenize = jsTokenBase; | |||
|
94 | return ret("string", "string"); | |||
|
95 | }; | |||
|
96 | } | |||
|
97 | ||||
|
98 | function jsTokenComment(stream, state) { | |||
|
99 | var maybeEnd = false, ch; | |||
|
100 | while (ch = stream.next()) { | |||
|
101 | if (ch == "/" && maybeEnd) { | |||
|
102 | state.tokenize = jsTokenBase; | |||
|
103 | break; | |||
|
104 | } | |||
|
105 | maybeEnd = (ch == "*"); | |||
|
106 | } | |||
|
107 | return ret("comment", "comment"); | |||
|
108 | } | |||
|
109 | ||||
|
110 | // Parser | |||
|
111 | ||||
|
112 | var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; | |||
|
113 | ||||
|
114 | function JSLexical(indented, column, type, align, prev, info) { | |||
|
115 | this.indented = indented; | |||
|
116 | this.column = column; | |||
|
117 | this.type = type; | |||
|
118 | this.prev = prev; | |||
|
119 | this.info = info; | |||
|
120 | if (align != null) this.align = align; | |||
|
121 | } | |||
|
122 | ||||
|
123 | function inScope(state, varname) { | |||
|
124 | for (var v = state.localVars; v; v = v.next) | |||
|
125 | if (v.name == varname) return true; | |||
|
126 | } | |||
|
127 | ||||
|
128 | function parseJS(state, style, type, content, stream) { | |||
|
129 | var cc = state.cc; | |||
|
130 | // Communicate our context to the combinators. | |||
|
131 | // (Less wasteful than consing up a hundred closures on every call.) | |||
|
132 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; | |||
|
133 | ||||
|
134 | if (!state.lexical.hasOwnProperty("align")) | |||
|
135 | state.lexical.align = true; | |||
|
136 | ||||
|
137 | while(true) { | |||
|
138 | var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; | |||
|
139 | if (combinator(type, content)) { | |||
|
140 | while(cc.length && cc[cc.length - 1].lex) | |||
|
141 | cc.pop()(); | |||
|
142 | if (cx.marked) return cx.marked; | |||
|
143 | if (type == "variable" && inScope(state, content)) return "variable-2"; | |||
|
144 | return style; | |||
|
145 | } | |||
|
146 | } | |||
|
147 | } | |||
|
148 | ||||
|
149 | // Combinator utils | |||
|
150 | ||||
|
151 | var cx = {state: null, column: null, marked: null, cc: null}; | |||
|
152 | function pass() { | |||
|
153 | for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); | |||
|
154 | } | |||
|
155 | function cont() { | |||
|
156 | pass.apply(null, arguments); | |||
|
157 | return true; | |||
|
158 | } | |||
|
159 | function register(varname) { | |||
|
160 | var state = cx.state; | |||
|
161 | if (state.context) { | |||
|
162 | cx.marked = "def"; | |||
|
163 | for (var v = state.localVars; v; v = v.next) | |||
|
164 | if (v.name == varname) return; | |||
|
165 | state.localVars = {name: varname, next: state.localVars}; | |||
|
166 | } | |||
|
167 | } | |||
|
168 | ||||
|
169 | // Combinators | |||
|
170 | ||||
|
171 | var defaultVars = {name: "this", next: {name: "arguments"}}; | |||
|
172 | function pushcontext() { | |||
|
173 | if (!cx.state.context) cx.state.localVars = defaultVars; | |||
|
174 | cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; | |||
|
175 | } | |||
|
176 | function popcontext() { | |||
|
177 | cx.state.localVars = cx.state.context.vars; | |||
|
178 | cx.state.context = cx.state.context.prev; | |||
|
179 | } | |||
|
180 | function pushlex(type, info) { | |||
|
181 | var result = function() { | |||
|
182 | var state = cx.state; | |||
|
183 | state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info) | |||
|
184 | }; | |||
|
185 | result.lex = true; | |||
|
186 | return result; | |||
|
187 | } | |||
|
188 | function poplex() { | |||
|
189 | var state = cx.state; | |||
|
190 | if (state.lexical.prev) { | |||
|
191 | if (state.lexical.type == ")") | |||
|
192 | state.indented = state.lexical.indented; | |||
|
193 | state.lexical = state.lexical.prev; | |||
|
194 | } | |||
|
195 | } | |||
|
196 | poplex.lex = true; | |||
|
197 | ||||
|
198 | function expect(wanted) { | |||
|
199 | return function expecting(type) { | |||
|
200 | if (type == wanted) return cont(); | |||
|
201 | else if (wanted == ";") return pass(); | |||
|
202 | else return cont(arguments.callee); | |||
|
203 | }; | |||
|
204 | } | |||
|
205 | ||||
|
206 | function statement(type) { | |||
|
207 | if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); | |||
|
208 | if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); | |||
|
209 | if (type == "keyword b") return cont(pushlex("form"), statement, poplex); | |||
|
210 | if (type == "{") return cont(pushlex("}"), block, poplex); | |||
|
211 | if (type == ";") return cont(); | |||
|
212 | if (type == "function") return cont(functiondef); | |||
|
213 | if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), | |||
|
214 | poplex, statement, poplex); | |||
|
215 | if (type == "variable") return cont(pushlex("stat"), maybelabel); | |||
|
216 | if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), | |||
|
217 | block, poplex, poplex); | |||
|
218 | if (type == "case") return cont(expression, expect(":")); | |||
|
219 | if (type == "default") return cont(expect(":")); | |||
|
220 | if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), | |||
|
221 | statement, poplex, popcontext); | |||
|
222 | return pass(pushlex("stat"), expression, expect(";"), poplex); | |||
|
223 | } | |||
|
224 | function expression(type) { | |||
|
225 | if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); | |||
|
226 | if (type == "function") return cont(functiondef); | |||
|
227 | if (type == "keyword c") return cont(expression); | |||
|
228 | if (type == "(") return cont(pushlex(")"), expression, expect(")"), poplex, maybeoperator); | |||
|
229 | if (type == "operator") return cont(expression); | |||
|
230 | if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); | |||
|
231 | if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); | |||
|
232 | return cont(); | |||
|
233 | } | |||
|
234 | function maybeoperator(type, value) { | |||
|
235 | if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); | |||
|
236 | if (type == "operator") return cont(expression); | |||
|
237 | if (type == ";") return; | |||
|
238 | if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); | |||
|
239 | if (type == ".") return cont(property, maybeoperator); | |||
|
240 | if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); | |||
|
241 | } | |||
|
242 | function maybelabel(type) { | |||
|
243 | if (type == ":") return cont(poplex, statement); | |||
|
244 | return pass(maybeoperator, expect(";"), poplex); | |||
|
245 | } | |||
|
246 | function property(type) { | |||
|
247 | if (type == "variable") {cx.marked = "property"; return cont();} | |||
|
248 | } | |||
|
249 | function objprop(type) { | |||
|
250 | if (type == "variable") cx.marked = "property"; | |||
|
251 | if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); | |||
|
252 | } | |||
|
253 | function commasep(what, end) { | |||
|
254 | function proceed(type) { | |||
|
255 | if (type == ",") return cont(what, proceed); | |||
|
256 | if (type == end) return cont(); | |||
|
257 | return cont(expect(end)); | |||
|
258 | } | |||
|
259 | return function commaSeparated(type) { | |||
|
260 | if (type == end) return cont(); | |||
|
261 | else return pass(what, proceed); | |||
|
262 | }; | |||
|
263 | } | |||
|
264 | function block(type) { | |||
|
265 | if (type == "}") return cont(); | |||
|
266 | return pass(statement, block); | |||
|
267 | } | |||
|
268 | function vardef1(type, value) { | |||
|
269 | if (type == "variable"){register(value); return cont(vardef2);} | |||
|
270 | return cont(); | |||
|
271 | } | |||
|
272 | function vardef2(type, value) { | |||
|
273 | if (value == "=") return cont(expression, vardef2); | |||
|
274 | if (type == ",") return cont(vardef1); | |||
|
275 | } | |||
|
276 | function forspec1(type) { | |||
|
277 | if (type == "var") return cont(vardef1, forspec2); | |||
|
278 | if (type == ";") return pass(forspec2); | |||
|
279 | if (type == "variable") return cont(formaybein); | |||
|
280 | return pass(forspec2); | |||
|
281 | } | |||
|
282 | function formaybein(type, value) { | |||
|
283 | if (value == "in") return cont(expression); | |||
|
284 | return cont(maybeoperator, forspec2); | |||
|
285 | } | |||
|
286 | function forspec2(type, value) { | |||
|
287 | if (type == ";") return cont(forspec3); | |||
|
288 | if (value == "in") return cont(expression); | |||
|
289 | return cont(expression, expect(";"), forspec3); | |||
|
290 | } | |||
|
291 | function forspec3(type) { | |||
|
292 | if (type != ")") cont(expression); | |||
|
293 | } | |||
|
294 | function functiondef(type, value) { | |||
|
295 | if (type == "variable") {register(value); return cont(functiondef);} | |||
|
296 | if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext); | |||
|
297 | } | |||
|
298 | function funarg(type, value) { | |||
|
299 | if (type == "variable") {register(value); return cont();} | |||
|
300 | } | |||
|
301 | ||||
|
302 | // Interface | |||
|
303 | ||||
|
304 | return { | |||
|
305 | startState: function(basecolumn) { | |||
|
306 | return { | |||
|
307 | tokenize: jsTokenBase, | |||
|
308 | reAllowed: true, | |||
|
309 | cc: [], | |||
|
310 | lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), | |||
|
311 | localVars: null, | |||
|
312 | context: null, | |||
|
313 | indented: 0 | |||
|
314 | }; | |||
|
315 | }, | |||
|
316 | ||||
|
317 | token: function(stream, state) { | |||
|
318 | if (stream.sol()) { | |||
|
319 | if (!state.lexical.hasOwnProperty("align")) | |||
|
320 | state.lexical.align = false; | |||
|
321 | state.indented = stream.indentation(); | |||
|
322 | } | |||
|
323 | if (stream.eatSpace()) return null; | |||
|
324 | var style = state.tokenize(stream, state); | |||
|
325 | if (type == "comment") return style; | |||
|
326 | state.reAllowed = type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/); | |||
|
327 | return parseJS(state, style, type, content, stream); | |||
|
328 | }, | |||
|
329 | ||||
|
330 | indent: function(state, textAfter) { | |||
|
331 | if (state.tokenize != jsTokenBase) return 0; | |||
|
332 | var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, | |||
|
333 | type = lexical.type, closing = firstChar == type; | |||
|
334 | if (type == "vardef") return lexical.indented + 4; | |||
|
335 | else if (type == "form" && firstChar == "{") return lexical.indented; | |||
|
336 | else if (type == "stat" || type == "form") return lexical.indented + indentUnit; | |||
|
337 | else if (lexical.info == "switch" && !closing) | |||
|
338 | return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); | |||
|
339 | else if (lexical.align) return lexical.column + (closing ? 0 : 1); | |||
|
340 | else return lexical.indented + (closing ? 0 : indentUnit); | |||
|
341 | }, | |||
|
342 | ||||
|
343 | electricChars: ":{}" | |||
|
344 | }; | |||
|
345 | }); | |||
|
346 | ||||
|
347 | CodeMirror.defineMIME("text/javascript", "javascript"); | |||
|
348 | CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); |
@@ -0,0 +1,21 b'' | |||||
|
1 | The MIT License | |||
|
2 | ||||
|
3 | Copyright (c) 2010 Timothy Farrell | |||
|
4 | ||||
|
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | |||
|
6 | of this software and associated documentation files (the "Software"), to deal | |||
|
7 | in the Software without restriction, including without limitation the rights | |||
|
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
|
9 | copies of the Software, and to permit persons to whom the Software is | |||
|
10 | furnished to do so, subject to the following conditions: | |||
|
11 | ||||
|
12 | The above copyright notice and this permission notice shall be included in | |||
|
13 | all copies or substantial portions of the Software. | |||
|
14 | ||||
|
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
|
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
|
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
|
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
|
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
|
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
|
21 | THE SOFTWARE. No newline at end of file |
@@ -0,0 +1,123 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: Python mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="python.js"></script> | |||
|
8 | <link rel="stylesheet" href="../../theme/default.css"> | |||
|
9 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
10 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |||
|
11 | </head> | |||
|
12 | <body> | |||
|
13 | <h1>CodeMirror 2: Python mode</h1> | |||
|
14 | ||||
|
15 | <div><textarea id="code" name="code"> | |||
|
16 | # Literals | |||
|
17 | 1234 | |||
|
18 | 0.0e101 | |||
|
19 | .123 | |||
|
20 | 0b01010011100 | |||
|
21 | 0o01234567 | |||
|
22 | 0x0987654321abcdef | |||
|
23 | 7 | |||
|
24 | 2147483647 | |||
|
25 | 3L | |||
|
26 | 79228162514264337593543950336L | |||
|
27 | 0x100000000L | |||
|
28 | 79228162514264337593543950336 | |||
|
29 | 0xdeadbeef | |||
|
30 | 3.14j | |||
|
31 | 10.j | |||
|
32 | 10j | |||
|
33 | .001j | |||
|
34 | 1e100j | |||
|
35 | 3.14e-10j | |||
|
36 | ||||
|
37 | ||||
|
38 | # String Literals | |||
|
39 | 'For\'' | |||
|
40 | "God\"" | |||
|
41 | """so loved | |||
|
42 | the world""" | |||
|
43 | '''that he gave | |||
|
44 | his only begotten\' ''' | |||
|
45 | 'that whosoever believeth \ | |||
|
46 | in him' | |||
|
47 | '' | |||
|
48 | ||||
|
49 | # Identifiers | |||
|
50 | __a__ | |||
|
51 | a.b | |||
|
52 | a.b.c | |||
|
53 | ||||
|
54 | # Operators | |||
|
55 | + - * / % & | ^ ~ < > | |||
|
56 | == != <= >= <> << >> // ** | |||
|
57 | and or not in is | |||
|
58 | ||||
|
59 | # Delimiters | |||
|
60 | () [] {} , : ` = ; @ . # Note that @ and . require the proper context. | |||
|
61 | += -= *= /= %= &= |= ^= | |||
|
62 | //= >>= <<= **= | |||
|
63 | ||||
|
64 | # Keywords | |||
|
65 | as assert break class continue def del elif else except | |||
|
66 | finally for from global if import lambda pass raise | |||
|
67 | return try while with yield | |||
|
68 | ||||
|
69 | # Python 2 Keywords (otherwise Identifiers) | |||
|
70 | exec print | |||
|
71 | ||||
|
72 | # Python 3 Keywords (otherwise Identifiers) | |||
|
73 | nonlocal | |||
|
74 | ||||
|
75 | # Types | |||
|
76 | bool classmethod complex dict enumerate float frozenset int list object | |||
|
77 | property reversed set slice staticmethod str super tuple type | |||
|
78 | ||||
|
79 | # Python 2 Types (otherwise Identifiers) | |||
|
80 | basestring buffer file long unicode xrange | |||
|
81 | ||||
|
82 | # Python 3 Types (otherwise Identifiers) | |||
|
83 | bytearray bytes filter map memoryview open range zip | |||
|
84 | ||||
|
85 | # Some Example code | |||
|
86 | import os | |||
|
87 | from package import ParentClass | |||
|
88 | ||||
|
89 | @nonsenseDecorator | |||
|
90 | def doesNothing(): | |||
|
91 | pass | |||
|
92 | ||||
|
93 | class ExampleClass(ParentClass): | |||
|
94 | @staticmethod | |||
|
95 | def example(inputStr): | |||
|
96 | a = list(inputStr) | |||
|
97 | a.reverse() | |||
|
98 | return ''.join(a) | |||
|
99 | ||||
|
100 | def __init__(self, mixin = 'Hello'): | |||
|
101 | self.mixin = mixin | |||
|
102 | ||||
|
103 | </textarea></div> | |||
|
104 | <script> | |||
|
105 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | |||
|
106 | mode: {name: "python", | |||
|
107 | version: 2, | |||
|
108 | singleLineStringErrors: false}, | |||
|
109 | lineNumbers: true, | |||
|
110 | indentUnit: 4, | |||
|
111 | tabMode: "shift", | |||
|
112 | matchBrackets: true | |||
|
113 | }); | |||
|
114 | </script> | |||
|
115 | <h2>Configuration Options:</h2> | |||
|
116 | <ul> | |||
|
117 | <li>version - 2/3 - The version of Python to recognize. Default is 2.</li> | |||
|
118 | <li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li> | |||
|
119 | </ul> | |||
|
120 | ||||
|
121 | <p><strong>MIME types defined:</strong> <code>text/x-python</code>.</p> | |||
|
122 | </body> | |||
|
123 | </html> |
@@ -0,0 +1,321 b'' | |||||
|
1 | CodeMirror.defineMode("python", function(conf) { | |||
|
2 | var ERRORCLASS = 'error'; | |||
|
3 | ||||
|
4 | function wordRegexp(words) { | |||
|
5 | return new RegExp("^((" + words.join(")|(") + "))\\b"); | |||
|
6 | } | |||
|
7 | ||||
|
8 | var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\\?]"); | |||
|
9 | var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); | |||
|
10 | var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); | |||
|
11 | var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); | |||
|
12 | var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); | |||
|
13 | var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); | |||
|
14 | ||||
|
15 | var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']); | |||
|
16 | var commonkeywords = ['as', 'assert', 'break', 'class', 'continue', | |||
|
17 | 'def', 'del', 'elif', 'else', 'except', 'finally', | |||
|
18 | 'for', 'from', 'global', 'if', 'import', | |||
|
19 | 'lambda', 'pass', 'raise', 'return', | |||
|
20 | 'try', 'while', 'with', 'yield']; | |||
|
21 | var commontypes = ['bool', 'classmethod', 'complex', 'dict', 'enumerate', | |||
|
22 | 'float', 'frozenset', 'int', 'list', 'object', | |||
|
23 | 'property', 'reversed', 'set', 'slice', 'staticmethod', | |||
|
24 | 'str', 'super', 'tuple', 'type']; | |||
|
25 | var py2 = {'types': ['basestring', 'buffer', 'file', 'long', 'unicode', | |||
|
26 | 'xrange'], | |||
|
27 | 'keywords': ['exec', 'print']}; | |||
|
28 | var py3 = {'types': ['bytearray', 'bytes', 'filter', 'map', 'memoryview', | |||
|
29 | 'open', 'range', 'zip'], | |||
|
30 | 'keywords': ['nonlocal']}; | |||
|
31 | ||||
|
32 | if (!!conf.mode.version && parseInt(conf.mode.version, 10) === 3) { | |||
|
33 | commonkeywords = commonkeywords.concat(py3.keywords); | |||
|
34 | commontypes = commontypes.concat(py3.types); | |||
|
35 | var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); | |||
|
36 | } else { | |||
|
37 | commonkeywords = commonkeywords.concat(py2.keywords); | |||
|
38 | commontypes = commontypes.concat(py2.types); | |||
|
39 | var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); | |||
|
40 | } | |||
|
41 | var keywords = wordRegexp(commonkeywords); | |||
|
42 | var types = wordRegexp(commontypes); | |||
|
43 | ||||
|
44 | var indentInfo = null; | |||
|
45 | ||||
|
46 | // tokenizers | |||
|
47 | function tokenBase(stream, state) { | |||
|
48 | // Handle scope changes | |||
|
49 | if (stream.sol()) { | |||
|
50 | var scopeOffset = state.scopes[0].offset; | |||
|
51 | if (stream.eatSpace()) { | |||
|
52 | var lineOffset = stream.indentation(); | |||
|
53 | if (lineOffset > scopeOffset) { | |||
|
54 | indentInfo = 'indent'; | |||
|
55 | } else if (lineOffset < scopeOffset) { | |||
|
56 | indentInfo = 'dedent'; | |||
|
57 | } | |||
|
58 | return null; | |||
|
59 | } else { | |||
|
60 | if (scopeOffset > 0) { | |||
|
61 | dedent(stream, state); | |||
|
62 | } | |||
|
63 | } | |||
|
64 | } | |||
|
65 | if (stream.eatSpace()) { | |||
|
66 | return null; | |||
|
67 | } | |||
|
68 | ||||
|
69 | var ch = stream.peek(); | |||
|
70 | ||||
|
71 | // Handle Comments | |||
|
72 | if (ch === '#') { | |||
|
73 | stream.skipToEnd(); | |||
|
74 | return 'comment'; | |||
|
75 | } | |||
|
76 | ||||
|
77 | // Handle Number Literals | |||
|
78 | if (stream.match(/^[0-9\.]/, false)) { | |||
|
79 | var floatLiteral = false; | |||
|
80 | // Floats | |||
|
81 | if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } | |||
|
82 | if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } | |||
|
83 | if (stream.match(/^\.\d+/)) { floatLiteral = true; } | |||
|
84 | if (floatLiteral) { | |||
|
85 | // Float literals may be "imaginary" | |||
|
86 | stream.eat(/J/i); | |||
|
87 | return 'number'; | |||
|
88 | } | |||
|
89 | // Integers | |||
|
90 | var intLiteral = false; | |||
|
91 | // Hex | |||
|
92 | if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } | |||
|
93 | // Binary | |||
|
94 | if (stream.match(/^0b[01]+/i)) { intLiteral = true; } | |||
|
95 | // Octal | |||
|
96 | if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } | |||
|
97 | // Decimal | |||
|
98 | if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { | |||
|
99 | // Decimal literals may be "imaginary" | |||
|
100 | stream.eat(/J/i); | |||
|
101 | // TODO - Can you have imaginary longs? | |||
|
102 | intLiteral = true; | |||
|
103 | } | |||
|
104 | // Zero by itself with no other piece of number. | |||
|
105 | if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } | |||
|
106 | if (intLiteral) { | |||
|
107 | // Integer literals may be "long" | |||
|
108 | stream.eat(/L/i); | |||
|
109 | return 'number'; | |||
|
110 | } | |||
|
111 | } | |||
|
112 | ||||
|
113 | // Handle Strings | |||
|
114 | if (stream.match(stringPrefixes)) { | |||
|
115 | state.tokenize = tokenStringFactory(stream.current()); | |||
|
116 | return state.tokenize(stream, state); | |||
|
117 | } | |||
|
118 | ||||
|
119 | // Handle operators and Delimiters | |||
|
120 | if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { | |||
|
121 | return null; | |||
|
122 | } | |||
|
123 | if (stream.match(doubleOperators) | |||
|
124 | || stream.match(singleOperators) | |||
|
125 | || stream.match(wordOperators)) { | |||
|
126 | return 'operator'; | |||
|
127 | } | |||
|
128 | if (stream.match(singleDelimiters)) { | |||
|
129 | return null; | |||
|
130 | } | |||
|
131 | ||||
|
132 | if (stream.match(types)) { | |||
|
133 | return 'builtin'; | |||
|
134 | } | |||
|
135 | ||||
|
136 | if (stream.match(keywords)) { | |||
|
137 | return 'keyword'; | |||
|
138 | } | |||
|
139 | ||||
|
140 | if (stream.match(identifiers)) { | |||
|
141 | return 'variable'; | |||
|
142 | } | |||
|
143 | ||||
|
144 | // Handle non-detected items | |||
|
145 | stream.next(); | |||
|
146 | return ERRORCLASS; | |||
|
147 | } | |||
|
148 | ||||
|
149 | function tokenStringFactory(delimiter) { | |||
|
150 | while ('rub'.indexOf(delimiter[0].toLowerCase()) >= 0) { | |||
|
151 | delimiter = delimiter.substr(1); | |||
|
152 | } | |||
|
153 | var delim_re = new RegExp(delimiter); | |||
|
154 | var singleline = delimiter.length == 1; | |||
|
155 | var OUTCLASS = 'string'; | |||
|
156 | ||||
|
157 | return function tokenString(stream, state) { | |||
|
158 | while (!stream.eol()) { | |||
|
159 | stream.eatWhile(/[^'"\\]/); | |||
|
160 | if (stream.eat('\\')) { | |||
|
161 | stream.next(); | |||
|
162 | if (singleline && stream.eol()) { | |||
|
163 | return OUTCLASS; | |||
|
164 | } | |||
|
165 | } else if (stream.match(delim_re)) { | |||
|
166 | state.tokenize = tokenBase; | |||
|
167 | return OUTCLASS; | |||
|
168 | } else { | |||
|
169 | stream.eat(/['"]/); | |||
|
170 | } | |||
|
171 | } | |||
|
172 | if (singleline) { | |||
|
173 | if (conf.mode.singleLineStringErrors) { | |||
|
174 | OUTCLASS = ERRORCLASS | |||
|
175 | } else { | |||
|
176 | state.tokenize = tokenBase; | |||
|
177 | } | |||
|
178 | } | |||
|
179 | return OUTCLASS; | |||
|
180 | }; | |||
|
181 | } | |||
|
182 | ||||
|
183 | function indent(stream, state, type) { | |||
|
184 | type = type || 'py'; | |||
|
185 | var indentUnit = 0; | |||
|
186 | if (type === 'py') { | |||
|
187 | for (var i = 0; i < state.scopes.length; ++i) { | |||
|
188 | if (state.scopes[i].type === 'py') { | |||
|
189 | indentUnit = state.scopes[i].offset + conf.indentUnit; | |||
|
190 | break; | |||
|
191 | } | |||
|
192 | } | |||
|
193 | } else { | |||
|
194 | indentUnit = stream.column() + stream.current().length; | |||
|
195 | } | |||
|
196 | state.scopes.unshift({ | |||
|
197 | offset: indentUnit, | |||
|
198 | type: type | |||
|
199 | }); | |||
|
200 | } | |||
|
201 | ||||
|
202 | function dedent(stream, state) { | |||
|
203 | if (state.scopes.length == 1) return; | |||
|
204 | if (state.scopes[0].type === 'py') { | |||
|
205 | var _indent = stream.indentation(); | |||
|
206 | var _indent_index = -1; | |||
|
207 | for (var i = 0; i < state.scopes.length; ++i) { | |||
|
208 | if (_indent === state.scopes[i].offset) { | |||
|
209 | _indent_index = i; | |||
|
210 | break; | |||
|
211 | } | |||
|
212 | } | |||
|
213 | if (_indent_index === -1) { | |||
|
214 | return true; | |||
|
215 | } | |||
|
216 | while (state.scopes[0].offset !== _indent) { | |||
|
217 | state.scopes.shift(); | |||
|
218 | } | |||
|
219 | return false | |||
|
220 | } else { | |||
|
221 | state.scopes.shift(); | |||
|
222 | return false; | |||
|
223 | } | |||
|
224 | } | |||
|
225 | ||||
|
226 | function tokenLexer(stream, state) { | |||
|
227 | indentInfo = null; | |||
|
228 | var style = state.tokenize(stream, state); | |||
|
229 | var current = stream.current(); | |||
|
230 | ||||
|
231 | // Handle '.' connected identifiers | |||
|
232 | if (current === '.') { | |||
|
233 | style = state.tokenize(stream, state); | |||
|
234 | current = stream.current(); | |||
|
235 | if (style === 'variable') { | |||
|
236 | return 'variable'; | |||
|
237 | } else { | |||
|
238 | return ERRORCLASS; | |||
|
239 | } | |||
|
240 | } | |||
|
241 | ||||
|
242 | // Handle decorators | |||
|
243 | if (current === '@') { | |||
|
244 | style = state.tokenize(stream, state); | |||
|
245 | current = stream.current(); | |||
|
246 | if (style === 'variable' | |||
|
247 | || current === '@staticmethod' | |||
|
248 | || current === '@classmethod') { | |||
|
249 | return 'meta'; | |||
|
250 | } else { | |||
|
251 | return ERRORCLASS; | |||
|
252 | } | |||
|
253 | } | |||
|
254 | ||||
|
255 | // Handle scope changes. | |||
|
256 | if (current === 'pass' || current === 'return') { | |||
|
257 | state.dedent += 1; | |||
|
258 | } | |||
|
259 | if ((current === ':' && !state.lambda && state.scopes[0].type == 'py') | |||
|
260 | || indentInfo === 'indent') { | |||
|
261 | indent(stream, state); | |||
|
262 | } | |||
|
263 | var delimiter_index = '[({'.indexOf(current); | |||
|
264 | if (delimiter_index !== -1) { | |||
|
265 | indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); | |||
|
266 | } | |||
|
267 | if (indentInfo === 'dedent') { | |||
|
268 | if (dedent(stream, state)) { | |||
|
269 | return ERRORCLASS; | |||
|
270 | } | |||
|
271 | } | |||
|
272 | delimiter_index = '])}'.indexOf(current); | |||
|
273 | if (delimiter_index !== -1) { | |||
|
274 | if (dedent(stream, state)) { | |||
|
275 | return ERRORCLASS; | |||
|
276 | } | |||
|
277 | } | |||
|
278 | if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') { | |||
|
279 | if (state.scopes.length > 1) state.scopes.shift(); | |||
|
280 | state.dedent -= 1; | |||
|
281 | } | |||
|
282 | ||||
|
283 | return style; | |||
|
284 | } | |||
|
285 | ||||
|
286 | var external = { | |||
|
287 | startState: function(basecolumn) { | |||
|
288 | return { | |||
|
289 | tokenize: tokenBase, | |||
|
290 | scopes: [{offset:basecolumn || 0, type:'py'}], | |||
|
291 | lastToken: null, | |||
|
292 | lambda: false, | |||
|
293 | dedent: 0 | |||
|
294 | }; | |||
|
295 | }, | |||
|
296 | ||||
|
297 | token: function(stream, state) { | |||
|
298 | var style = tokenLexer(stream, state); | |||
|
299 | ||||
|
300 | state.lastToken = {style:style, content: stream.current()}; | |||
|
301 | ||||
|
302 | if (stream.eol() && stream.lambda) { | |||
|
303 | state.lambda = false; | |||
|
304 | } | |||
|
305 | ||||
|
306 | return style; | |||
|
307 | }, | |||
|
308 | ||||
|
309 | indent: function(state, textAfter) { | |||
|
310 | if (state.tokenize != tokenBase) { | |||
|
311 | return 0; | |||
|
312 | } | |||
|
313 | ||||
|
314 | return state.scopes[0].offset; | |||
|
315 | } | |||
|
316 | ||||
|
317 | }; | |||
|
318 | return external; | |||
|
319 | }); | |||
|
320 | ||||
|
321 | CodeMirror.defineMIME("text/x-python", "python"); |
This diff has been collapsed as it changes many lines, (526 lines changed) Show them Hide them | |||||
@@ -0,0 +1,526 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: reStructuredText mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="rst.js"></script> | |||
|
8 | <link rel="stylesheet" href="rst.css"> | |||
|
9 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |||
|
10 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
11 | </head> | |||
|
12 | <body> | |||
|
13 | <h1>CodeMirror 2: reStructuredText mode</h1> | |||
|
14 | ||||
|
15 | <form><textarea id="code" name="code"> | |||
|
16 | .. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt | |||
|
17 | ||||
|
18 | .. highlightlang:: rest | |||
|
19 | ||||
|
20 | .. _rst-primer: | |||
|
21 | ||||
|
22 | reStructuredText Primer | |||
|
23 | ======================= | |||
|
24 | ||||
|
25 | This section is a brief introduction to reStructuredText (reST) concepts and | |||
|
26 | syntax, intended to provide authors with enough information to author documents | |||
|
27 | productively. Since reST was designed to be a simple, unobtrusive markup | |||
|
28 | language, this will not take too long. | |||
|
29 | ||||
|
30 | .. seealso:: | |||
|
31 | ||||
|
32 | The authoritative `reStructuredText User Documentation | |||
|
33 | <http://docutils.sourceforge.net/rst.html>`_. The "ref" links in this | |||
|
34 | document link to the description of the individual constructs in the reST | |||
|
35 | reference. | |||
|
36 | ||||
|
37 | ||||
|
38 | Paragraphs | |||
|
39 | ---------- | |||
|
40 | ||||
|
41 | The paragraph (:duref:`ref <paragraphs>`) is the most basic block in a reST | |||
|
42 | document. Paragraphs are simply chunks of text separated by one or more blank | |||
|
43 | lines. As in Python, indentation is significant in reST, so all lines of the | |||
|
44 | same paragraph must be left-aligned to the same level of indentation. | |||
|
45 | ||||
|
46 | ||||
|
47 | .. _inlinemarkup: | |||
|
48 | ||||
|
49 | Inline markup | |||
|
50 | ------------- | |||
|
51 | ||||
|
52 | The standard reST inline markup is quite simple: use | |||
|
53 | ||||
|
54 | * one asterisk: ``*text*`` for emphasis (italics), | |||
|
55 | * two asterisks: ``**text**`` for strong emphasis (boldface), and | |||
|
56 | * backquotes: ````text```` for code samples. | |||
|
57 | ||||
|
58 | If asterisks or backquotes appear in running text and could be confused with | |||
|
59 | inline markup delimiters, they have to be escaped with a backslash. | |||
|
60 | ||||
|
61 | Be aware of some restrictions of this markup: | |||
|
62 | ||||
|
63 | * it may not be nested, | |||
|
64 | * content may not start or end with whitespace: ``* text*`` is wrong, | |||
|
65 | * it must be separated from surrounding text by non-word characters. Use a | |||
|
66 | backslash escaped space to work around that: ``thisis\ *one*\ word``. | |||
|
67 | ||||
|
68 | These restrictions may be lifted in future versions of the docutils. | |||
|
69 | ||||
|
70 | reST also allows for custom "interpreted text roles"', which signify that the | |||
|
71 | enclosed text should be interpreted in a specific way. Sphinx uses this to | |||
|
72 | provide semantic markup and cross-referencing of identifiers, as described in | |||
|
73 | the appropriate section. The general syntax is ``:rolename:`content```. | |||
|
74 | ||||
|
75 | Standard reST provides the following roles: | |||
|
76 | ||||
|
77 | * :durole:`emphasis` -- alternate spelling for ``*emphasis*`` | |||
|
78 | * :durole:`strong` -- alternate spelling for ``**strong**`` | |||
|
79 | * :durole:`literal` -- alternate spelling for ````literal```` | |||
|
80 | * :durole:`subscript` -- subscript text | |||
|
81 | * :durole:`superscript` -- superscript text | |||
|
82 | * :durole:`title-reference` -- for titles of books, periodicals, and other | |||
|
83 | materials | |||
|
84 | ||||
|
85 | See :ref:`inline-markup` for roles added by Sphinx. | |||
|
86 | ||||
|
87 | ||||
|
88 | Lists and Quote-like blocks | |||
|
89 | --------------------------- | |||
|
90 | ||||
|
91 | List markup (:duref:`ref <bullet-lists>`) is natural: just place an asterisk at | |||
|
92 | the start of a paragraph and indent properly. The same goes for numbered lists; | |||
|
93 | they can also be autonumbered using a ``#`` sign:: | |||
|
94 | ||||
|
95 | * This is a bulleted list. | |||
|
96 | * It has two items, the second | |||
|
97 | item uses two lines. | |||
|
98 | ||||
|
99 | 1. This is a numbered list. | |||
|
100 | 2. It has two items too. | |||
|
101 | ||||
|
102 | #. This is a numbered list. | |||
|
103 | #. It has two items too. | |||
|
104 | ||||
|
105 | ||||
|
106 | Nested lists are possible, but be aware that they must be separated from the | |||
|
107 | parent list items by blank lines:: | |||
|
108 | ||||
|
109 | * this is | |||
|
110 | * a list | |||
|
111 | ||||
|
112 | * with a nested list | |||
|
113 | * and some subitems | |||
|
114 | ||||
|
115 | * and here the parent list continues | |||
|
116 | ||||
|
117 | Definition lists (:duref:`ref <definition-lists>`) are created as follows:: | |||
|
118 | ||||
|
119 | term (up to a line of text) | |||
|
120 | Definition of the term, which must be indented | |||
|
121 | ||||
|
122 | and can even consist of multiple paragraphs | |||
|
123 | ||||
|
124 | next term | |||
|
125 | Description. | |||
|
126 | ||||
|
127 | Note that the term cannot have more than one line of text. | |||
|
128 | ||||
|
129 | Quoted paragraphs (:duref:`ref <block-quotes>`) are created by just indenting | |||
|
130 | them more than the surrounding paragraphs. | |||
|
131 | ||||
|
132 | Line blocks (:duref:`ref <line-blocks>`) are a way of preserving line breaks:: | |||
|
133 | ||||
|
134 | | These lines are | |||
|
135 | | broken exactly like in | |||
|
136 | | the source file. | |||
|
137 | ||||
|
138 | There are also several more special blocks available: | |||
|
139 | ||||
|
140 | * field lists (:duref:`ref <field-lists>`) | |||
|
141 | * option lists (:duref:`ref <option-lists>`) | |||
|
142 | * quoted literal blocks (:duref:`ref <quoted-literal-blocks>`) | |||
|
143 | * doctest blocks (:duref:`ref <doctest-blocks>`) | |||
|
144 | ||||
|
145 | ||||
|
146 | Source Code | |||
|
147 | ----------- | |||
|
148 | ||||
|
149 | Literal code blocks (:duref:`ref <literal-blocks>`) are introduced by ending a | |||
|
150 | paragraph with the special marker ``::``. The literal block must be indented | |||
|
151 | (and, like all paragraphs, separated from the surrounding ones by blank lines):: | |||
|
152 | ||||
|
153 | This is a normal text paragraph. The next paragraph is a code sample:: | |||
|
154 | ||||
|
155 | It is not processed in any way, except | |||
|
156 | that the indentation is removed. | |||
|
157 | ||||
|
158 | It can span multiple lines. | |||
|
159 | ||||
|
160 | This is a normal text paragraph again. | |||
|
161 | ||||
|
162 | The handling of the ``::`` marker is smart: | |||
|
163 | ||||
|
164 | * If it occurs as a paragraph of its own, that paragraph is completely left | |||
|
165 | out of the document. | |||
|
166 | * If it is preceded by whitespace, the marker is removed. | |||
|
167 | * If it is preceded by non-whitespace, the marker is replaced by a single | |||
|
168 | colon. | |||
|
169 | ||||
|
170 | That way, the second sentence in the above example's first paragraph would be | |||
|
171 | rendered as "The next paragraph is a code sample:". | |||
|
172 | ||||
|
173 | ||||
|
174 | .. _rst-tables: | |||
|
175 | ||||
|
176 | Tables | |||
|
177 | ------ | |||
|
178 | ||||
|
179 | Two forms of tables are supported. For *grid tables* (:duref:`ref | |||
|
180 | <grid-tables>`), you have to "paint" the cell grid yourself. They look like | |||
|
181 | this:: | |||
|
182 | ||||
|
183 | +------------------------+------------+----------+----------+ | |||
|
184 | | Header row, column 1 | Header 2 | Header 3 | Header 4 | | |||
|
185 | | (header rows optional) | | | | | |||
|
186 | +========================+============+==========+==========+ | |||
|
187 | | body row 1, column 1 | column 2 | column 3 | column 4 | | |||
|
188 | +------------------------+------------+----------+----------+ | |||
|
189 | | body row 2 | ... | ... | | | |||
|
190 | +------------------------+------------+----------+----------+ | |||
|
191 | ||||
|
192 | *Simple tables* (:duref:`ref <simple-tables>`) are easier to write, but | |||
|
193 | limited: they must contain more than one row, and the first column cannot | |||
|
194 | contain multiple lines. They look like this:: | |||
|
195 | ||||
|
196 | ===== ===== ======= | |||
|
197 | A B A and B | |||
|
198 | ===== ===== ======= | |||
|
199 | False False False | |||
|
200 | True False False | |||
|
201 | False True False | |||
|
202 | True True True | |||
|
203 | ===== ===== ======= | |||
|
204 | ||||
|
205 | ||||
|
206 | Hyperlinks | |||
|
207 | ---------- | |||
|
208 | ||||
|
209 | External links | |||
|
210 | ^^^^^^^^^^^^^^ | |||
|
211 | ||||
|
212 | Use ```Link text <http://example.com/>`_`` for inline web links. If the link | |||
|
213 | text should be the web address, you don't need special markup at all, the parser | |||
|
214 | finds links and mail addresses in ordinary text. | |||
|
215 | ||||
|
216 | You can also separate the link and the target definition (:duref:`ref | |||
|
217 | <hyperlink-targets>`), like this:: | |||
|
218 | ||||
|
219 | This is a paragraph that contains `a link`_. | |||
|
220 | ||||
|
221 | .. _a link: http://example.com/ | |||
|
222 | ||||
|
223 | ||||
|
224 | Internal links | |||
|
225 | ^^^^^^^^^^^^^^ | |||
|
226 | ||||
|
227 | Internal linking is done via a special reST role provided by Sphinx, see the | |||
|
228 | section on specific markup, :ref:`ref-role`. | |||
|
229 | ||||
|
230 | ||||
|
231 | Sections | |||
|
232 | -------- | |||
|
233 | ||||
|
234 | Section headers (:duref:`ref <sections>`) are created by underlining (and | |||
|
235 | optionally overlining) the section title with a punctuation character, at least | |||
|
236 | as long as the text:: | |||
|
237 | ||||
|
238 | ================= | |||
|
239 | This is a heading | |||
|
240 | ================= | |||
|
241 | ||||
|
242 | Normally, there are no heading levels assigned to certain characters as the | |||
|
243 | structure is determined from the succession of headings. However, for the | |||
|
244 | Python documentation, this convention is used which you may follow: | |||
|
245 | ||||
|
246 | * ``#`` with overline, for parts | |||
|
247 | * ``*`` with overline, for chapters | |||
|
248 | * ``=``, for sections | |||
|
249 | * ``-``, for subsections | |||
|
250 | * ``^``, for subsubsections | |||
|
251 | * ``"``, for paragraphs | |||
|
252 | ||||
|
253 | Of course, you are free to use your own marker characters (see the reST | |||
|
254 | documentation), and use a deeper nesting level, but keep in mind that most | |||
|
255 | target formats (HTML, LaTeX) have a limited supported nesting depth. | |||
|
256 | ||||
|
257 | ||||
|
258 | Explicit Markup | |||
|
259 | --------------- | |||
|
260 | ||||
|
261 | "Explicit markup" (:duref:`ref <explicit-markup-blocks>`) is used in reST for | |||
|
262 | most constructs that need special handling, such as footnotes, | |||
|
263 | specially-highlighted paragraphs, comments, and generic directives. | |||
|
264 | ||||
|
265 | An explicit markup block begins with a line starting with ``..`` followed by | |||
|
266 | whitespace and is terminated by the next paragraph at the same level of | |||
|
267 | indentation. (There needs to be a blank line between explicit markup and normal | |||
|
268 | paragraphs. This may all sound a bit complicated, but it is intuitive enough | |||
|
269 | when you write it.) | |||
|
270 | ||||
|
271 | ||||
|
272 | .. _directives: | |||
|
273 | ||||
|
274 | Directives | |||
|
275 | ---------- | |||
|
276 | ||||
|
277 | A directive (:duref:`ref <directives>`) is a generic block of explicit markup. | |||
|
278 | Besides roles, it is one of the extension mechanisms of reST, and Sphinx makes | |||
|
279 | heavy use of it. | |||
|
280 | ||||
|
281 | Docutils supports the following directives: | |||
|
282 | ||||
|
283 | * Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`, | |||
|
284 | :dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`, | |||
|
285 | :dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`. | |||
|
286 | (Most themes style only "note" and "warning" specially.) | |||
|
287 | ||||
|
288 | * Images: | |||
|
289 | ||||
|
290 | - :dudir:`image` (see also Images_ below) | |||
|
291 | - :dudir:`figure` (an image with caption and optional legend) | |||
|
292 | ||||
|
293 | * Additional body elements: | |||
|
294 | ||||
|
295 | - :dudir:`contents` (a local, i.e. for the current file only, table of | |||
|
296 | contents) | |||
|
297 | - :dudir:`container` (a container with a custom class, useful to generate an | |||
|
298 | outer ``<div>`` in HTML) | |||
|
299 | - :dudir:`rubric` (a heading without relation to the document sectioning) | |||
|
300 | - :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements) | |||
|
301 | - :dudir:`parsed-literal` (literal block that supports inline markup) | |||
|
302 | - :dudir:`epigraph` (a block quote with optional attribution line) | |||
|
303 | - :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own | |||
|
304 | class attribute) | |||
|
305 | - :dudir:`compound` (a compound paragraph) | |||
|
306 | ||||
|
307 | * Special tables: | |||
|
308 | ||||
|
309 | - :dudir:`table` (a table with title) | |||
|
310 | - :dudir:`csv-table` (a table generated from comma-separated values) | |||
|
311 | - :dudir:`list-table` (a table generated from a list of lists) | |||
|
312 | ||||
|
313 | * Special directives: | |||
|
314 | ||||
|
315 | - :dudir:`raw` (include raw target-format markup) | |||
|
316 | - :dudir:`include` (include reStructuredText from another file) | |||
|
317 | -- in Sphinx, when given an absolute include file path, this directive takes | |||
|
318 | it as relative to the source directory | |||
|
319 | - :dudir:`class` (assign a class attribute to the next element) [1]_ | |||
|
320 | ||||
|
321 | * HTML specifics: | |||
|
322 | ||||
|
323 | - :dudir:`meta` (generation of HTML ``<meta>`` tags) | |||
|
324 | - :dudir:`title` (override document title) | |||
|
325 | ||||
|
326 | * Influencing markup: | |||
|
327 | ||||
|
328 | - :dudir:`default-role` (set a new default role) | |||
|
329 | - :dudir:`role` (create a new role) | |||
|
330 | ||||
|
331 | Since these are only per-file, better use Sphinx' facilities for setting the | |||
|
332 | :confval:`default_role`. | |||
|
333 | ||||
|
334 | Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and | |||
|
335 | :dudir:`footer`. | |||
|
336 | ||||
|
337 | Directives added by Sphinx are described in :ref:`sphinxmarkup`. | |||
|
338 | ||||
|
339 | Basically, a directive consists of a name, arguments, options and content. (Keep | |||
|
340 | this terminology in mind, it is used in the next chapter describing custom | |||
|
341 | directives.) Looking at this example, :: | |||
|
342 | ||||
|
343 | .. function:: foo(x) | |||
|
344 | foo(y, z) | |||
|
345 | :module: some.module.name | |||
|
346 | ||||
|
347 | Return a line of text input from the user. | |||
|
348 | ||||
|
349 | ``function`` is the directive name. It is given two arguments here, the | |||
|
350 | remainder of the first line and the second line, as well as one option | |||
|
351 | ``module`` (as you can see, options are given in the lines immediately following | |||
|
352 | the arguments and indicated by the colons). Options must be indented to the | |||
|
353 | same level as the directive content. | |||
|
354 | ||||
|
355 | The directive content follows after a blank line and is indented relative to the | |||
|
356 | directive start. | |||
|
357 | ||||
|
358 | ||||
|
359 | Images | |||
|
360 | ------ | |||
|
361 | ||||
|
362 | reST supports an image directive (:dudir:`ref <image>`), used like so:: | |||
|
363 | ||||
|
364 | .. image:: gnu.png | |||
|
365 | (options) | |||
|
366 | ||||
|
367 | When used within Sphinx, the file name given (here ``gnu.png``) must either be | |||
|
368 | relative to the source file, or absolute which means that they are relative to | |||
|
369 | the top source directory. For example, the file ``sketch/spam.rst`` could refer | |||
|
370 | to the image ``images/spam.png`` as ``../images/spam.png`` or | |||
|
371 | ``/images/spam.png``. | |||
|
372 | ||||
|
373 | Sphinx will automatically copy image files over to a subdirectory of the output | |||
|
374 | directory on building (e.g. the ``_static`` directory for HTML output.) | |||
|
375 | ||||
|
376 | Interpretation of image size options (``width`` and ``height``) is as follows: | |||
|
377 | if the size has no unit or the unit is pixels, the given size will only be | |||
|
378 | respected for output channels that support pixels (i.e. not in LaTeX output). | |||
|
379 | Other units (like ``pt`` for points) will be used for HTML and LaTeX output. | |||
|
380 | ||||
|
381 | Sphinx extends the standard docutils behavior by allowing an asterisk for the | |||
|
382 | extension:: | |||
|
383 | ||||
|
384 | .. image:: gnu.* | |||
|
385 | ||||
|
386 | Sphinx then searches for all images matching the provided pattern and determines | |||
|
387 | their type. Each builder then chooses the best image out of these candidates. | |||
|
388 | For instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf` | |||
|
389 | and :file:`gnu.png` existed in the source tree, the LaTeX builder would choose | |||
|
390 | the former, while the HTML builder would prefer the latter. | |||
|
391 | ||||
|
392 | .. versionchanged:: 0.4 | |||
|
393 | Added the support for file names ending in an asterisk. | |||
|
394 | ||||
|
395 | .. versionchanged:: 0.6 | |||
|
396 | Image paths can now be absolute. | |||
|
397 | ||||
|
398 | ||||
|
399 | Footnotes | |||
|
400 | --------- | |||
|
401 | ||||
|
402 | For footnotes (:duref:`ref <footnotes>`), use ``[#name]_`` to mark the footnote | |||
|
403 | location, and add the footnote body at the bottom of the document after a | |||
|
404 | "Footnotes" rubric heading, like so:: | |||
|
405 | ||||
|
406 | Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_ | |||
|
407 | ||||
|
408 | .. rubric:: Footnotes | |||
|
409 | ||||
|
410 | .. [#f1] Text of the first footnote. | |||
|
411 | .. [#f2] Text of the second footnote. | |||
|
412 | ||||
|
413 | You can also explicitly number the footnotes (``[1]_``) or use auto-numbered | |||
|
414 | footnotes without names (``[#]_``). | |||
|
415 | ||||
|
416 | ||||
|
417 | Citations | |||
|
418 | --------- | |||
|
419 | ||||
|
420 | Standard reST citations (:duref:`ref <citations>`) are supported, with the | |||
|
421 | additional feature that they are "global", i.e. all citations can be referenced | |||
|
422 | from all files. Use them like so:: | |||
|
423 | ||||
|
424 | Lorem ipsum [Ref]_ dolor sit amet. | |||
|
425 | ||||
|
426 | .. [Ref] Book or article reference, URL or whatever. | |||
|
427 | ||||
|
428 | Citation usage is similar to footnote usage, but with a label that is not | |||
|
429 | numeric or begins with ``#``. | |||
|
430 | ||||
|
431 | ||||
|
432 | Substitutions | |||
|
433 | ------------- | |||
|
434 | ||||
|
435 | reST supports "substitutions" (:duref:`ref <substitution-definitions>`), which | |||
|
436 | are pieces of text and/or markup referred to in the text by ``|name|``. They | |||
|
437 | are defined like footnotes with explicit markup blocks, like this:: | |||
|
438 | ||||
|
439 | .. |name| replace:: replacement *text* | |||
|
440 | ||||
|
441 | or this:: | |||
|
442 | ||||
|
443 | .. |caution| image:: warning.png | |||
|
444 | :alt: Warning! | |||
|
445 | ||||
|
446 | See the :duref:`reST reference for substitutions <substitution-definitions>` | |||
|
447 | for details. | |||
|
448 | ||||
|
449 | If you want to use some substitutions for all documents, put them into | |||
|
450 | :confval:`rst_prolog` or put them into a separate file and include it into all | |||
|
451 | documents you want to use them in, using the :rst:dir:`include` directive. (Be | |||
|
452 | sure to give the include file a file name extension differing from that of other | |||
|
453 | source files, to avoid Sphinx finding it as a standalone document.) | |||
|
454 | ||||
|
455 | Sphinx defines some default substitutions, see :ref:`default-substitutions`. | |||
|
456 | ||||
|
457 | ||||
|
458 | Comments | |||
|
459 | -------- | |||
|
460 | ||||
|
461 | Every explicit markup block which isn't a valid markup construct (like the | |||
|
462 | footnotes above) is regarded as a comment (:duref:`ref <comments>`). For | |||
|
463 | example:: | |||
|
464 | ||||
|
465 | .. This is a comment. | |||
|
466 | ||||
|
467 | You can indent text after a comment start to form multiline comments:: | |||
|
468 | ||||
|
469 | .. | |||
|
470 | This whole indented block | |||
|
471 | is a comment. | |||
|
472 | ||||
|
473 | Still in the comment. | |||
|
474 | ||||
|
475 | ||||
|
476 | Source encoding | |||
|
477 | --------------- | |||
|
478 | ||||
|
479 | Since the easiest way to include special characters like em dashes or copyright | |||
|
480 | signs in reST is to directly write them as Unicode characters, one has to | |||
|
481 | specify an encoding. Sphinx assumes source files to be encoded in UTF-8 by | |||
|
482 | default; you can change this with the :confval:`source_encoding` config value. | |||
|
483 | ||||
|
484 | ||||
|
485 | Gotchas | |||
|
486 | ------- | |||
|
487 | ||||
|
488 | There are some problems one commonly runs into while authoring reST documents: | |||
|
489 | ||||
|
490 | * **Separation of inline markup:** As said above, inline markup spans must be | |||
|
491 | separated from the surrounding text by non-word characters, you have to use a | |||
|
492 | backslash-escaped space to get around that. See `the reference | |||
|
493 | <http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup>`_ | |||
|
494 | for the details. | |||
|
495 | ||||
|
496 | * **No nested inline markup:** Something like ``*see :func:`foo`*`` is not | |||
|
497 | possible. | |||
|
498 | ||||
|
499 | ||||
|
500 | .. rubric:: Footnotes | |||
|
501 | ||||
|
502 | .. [1] When the default domain contains a :rst:dir:`class` directive, this directive | |||
|
503 | will be shadowed. Therefore, Sphinx re-exports it as :rst:dir:`rst-class`. | |||
|
504 | </textarea></form> | |||
|
505 | ||||
|
506 | <script> | |||
|
507 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | |||
|
508 | lineNumbers: true, | |||
|
509 | }); | |||
|
510 | </script> | |||
|
511 | <p>The reStructuredText mode supports one configuration parameter:</p> | |||
|
512 | <dl> | |||
|
513 | <dt><code>verbatim (string)</code></dt> | |||
|
514 | <dd>A name or MIME type of a mode that will be used for highlighting | |||
|
515 | verbatim blocks. By default, reStructuredText mode uses uniform color | |||
|
516 | for whole block of verbatim text if no mode is given.</dd> | |||
|
517 | </dl> | |||
|
518 | <p>If <code>python</code> mode is available (not a part of CodeMirror 2 yet), | |||
|
519 | it will be used for highlighting blocks containing Python/IPython terminal | |||
|
520 | sessions (blocks starting with <code>>>></code> (for Python) or | |||
|
521 | <code>In [num]:</code> (for IPython). | |||
|
522 | ||||
|
523 | <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p> | |||
|
524 | </body> | |||
|
525 | </html> | |||
|
526 |
@@ -0,0 +1,75 b'' | |||||
|
1 | .cm-s-default span.cm-emphasis { | |||
|
2 | font-style: italic; | |||
|
3 | } | |||
|
4 | ||||
|
5 | .cm-s-default span.cm-strong { | |||
|
6 | font-weight: bold; | |||
|
7 | } | |||
|
8 | ||||
|
9 | .cm-s-default span.cm-interpreted { | |||
|
10 | color: #33cc66; | |||
|
11 | } | |||
|
12 | ||||
|
13 | .cm-s-default span.cm-inline { | |||
|
14 | color: #3399cc; | |||
|
15 | } | |||
|
16 | ||||
|
17 | .cm-s-default span.cm-role { | |||
|
18 | color: #666699; | |||
|
19 | } | |||
|
20 | ||||
|
21 | .cm-s-default span.cm-list { | |||
|
22 | color: #cc0099; | |||
|
23 | font-weight: bold; | |||
|
24 | } | |||
|
25 | ||||
|
26 | .cm-s-default span.cm-body { | |||
|
27 | color: #6699cc; | |||
|
28 | } | |||
|
29 | ||||
|
30 | .cm-s-default span.cm-verbatim { | |||
|
31 | color: #3366ff; | |||
|
32 | } | |||
|
33 | ||||
|
34 | .cm-s-default span.cm-comment { | |||
|
35 | color: #aa7700; | |||
|
36 | } | |||
|
37 | ||||
|
38 | .cm-s-default span.cm-directive { | |||
|
39 | font-weight: bold; | |||
|
40 | color: #3399ff; | |||
|
41 | } | |||
|
42 | ||||
|
43 | .cm-s-default span.cm-hyperlink { | |||
|
44 | font-weight: bold; | |||
|
45 | color: #3366ff; | |||
|
46 | } | |||
|
47 | ||||
|
48 | .cm-s-default span.cm-footnote { | |||
|
49 | font-weight: bold; | |||
|
50 | color: #3333ff; | |||
|
51 | } | |||
|
52 | ||||
|
53 | .cm-s-default span.cm-citation { | |||
|
54 | font-weight: bold; | |||
|
55 | color: #3300ff; | |||
|
56 | } | |||
|
57 | ||||
|
58 | .cm-s-default span.cm-replacement { | |||
|
59 | color: #9933cc; | |||
|
60 | } | |||
|
61 | ||||
|
62 | .cm-s-default span.cm-section { | |||
|
63 | font-weight: bold; | |||
|
64 | color: #cc0099; | |||
|
65 | } | |||
|
66 | ||||
|
67 | .cm-s-default span.cm-directive-marker { | |||
|
68 | font-weight: bold; | |||
|
69 | color: #3399ff; | |||
|
70 | } | |||
|
71 | ||||
|
72 | .cm-s-default span.cm-verbatim-marker { | |||
|
73 | font-weight: bold; | |||
|
74 | color: #9900ff; | |||
|
75 | } |
@@ -0,0 +1,333 b'' | |||||
|
1 | CodeMirror.defineMode('rst', function(config, options) { | |||
|
2 | function setState(state, fn, ctx) { | |||
|
3 | state.fn = fn; | |||
|
4 | setCtx(state, ctx); | |||
|
5 | } | |||
|
6 | ||||
|
7 | function setCtx(state, ctx) { | |||
|
8 | state.ctx = ctx || {}; | |||
|
9 | } | |||
|
10 | ||||
|
11 | function setNormal(state, ch) { | |||
|
12 | if (ch && (typeof ch !== 'string')) { | |||
|
13 | var str = ch.current(); | |||
|
14 | ch = str[str.length-1]; | |||
|
15 | } | |||
|
16 | ||||
|
17 | setState(state, normal, {back: ch}); | |||
|
18 | } | |||
|
19 | ||||
|
20 | function hasMode(mode) { | |||
|
21 | if (mode) { | |||
|
22 | var modes = CodeMirror.listModes(); | |||
|
23 | ||||
|
24 | for (var i in modes) { | |||
|
25 | if (modes[i] == mode) { | |||
|
26 | return true; | |||
|
27 | } | |||
|
28 | } | |||
|
29 | } | |||
|
30 | ||||
|
31 | return false; | |||
|
32 | } | |||
|
33 | ||||
|
34 | function getMode(mode) { | |||
|
35 | if (hasMode(mode)) { | |||
|
36 | return CodeMirror.getMode(config, mode); | |||
|
37 | } else { | |||
|
38 | return null; | |||
|
39 | } | |||
|
40 | } | |||
|
41 | ||||
|
42 | var verbatimMode = getMode(options.verbatim); | |||
|
43 | var pythonMode = getMode('python'); | |||
|
44 | ||||
|
45 | var reSection = /^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/; | |||
|
46 | var reDirective = /^\s*\w([-:.\w]*\w)?::(\s|$)/; | |||
|
47 | var reHyperlink = /^\s*_[\w-]+:(\s|$)/; | |||
|
48 | var reFootnote = /^\s*\[(\d+|#)\](\s|$)/; | |||
|
49 | var reCitation = /^\s*\[[A-Za-z][\w-]*\](\s|$)/; | |||
|
50 | var reFootnoteRef = /^\[(\d+|#)\]_/; | |||
|
51 | var reCitationRef = /^\[[A-Za-z][\w-]*\]_/; | |||
|
52 | var reDirectiveMarker = /^\.\.(\s|$)/; | |||
|
53 | var reVerbatimMarker = /^::\s*$/; | |||
|
54 | var rePreInline = /^[-\s"([{</:]/; | |||
|
55 | var rePostInline = /^[-\s`'")\]}>/:.,;!?\\_]/; | |||
|
56 | var reEnumeratedList = /^\s*((\d+|[A-Za-z#])[.)]|\((\d+|[A-Z-a-z#])\))\s/; | |||
|
57 | var reBulletedList = /^\s*[-\+\*]\s/; | |||
|
58 | var reExamples = /^\s+(>>>|In \[\d+\]:)\s/; | |||
|
59 | ||||
|
60 | function normal(stream, state) { | |||
|
61 | var ch, sol, i; | |||
|
62 | ||||
|
63 | if (stream.eat(/\\/)) { | |||
|
64 | ch = stream.next(); | |||
|
65 | setNormal(state, ch); | |||
|
66 | return null; | |||
|
67 | } | |||
|
68 | ||||
|
69 | sol = stream.sol(); | |||
|
70 | ||||
|
71 | if (sol && (ch = stream.eat(reSection))) { | |||
|
72 | for (i = 0; stream.eat(ch); i++); | |||
|
73 | ||||
|
74 | if (i >= 3 && stream.match(/^\s*$/)) { | |||
|
75 | setNormal(state, null); | |||
|
76 | return 'section'; | |||
|
77 | } else { | |||
|
78 | stream.backUp(i + 1); | |||
|
79 | } | |||
|
80 | } | |||
|
81 | ||||
|
82 | if (sol && stream.match(reDirectiveMarker)) { | |||
|
83 | if (!stream.eol()) { | |||
|
84 | setState(state, directive); | |||
|
85 | } | |||
|
86 | ||||
|
87 | return 'directive-marker'; | |||
|
88 | } | |||
|
89 | ||||
|
90 | if (stream.match(reVerbatimMarker)) { | |||
|
91 | if (!verbatimMode) { | |||
|
92 | setState(state, verbatim); | |||
|
93 | } else { | |||
|
94 | var mode = verbatimMode; | |||
|
95 | ||||
|
96 | setState(state, verbatim, { | |||
|
97 | mode: mode, | |||
|
98 | local: mode.startState() | |||
|
99 | }); | |||
|
100 | } | |||
|
101 | ||||
|
102 | return 'verbatim-marker'; | |||
|
103 | } | |||
|
104 | ||||
|
105 | if (sol && stream.match(reExamples, false)) { | |||
|
106 | if (!pythonMode) { | |||
|
107 | setState(state, verbatim); | |||
|
108 | return 'verbatim-marker'; | |||
|
109 | } else { | |||
|
110 | var mode = pythonMode; | |||
|
111 | ||||
|
112 | setState(state, verbatim, { | |||
|
113 | mode: mode, | |||
|
114 | local: mode.startState() | |||
|
115 | }); | |||
|
116 | ||||
|
117 | return null; | |||
|
118 | } | |||
|
119 | } | |||
|
120 | ||||
|
121 | if (sol && (stream.match(reEnumeratedList) || | |||
|
122 | stream.match(reBulletedList))) { | |||
|
123 | setNormal(state, stream); | |||
|
124 | return 'list'; | |||
|
125 | } | |||
|
126 | ||||
|
127 | function testBackward(re) { | |||
|
128 | return sol || !state.ctx.back || re.test(state.ctx.back); | |||
|
129 | } | |||
|
130 | ||||
|
131 | function testForward(re) { | |||
|
132 | return stream.eol() || stream.match(re, false); | |||
|
133 | } | |||
|
134 | ||||
|
135 | function testInline(re) { | |||
|
136 | return stream.match(re) && testBackward(/\W/) && testForward(/\W/); | |||
|
137 | } | |||
|
138 | ||||
|
139 | if (testInline(reFootnoteRef)) { | |||
|
140 | setNormal(state, stream); | |||
|
141 | return 'footnote'; | |||
|
142 | } | |||
|
143 | ||||
|
144 | if (testInline(reCitationRef)) { | |||
|
145 | setNormal(state, stream); | |||
|
146 | return 'citation'; | |||
|
147 | } | |||
|
148 | ||||
|
149 | ch = stream.next(); | |||
|
150 | ||||
|
151 | if (testBackward(rePreInline)) { | |||
|
152 | if ((ch === ':' || ch === '|') && stream.eat(/\S/)) { | |||
|
153 | var token; | |||
|
154 | ||||
|
155 | if (ch === ':') { | |||
|
156 | token = 'role'; | |||
|
157 | } else { | |||
|
158 | token = 'replacement'; | |||
|
159 | } | |||
|
160 | ||||
|
161 | setState(state, inline, { | |||
|
162 | ch: ch, | |||
|
163 | wide: false, | |||
|
164 | prev: null, | |||
|
165 | token: token | |||
|
166 | }); | |||
|
167 | ||||
|
168 | return token; | |||
|
169 | } | |||
|
170 | ||||
|
171 | if (ch === '*' || ch === '`') { | |||
|
172 | var orig = ch, | |||
|
173 | wide = false; | |||
|
174 | ||||
|
175 | ch = stream.next(); | |||
|
176 | ||||
|
177 | if (ch == orig) { | |||
|
178 | wide = true; | |||
|
179 | ch = stream.next(); | |||
|
180 | } | |||
|
181 | ||||
|
182 | if (ch && !/\s/.test(ch)) { | |||
|
183 | var token; | |||
|
184 | ||||
|
185 | if (orig === '*') { | |||
|
186 | token = wide ? 'strong' : 'emphasis'; | |||
|
187 | } else { | |||
|
188 | token = wide ? 'inline' : 'interpreted'; | |||
|
189 | } | |||
|
190 | ||||
|
191 | setState(state, inline, { | |||
|
192 | ch: orig, // inline() has to know what to search for | |||
|
193 | wide: wide, // are we looking for `ch` or `chch` | |||
|
194 | prev: null, // terminator must not be preceeded with whitespace | |||
|
195 | token: token // I don't want to recompute this all the time | |||
|
196 | }); | |||
|
197 | ||||
|
198 | return token; | |||
|
199 | } | |||
|
200 | } | |||
|
201 | } | |||
|
202 | ||||
|
203 | setNormal(state, ch); | |||
|
204 | return null; | |||
|
205 | } | |||
|
206 | ||||
|
207 | function inline(stream, state) { | |||
|
208 | var ch = stream.next(), | |||
|
209 | token = state.ctx.token; | |||
|
210 | ||||
|
211 | function finish(ch) { | |||
|
212 | state.ctx.prev = ch; | |||
|
213 | return token; | |||
|
214 | } | |||
|
215 | ||||
|
216 | if (ch != state.ctx.ch) { | |||
|
217 | return finish(ch); | |||
|
218 | } | |||
|
219 | ||||
|
220 | if (/\s/.test(state.ctx.prev)) { | |||
|
221 | return finish(ch); | |||
|
222 | } | |||
|
223 | ||||
|
224 | if (state.ctx.wide) { | |||
|
225 | ch = stream.next(); | |||
|
226 | ||||
|
227 | if (ch != state.ctx.ch) { | |||
|
228 | return finish(ch); | |||
|
229 | } | |||
|
230 | } | |||
|
231 | ||||
|
232 | if (!stream.eol() && !rePostInline.test(stream.peek())) { | |||
|
233 | if (state.ctx.wide) { | |||
|
234 | stream.backUp(1); | |||
|
235 | } | |||
|
236 | ||||
|
237 | return finish(ch); | |||
|
238 | } | |||
|
239 | ||||
|
240 | setState(state, normal); | |||
|
241 | setNormal(state, ch); | |||
|
242 | ||||
|
243 | return token; | |||
|
244 | } | |||
|
245 | ||||
|
246 | function directive(stream, state) { | |||
|
247 | var token = null; | |||
|
248 | ||||
|
249 | if (stream.match(reDirective)) { | |||
|
250 | token = 'directive'; | |||
|
251 | } else if (stream.match(reHyperlink)) { | |||
|
252 | token = 'hyperlink'; | |||
|
253 | } else if (stream.match(reFootnote)) { | |||
|
254 | token = 'footnote'; | |||
|
255 | } else if (stream.match(reCitation)) { | |||
|
256 | token = 'citation'; | |||
|
257 | } else { | |||
|
258 | stream.eatSpace(); | |||
|
259 | ||||
|
260 | if (stream.eol()) { | |||
|
261 | setNormal(state, stream); | |||
|
262 | return null; | |||
|
263 | } else { | |||
|
264 | stream.skipToEnd(); | |||
|
265 | setState(state, comment); | |||
|
266 | return 'comment'; | |||
|
267 | } | |||
|
268 | } | |||
|
269 | ||||
|
270 | setState(state, body, {start: true}); | |||
|
271 | return token; | |||
|
272 | } | |||
|
273 | ||||
|
274 | function body(stream, state) { | |||
|
275 | var token = 'body'; | |||
|
276 | ||||
|
277 | if (!state.ctx.start || stream.sol()) { | |||
|
278 | return block(stream, state, token); | |||
|
279 | } | |||
|
280 | ||||
|
281 | stream.skipToEnd(); | |||
|
282 | setCtx(state); | |||
|
283 | ||||
|
284 | return token; | |||
|
285 | } | |||
|
286 | ||||
|
287 | function comment(stream, state) { | |||
|
288 | return block(stream, state, 'comment'); | |||
|
289 | } | |||
|
290 | ||||
|
291 | function verbatim(stream, state) { | |||
|
292 | if (!verbatimMode) { | |||
|
293 | return block(stream, state, 'verbatim'); | |||
|
294 | } else { | |||
|
295 | if (stream.sol()) { | |||
|
296 | if (!stream.eatSpace()) { | |||
|
297 | setNormal(state, stream); | |||
|
298 | } | |||
|
299 | ||||
|
300 | return null; | |||
|
301 | } | |||
|
302 | ||||
|
303 | return verbatimMode.token(stream, state.ctx.local); | |||
|
304 | } | |||
|
305 | } | |||
|
306 | ||||
|
307 | function block(stream, state, token) { | |||
|
308 | if (stream.eol() || stream.eatSpace()) { | |||
|
309 | stream.skipToEnd(); | |||
|
310 | return token; | |||
|
311 | } else { | |||
|
312 | setNormal(state, stream); | |||
|
313 | return null; | |||
|
314 | } | |||
|
315 | } | |||
|
316 | ||||
|
317 | return { | |||
|
318 | startState: function() { | |||
|
319 | return {fn: normal, ctx: {}}; | |||
|
320 | }, | |||
|
321 | ||||
|
322 | copyState: function(state) { | |||
|
323 | return {fn: state.fn, ctx: state.ctx}; | |||
|
324 | }, | |||
|
325 | ||||
|
326 | token: function(stream, state) { | |||
|
327 | var token = state.fn(stream, state); | |||
|
328 | return token; | |||
|
329 | } | |||
|
330 | }; | |||
|
331 | }); | |||
|
332 | ||||
|
333 | CodeMirror.defineMIME("text/x-rst", "rst"); |
@@ -0,0 +1,42 b'' | |||||
|
1 | <!doctype html> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <title>CodeMirror 2: XML mode</title> | |||
|
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | |||
|
6 | <script src="../../lib/codemirror.js"></script> | |||
|
7 | <script src="xml.js"></script> | |||
|
8 | <link rel="stylesheet" href="../../theme/default.css"> | |||
|
9 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | |||
|
10 | <link rel="stylesheet" href="../../css/docs.css"> | |||
|
11 | </head> | |||
|
12 | <body> | |||
|
13 | <h1>CodeMirror 2: XML mode</h1> | |||
|
14 | <form><textarea id="code" name="code"> | |||
|
15 | <html style="color: green"> | |||
|
16 | <!-- this is a comment --> | |||
|
17 | <head> | |||
|
18 | <title>HTML Example</title> | |||
|
19 | </head> | |||
|
20 | <body> | |||
|
21 | The indentation tries to be <em>somewhat &quot;do what | |||
|
22 | I mean&quot;</em>... but might not match your style. | |||
|
23 | </body> | |||
|
24 | </html> | |||
|
25 | </textarea></form> | |||
|
26 | <script> | |||
|
27 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: {name: "xml", htmlMode: true}}); | |||
|
28 | </script> | |||
|
29 | <p>The XML mode supports two configuration parameters:</p> | |||
|
30 | <dl> | |||
|
31 | <dt><code>htmlMode (boolean)</code></dt> | |||
|
32 | <dd>This switches the mode to parse HTML instead of XML. This | |||
|
33 | means attributes do not have to be quoted, and some elements | |||
|
34 | (such as <code>br</code>) do not require a closing tag.</dd> | |||
|
35 | <dt><code>alignCDATA (boolean)</code></dt> | |||
|
36 | <dd>Setting this to true will force the opening tag of CDATA | |||
|
37 | blocks to not be indented.</dd> | |||
|
38 | </dl> | |||
|
39 | ||||
|
40 | <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p> | |||
|
41 | </body> | |||
|
42 | </html> |
@@ -0,0 +1,231 b'' | |||||
|
1 | CodeMirror.defineMode("xml", function(config, parserConfig) { | |||
|
2 | var indentUnit = config.indentUnit; | |||
|
3 | var Kludges = parserConfig.htmlMode ? { | |||
|
4 | autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true, | |||
|
5 | "meta": true, "col": true, "frame": true, "base": true, "area": true}, | |||
|
6 | doNotIndent: {"pre": true, "!cdata": true}, | |||
|
7 | allowUnquoted: true | |||
|
8 | } : {autoSelfClosers: {}, doNotIndent: {"!cdata": true}, allowUnquoted: false}; | |||
|
9 | var alignCDATA = parserConfig.alignCDATA; | |||
|
10 | ||||
|
11 | // Return variables for tokenizers | |||
|
12 | var tagName, type; | |||
|
13 | ||||
|
14 | function inText(stream, state) { | |||
|
15 | function chain(parser) { | |||
|
16 | state.tokenize = parser; | |||
|
17 | return parser(stream, state); | |||
|
18 | } | |||
|
19 | ||||
|
20 | var ch = stream.next(); | |||
|
21 | if (ch == "<") { | |||
|
22 | if (stream.eat("!")) { | |||
|
23 | if (stream.eat("[")) { | |||
|
24 | if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); | |||
|
25 | else return null; | |||
|
26 | } | |||
|
27 | else if (stream.match("--")) return chain(inBlock("comment", "-->")); | |||
|
28 | else if (stream.match("DOCTYPE", true, true)) { | |||
|
29 | stream.eatWhile(/[\w\._\-]/); | |||
|
30 | return chain(inBlock("meta", ">")); | |||
|
31 | } | |||
|
32 | else return null; | |||
|
33 | } | |||
|
34 | else if (stream.eat("?")) { | |||
|
35 | stream.eatWhile(/[\w\._\-]/); | |||
|
36 | state.tokenize = inBlock("meta", "?>"); | |||
|
37 | return "meta"; | |||
|
38 | } | |||
|
39 | else { | |||
|
40 | type = stream.eat("/") ? "closeTag" : "openTag"; | |||
|
41 | stream.eatSpace(); | |||
|
42 | tagName = ""; | |||
|
43 | var c; | |||
|
44 | while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; | |||
|
45 | state.tokenize = inTag; | |||
|
46 | return "tag"; | |||
|
47 | } | |||
|
48 | } | |||
|
49 | else if (ch == "&") { | |||
|
50 | stream.eatWhile(/[^;]/); | |||
|
51 | stream.eat(";"); | |||
|
52 | return "atom"; | |||
|
53 | } | |||
|
54 | else { | |||
|
55 | stream.eatWhile(/[^&<]/); | |||
|
56 | return null; | |||
|
57 | } | |||
|
58 | } | |||
|
59 | ||||
|
60 | function inTag(stream, state) { | |||
|
61 | var ch = stream.next(); | |||
|
62 | if (ch == ">" || (ch == "/" && stream.eat(">"))) { | |||
|
63 | state.tokenize = inText; | |||
|
64 | type = ch == ">" ? "endTag" : "selfcloseTag"; | |||
|
65 | return "tag"; | |||
|
66 | } | |||
|
67 | else if (ch == "=") { | |||
|
68 | type = "equals"; | |||
|
69 | return null; | |||
|
70 | } | |||
|
71 | else if (/[\'\"]/.test(ch)) { | |||
|
72 | state.tokenize = inAttribute(ch); | |||
|
73 | return state.tokenize(stream, state); | |||
|
74 | } | |||
|
75 | else { | |||
|
76 | stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/); | |||
|
77 | return "word"; | |||
|
78 | } | |||
|
79 | } | |||
|
80 | ||||
|
81 | function inAttribute(quote) { | |||
|
82 | return function(stream, state) { | |||
|
83 | while (!stream.eol()) { | |||
|
84 | if (stream.next() == quote) { | |||
|
85 | state.tokenize = inTag; | |||
|
86 | break; | |||
|
87 | } | |||
|
88 | } | |||
|
89 | return "string"; | |||
|
90 | }; | |||
|
91 | } | |||
|
92 | ||||
|
93 | function inBlock(style, terminator) { | |||
|
94 | return function(stream, state) { | |||
|
95 | while (!stream.eol()) { | |||
|
96 | if (stream.match(terminator)) { | |||
|
97 | state.tokenize = inText; | |||
|
98 | break; | |||
|
99 | } | |||
|
100 | stream.next(); | |||
|
101 | } | |||
|
102 | return style; | |||
|
103 | }; | |||
|
104 | } | |||
|
105 | ||||
|
106 | var curState, setStyle; | |||
|
107 | function pass() { | |||
|
108 | for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); | |||
|
109 | } | |||
|
110 | function cont() { | |||
|
111 | pass.apply(null, arguments); | |||
|
112 | return true; | |||
|
113 | } | |||
|
114 | ||||
|
115 | function pushContext(tagName, startOfLine) { | |||
|
116 | var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent); | |||
|
117 | curState.context = { | |||
|
118 | prev: curState.context, | |||
|
119 | tagName: tagName, | |||
|
120 | indent: curState.indented, | |||
|
121 | startOfLine: startOfLine, | |||
|
122 | noIndent: noIndent | |||
|
123 | }; | |||
|
124 | } | |||
|
125 | function popContext() { | |||
|
126 | if (curState.context) curState.context = curState.context.prev; | |||
|
127 | } | |||
|
128 | ||||
|
129 | function element(type) { | |||
|
130 | if (type == "openTag") {curState.tagName = tagName; return cont(attributes, endtag(curState.startOfLine));} | |||
|
131 | else if (type == "closeTag") { | |||
|
132 | var err = false; | |||
|
133 | if (curState.context) { | |||
|
134 | err = curState.context.tagName != tagName; | |||
|
135 | popContext(); | |||
|
136 | } else { | |||
|
137 | err = true; | |||
|
138 | } | |||
|
139 | if (err) setStyle = "error"; | |||
|
140 | return cont(endclosetag(err)); | |||
|
141 | } | |||
|
142 | else if (type == "string") { | |||
|
143 | if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata"); | |||
|
144 | if (curState.tokenize == inText) popContext(); | |||
|
145 | return cont(); | |||
|
146 | } | |||
|
147 | else return cont(); | |||
|
148 | } | |||
|
149 | function endtag(startOfLine) { | |||
|
150 | return function(type) { | |||
|
151 | if (type == "selfcloseTag" || | |||
|
152 | (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase()))) | |||
|
153 | return cont(); | |||
|
154 | if (type == "endTag") {pushContext(curState.tagName, startOfLine); return cont();} | |||
|
155 | return cont(); | |||
|
156 | }; | |||
|
157 | } | |||
|
158 | function endclosetag(err) { | |||
|
159 | return function(type) { | |||
|
160 | if (err) setStyle = "error"; | |||
|
161 | if (type == "endTag") return cont(); | |||
|
162 | return pass(); | |||
|
163 | } | |||
|
164 | } | |||
|
165 | ||||
|
166 | function attributes(type) { | |||
|
167 | if (type == "word") {setStyle = "attribute"; return cont(attributes);} | |||
|
168 | if (type == "equals") return cont(attvalue, attributes); | |||
|
169 | return pass(); | |||
|
170 | } | |||
|
171 | function attvalue(type) { | |||
|
172 | if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();} | |||
|
173 | if (type == "string") return cont(attvaluemaybe); | |||
|
174 | return pass(); | |||
|
175 | } | |||
|
176 | function attvaluemaybe(type) { | |||
|
177 | if (type == "string") return cont(attvaluemaybe); | |||
|
178 | else return pass(); | |||
|
179 | } | |||
|
180 | ||||
|
181 | return { | |||
|
182 | startState: function() { | |||
|
183 | return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null}; | |||
|
184 | }, | |||
|
185 | ||||
|
186 | token: function(stream, state) { | |||
|
187 | if (stream.sol()) { | |||
|
188 | state.startOfLine = true; | |||
|
189 | state.indented = stream.indentation(); | |||
|
190 | } | |||
|
191 | if (stream.eatSpace()) return null; | |||
|
192 | ||||
|
193 | setStyle = type = tagName = null; | |||
|
194 | var style = state.tokenize(stream, state); | |||
|
195 | if ((style || type) && style != "comment") { | |||
|
196 | curState = state; | |||
|
197 | while (true) { | |||
|
198 | var comb = state.cc.pop() || element; | |||
|
199 | if (comb(type || style)) break; | |||
|
200 | } | |||
|
201 | } | |||
|
202 | state.startOfLine = false; | |||
|
203 | return setStyle || style; | |||
|
204 | }, | |||
|
205 | ||||
|
206 | indent: function(state, textAfter) { | |||
|
207 | var context = state.context; | |||
|
208 | if (context && context.noIndent) return 0; | |||
|
209 | if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0; | |||
|
210 | if (context && /^<\//.test(textAfter)) | |||
|
211 | context = context.prev; | |||
|
212 | while (context && !context.startOfLine) | |||
|
213 | context = context.prev; | |||
|
214 | if (context) return context.indent + indentUnit; | |||
|
215 | else return 0; | |||
|
216 | }, | |||
|
217 | ||||
|
218 | compareStates: function(a, b) { | |||
|
219 | if (a.indented != b.indented || a.tagName != b.tagName) return false; | |||
|
220 | for (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) { | |||
|
221 | if (!ca || !cb) return ca == cb; | |||
|
222 | if (ca.tagName != cb.tagName) return false; | |||
|
223 | } | |||
|
224 | }, | |||
|
225 | ||||
|
226 | electricChars: "/" | |||
|
227 | }; | |||
|
228 | }); | |||
|
229 | ||||
|
230 | CodeMirror.defineMIME("application/xml", "xml"); | |||
|
231 | CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); |
@@ -0,0 +1,18 b'' | |||||
|
1 | .cm-s-default span.cm-keyword {color: #708;} | |||
|
2 | .cm-s-default span.cm-atom {color: #219;} | |||
|
3 | .cm-s-default span.cm-number {color: #164;} | |||
|
4 | .cm-s-default span.cm-def {color: #00f;} | |||
|
5 | .cm-s-default span.cm-variable {color: black;} | |||
|
6 | .cm-s-default span.cm-variable-2 {color: #05a;} | |||
|
7 | .cm-s-default span.cm-variable-3 {color: #0a5;} | |||
|
8 | .cm-s-default span.cm-property {color: black;} | |||
|
9 | .cm-s-default span.cm-operator {color: black;} | |||
|
10 | .cm-s-default span.cm-comment {color: #a50;} | |||
|
11 | .cm-s-default span.cm-string {color: #a11;} | |||
|
12 | .cm-s-default span.cm-meta {color: #555;} | |||
|
13 | .cm-s-default span.cm-error {color: #f00;} | |||
|
14 | .cm-s-default span.cm-qualifier {color: #555;} | |||
|
15 | .cm-s-default span.cm-builtin {color: #30a;} | |||
|
16 | .cm-s-default span.cm-bracket {color: #cc7;} | |||
|
17 | .cm-s-default span.cm-tag {color: #170;} | |||
|
18 | .cm-s-default span.cm-attribute {color: #00c;} |
@@ -0,0 +1,9 b'' | |||||
|
1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} | |||
|
2 | .cm-s-elegant span.cm-comment {color: #262;font-style: italic;} | |||
|
3 | .cm-s-elegant span.cm-meta {color: #555;font-style: italic;} | |||
|
4 | .cm-s-elegant span.cm-variable {color: black;} | |||
|
5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} | |||
|
6 | .cm-s-elegant span.cm-qualifier {color: #555;} | |||
|
7 | .cm-s-elegant span.cm-keyword {color: #730;} | |||
|
8 | .cm-s-elegant span.cm-builtin {color: #30a;} | |||
|
9 | .cm-s-elegant span.cm-error {background-color: #fdd;} |
@@ -0,0 +1,41 b'' | |||||
|
1 | ||||
|
2 | ||||
|
3 | .cm-s-ipython span.cm-keyword {color: #008000; font-weight: bold;} | |||
|
4 | .cm-s-ipython span.cm-number {color: #666666;} | |||
|
5 | .cm-s-ipython span.cm-operator {color: #AA22FF; font-weight: bold;} | |||
|
6 | .cm-s-ipython span.cm-meta {color: #AA22FF;} | |||
|
7 | .cm-s-ipython span.cm-comment {color: #408080; font-style: italic;} | |||
|
8 | .cm-s-ipython span.cm-string {color: #BA2121;} | |||
|
9 | .cm-s-ipython span.cm-error {color: #f00;} | |||
|
10 | .cm-s-ipython span.cm-builtin {color: #008000;} | |||
|
11 | .cm-s-ipython span.cm-variable {color: #000000;} | |||
|
12 | ||||
|
13 | /* These classes are not currently used in the python.js mode */ | |||
|
14 | ||||
|
15 | /*.cm-s-ipython span.cm-atom {color: #219;}*/ | |||
|
16 | /*.cm-s-ipython span.cm-def {color: #00f;}*/ | |||
|
17 | /*.cm-s-ipython span.cm-variable-2 {color: #05a;}*/ | |||
|
18 | /*.cm-s-ipython span.cm-variable-3 {color: #0a5;}*/ | |||
|
19 | /*.cm-s-ipython span.cm-property {color: black;}*/ | |||
|
20 | /*.cm-s-ipython span.cm-qualifier {color: #555;}*/ | |||
|
21 | /*.cm-s-ipython span.cm-bracket {color: #cc7;}*/ | |||
|
22 | /*.cm-s-ipython span.cm-tag {color: #170;}*/ | |||
|
23 | /*.cm-s-ipython span.cm-attribute {color: #00c;}*/ | |||
|
24 | ||||
|
25 | /* These are the old styles for our pre-themed version */ | |||
|
26 | ||||
|
27 | /*span.py-delimiter {color: #666666;}*/ | |||
|
28 | /*span.py-special {color: #666666;}*/ | |||
|
29 | /*span.py-operator {color: #AA22FF; font-weight: bold;}*/ | |||
|
30 | /*span.py-keyword {color: #008000; font-weight: bold;}*/ | |||
|
31 | /*span.py-number {color: #666666;}*/ | |||
|
32 | /*span.py-identifier {color: #000000;}*/ | |||
|
33 | /*span.py-func {color: #000000;}*/ | |||
|
34 | /*span.py-type {color: #008000;}*/ | |||
|
35 | /*span.py-decorator {color: #AA22FF;}*/ | |||
|
36 | /*span.py-comment {color: #408080; font-style: italic;}*/ | |||
|
37 | /*span.py-string {color: #BA2121;}*/ | |||
|
38 | /*span.py-bytes {color: #BA2121;}*/ | |||
|
39 | /*span.py-raw {color: #BA2121;}*/ | |||
|
40 | /*span.py-unicode {color: #BA2121;}*/ | |||
|
41 |
@@ -0,0 +1,8 b'' | |||||
|
1 | .cm-s-neat span.cm-comment { color: #a86; } | |||
|
2 | .cm-s-neat span.cm-keyword { font-weight: bold; color: blue; } | |||
|
3 | .cm-s-neat span.cm-string { color: #a22; } | |||
|
4 | .cm-s-neat span.cm-builtin { font-weight: bold; color: #077; } | |||
|
5 | .cm-s-neat span.cm-special { font-weight: bold; color: #0aa; } | |||
|
6 | .cm-s-neat span.cm-variable { color: black; } | |||
|
7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } | |||
|
8 | .cm-s-neat span.cm-meta {color: #555;} |
@@ -0,0 +1,20 b'' | |||||
|
1 | /* Loosely based on the Midnight Textmate theme */ | |||
|
2 | ||||
|
3 | .cm-s-night { background: #0a001f; color: #f8f8f8; } | |||
|
4 | .cm-s-night span.CodeMirror-selected { background: #a8f !important; } | |||
|
5 | .cm-s-night .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; } | |||
|
6 | .cm-s-night .CodeMirror-gutter-text { color: #f8f8f8; } | |||
|
7 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } | |||
|
8 | ||||
|
9 | .cm-s-night span.cm-comment { color: #6900a1; } | |||
|
10 | .cm-s-night span.cm-atom { color: #845dc4; } | |||
|
11 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } | |||
|
12 | .cm-s-night span.cm-keyword { color: #599eff; } | |||
|
13 | .cm-s-night span.cm-string { color: #37f14a; } | |||
|
14 | .cm-s-night span.cm-meta { color: #7678e2; } | |||
|
15 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } | |||
|
16 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } | |||
|
17 | .cm-s-night span.cm-error { color: #9d1e15; } | |||
|
18 | .cm-s-night span.cm-bracket { color: #8da6ce; } | |||
|
19 | .cm-s-night span.cm-comment { color: #6900a1; } | |||
|
20 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } |
@@ -0,0 +1,56 b'' | |||||
|
1 | ||||
|
2 | /** | |||
|
3 | * Primary styles | |||
|
4 | * | |||
|
5 | * Author: IPython Development Team | |||
|
6 | */ | |||
|
7 | ||||
|
8 | ||||
|
9 | body { | |||
|
10 | background-color: white; | |||
|
11 | /* This makes sure that the body covers the entire window and needs to | |||
|
12 | be in a different element than the display: box in wrapper below */ | |||
|
13 | position: absolute; | |||
|
14 | left: 0px; | |||
|
15 | right: 0px; | |||
|
16 | top: 0px; | |||
|
17 | bottom: 0px; | |||
|
18 | overflow: hidden; | |||
|
19 | } | |||
|
20 | ||||
|
21 | ||||
|
22 | div#header { | |||
|
23 | /* Initially hidden to prevent FLOUC */ | |||
|
24 | display: none; | |||
|
25 | position: relative; | |||
|
26 | height: 45px; | |||
|
27 | padding: 5px; | |||
|
28 | margin: 0px; | |||
|
29 | width: 100%; | |||
|
30 | } | |||
|
31 | ||||
|
32 | span#ipython_notebook { | |||
|
33 | position: absolute; | |||
|
34 | padding: 2px; | |||
|
35 | } | |||
|
36 | ||||
|
37 | span#ipython_notebook h1 { | |||
|
38 | font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |||
|
39 | font-size: 197%; | |||
|
40 | display: inline; | |||
|
41 | color: black; | |||
|
42 | } | |||
|
43 | ||||
|
44 | div#main_app { | |||
|
45 | /* Initially hidden to prevent FLOUC */ | |||
|
46 | display: none; | |||
|
47 | width: 100%; | |||
|
48 | position: relative; | |||
|
49 | } | |||
|
50 | ||||
|
51 | .ui-button .ui-button-text { | |||
|
52 | padding: 0.2em 0.8em; | |||
|
53 | font-size: 77%; | |||
|
54 | } | |||
|
55 | ||||
|
56 |
@@ -0,0 +1,73 b'' | |||||
|
1 | /** | |||
|
2 | * HTML5 ✰ Boilerplate | |||
|
3 | * | |||
|
4 | * style.css contains a reset, font normalization and some base styles. | |||
|
5 | * | |||
|
6 | * Credit is left where credit is due. | |||
|
7 | * Much inspiration was taken from these projects: | |||
|
8 | * - yui.yahooapis.com/2.8.1/build/base/base.css | |||
|
9 | * - camendesign.com/design/ | |||
|
10 | * - praegnanz.de/weblog/htmlcssjs-kickstart | |||
|
11 | */ | |||
|
12 | ||||
|
13 | ||||
|
14 | /** | |||
|
15 | * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) | |||
|
16 | * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark | |||
|
17 | * html5doctor.com/html-5-reset-stylesheet/ | |||
|
18 | */ | |||
|
19 | ||||
|
20 | html, body, div, span, object, iframe, | |||
|
21 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |||
|
22 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, | |||
|
23 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, | |||
|
24 | fieldset, form, label, legend, | |||
|
25 | table, caption, tbody, tfoot, thead, tr, th, td, | |||
|
26 | article, aside, canvas, details, figcaption, figure, | |||
|
27 | footer, header, hgroup, menu, nav, section, summary, | |||
|
28 | time, mark, audio, video { | |||
|
29 | margin: 0; | |||
|
30 | padding: 0; | |||
|
31 | border: 0; | |||
|
32 | font-size: 100%; | |||
|
33 | font: inherit; | |||
|
34 | vertical-align: baseline; | |||
|
35 | } | |||
|
36 | ||||
|
37 | article, aside, details, figcaption, figure, | |||
|
38 | footer, header, hgroup, menu, nav, section { | |||
|
39 | display: block; | |||
|
40 | } | |||
|
41 | ||||
|
42 | blockquote, q { quotes: none; } | |||
|
43 | ||||
|
44 | blockquote:before, blockquote:after, | |||
|
45 | q:before, q:after { content: ""; content: none; } | |||
|
46 | ||||
|
47 | ins { background-color: #ff9; color: #000; text-decoration: none; } | |||
|
48 | ||||
|
49 | mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } | |||
|
50 | ||||
|
51 | del { text-decoration: line-through; } | |||
|
52 | ||||
|
53 | abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } | |||
|
54 | ||||
|
55 | table { border-collapse: collapse; border-spacing: 0; } | |||
|
56 | ||||
|
57 | hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } | |||
|
58 | ||||
|
59 | input, select { vertical-align: middle; } | |||
|
60 | ||||
|
61 | ||||
|
62 | /** | |||
|
63 | * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/ | |||
|
64 | */ | |||
|
65 | ||||
|
66 | body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */ | |||
|
67 | select, input, textarea, button { font:99% sans-serif; } | |||
|
68 | ||||
|
69 | /* Normalize monospace sizing: | |||
|
70 | en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */ | |||
|
71 | pre, code, kbd, samp { font-family: monospace, sans-serif; } | |||
|
72 | ||||
|
73 |
@@ -0,0 +1,103 b'' | |||||
|
1 | ||||
|
2 | .border-box-sizing { | |||
|
3 | box-sizing: border-box; | |||
|
4 | -moz-box-sizing: border-box; | |||
|
5 | -webkit-box-sizing: border-box; | |||
|
6 | } | |||
|
7 | ||||
|
8 | /* Flexible box model classes */ | |||
|
9 | /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */ | |||
|
10 | ||||
|
11 | .hbox { | |||
|
12 | display: -webkit-box; | |||
|
13 | -webkit-box-orient: horizontal; | |||
|
14 | -webkit-box-align: stretch; | |||
|
15 | ||||
|
16 | display: -moz-box; | |||
|
17 | -moz-box-orient: horizontal; | |||
|
18 | -moz-box-align: stretch; | |||
|
19 | ||||
|
20 | display: box; | |||
|
21 | box-orient: horizontal; | |||
|
22 | box-align: stretch; | |||
|
23 | } | |||
|
24 | ||||
|
25 | .hbox > * { | |||
|
26 | -webkit-box-flex: 0; | |||
|
27 | -moz-box-flex: 0; | |||
|
28 | box-flex: 0; | |||
|
29 | } | |||
|
30 | ||||
|
31 | .vbox { | |||
|
32 | display: -webkit-box; | |||
|
33 | -webkit-box-orient: vertical; | |||
|
34 | -webkit-box-align: stretch; | |||
|
35 | ||||
|
36 | display: -moz-box; | |||
|
37 | -moz-box-orient: vertical; | |||
|
38 | -moz-box-align: stretch; | |||
|
39 | ||||
|
40 | display: box; | |||
|
41 | box-orient: vertical; | |||
|
42 | box-align: stretch; | |||
|
43 | } | |||
|
44 | ||||
|
45 | .vbox > * { | |||
|
46 | -webkit-box-flex: 0; | |||
|
47 | -moz-box-flex: 0; | |||
|
48 | box-flex: 0; | |||
|
49 | } | |||
|
50 | ||||
|
51 | .reverse { | |||
|
52 | -webkit-box-direction: reverse; | |||
|
53 | -moz-box-direction: reverse; | |||
|
54 | box-direction: reverse; | |||
|
55 | } | |||
|
56 | ||||
|
57 | .box-flex0 { | |||
|
58 | -webkit-box-flex: 0; | |||
|
59 | -moz-box-flex: 0; | |||
|
60 | box-flex: 0; | |||
|
61 | } | |||
|
62 | ||||
|
63 | .box-flex1, .box-flex { | |||
|
64 | -webkit-box-flex: 1; | |||
|
65 | -moz-box-flex: 1; | |||
|
66 | box-flex: 1; | |||
|
67 | } | |||
|
68 | ||||
|
69 | .box-flex2 { | |||
|
70 | -webkit-box-flex: 2; | |||
|
71 | -moz-box-flex: 2; | |||
|
72 | box-flex: 2; | |||
|
73 | } | |||
|
74 | ||||
|
75 | .box-group1 { | |||
|
76 | -webkit-box-flex-group: 1; | |||
|
77 | -moz-box-flex-group: 1; | |||
|
78 | box-flex-group: 1; | |||
|
79 | } | |||
|
80 | ||||
|
81 | .box-group2 { | |||
|
82 | -webkit-box-flex-group: 2; | |||
|
83 | -moz-box-flex-group: 2; | |||
|
84 | box-flex-group: 2; | |||
|
85 | } | |||
|
86 | ||||
|
87 | .start { | |||
|
88 | -webkit-box-pack: start; | |||
|
89 | -moz-box-pack: start; | |||
|
90 | box-pack: start; | |||
|
91 | } | |||
|
92 | ||||
|
93 | .end { | |||
|
94 | -webkit-box-pack: end; | |||
|
95 | -moz-box-pack: end; | |||
|
96 | box-pack: end; | |||
|
97 | } | |||
|
98 | ||||
|
99 | .center { | |||
|
100 | -webkit-box-pack: center; | |||
|
101 | -moz-box-pack: center; | |||
|
102 | box-pack: center; | |||
|
103 | } |
@@ -0,0 +1,82 b'' | |||||
|
1 | ||||
|
2 | /** | |||
|
3 | * Primary styles | |||
|
4 | * | |||
|
5 | * Author: IPython Development Team | |||
|
6 | */ | |||
|
7 | ||||
|
8 | ||||
|
9 | body { | |||
|
10 | background-color: white; | |||
|
11 | /* This makes sure that the body covers the entire window and needs to | |||
|
12 | be in a different element than the display: box in wrapper below */ | |||
|
13 | position: absolute; | |||
|
14 | left: 0px; | |||
|
15 | right: 0px; | |||
|
16 | top: 0px; | |||
|
17 | bottom: 0px; | |||
|
18 | overflow: auto; | |||
|
19 | } | |||
|
20 | ||||
|
21 | #left_panel { | |||
|
22 | } | |||
|
23 | ||||
|
24 | #drop_zone { | |||
|
25 | height: 200px; | |||
|
26 | width: 200px | |||
|
27 | } | |||
|
28 | ||||
|
29 | #content_panel { | |||
|
30 | width: 600px; | |||
|
31 | } | |||
|
32 | ||||
|
33 | #content_toolbar { | |||
|
34 | padding: 10px 5px 5px 5px; | |||
|
35 | height: 25px; | |||
|
36 | line-height: 25px; | |||
|
37 | } | |||
|
38 | ||||
|
39 | #header_border { | |||
|
40 | width: 100%; | |||
|
41 | height: 2px; | |||
|
42 | } | |||
|
43 | ||||
|
44 | #app_hbox { | |||
|
45 | width: 100%; | |||
|
46 | } | |||
|
47 | ||||
|
48 | #drag_info { | |||
|
49 | float: left; | |||
|
50 | } | |||
|
51 | ||||
|
52 | #notebooks_buttons { | |||
|
53 | float: right; | |||
|
54 | } | |||
|
55 | ||||
|
56 | #project_name { | |||
|
57 | height: 25px; | |||
|
58 | line-height: 25px; | |||
|
59 | padding: 3px; | |||
|
60 | } | |||
|
61 | ||||
|
62 | .notebook_item { | |||
|
63 | height: 25px; | |||
|
64 | line-height: 25px; | |||
|
65 | padding: 3px; | |||
|
66 | } | |||
|
67 | ||||
|
68 | .notebook_item a { | |||
|
69 | text-decoration: none; | |||
|
70 | } | |||
|
71 | ||||
|
72 | .item_buttons { | |||
|
73 | float: right; | |||
|
74 | } | |||
|
75 | ||||
|
76 | .item_buttons .upload_button { | |||
|
77 | color: darkred; | |||
|
78 | } | |||
|
79 | ||||
|
80 | .highlight_text { | |||
|
81 | color: blue; | |||
|
82 | } |
@@ -0,0 +1,321 b'' | |||||
|
1 | ||||
|
2 | /** | |||
|
3 | * Primary styles | |||
|
4 | * | |||
|
5 | * Author: IPython Development Team | |||
|
6 | */ | |||
|
7 | ||||
|
8 | ||||
|
9 | body { | |||
|
10 | background-color: white; | |||
|
11 | /* This makes sure that the body covers the entire window and needs to | |||
|
12 | be in a different element than the display: box in wrapper below */ | |||
|
13 | position: absolute; | |||
|
14 | left: 0px; | |||
|
15 | right: 0px; | |||
|
16 | top: 0px; | |||
|
17 | bottom: 0px; | |||
|
18 | overflow: hidden; | |||
|
19 | } | |||
|
20 | ||||
|
21 | span#save_widget { | |||
|
22 | position: absolute; | |||
|
23 | left: 0px; | |||
|
24 | padding: 5px 0px; | |||
|
25 | margin: 0px 0px 0px 0px; | |||
|
26 | } | |||
|
27 | ||||
|
28 | input#notebook_name { | |||
|
29 | height: 1em; | |||
|
30 | line-height: 1em; | |||
|
31 | padding: 5px; | |||
|
32 | } | |||
|
33 | ||||
|
34 | span#kernel_status { | |||
|
35 | position: absolute; | |||
|
36 | padding: 8px 5px 5px 5px; | |||
|
37 | right: 10px; | |||
|
38 | font-weight: bold; | |||
|
39 | } | |||
|
40 | ||||
|
41 | .status_idle { | |||
|
42 | color: gray; | |||
|
43 | } | |||
|
44 | ||||
|
45 | .status_busy { | |||
|
46 | color: red; | |||
|
47 | } | |||
|
48 | ||||
|
49 | .status_restarting { | |||
|
50 | color: black; | |||
|
51 | } | |||
|
52 | ||||
|
53 | div#left_panel { | |||
|
54 | overflow-y: auto; | |||
|
55 | top: 0px; | |||
|
56 | left: 0px; | |||
|
57 | margin: 0px; | |||
|
58 | padding: 0px; | |||
|
59 | position: absolute; | |||
|
60 | } | |||
|
61 | ||||
|
62 | h3.section_header { | |||
|
63 | padding: 5px; | |||
|
64 | } | |||
|
65 | ||||
|
66 | div.section_content { | |||
|
67 | padding: 5px; | |||
|
68 | } | |||
|
69 | ||||
|
70 | span.section_row_buttons button { | |||
|
71 | width: 70px; | |||
|
72 | } | |||
|
73 | ||||
|
74 | span.section_row_buttons a { | |||
|
75 | width: 70px; | |||
|
76 | } | |||
|
77 | ||||
|
78 | .section_row { | |||
|
79 | margin: 5px 0px; | |||
|
80 | } | |||
|
81 | ||||
|
82 | .section_row_buttons { | |||
|
83 | float: right; | |||
|
84 | } | |||
|
85 | ||||
|
86 | #kernel_persist { | |||
|
87 | float: right; | |||
|
88 | } | |||
|
89 | ||||
|
90 | .help_string { | |||
|
91 | float: right; | |||
|
92 | width: 170px; | |||
|
93 | padding: 0px 5px; | |||
|
94 | text-align: left; | |||
|
95 | font-size: 85%; | |||
|
96 | } | |||
|
97 | ||||
|
98 | .help_string_label { | |||
|
99 | float: right; | |||
|
100 | font-size: 85%; | |||
|
101 | } | |||
|
102 | ||||
|
103 | #autoindent_span { | |||
|
104 | float: right; | |||
|
105 | } | |||
|
106 | ||||
|
107 | .checkbox_label { | |||
|
108 | font-size: 85%; | |||
|
109 | float: right; | |||
|
110 | padding: 0.3em; | |||
|
111 | } | |||
|
112 | ||||
|
113 | .section_row_header { | |||
|
114 | float: left; | |||
|
115 | font-size: 85%; | |||
|
116 | padding: 0.4em 0em; | |||
|
117 | font-weight: bold; | |||
|
118 | } | |||
|
119 | ||||
|
120 | span.button_label { | |||
|
121 | padding: 0.2em 1em; | |||
|
122 | font-size: 77%; | |||
|
123 | float: right; | |||
|
124 | } | |||
|
125 | ||||
|
126 | /* This is needed because FF was adding a 2px margin top and bottom. */ | |||
|
127 | .section_row .ui-button { | |||
|
128 | margin-top: 0px; | |||
|
129 | margin-bottom: 0px; | |||
|
130 | } | |||
|
131 | ||||
|
132 | #download_format { | |||
|
133 | float: right; | |||
|
134 | font-size: 85%; | |||
|
135 | width: 62px; | |||
|
136 | margin: 1px 5px; | |||
|
137 | } | |||
|
138 | ||||
|
139 | div#left_panel_splitter { | |||
|
140 | width: 8px; | |||
|
141 | top: 0px; | |||
|
142 | left: 202px; | |||
|
143 | margin: 0px; | |||
|
144 | padding: 0px; | |||
|
145 | position: absolute; | |||
|
146 | } | |||
|
147 | ||||
|
148 | div#notebook_panel { | |||
|
149 | /* The L margin will be set in the Javascript code*/ | |||
|
150 | margin: 0px 0px 0px 0px; | |||
|
151 | padding: 0px; | |||
|
152 | } | |||
|
153 | ||||
|
154 | div#notebook { | |||
|
155 | overflow-y: scroll; | |||
|
156 | overflow-x: auto; | |||
|
157 | width: 100%; | |||
|
158 | /* This spaces the cell away from the edge of the notebook area */ | |||
|
159 | padding: 15px 15px 15px 15px; | |||
|
160 | margin: 0px | |||
|
161 | background-color: white; | |||
|
162 | } | |||
|
163 | ||||
|
164 | div#pager_splitter { | |||
|
165 | height: 8px; | |||
|
166 | } | |||
|
167 | ||||
|
168 | div#pager { | |||
|
169 | padding: 15px; | |||
|
170 | overflow: auto; | |||
|
171 | } | |||
|
172 | ||||
|
173 | div.cell { | |||
|
174 | width: 100%; | |||
|
175 | padding: 5px; | |||
|
176 | /* This acts as a spacer between cells, that is outside the border */ | |||
|
177 | margin: 5px 0px 5px 0px; | |||
|
178 | } | |||
|
179 | ||||
|
180 | div.code_cell { | |||
|
181 | background-color: white; | |||
|
182 | } | |||
|
183 | ||||
|
184 | div.prompt { | |||
|
185 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ | |||
|
186 | width: 11ex; | |||
|
187 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ | |||
|
188 | padding: 0.4em; | |||
|
189 | margin: 0px; | |||
|
190 | font-family: monospace; | |||
|
191 | text-align:right; | |||
|
192 | } | |||
|
193 | ||||
|
194 | div.input { | |||
|
195 | page-break-inside: avoid; | |||
|
196 | } | |||
|
197 | ||||
|
198 | div.input_area { | |||
|
199 | color: black; | |||
|
200 | } | |||
|
201 | ||||
|
202 | div.input_prompt { | |||
|
203 | color: navy; | |||
|
204 | } | |||
|
205 | ||||
|
206 | div.output { | |||
|
207 | /* This is a spacer between the input and output of each cell */ | |||
|
208 | margin-top: 5px; | |||
|
209 | } | |||
|
210 | ||||
|
211 | div.output_prompt { | |||
|
212 | color: darkred; | |||
|
213 | } | |||
|
214 | ||||
|
215 | /* This class is the outer container of all output sections. */ | |||
|
216 | div.output_area { | |||
|
217 | padding: 0px; | |||
|
218 | page-break-inside: avoid; | |||
|
219 | } | |||
|
220 | ||||
|
221 | /* This class is for the output subarea inside the output_area and after | |||
|
222 | the prompt div. */ | |||
|
223 | div.output_subarea { | |||
|
224 | padding: 0.4em; | |||
|
225 | } | |||
|
226 | ||||
|
227 | /* The rest of the output_* classes are for special styling of the different | |||
|
228 | output types */ | |||
|
229 | ||||
|
230 | div.output_stream { | |||
|
231 | text-align: left; | |||
|
232 | color: black; | |||
|
233 | font-family: monospace; | |||
|
234 | } | |||
|
235 | ||||
|
236 | div.output_latex { | |||
|
237 | text-align: left; | |||
|
238 | color: black; | |||
|
239 | } | |||
|
240 | ||||
|
241 | div.output_html { | |||
|
242 | } | |||
|
243 | ||||
|
244 | div.output_png { | |||
|
245 | } | |||
|
246 | ||||
|
247 | div.output_jpeg { | |||
|
248 | } | |||
|
249 | ||||
|
250 | div.text_cell { | |||
|
251 | background-color: white; | |||
|
252 | } | |||
|
253 | ||||
|
254 | div.text_cell_input { | |||
|
255 | color: black; | |||
|
256 | } | |||
|
257 | ||||
|
258 | div.text_cell_render { | |||
|
259 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |||
|
260 | outline: none; | |||
|
261 | resize: none; | |||
|
262 | width: inherit; | |||
|
263 | border-style: none; | |||
|
264 | padding: 5px; | |||
|
265 | color: black; | |||
|
266 | } | |||
|
267 | ||||
|
268 | .CodeMirror { | |||
|
269 | line-height: 1.231; /* Changed from 1em to our global default */ | |||
|
270 | } | |||
|
271 | ||||
|
272 | .CodeMirror-scroll { | |||
|
273 | height: auto; /* Changed to auto to autogrow */ | |||
|
274 | /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ | |||
|
275 | /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ | |||
|
276 | overflow-y: hidden; | |||
|
277 | overflow-x: auto; /* Changed from auto to remove scrollbar */ | |||
|
278 | } | |||
|
279 | ||||
|
280 | /* CSS font colors for translated ANSI colors. */ | |||
|
281 | ||||
|
282 | ||||
|
283 | .ansiblack {color: black;} | |||
|
284 | .ansired {color: darkred;} | |||
|
285 | .ansigreen {color: darkgreen;} | |||
|
286 | .ansiyellow {color: brown;} | |||
|
287 | .ansiblue {color: darkblue;} | |||
|
288 | .ansipurple {color: darkviolet;} | |||
|
289 | .ansicyan {color: steelblue;} | |||
|
290 | .ansigrey {color: grey;} | |||
|
291 | .ansibold {font-weight: bold;} | |||
|
292 | ||||
|
293 | .completions { | |||
|
294 | position: absolute; | |||
|
295 | z-index: 10; | |||
|
296 | overflow: auto; | |||
|
297 | border: 1px solid black; | |||
|
298 | } | |||
|
299 | ||||
|
300 | .completions select { | |||
|
301 | background: white; | |||
|
302 | outline: none; | |||
|
303 | border: none; | |||
|
304 | padding: 0px; | |||
|
305 | margin: 0px; | |||
|
306 | font-family: monospace; | |||
|
307 | } | |||
|
308 | ||||
|
309 | @media print { | |||
|
310 | body { overflow: visible !important; } | |||
|
311 | .ui-widget-content { border: 0px; } | |||
|
312 | } | |||
|
313 | ||||
|
314 | .shortcut_key { | |||
|
315 | display: inline-block; | |||
|
316 | width: 10ex; | |||
|
317 | text-align: right; | |||
|
318 | } | |||
|
319 | ||||
|
320 | .shortcut_descr { | |||
|
321 | } No newline at end of file |
@@ -0,0 +1,59 b'' | |||||
|
1 | .rendered_html {color: black;} | |||
|
2 | .rendered_html em {font-style: italic;} | |||
|
3 | .rendered_html strong {font-weight: bold;} | |||
|
4 | .rendered_html u {text-decoration: underline;} | |||
|
5 | .rendered_html :link { text-decoration: underline } | |||
|
6 | .rendered_html :visited { text-decoration: underline } | |||
|
7 | .rendered_html h1 {font-size: 197%; margin: .65em 0; font-weight: bold;} | |||
|
8 | .rendered_html h2 {font-size: 153.9%; margin: .75em 0; font-weight: bold;} | |||
|
9 | .rendered_html h3 {font-size: 123.1%; margin: .85em 0; font-weight: bold;} | |||
|
10 | .rendered_html h4 {font-size: 100% margin: 0.95em 0; font-weight: bold;} | |||
|
11 | .rendered_html h5 {font-size: 85%; margin: 1.5em 0; font-weight: bold;} | |||
|
12 | .rendered_html h6 {font-size: 77%; margin: 1.65em 0; font-weight: bold;} | |||
|
13 | .rendered_html ul {list-style:disc; margin: 1em 2em;} | |||
|
14 | .rendered_html ul ul {list-style:square; margin: 0em 2em;} | |||
|
15 | .rendered_html ul ul ul {list-style:circle; margin-left: 0em 2em;} | |||
|
16 | .rendered_html ol {list-style:upper-roman; margin: 1em 2em;} | |||
|
17 | .rendered_html ol ol {list-style:upper-alpha; margin: 0em 2em;} | |||
|
18 | .rendered_html ol ol ol {list-style:decimal; margin: 0em 2em;} | |||
|
19 | .rendered_html ol ol ol ol {list-style:lower-alpha; margin 0em 2em;} | |||
|
20 | .rendered_html ol ol ol ol ol {list-style:lower-roman; 0em 2em;} | |||
|
21 | ||||
|
22 | .rendered_html hr { | |||
|
23 | color: black; | |||
|
24 | background-color: black; | |||
|
25 | } | |||
|
26 | ||||
|
27 | .rendered_html pre { | |||
|
28 | margin: 1em 2em; | |||
|
29 | } | |||
|
30 | ||||
|
31 | .rendered_html blockquote { | |||
|
32 | margin: 1em 2em; | |||
|
33 | } | |||
|
34 | ||||
|
35 | .rendered_html table { | |||
|
36 | border: 1px solid black; | |||
|
37 | border-collapse: collapse; | |||
|
38 | margin: 1em 2em; | |||
|
39 | } | |||
|
40 | ||||
|
41 | .rendered_html td { | |||
|
42 | border: 1px solid black; | |||
|
43 | text-align: left; | |||
|
44 | vertical-align: middle; | |||
|
45 | padding: 4px; | |||
|
46 | } | |||
|
47 | ||||
|
48 | .rendered_html th { | |||
|
49 | border: 1px solid black; | |||
|
50 | text-align: left; | |||
|
51 | vertical-align: middle; | |||
|
52 | padding: 4px; | |||
|
53 | font-weight: bold; | |||
|
54 | } | |||
|
55 | ||||
|
56 | .rendered_html tr { | |||
|
57 | border: 1px solid black; | |||
|
58 | } | |||
|
59 |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
This diff has been collapsed as it changes many lines, (2295 lines changed) Show them Hide them | |||||
@@ -0,0 +1,2295 b'' | |||||
|
1 | /* | |||
|
2 | * | |||
|
3 | * Wijmo Aristo Theme | |||
|
4 | * http://wijmo.com/ | |||
|
5 | * | |||
|
6 | * Copyright(c) ComponentOne, LLC. All rights reserved. | |||
|
7 | * | |||
|
8 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
9 | * licensing@wijmo.com | |||
|
10 | * http://www.wijmo.com/license | |||
|
11 | * | |||
|
12 | * Based on the Aristo theme concept created by 280 North and Pinvoke (https://github.com/280north/aristo). | |||
|
13 | * | |||
|
14 | */ | |||
|
15 | ||||
|
16 | a | |||
|
17 | { | |||
|
18 | outline: none; | |||
|
19 | } | |||
|
20 | ||||
|
21 | /* Layout helpers | |||
|
22 | ----------------------------------*/ | |||
|
23 | .ui-helper-hidden | |||
|
24 | { | |||
|
25 | display: none; | |||
|
26 | } | |||
|
27 | .ui-helper-hidden-accessible | |||
|
28 | { | |||
|
29 | position: absolute; | |||
|
30 | left: -99999999px; | |||
|
31 | } | |||
|
32 | .ui-helper-reset | |||
|
33 | { | |||
|
34 | margin: 0; | |||
|
35 | padding: 0; | |||
|
36 | border: 0; | |||
|
37 | outline: 0; | |||
|
38 | line-height: 1.3; | |||
|
39 | text-decoration: none; | |||
|
40 | font-size: 100%; | |||
|
41 | list-style: none; | |||
|
42 | } | |||
|
43 | .ui-helper-clearfix:after | |||
|
44 | { | |||
|
45 | content: "."; | |||
|
46 | display: block; | |||
|
47 | height: 0; | |||
|
48 | clear: both; | |||
|
49 | visibility: hidden; | |||
|
50 | } | |||
|
51 | .ui-helper-clearfix | |||
|
52 | { | |||
|
53 | display: inline-block; | |||
|
54 | } | |||
|
55 | /* required comment for clearfix to work in Opera \*/ | |||
|
56 | * html .ui-helper-clearfix | |||
|
57 | { | |||
|
58 | height: 1%; | |||
|
59 | } | |||
|
60 | .ui-helper-clearfix | |||
|
61 | { | |||
|
62 | display: block; | |||
|
63 | } | |||
|
64 | /* end clearfix */ | |||
|
65 | .ui-helper-zfix | |||
|
66 | { | |||
|
67 | width: 100%; | |||
|
68 | height: 100%; | |||
|
69 | top: 0; | |||
|
70 | left: 0; | |||
|
71 | position: absolute; | |||
|
72 | opacity: 0; | |||
|
73 | filter: Alpha(Opacity=0); | |||
|
74 | } | |||
|
75 | ||||
|
76 | ||||
|
77 | /* Interaction Cues | |||
|
78 | ----------------------------------*/ | |||
|
79 | .ui-state-disabled | |||
|
80 | { | |||
|
81 | cursor: default !important; | |||
|
82 | } | |||
|
83 | ||||
|
84 | ||||
|
85 | /* Icons | |||
|
86 | ----------------------------------*/ | |||
|
87 | ||||
|
88 | /* states and images */ | |||
|
89 | .ui-icon | |||
|
90 | { | |||
|
91 | display: block; | |||
|
92 | text-indent: -99999px; | |||
|
93 | overflow: hidden; | |||
|
94 | background-repeat: no-repeat; | |||
|
95 | -moz-border-radius: 10px; | |||
|
96 | -webkit-border-radius: 10px; | |||
|
97 | border-radius: 10px; | |||
|
98 | } | |||
|
99 | ||||
|
100 | ||||
|
101 | /* Misc visuals | |||
|
102 | ----------------------------------*/ | |||
|
103 | ||||
|
104 | /* Overlays */ | |||
|
105 | .ui-widget-overlay | |||
|
106 | { | |||
|
107 | position: absolute; | |||
|
108 | top: 0; | |||
|
109 | left: 0; | |||
|
110 | width: 100%; | |||
|
111 | height: 100%; | |||
|
112 | } | |||
|
113 | ||||
|
114 | ||||
|
115 | /* | |||
|
116 | * jQuery UI CSS Framework @VERSION | |||
|
117 | * | |||
|
118 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
119 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
120 | * http://jquery.org/license | |||
|
121 | * | |||
|
122 | * http://docs.jquery.com/UI/Theming/API | |||
|
123 | * | |||
|
124 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=3px&bgColorHeader=c4c4c4&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=a8a8a8&fcHeader=4f4f4f&iconColorHeader=898989&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=a8a8a8&fcContent=4f4f4f&iconColorContent=616161&bgColorDefault=c4c4c4&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=80&borderColorDefault=a8a8a8&fcDefault=4f4f4f&iconColorDefault=ffffff&bgColorHover=c4c4c4&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=80&borderColorHover=a8a8a8&fcHover=4f4f4f&iconColorHover=ffffff&bgColorActive=c4c4c4&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=4f4f4f&iconColorActive=ffffff&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=05_inset_soft.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=4f4f4f&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px | |||
|
125 | */ | |||
|
126 | ||||
|
127 | ||||
|
128 | /* Component containers | |||
|
129 | ----------------------------------*/ | |||
|
130 | .ui-widget | |||
|
131 | { | |||
|
132 | font-family: Arial,sans-serif; | |||
|
133 | font-size: 1.1em; | |||
|
134 | } | |||
|
135 | .ui-widget .ui-widget | |||
|
136 | { | |||
|
137 | font-size: 1em; | |||
|
138 | } | |||
|
139 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button | |||
|
140 | { | |||
|
141 | font-family: Arial,sans-serif; | |||
|
142 | font-size: 1em; | |||
|
143 | } | |||
|
144 | .ui-widget-content | |||
|
145 | { | |||
|
146 | border: 1px solid #a8a8a8; | |||
|
147 | background: #ffffff; | |||
|
148 | color: #4f4f4f; | |||
|
149 | } | |||
|
150 | .ui-widget-content a | |||
|
151 | { | |||
|
152 | color: #4f4f4f; | |||
|
153 | } | |||
|
154 | .ui-widget-header | |||
|
155 | { | |||
|
156 | border: 1px solid #a8a8a8; | |||
|
157 | background: #c4c4c4 url(images/ui-bg_highlight-soft_100_c4c4c4_1x100.png) 50% 50% repeat-x; | |||
|
158 | background: #c4c4c4 linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
159 | background: #c4c4c4 -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
160 | background: #c4c4c4 -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
161 | color: #333; | |||
|
162 | font-weight: bold; | |||
|
163 | text-shadow: 0px 1px 0px rgba(255,255,255,0.7); | |||
|
164 | } | |||
|
165 | .ui-widget-header a | |||
|
166 | { | |||
|
167 | color: #4f4f4f; | |||
|
168 | } | |||
|
169 | ||||
|
170 | /* Interaction states | |||
|
171 | ----------------------------------*/ | |||
|
172 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default | |||
|
173 | { | |||
|
174 | border: 1px solid #a8a8a8; | |||
|
175 | background: #c4c4c4 url(images/ui-bg_highlight-hard_80_c4c4c4_1x100.png) 50% 50% repeat-x; | |||
|
176 | background: #c4c4c4 linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
177 | background: #c4c4c4 -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
178 | background: #c4c4c4 -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
179 | font-weight: bold; | |||
|
180 | color: #4f4f4f; | |||
|
181 | text-shadow: 0px 1px 0px rgba(255,255,255,0.7); | |||
|
182 | } | |||
|
183 | .ui-state-default | |||
|
184 | { | |||
|
185 | -moz-box-shadow: inset 0px 1px 0px #fff; | |||
|
186 | -webkit-box-shadow: inset 0px 1px 0px #fff; | |||
|
187 | box-shadow: inset 0px 1px 0px #fff; | |||
|
188 | } | |||
|
189 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited | |||
|
190 | { | |||
|
191 | color: #4f4f4f; | |||
|
192 | text-decoration: none; | |||
|
193 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); | |||
|
194 | } | |||
|
195 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus | |||
|
196 | { | |||
|
197 | border: 1px solid #7096ab; | |||
|
198 | background: #85b2cb url(images/ui-bg_highlight-hard_80_85b2cb_1x100.png) 50% 50% repeat-x; | |||
|
199 | background: #85b2cb linear-gradient(top, rgba(255,255,255,0.6), rgba(255,255,255,0)); | |||
|
200 | background: #85b2cb -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.6)), to(rgba(255,255,255,0))); | |||
|
201 | background: #85b2cb -moz-linear-gradient(top, rgba(255,255,255,0.6), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#CCFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#CCFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
202 | font-weight: bold; | |||
|
203 | color: #313131; | |||
|
204 | -moz-box-shadow: 0 0 5px #85b2cb; | |||
|
205 | -webkit-box-shadow: 0px 0px 8px #85b2cb; | |||
|
206 | box-shadow: 0px 0px 8px #85b2cb; | |||
|
207 | } | |||
|
208 | .ui-state-hover | |||
|
209 | { | |||
|
210 | -moz-box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #fff; | |||
|
211 | -webkit-box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #fff; | |||
|
212 | box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #fff; | |||
|
213 | } | |||
|
214 | .ui-state-hover a, .ui-state-hover a:hover | |||
|
215 | { | |||
|
216 | color: #2f556a; | |||
|
217 | text-decoration: none; | |||
|
218 | } | |||
|
219 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active | |||
|
220 | { | |||
|
221 | border: 1px solid #7096ab; | |||
|
222 | background: #85b2cb url(images/ui-bg_inset-hard_65_85b2cb_1x100.png) 50% 50% repeat-x; | |||
|
223 | background: #85b2cb linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,0.4)); | |||
|
224 | background: #85b2cb -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0)), to(rgba(255,255,255,0.4))); | |||
|
225 | background: #85b2cb -moz-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,0.4)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF, endColorstr=#CCFFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF, endColorstr=#CCFFFFFF)"; */ | |||
|
226 | font-weight: bold; | |||
|
227 | color: #1C4257; | |||
|
228 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); | |||
|
229 | } | |||
|
230 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited | |||
|
231 | { | |||
|
232 | color: #2f556a; | |||
|
233 | text-decoration: none; | |||
|
234 | } | |||
|
235 | .ui-widget :active | |||
|
236 | { | |||
|
237 | outline: none; | |||
|
238 | } | |||
|
239 | .ui-state-active | |||
|
240 | { | |||
|
241 | -moz-box-shadow: inset 0px -1px 0px #fff; | |||
|
242 | -webkit-box-shadow: inset 0px 1px 0px #fff; | |||
|
243 | box-shadow: inset 0px 1px 0px #fff; | |||
|
244 | } | |||
|
245 | /* Interaction Cues | |||
|
246 | ----------------------------------*/ | |||
|
247 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight | |||
|
248 | { | |||
|
249 | border: 1px solid #666666; | |||
|
250 | background: #aaaaaa; | |||
|
251 | background: #aaaaaa linear-gradient(top, rgba(0,0,0,0.25), rgba(0,0,0,0)); | |||
|
252 | background: #aaaaaa -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.25)), to(rgba(0,0,0,0))); | |||
|
253 | background: #aaaaaa -moz-linear-gradient(top, rgba(0,0,0,0.25), rgba(0,0,0,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#33000000, endColorstr=#00000000); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#33000000, endColorstr=#00000000)"; */ | |||
|
254 | color: #ffffff; | |||
|
255 | text-shadow: 1px 1px 1px #333333; | |||
|
256 | } | |||
|
257 | ||||
|
258 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a | |||
|
259 | { | |||
|
260 | color: #363636; | |||
|
261 | } | |||
|
262 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error | |||
|
263 | { | |||
|
264 | border: 1px solid #cd0a0a; | |||
|
265 | background: #fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x; | |||
|
266 | background: #fef1ec linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
267 | background: #fef1ec -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
268 | background: #fef1ec -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)";*/ | |||
|
269 | color: #cd0a0a; | |||
|
270 | } | |||
|
271 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a | |||
|
272 | { | |||
|
273 | color: #cd0a0a; | |||
|
274 | } | |||
|
275 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text | |||
|
276 | { | |||
|
277 | color: #cd0a0a; | |||
|
278 | } | |||
|
279 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary | |||
|
280 | { | |||
|
281 | font-weight: bold; | |||
|
282 | } | |||
|
283 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary | |||
|
284 | { | |||
|
285 | opacity: .7; | |||
|
286 | filter: Alpha(Opacity=70); | |||
|
287 | font-weight: normal; | |||
|
288 | } | |||
|
289 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled | |||
|
290 | { | |||
|
291 | opacity: .35; | |||
|
292 | filter: Alpha(Opacity=35); | |||
|
293 | background-image: none; | |||
|
294 | } | |||
|
295 | ||||
|
296 | /* Icons | |||
|
297 | ----------------------------------*/ | |||
|
298 | ||||
|
299 | /* states and images */ | |||
|
300 | .ui-icon | |||
|
301 | { | |||
|
302 | width: 16px; | |||
|
303 | height: 16px; | |||
|
304 | background-image: url(images/ui-icons_616161_256x240.png); | |||
|
305 | } | |||
|
306 | .ui-widget-content .ui-icon | |||
|
307 | { | |||
|
308 | background-image: url(images/ui-icons_616161_256x240.png); | |||
|
309 | } | |||
|
310 | .ui-widget-header .ui-icon | |||
|
311 | { | |||
|
312 | background-image: url(images/ui-icons_898989_256x240.png); | |||
|
313 | } | |||
|
314 | .ui-state-default .ui-icon | |||
|
315 | { | |||
|
316 | background-image: url(images/ui-icons_38667f_256x240.png); | |||
|
317 | } | |||
|
318 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon | |||
|
319 | { | |||
|
320 | background-image: url(images/ui-icons_38667f_256x240.png); | |||
|
321 | } | |||
|
322 | .ui-state-active .ui-icon | |||
|
323 | { | |||
|
324 | background-image: url(images/ui-icons_38667f_256x240.png); | |||
|
325 | } | |||
|
326 | .ui-state-highlight .ui-icon | |||
|
327 | { | |||
|
328 | background-image: url(images/ui-icons_2e83ff_256x240.png); | |||
|
329 | } | |||
|
330 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon | |||
|
331 | { | |||
|
332 | background-image: url(images/ui-icons_cd0a0a_256x240.png); | |||
|
333 | } | |||
|
334 | ||||
|
335 | /* positioning */ | |||
|
336 | .ui-icon-carat-1-n | |||
|
337 | { | |||
|
338 | background-position: 0 0; | |||
|
339 | } | |||
|
340 | .ui-icon-carat-1-ne | |||
|
341 | { | |||
|
342 | background-position: -16px 0; | |||
|
343 | } | |||
|
344 | .ui-icon-carat-1-e | |||
|
345 | { | |||
|
346 | background-position: -32px 0; | |||
|
347 | } | |||
|
348 | .ui-icon-carat-1-se | |||
|
349 | { | |||
|
350 | background-position: -48px 0; | |||
|
351 | } | |||
|
352 | .ui-icon-carat-1-s | |||
|
353 | { | |||
|
354 | background-position: -64px 0; | |||
|
355 | } | |||
|
356 | .ui-icon-carat-1-sw | |||
|
357 | { | |||
|
358 | background-position: -80px 0; | |||
|
359 | } | |||
|
360 | .ui-icon-carat-1-w | |||
|
361 | { | |||
|
362 | background-position: -96px 0; | |||
|
363 | } | |||
|
364 | .ui-icon-carat-1-nw | |||
|
365 | { | |||
|
366 | background-position: -112px 0; | |||
|
367 | } | |||
|
368 | .ui-icon-carat-2-n-s | |||
|
369 | { | |||
|
370 | background-position: -128px 0; | |||
|
371 | } | |||
|
372 | .ui-icon-carat-2-e-w | |||
|
373 | { | |||
|
374 | background-position: -144px 0; | |||
|
375 | } | |||
|
376 | .ui-icon-triangle-1-n | |||
|
377 | { | |||
|
378 | background-position: 0 -16px; | |||
|
379 | } | |||
|
380 | .ui-icon-triangle-1-ne | |||
|
381 | { | |||
|
382 | background-position: -16px -16px; | |||
|
383 | } | |||
|
384 | .ui-icon-triangle-1-e | |||
|
385 | { | |||
|
386 | background-position: -32px -16px; | |||
|
387 | } | |||
|
388 | .ui-icon-triangle-1-se | |||
|
389 | { | |||
|
390 | background-position: -48px -16px; | |||
|
391 | } | |||
|
392 | .ui-icon-triangle-1-s | |||
|
393 | { | |||
|
394 | background-position: -64px -16px; | |||
|
395 | } | |||
|
396 | .ui-icon-triangle-1-sw | |||
|
397 | { | |||
|
398 | background-position: -80px -16px; | |||
|
399 | } | |||
|
400 | .ui-icon-triangle-1-w | |||
|
401 | { | |||
|
402 | background-position: -96px -16px; | |||
|
403 | } | |||
|
404 | .ui-icon-triangle-1-nw | |||
|
405 | { | |||
|
406 | background-position: -112px -16px; | |||
|
407 | } | |||
|
408 | .ui-icon-triangle-2-n-s | |||
|
409 | { | |||
|
410 | background-position: -128px -16px; | |||
|
411 | } | |||
|
412 | .ui-icon-triangle-2-e-w | |||
|
413 | { | |||
|
414 | background-position: -144px -16px; | |||
|
415 | } | |||
|
416 | .ui-icon-arrow-1-n | |||
|
417 | { | |||
|
418 | background-position: 0 -32px; | |||
|
419 | } | |||
|
420 | .ui-icon-arrow-1-ne | |||
|
421 | { | |||
|
422 | background-position: -16px -32px; | |||
|
423 | } | |||
|
424 | .ui-icon-arrow-1-e | |||
|
425 | { | |||
|
426 | background-position: -32px -32px; | |||
|
427 | } | |||
|
428 | .ui-icon-arrow-1-se | |||
|
429 | { | |||
|
430 | background-position: -48px -32px; | |||
|
431 | } | |||
|
432 | .ui-icon-arrow-1-s | |||
|
433 | { | |||
|
434 | background-position: -64px -32px; | |||
|
435 | } | |||
|
436 | .ui-icon-arrow-1-sw | |||
|
437 | { | |||
|
438 | background-position: -80px -32px; | |||
|
439 | } | |||
|
440 | .ui-icon-arrow-1-w | |||
|
441 | { | |||
|
442 | background-position: -96px -32px; | |||
|
443 | } | |||
|
444 | .ui-icon-arrow-1-nw | |||
|
445 | { | |||
|
446 | background-position: -112px -32px; | |||
|
447 | } | |||
|
448 | .ui-icon-arrow-2-n-s | |||
|
449 | { | |||
|
450 | background-position: -128px -32px; | |||
|
451 | } | |||
|
452 | .ui-icon-arrow-2-ne-sw | |||
|
453 | { | |||
|
454 | background-position: -144px -32px; | |||
|
455 | } | |||
|
456 | .ui-icon-arrow-2-e-w | |||
|
457 | { | |||
|
458 | background-position: -160px -32px; | |||
|
459 | } | |||
|
460 | .ui-icon-arrow-2-se-nw | |||
|
461 | { | |||
|
462 | background-position: -176px -32px; | |||
|
463 | } | |||
|
464 | .ui-icon-arrowstop-1-n | |||
|
465 | { | |||
|
466 | background-position: -192px -32px; | |||
|
467 | } | |||
|
468 | .ui-icon-arrowstop-1-e | |||
|
469 | { | |||
|
470 | background-position: -208px -32px; | |||
|
471 | } | |||
|
472 | .ui-icon-arrowstop-1-s | |||
|
473 | { | |||
|
474 | background-position: -224px -32px; | |||
|
475 | } | |||
|
476 | .ui-icon-arrowstop-1-w | |||
|
477 | { | |||
|
478 | background-position: -240px -32px; | |||
|
479 | } | |||
|
480 | .ui-icon-arrowthick-1-n | |||
|
481 | { | |||
|
482 | background-position: 0 -48px; | |||
|
483 | } | |||
|
484 | .ui-icon-arrowthick-1-ne | |||
|
485 | { | |||
|
486 | background-position: -16px -48px; | |||
|
487 | } | |||
|
488 | .ui-icon-arrowthick-1-e | |||
|
489 | { | |||
|
490 | background-position: -32px -48px; | |||
|
491 | } | |||
|
492 | .ui-icon-arrowthick-1-se | |||
|
493 | { | |||
|
494 | background-position: -48px -48px; | |||
|
495 | } | |||
|
496 | .ui-icon-arrowthick-1-s | |||
|
497 | { | |||
|
498 | background-position: -64px -48px; | |||
|
499 | } | |||
|
500 | .ui-icon-arrowthick-1-sw | |||
|
501 | { | |||
|
502 | background-position: -80px -48px; | |||
|
503 | } | |||
|
504 | .ui-icon-arrowthick-1-w | |||
|
505 | { | |||
|
506 | background-position: -96px -48px; | |||
|
507 | } | |||
|
508 | .ui-icon-arrowthick-1-nw | |||
|
509 | { | |||
|
510 | background-position: -112px -48px; | |||
|
511 | } | |||
|
512 | .ui-icon-arrowthick-2-n-s | |||
|
513 | { | |||
|
514 | background-position: -128px -48px; | |||
|
515 | } | |||
|
516 | .ui-icon-arrowthick-2-ne-sw | |||
|
517 | { | |||
|
518 | background-position: -144px -48px; | |||
|
519 | } | |||
|
520 | .ui-icon-arrowthick-2-e-w | |||
|
521 | { | |||
|
522 | background-position: -160px -48px; | |||
|
523 | } | |||
|
524 | .ui-icon-arrowthick-2-se-nw | |||
|
525 | { | |||
|
526 | background-position: -176px -48px; | |||
|
527 | } | |||
|
528 | .ui-icon-arrowthickstop-1-n | |||
|
529 | { | |||
|
530 | background-position: -192px -48px; | |||
|
531 | } | |||
|
532 | .ui-icon-arrowthickstop-1-e | |||
|
533 | { | |||
|
534 | background-position: -208px -48px; | |||
|
535 | } | |||
|
536 | .ui-icon-arrowthickstop-1-s | |||
|
537 | { | |||
|
538 | background-position: -224px -48px; | |||
|
539 | } | |||
|
540 | .ui-icon-arrowthickstop-1-w | |||
|
541 | { | |||
|
542 | background-position: -240px -48px; | |||
|
543 | } | |||
|
544 | .ui-icon-arrowreturnthick-1-w | |||
|
545 | { | |||
|
546 | background-position: 0 -64px; | |||
|
547 | } | |||
|
548 | .ui-icon-arrowreturnthick-1-n | |||
|
549 | { | |||
|
550 | background-position: -16px -64px; | |||
|
551 | } | |||
|
552 | .ui-icon-arrowreturnthick-1-e | |||
|
553 | { | |||
|
554 | background-position: -32px -64px; | |||
|
555 | } | |||
|
556 | .ui-icon-arrowreturnthick-1-s | |||
|
557 | { | |||
|
558 | background-position: -48px -64px; | |||
|
559 | } | |||
|
560 | .ui-icon-arrowreturn-1-w | |||
|
561 | { | |||
|
562 | background-position: -64px -64px; | |||
|
563 | } | |||
|
564 | .ui-icon-arrowreturn-1-n | |||
|
565 | { | |||
|
566 | background-position: -80px -64px; | |||
|
567 | } | |||
|
568 | .ui-icon-arrowreturn-1-e | |||
|
569 | { | |||
|
570 | background-position: -96px -64px; | |||
|
571 | } | |||
|
572 | .ui-icon-arrowreturn-1-s | |||
|
573 | { | |||
|
574 | background-position: -112px -64px; | |||
|
575 | } | |||
|
576 | .ui-icon-arrowrefresh-1-w | |||
|
577 | { | |||
|
578 | background-position: -128px -64px; | |||
|
579 | } | |||
|
580 | .ui-icon-arrowrefresh-1-n | |||
|
581 | { | |||
|
582 | background-position: -144px -64px; | |||
|
583 | } | |||
|
584 | .ui-icon-arrowrefresh-1-e | |||
|
585 | { | |||
|
586 | background-position: -160px -64px; | |||
|
587 | } | |||
|
588 | .ui-icon-arrowrefresh-1-s | |||
|
589 | { | |||
|
590 | background-position: -176px -64px; | |||
|
591 | } | |||
|
592 | .ui-icon-arrow-4 | |||
|
593 | { | |||
|
594 | background-position: 0 -80px; | |||
|
595 | } | |||
|
596 | .ui-icon-arrow-4-diag | |||
|
597 | { | |||
|
598 | background-position: -16px -80px; | |||
|
599 | } | |||
|
600 | .ui-icon-extlink | |||
|
601 | { | |||
|
602 | background-position: -32px -80px; | |||
|
603 | } | |||
|
604 | .ui-icon-newwin | |||
|
605 | { | |||
|
606 | background-position: -48px -80px; | |||
|
607 | } | |||
|
608 | .ui-icon-refresh | |||
|
609 | { | |||
|
610 | background-position: -64px -80px; | |||
|
611 | } | |||
|
612 | .ui-icon-shuffle | |||
|
613 | { | |||
|
614 | background-position: -80px -80px; | |||
|
615 | } | |||
|
616 | .ui-icon-transfer-e-w | |||
|
617 | { | |||
|
618 | background-position: -96px -80px; | |||
|
619 | } | |||
|
620 | .ui-icon-transferthick-e-w | |||
|
621 | { | |||
|
622 | background-position: -112px -80px; | |||
|
623 | } | |||
|
624 | .ui-icon-folder-collapsed | |||
|
625 | { | |||
|
626 | background-position: 0 -96px; | |||
|
627 | } | |||
|
628 | .ui-icon-folder-open | |||
|
629 | { | |||
|
630 | background-position: -16px -96px; | |||
|
631 | } | |||
|
632 | .ui-icon-document | |||
|
633 | { | |||
|
634 | background-position: -32px -96px; | |||
|
635 | } | |||
|
636 | .ui-icon-document-b | |||
|
637 | { | |||
|
638 | background-position: -48px -96px; | |||
|
639 | } | |||
|
640 | .ui-icon-note | |||
|
641 | { | |||
|
642 | background-position: -64px -96px; | |||
|
643 | } | |||
|
644 | .ui-icon-mail-closed | |||
|
645 | { | |||
|
646 | background-position: -80px -96px; | |||
|
647 | } | |||
|
648 | .ui-icon-mail-open | |||
|
649 | { | |||
|
650 | background-position: -96px -96px; | |||
|
651 | } | |||
|
652 | .ui-icon-suitcase | |||
|
653 | { | |||
|
654 | background-position: -112px -96px; | |||
|
655 | } | |||
|
656 | .ui-icon-comment | |||
|
657 | { | |||
|
658 | background-position: -128px -96px; | |||
|
659 | } | |||
|
660 | .ui-icon-person | |||
|
661 | { | |||
|
662 | background-position: -144px -96px; | |||
|
663 | } | |||
|
664 | .ui-icon-print | |||
|
665 | { | |||
|
666 | background-position: -160px -96px; | |||
|
667 | } | |||
|
668 | .ui-icon-trash | |||
|
669 | { | |||
|
670 | background-position: -176px -96px; | |||
|
671 | } | |||
|
672 | .ui-icon-locked | |||
|
673 | { | |||
|
674 | background-position: -192px -96px; | |||
|
675 | } | |||
|
676 | .ui-icon-unlocked | |||
|
677 | { | |||
|
678 | background-position: -208px -96px; | |||
|
679 | } | |||
|
680 | .ui-icon-bookmark | |||
|
681 | { | |||
|
682 | background-position: -224px -96px; | |||
|
683 | } | |||
|
684 | .ui-icon-tag | |||
|
685 | { | |||
|
686 | background-position: -240px -96px; | |||
|
687 | } | |||
|
688 | .ui-icon-home | |||
|
689 | { | |||
|
690 | background-position: 0 -112px; | |||
|
691 | } | |||
|
692 | .ui-icon-flag | |||
|
693 | { | |||
|
694 | background-position: -16px -112px; | |||
|
695 | } | |||
|
696 | .ui-icon-calendar | |||
|
697 | { | |||
|
698 | background-position: -32px -112px; | |||
|
699 | } | |||
|
700 | .ui-icon-cart | |||
|
701 | { | |||
|
702 | background-position: -48px -112px; | |||
|
703 | } | |||
|
704 | .ui-icon-pencil | |||
|
705 | { | |||
|
706 | background-position: -64px -112px; | |||
|
707 | } | |||
|
708 | .ui-icon-clock | |||
|
709 | { | |||
|
710 | background-position: -80px -112px; | |||
|
711 | } | |||
|
712 | .ui-icon-disk | |||
|
713 | { | |||
|
714 | background-position: -96px -112px; | |||
|
715 | } | |||
|
716 | .ui-icon-calculator | |||
|
717 | { | |||
|
718 | background-position: -112px -112px; | |||
|
719 | } | |||
|
720 | .ui-icon-zoomin | |||
|
721 | { | |||
|
722 | background-position: -128px -112px; | |||
|
723 | } | |||
|
724 | .ui-icon-zoomout | |||
|
725 | { | |||
|
726 | background-position: -144px -112px; | |||
|
727 | } | |||
|
728 | .ui-icon-search | |||
|
729 | { | |||
|
730 | background-position: -160px -112px; | |||
|
731 | } | |||
|
732 | .ui-icon-wrench | |||
|
733 | { | |||
|
734 | background-position: -176px -112px; | |||
|
735 | } | |||
|
736 | .ui-icon-gear | |||
|
737 | { | |||
|
738 | background-position: -192px -112px; | |||
|
739 | } | |||
|
740 | .ui-icon-heart | |||
|
741 | { | |||
|
742 | background-position: -208px -112px; | |||
|
743 | } | |||
|
744 | .ui-icon-star | |||
|
745 | { | |||
|
746 | background-position: -224px -112px; | |||
|
747 | } | |||
|
748 | .ui-icon-link | |||
|
749 | { | |||
|
750 | background-position: -240px -112px; | |||
|
751 | } | |||
|
752 | .ui-icon-cancel | |||
|
753 | { | |||
|
754 | background-position: 0 -128px; | |||
|
755 | } | |||
|
756 | .ui-icon-plus | |||
|
757 | { | |||
|
758 | background-position: -16px -128px; | |||
|
759 | } | |||
|
760 | .ui-icon-plusthick | |||
|
761 | { | |||
|
762 | background-position: -32px -128px; | |||
|
763 | } | |||
|
764 | .ui-icon-minus | |||
|
765 | { | |||
|
766 | background-position: -48px -128px; | |||
|
767 | } | |||
|
768 | .ui-icon-minusthick | |||
|
769 | { | |||
|
770 | background-position: -64px -128px; | |||
|
771 | } | |||
|
772 | .ui-icon-close | |||
|
773 | { | |||
|
774 | background-position: -80px -128px; | |||
|
775 | } | |||
|
776 | .ui-icon-closethick | |||
|
777 | { | |||
|
778 | background-position: -96px -128px; | |||
|
779 | } | |||
|
780 | .ui-icon-key | |||
|
781 | { | |||
|
782 | background-position: -112px -128px; | |||
|
783 | } | |||
|
784 | .ui-icon-lightbulb | |||
|
785 | { | |||
|
786 | background-position: -128px -128px; | |||
|
787 | } | |||
|
788 | .ui-icon-scissors | |||
|
789 | { | |||
|
790 | background-position: -144px -128px; | |||
|
791 | } | |||
|
792 | .ui-icon-clipboard | |||
|
793 | { | |||
|
794 | background-position: -160px -128px; | |||
|
795 | } | |||
|
796 | .ui-icon-copy | |||
|
797 | { | |||
|
798 | background-position: -176px -128px; | |||
|
799 | } | |||
|
800 | .ui-icon-contact | |||
|
801 | { | |||
|
802 | background-position: -192px -128px; | |||
|
803 | } | |||
|
804 | .ui-icon-image | |||
|
805 | { | |||
|
806 | background-position: -208px -128px; | |||
|
807 | } | |||
|
808 | .ui-icon-video | |||
|
809 | { | |||
|
810 | background-position: -224px -128px; | |||
|
811 | } | |||
|
812 | .ui-icon-script | |||
|
813 | { | |||
|
814 | background-position: -240px -128px; | |||
|
815 | } | |||
|
816 | .ui-icon-alert | |||
|
817 | { | |||
|
818 | background-position: 0 -144px; | |||
|
819 | } | |||
|
820 | .ui-icon-info | |||
|
821 | { | |||
|
822 | background-position: -16px -144px; | |||
|
823 | } | |||
|
824 | .ui-icon-notice | |||
|
825 | { | |||
|
826 | background-position: -32px -144px; | |||
|
827 | } | |||
|
828 | .ui-icon-help | |||
|
829 | { | |||
|
830 | background-position: -48px -144px; | |||
|
831 | } | |||
|
832 | .ui-icon-check | |||
|
833 | { | |||
|
834 | background-position: -64px -144px; | |||
|
835 | } | |||
|
836 | .ui-icon-bullet | |||
|
837 | { | |||
|
838 | background-position: -80px -144px; | |||
|
839 | } | |||
|
840 | .ui-icon-radio-off | |||
|
841 | { | |||
|
842 | background-position: -96px -144px; | |||
|
843 | } | |||
|
844 | .ui-icon-radio-on | |||
|
845 | { | |||
|
846 | background-position: -112px -144px; | |||
|
847 | } | |||
|
848 | .ui-icon-pin-w | |||
|
849 | { | |||
|
850 | background-position: -128px -144px; | |||
|
851 | } | |||
|
852 | .ui-icon-pin-s | |||
|
853 | { | |||
|
854 | background-position: -144px -144px; | |||
|
855 | } | |||
|
856 | .ui-icon-play | |||
|
857 | { | |||
|
858 | background-position: 0 -160px; | |||
|
859 | } | |||
|
860 | .ui-icon-pause | |||
|
861 | { | |||
|
862 | background-position: -16px -160px; | |||
|
863 | } | |||
|
864 | .ui-icon-seek-next | |||
|
865 | { | |||
|
866 | background-position: -32px -160px; | |||
|
867 | } | |||
|
868 | .ui-icon-seek-prev | |||
|
869 | { | |||
|
870 | background-position: -48px -160px; | |||
|
871 | } | |||
|
872 | .ui-icon-seek-end | |||
|
873 | { | |||
|
874 | background-position: -64px -160px; | |||
|
875 | } | |||
|
876 | .ui-icon-seek-start | |||
|
877 | { | |||
|
878 | background-position: -80px -160px; | |||
|
879 | } | |||
|
880 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ | |||
|
881 | .ui-icon-seek-first | |||
|
882 | { | |||
|
883 | background-position: -80px -160px; | |||
|
884 | } | |||
|
885 | .ui-icon-stop | |||
|
886 | { | |||
|
887 | background-position: -96px -160px; | |||
|
888 | } | |||
|
889 | .ui-icon-eject | |||
|
890 | { | |||
|
891 | background-position: -112px -160px; | |||
|
892 | } | |||
|
893 | .ui-icon-volume-off | |||
|
894 | { | |||
|
895 | background-position: -128px -160px; | |||
|
896 | } | |||
|
897 | .ui-icon-volume-on | |||
|
898 | { | |||
|
899 | background-position: -144px -160px; | |||
|
900 | } | |||
|
901 | .ui-icon-power | |||
|
902 | { | |||
|
903 | background-position: 0 -176px; | |||
|
904 | } | |||
|
905 | .ui-icon-signal-diag | |||
|
906 | { | |||
|
907 | background-position: -16px -176px; | |||
|
908 | } | |||
|
909 | .ui-icon-signal | |||
|
910 | { | |||
|
911 | background-position: -32px -176px; | |||
|
912 | } | |||
|
913 | .ui-icon-battery-0 | |||
|
914 | { | |||
|
915 | background-position: -48px -176px; | |||
|
916 | } | |||
|
917 | .ui-icon-battery-1 | |||
|
918 | { | |||
|
919 | background-position: -64px -176px; | |||
|
920 | } | |||
|
921 | .ui-icon-battery-2 | |||
|
922 | { | |||
|
923 | background-position: -80px -176px; | |||
|
924 | } | |||
|
925 | .ui-icon-battery-3 | |||
|
926 | { | |||
|
927 | background-position: -96px -176px; | |||
|
928 | } | |||
|
929 | .ui-icon-circle-plus | |||
|
930 | { | |||
|
931 | background-position: 0 -192px; | |||
|
932 | } | |||
|
933 | .ui-icon-circle-minus | |||
|
934 | { | |||
|
935 | background-position: -16px -192px; | |||
|
936 | } | |||
|
937 | .ui-icon-circle-close | |||
|
938 | { | |||
|
939 | background-position: -32px -192px; | |||
|
940 | } | |||
|
941 | .ui-icon-circle-triangle-e | |||
|
942 | { | |||
|
943 | background-position: -48px -192px; | |||
|
944 | } | |||
|
945 | .ui-icon-circle-triangle-s | |||
|
946 | { | |||
|
947 | background-position: -64px -192px; | |||
|
948 | } | |||
|
949 | .ui-icon-circle-triangle-w | |||
|
950 | { | |||
|
951 | background-position: -80px -192px; | |||
|
952 | } | |||
|
953 | .ui-icon-circle-triangle-n | |||
|
954 | { | |||
|
955 | background-position: -96px -192px; | |||
|
956 | } | |||
|
957 | .ui-icon-circle-arrow-e | |||
|
958 | { | |||
|
959 | background-position: -112px -192px; | |||
|
960 | } | |||
|
961 | .ui-icon-circle-arrow-s | |||
|
962 | { | |||
|
963 | background-position: -128px -192px; | |||
|
964 | } | |||
|
965 | .ui-icon-circle-arrow-w | |||
|
966 | { | |||
|
967 | background-position: -144px -192px; | |||
|
968 | } | |||
|
969 | .ui-icon-circle-arrow-n | |||
|
970 | { | |||
|
971 | background-position: -160px -192px; | |||
|
972 | } | |||
|
973 | .ui-icon-circle-zoomin | |||
|
974 | { | |||
|
975 | background-position: -176px -192px; | |||
|
976 | } | |||
|
977 | .ui-icon-circle-zoomout | |||
|
978 | { | |||
|
979 | background-position: -192px -192px; | |||
|
980 | } | |||
|
981 | .ui-icon-circle-check | |||
|
982 | { | |||
|
983 | background-position: -208px -192px; | |||
|
984 | } | |||
|
985 | .ui-icon-circlesmall-plus | |||
|
986 | { | |||
|
987 | background-position: 0 -208px; | |||
|
988 | } | |||
|
989 | .ui-icon-circlesmall-minus | |||
|
990 | { | |||
|
991 | background-position: -16px -208px; | |||
|
992 | } | |||
|
993 | .ui-icon-circlesmall-close | |||
|
994 | { | |||
|
995 | background-position: -32px -208px; | |||
|
996 | } | |||
|
997 | .ui-icon-squaresmall-plus | |||
|
998 | { | |||
|
999 | background-position: -48px -208px; | |||
|
1000 | } | |||
|
1001 | .ui-icon-squaresmall-minus | |||
|
1002 | { | |||
|
1003 | background-position: -64px -208px; | |||
|
1004 | } | |||
|
1005 | .ui-icon-squaresmall-close | |||
|
1006 | { | |||
|
1007 | background-position: -80px -208px; | |||
|
1008 | } | |||
|
1009 | .ui-icon-grip-dotted-vertical | |||
|
1010 | { | |||
|
1011 | background-position: 0 -224px; | |||
|
1012 | } | |||
|
1013 | .ui-icon-grip-dotted-horizontal | |||
|
1014 | { | |||
|
1015 | background-position: -16px -224px; | |||
|
1016 | } | |||
|
1017 | .ui-icon-grip-solid-vertical | |||
|
1018 | { | |||
|
1019 | background-position: -32px -224px; | |||
|
1020 | } | |||
|
1021 | .ui-icon-grip-solid-horizontal | |||
|
1022 | { | |||
|
1023 | background-position: -48px -224px; | |||
|
1024 | } | |||
|
1025 | .ui-icon-gripsmall-diagonal-se | |||
|
1026 | { | |||
|
1027 | background-position: -64px -224px; | |||
|
1028 | } | |||
|
1029 | .ui-icon-grip-diagonal-se | |||
|
1030 | { | |||
|
1031 | background-position: -80px -224px; | |||
|
1032 | } | |||
|
1033 | ||||
|
1034 | ||||
|
1035 | /* Misc visuals | |||
|
1036 | ----------------------------------*/ | |||
|
1037 | ||||
|
1038 | /* Corner radius */ | |||
|
1039 | .ui-corner-tl | |||
|
1040 | { | |||
|
1041 | -moz-border-radius-topleft: 3px; | |||
|
1042 | -webkit-border-top-left-radius: 3px; | |||
|
1043 | border-top-left-radius: 3px; | |||
|
1044 | } | |||
|
1045 | .ui-corner-tr | |||
|
1046 | { | |||
|
1047 | -moz-border-radius-topright: 3px; | |||
|
1048 | -webkit-border-top-right-radius: 3px; | |||
|
1049 | border-top-right-radius: 3px; | |||
|
1050 | } | |||
|
1051 | .ui-corner-bl | |||
|
1052 | { | |||
|
1053 | -moz-border-radius-bottomleft: 3px; | |||
|
1054 | -webkit-border-bottom-left-radius: 3px; | |||
|
1055 | border-bottom-left-radius: 3px; | |||
|
1056 | } | |||
|
1057 | .ui-corner-br | |||
|
1058 | { | |||
|
1059 | -moz-border-radius-bottomright: 3px; | |||
|
1060 | -webkit-border-bottom-right-radius: 3px; | |||
|
1061 | border-bottom-right-radius: 3px; | |||
|
1062 | } | |||
|
1063 | .ui-corner-top | |||
|
1064 | { | |||
|
1065 | -moz-border-radius-topleft: 3px; | |||
|
1066 | -webkit-border-top-left-radius: 3px; | |||
|
1067 | border-top-left-radius: 3px; | |||
|
1068 | -moz-border-radius-topright: 3px; | |||
|
1069 | -webkit-border-top-right-radius: 3px; | |||
|
1070 | border-top-right-radius: 3px; | |||
|
1071 | } | |||
|
1072 | .ui-corner-bottom | |||
|
1073 | { | |||
|
1074 | -moz-border-radius-bottomleft: 3px; | |||
|
1075 | -webkit-border-bottom-left-radius: 3px; | |||
|
1076 | border-bottom-left-radius: 3px; | |||
|
1077 | -moz-border-radius-bottomright: 3px; | |||
|
1078 | -webkit-border-bottom-right-radius: 3px; | |||
|
1079 | border-bottom-right-radius: 3px; | |||
|
1080 | } | |||
|
1081 | .ui-corner-right | |||
|
1082 | { | |||
|
1083 | -moz-border-radius-topright: 3px; | |||
|
1084 | -webkit-border-top-right-radius: 3px; | |||
|
1085 | border-top-right-radius: 3px; | |||
|
1086 | -moz-border-radius-bottomright: 3px; | |||
|
1087 | -webkit-border-bottom-right-radius: 3px; | |||
|
1088 | border-bottom-right-radius: 3px; | |||
|
1089 | } | |||
|
1090 | .ui-corner-left | |||
|
1091 | { | |||
|
1092 | -moz-border-radius-topleft: 3px; | |||
|
1093 | -webkit-border-top-left-radius: 3px; | |||
|
1094 | border-top-left-radius: 3px; | |||
|
1095 | -moz-border-radius-bottomleft: 3px; | |||
|
1096 | -webkit-border-bottom-left-radius: 3px; | |||
|
1097 | border-bottom-left-radius: 3px; | |||
|
1098 | } | |||
|
1099 | .ui-corner-all | |||
|
1100 | { | |||
|
1101 | -moz-border-radius: 3px; | |||
|
1102 | -webkit-border-radius: 3px; | |||
|
1103 | border-radius: 3px; | |||
|
1104 | } | |||
|
1105 | .ui-round-all | |||
|
1106 | { | |||
|
1107 | -moz-border-radius: 10px; | |||
|
1108 | -webkit-border-radius: 10px; | |||
|
1109 | border-radius: 10px; | |||
|
1110 | } | |||
|
1111 | ||||
|
1112 | /* Overlays */ | |||
|
1113 | .ui-widget-overlay | |||
|
1114 | { | |||
|
1115 | background: #2d5972 url(images/ui-bg_flat_0_2d5972_40x100.png) 50% 50% repeat-x; | |||
|
1116 | opacity: .30; | |||
|
1117 | filter: Alpha(Opacity=30); | |||
|
1118 | } | |||
|
1119 | .ui-widget-shadow | |||
|
1120 | { | |||
|
1121 | margin: -8px 0 0 -8px; | |||
|
1122 | padding: 8px; | |||
|
1123 | background: #4f4f4f url(images/ui-bg_flat_0_4f4f4f_40x100.png) 50% 50% repeat-x; | |||
|
1124 | opacity: .30; | |||
|
1125 | filter: Alpha(Opacity=30); | |||
|
1126 | -moz-border-radius: 8px; | |||
|
1127 | -webkit-border-radius: 8px; | |||
|
1128 | border-radius: 8px; | |||
|
1129 | } | |||
|
1130 | /* | |||
|
1131 | * jQuery UI Resizable @VERSION | |||
|
1132 | * | |||
|
1133 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1134 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1135 | * http://jquery.org/license | |||
|
1136 | * | |||
|
1137 | * http://docs.jquery.com/UI/Resizable#theming | |||
|
1138 | */ | |||
|
1139 | .ui-resizable | |||
|
1140 | { | |||
|
1141 | position: relative; | |||
|
1142 | } | |||
|
1143 | .ui-resizable-handle | |||
|
1144 | { | |||
|
1145 | position: absolute; | |||
|
1146 | font-size: 0.1px; | |||
|
1147 | z-index: 99999; | |||
|
1148 | display: block; | |||
|
1149 | } | |||
|
1150 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle | |||
|
1151 | { | |||
|
1152 | display: none; | |||
|
1153 | } | |||
|
1154 | .ui-resizable-n | |||
|
1155 | { | |||
|
1156 | cursor: n-resize; | |||
|
1157 | height: 7px; | |||
|
1158 | width: 100%; | |||
|
1159 | top: -5px; | |||
|
1160 | left: 0; | |||
|
1161 | } | |||
|
1162 | .ui-resizable-s | |||
|
1163 | { | |||
|
1164 | cursor: s-resize; | |||
|
1165 | height: 7px; | |||
|
1166 | width: 100%; | |||
|
1167 | bottom: -5px; | |||
|
1168 | left: 0; | |||
|
1169 | } | |||
|
1170 | .ui-resizable-e | |||
|
1171 | { | |||
|
1172 | cursor: e-resize; | |||
|
1173 | width: 7px; | |||
|
1174 | right: -5px; | |||
|
1175 | top: 0; | |||
|
1176 | height: 100%; | |||
|
1177 | } | |||
|
1178 | .ui-resizable-w | |||
|
1179 | { | |||
|
1180 | cursor: w-resize; | |||
|
1181 | width: 7px; | |||
|
1182 | left: -5px; | |||
|
1183 | top: 0; | |||
|
1184 | height: 100%; | |||
|
1185 | } | |||
|
1186 | .ui-resizable-se | |||
|
1187 | { | |||
|
1188 | cursor: se-resize; | |||
|
1189 | width: 12px; | |||
|
1190 | height: 12px; | |||
|
1191 | right: 1px; | |||
|
1192 | bottom: 1px; | |||
|
1193 | } | |||
|
1194 | .ui-resizable-sw | |||
|
1195 | { | |||
|
1196 | cursor: sw-resize; | |||
|
1197 | width: 9px; | |||
|
1198 | height: 9px; | |||
|
1199 | left: -5px; | |||
|
1200 | bottom: -5px; | |||
|
1201 | } | |||
|
1202 | .ui-resizable-nw | |||
|
1203 | { | |||
|
1204 | cursor: nw-resize; | |||
|
1205 | width: 9px; | |||
|
1206 | height: 9px; | |||
|
1207 | left: -5px; | |||
|
1208 | top: -5px; | |||
|
1209 | } | |||
|
1210 | .ui-resizable-ne | |||
|
1211 | { | |||
|
1212 | cursor: ne-resize; | |||
|
1213 | width: 9px; | |||
|
1214 | height: 9px; | |||
|
1215 | right: -5px; | |||
|
1216 | top: -5px; | |||
|
1217 | } | |||
|
1218 | /* | |||
|
1219 | * jQuery UI Selectable @VERSION | |||
|
1220 | * | |||
|
1221 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1222 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1223 | * http://jquery.org/license | |||
|
1224 | * | |||
|
1225 | * http://docs.jquery.com/UI/Selectable#theming | |||
|
1226 | */ | |||
|
1227 | .ui-selectable-helper | |||
|
1228 | { | |||
|
1229 | position: absolute; | |||
|
1230 | z-index: 100; | |||
|
1231 | border: 1px dotted black; | |||
|
1232 | } | |||
|
1233 | /* | |||
|
1234 | * jQuery UI Accordion @VERSION | |||
|
1235 | * | |||
|
1236 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1237 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1238 | * http://jquery.org/license | |||
|
1239 | * | |||
|
1240 | * http://docs.jquery.com/UI/Accordion#theming | |||
|
1241 | */ | |||
|
1242 | /* IE/Win - Fix animation bug - #4615 */ | |||
|
1243 | .ui-accordion | |||
|
1244 | { | |||
|
1245 | width: 100%; | |||
|
1246 | } | |||
|
1247 | .ui-accordion .ui-accordion-header | |||
|
1248 | { | |||
|
1249 | cursor: pointer; | |||
|
1250 | position: relative; | |||
|
1251 | margin-top: 1px; | |||
|
1252 | zoom: 1; | |||
|
1253 | } | |||
|
1254 | .ui-accordion .ui-accordion-li-fix | |||
|
1255 | { | |||
|
1256 | display: inline; | |||
|
1257 | } | |||
|
1258 | .ui-accordion .ui-accordion-header-active | |||
|
1259 | { | |||
|
1260 | border-bottom: 0 !important; | |||
|
1261 | } | |||
|
1262 | .ui-accordion .ui-accordion-header a | |||
|
1263 | { | |||
|
1264 | display: block; | |||
|
1265 | font-size: 1em; | |||
|
1266 | padding: .5em .5em .5em .7em; | |||
|
1267 | } | |||
|
1268 | .ui-accordion-icons .ui-accordion-header a | |||
|
1269 | { | |||
|
1270 | padding-left: 2.2em; | |||
|
1271 | } | |||
|
1272 | .ui-accordion .ui-accordion-header .ui-icon | |||
|
1273 | { | |||
|
1274 | position: absolute; | |||
|
1275 | left: .5em; | |||
|
1276 | top: 50%; | |||
|
1277 | margin-top: -8px; | |||
|
1278 | } | |||
|
1279 | .ui-accordion .ui-accordion-content | |||
|
1280 | { | |||
|
1281 | padding: 1em 2.2em; | |||
|
1282 | border-top: 0; | |||
|
1283 | margin-top: -2px; | |||
|
1284 | position: relative; | |||
|
1285 | top: 1px; | |||
|
1286 | margin-bottom: 2px; | |||
|
1287 | overflow: auto; | |||
|
1288 | display: none; | |||
|
1289 | zoom: 1; | |||
|
1290 | } | |||
|
1291 | .ui-accordion .ui-accordion-content-active | |||
|
1292 | { | |||
|
1293 | display: block; | |||
|
1294 | } | |||
|
1295 | ||||
|
1296 | .ui-accordion .ui-accordion-header | |||
|
1297 | { | |||
|
1298 | margin: 0; | |||
|
1299 | -moz-border-radius: 0; | |||
|
1300 | -webkit-border-radius: 0; | |||
|
1301 | border-radius: 0; | |||
|
1302 | } | |||
|
1303 | ||||
|
1304 | ||||
|
1305 | .ui-accordion .ui-accordion-content | |||
|
1306 | { | |||
|
1307 | margin-bottom: 0; | |||
|
1308 | } | |||
|
1309 | ||||
|
1310 | /* | |||
|
1311 | * jQuery UI Autocomplete @VERSION | |||
|
1312 | * | |||
|
1313 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1314 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1315 | * http://jquery.org/license | |||
|
1316 | * | |||
|
1317 | * http://docs.jquery.com/UI/Autocomplete#theming | |||
|
1318 | */ | |||
|
1319 | .ui-autocomplete | |||
|
1320 | { | |||
|
1321 | position: absolute; | |||
|
1322 | cursor: default; | |||
|
1323 | } | |||
|
1324 | ||||
|
1325 | ||||
|
1326 | .ui-autocomplete .ui-menu-item .ui-state-hover | |||
|
1327 | { | |||
|
1328 | background: none repeat scroll 0 0 #5F83B9; | |||
|
1329 | color: #FFFFFF !important; | |||
|
1330 | font-weight: bold; | |||
|
1331 | -moz-box-shadow: none; | |||
|
1332 | -webkit-box-shadow: none; | |||
|
1333 | box-shadow: none; | |||
|
1334 | border: solid 1px transparent; | |||
|
1335 | cursor: pointer; | |||
|
1336 | } | |||
|
1337 | ||||
|
1338 | ||||
|
1339 | /* workarounds */ | |||
|
1340 | * html .ui-autocomplete | |||
|
1341 | { | |||
|
1342 | width: 1px; | |||
|
1343 | } | |||
|
1344 | /* without this, the menu expands to 100% in IE6 */ | |||
|
1345 | ||||
|
1346 | /* | |||
|
1347 | * jQuery UI Menu @VERSION | |||
|
1348 | * | |||
|
1349 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1350 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1351 | * http://jquery.org/license | |||
|
1352 | * | |||
|
1353 | * http://docs.jquery.com/UI/Menu#theming | |||
|
1354 | */ | |||
|
1355 | .ui-menu | |||
|
1356 | { | |||
|
1357 | list-style: none; | |||
|
1358 | padding: 2px; | |||
|
1359 | margin: 0; | |||
|
1360 | display: block; | |||
|
1361 | float: left; | |||
|
1362 | } | |||
|
1363 | .ui-menu .ui-menu | |||
|
1364 | { | |||
|
1365 | margin-top: -3px; | |||
|
1366 | } | |||
|
1367 | .ui-menu .ui-menu-item | |||
|
1368 | { | |||
|
1369 | margin: 0; | |||
|
1370 | padding: 0; | |||
|
1371 | zoom: 1; | |||
|
1372 | float: left; | |||
|
1373 | clear: left; | |||
|
1374 | width: 100%; | |||
|
1375 | } | |||
|
1376 | .ui-menu .ui-menu-item a | |||
|
1377 | { | |||
|
1378 | text-decoration: none; | |||
|
1379 | display: block; | |||
|
1380 | padding: .2em .4em; | |||
|
1381 | line-height: 1.5; | |||
|
1382 | zoom: 1; | |||
|
1383 | } | |||
|
1384 | .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active | |||
|
1385 | { | |||
|
1386 | font-weight: normal; | |||
|
1387 | margin: -1px; | |||
|
1388 | } | |||
|
1389 | /* | |||
|
1390 | * jQuery UI Button @VERSION | |||
|
1391 | * | |||
|
1392 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1393 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1394 | * http://jquery.org/license | |||
|
1395 | * | |||
|
1396 | * http://docs.jquery.com/UI/Button#theming | |||
|
1397 | */ | |||
|
1398 | .ui-button | |||
|
1399 | { | |||
|
1400 | display: inline-block; | |||
|
1401 | position: relative; | |||
|
1402 | padding: 0; | |||
|
1403 | margin-right: .1em; | |||
|
1404 | text-decoration: none !important; | |||
|
1405 | cursor: pointer; | |||
|
1406 | text-align: center; | |||
|
1407 | zoom: 1; | |||
|
1408 | overflow: visible; | |||
|
1409 | } | |||
|
1410 | /* the overflow property removes extra width in IE */ | |||
|
1411 | .ui-button-icon-only | |||
|
1412 | { | |||
|
1413 | width: 2.2em; | |||
|
1414 | } | |||
|
1415 | /* to make room for the icon, a width needs to be set here */ | |||
|
1416 | button.ui-button-icon-only | |||
|
1417 | { | |||
|
1418 | width: 2.4em; | |||
|
1419 | } | |||
|
1420 | /* button elements seem to need a little more width */ | |||
|
1421 | .ui-button-icons-only | |||
|
1422 | { | |||
|
1423 | width: 3.4em; | |||
|
1424 | } | |||
|
1425 | button.ui-button-icons-only | |||
|
1426 | { | |||
|
1427 | width: 3.7em; | |||
|
1428 | } | |||
|
1429 | ||||
|
1430 | .ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon | |||
|
1431 | { | |||
|
1432 | margin-left: 6px; | |||
|
1433 | margin-top: -8px; | |||
|
1434 | position: absolute; | |||
|
1435 | top: 50%; | |||
|
1436 | } | |||
|
1437 | ||||
|
1438 | .ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text | |||
|
1439 | { | |||
|
1440 | padding: 5px 12px 5px 25px; | |||
|
1441 | } | |||
|
1442 | ||||
|
1443 | /*button text element */ | |||
|
1444 | .ui-button .ui-button-text | |||
|
1445 | { | |||
|
1446 | display: block; | |||
|
1447 | line-height: 1.4; | |||
|
1448 | } | |||
|
1449 | .ui-button-text-only .ui-button-text | |||
|
1450 | { | |||
|
1451 | padding: .4em 1em; | |||
|
1452 | } | |||
|
1453 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text | |||
|
1454 | { | |||
|
1455 | padding: .4em; | |||
|
1456 | text-indent: -9999999px; | |||
|
1457 | } | |||
|
1458 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text | |||
|
1459 | { | |||
|
1460 | padding: .4em 1em .4em 2.1em; | |||
|
1461 | } | |||
|
1462 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text | |||
|
1463 | { | |||
|
1464 | padding: .4em 2.1em .4em 1em; | |||
|
1465 | } | |||
|
1466 | .ui-button-text-icons .ui-button-text | |||
|
1467 | { | |||
|
1468 | padding-left: 2.1em; | |||
|
1469 | padding-right: 2.1em; | |||
|
1470 | } | |||
|
1471 | /* no icon support for input elements, provide padding by default */ | |||
|
1472 | input.ui-button | |||
|
1473 | { | |||
|
1474 | padding: .4em 1em; | |||
|
1475 | } | |||
|
1476 | ||||
|
1477 | /*button icon element(s) */ | |||
|
1478 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon | |||
|
1479 | { | |||
|
1480 | position: absolute; | |||
|
1481 | top: 50%; | |||
|
1482 | margin-top: -8px; | |||
|
1483 | } | |||
|
1484 | .ui-button-icon-only .ui-icon | |||
|
1485 | { | |||
|
1486 | left: 50%; | |||
|
1487 | margin-left: -8px; | |||
|
1488 | } | |||
|
1489 | /*.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }*/ | |||
|
1490 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary | |||
|
1491 | { | |||
|
1492 | right: .5em; | |||
|
1493 | } | |||
|
1494 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary | |||
|
1495 | { | |||
|
1496 | right: .5em; | |||
|
1497 | } | |||
|
1498 | ||||
|
1499 | /*button sets*/ | |||
|
1500 | .ui-buttonset | |||
|
1501 | { | |||
|
1502 | margin-right: 7px; | |||
|
1503 | } | |||
|
1504 | .ui-buttonset .ui-button | |||
|
1505 | { | |||
|
1506 | margin-left: 0; | |||
|
1507 | margin-right: -.3em; | |||
|
1508 | } | |||
|
1509 | ||||
|
1510 | /* workarounds */ | |||
|
1511 | button.ui-button::-moz-focus-inner | |||
|
1512 | { | |||
|
1513 | border: 0; | |||
|
1514 | padding: 0; | |||
|
1515 | } | |||
|
1516 | /* reset extra padding in Firefox */ | |||
|
1517 | /* | |||
|
1518 | * jQuery UI Dialog @VERSION | |||
|
1519 | * | |||
|
1520 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1521 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1522 | * http://jquery.org/license | |||
|
1523 | * | |||
|
1524 | * http://docs.jquery.com/UI/Dialog#theming | |||
|
1525 | */ | |||
|
1526 | .ui-dialog | |||
|
1527 | { | |||
|
1528 | position: absolute; | |||
|
1529 | padding: .2em; | |||
|
1530 | width: 300px; | |||
|
1531 | overflow: hidden; | |||
|
1532 | -moz-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
1533 | -webkit-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
1534 | box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
1535 | } | |||
|
1536 | .ui-dialog .ui-dialog-titlebar | |||
|
1537 | { | |||
|
1538 | padding: .5em 1em .3em; | |||
|
1539 | position: relative; | |||
|
1540 | } | |||
|
1541 | .ui-dialog .ui-dialog-title | |||
|
1542 | { | |||
|
1543 | float: left; | |||
|
1544 | margin: .1em 16px .2em 0; | |||
|
1545 | } | |||
|
1546 | .ui-dialog .ui-dialog-titlebar-close | |||
|
1547 | { | |||
|
1548 | position: absolute; | |||
|
1549 | right: .3em; | |||
|
1550 | top: 50%; | |||
|
1551 | width: 19px; | |||
|
1552 | margin: -10px 0 0 0; | |||
|
1553 | padding: 1px; | |||
|
1554 | height: 18px; | |||
|
1555 | -moz-border-radius: 10px; | |||
|
1556 | } | |||
|
1557 | .ui-dialog .ui-dialog-titlebar-close span | |||
|
1558 | { | |||
|
1559 | display: block; | |||
|
1560 | margin: 1px; | |||
|
1561 | } | |||
|
1562 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus | |||
|
1563 | { | |||
|
1564 | padding: 0; | |||
|
1565 | } | |||
|
1566 | .ui-dialog .ui-dialog-content | |||
|
1567 | { | |||
|
1568 | position: relative; | |||
|
1569 | border: 0; | |||
|
1570 | padding: .5em 1em; | |||
|
1571 | background: none; | |||
|
1572 | overflow: auto; | |||
|
1573 | zoom: 1; | |||
|
1574 | } | |||
|
1575 | .ui-dialog .ui-dialog-buttonpane | |||
|
1576 | { | |||
|
1577 | text-align: left; | |||
|
1578 | border-width: 1px 0 0 0; | |||
|
1579 | background-image: none; | |||
|
1580 | margin: .5em 0 0 0; | |||
|
1581 | padding: .3em 1em .5em .4em; | |||
|
1582 | } | |||
|
1583 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset | |||
|
1584 | { | |||
|
1585 | float: right; | |||
|
1586 | } | |||
|
1587 | .ui-dialog .ui-dialog-buttonpane button | |||
|
1588 | { | |||
|
1589 | margin: .5em .4em .5em 0; | |||
|
1590 | cursor: pointer; | |||
|
1591 | } | |||
|
1592 | .ui-dialog .ui-resizable-se | |||
|
1593 | { | |||
|
1594 | width: 14px; | |||
|
1595 | height: 14px; | |||
|
1596 | right: 3px; | |||
|
1597 | bottom: 3px; | |||
|
1598 | } | |||
|
1599 | .ui-draggable .ui-dialog-titlebar | |||
|
1600 | { | |||
|
1601 | cursor: move; | |||
|
1602 | } | |||
|
1603 | ||||
|
1604 | .ui-dialog | |||
|
1605 | { | |||
|
1606 | padding: 0; | |||
|
1607 | } | |||
|
1608 | ||||
|
1609 | .ui-dialog .ui-dialog-titlebar | |||
|
1610 | { | |||
|
1611 | border-top: none; | |||
|
1612 | border-right: none; | |||
|
1613 | border-left: none; | |||
|
1614 | -moz-border-radius: 0; | |||
|
1615 | -webkit-border-radius: 0; | |||
|
1616 | border-radius: 0; | |||
|
1617 | } | |||
|
1618 | ||||
|
1619 | .ui-dialog .ui-dialog-titlebar-close | |||
|
1620 | { | |||
|
1621 | } | |||
|
1622 | ||||
|
1623 | /* | |||
|
1624 | * jQuery UI Slider @VERSION | |||
|
1625 | * | |||
|
1626 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1627 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1628 | * http://jquery.org/license | |||
|
1629 | * | |||
|
1630 | * http://docs.jquery.com/UI/Slider#theming | |||
|
1631 | */ | |||
|
1632 | .ui-slider | |||
|
1633 | { | |||
|
1634 | position: relative; | |||
|
1635 | text-align: left; | |||
|
1636 | -moz-border-radius: 10px; | |||
|
1637 | -webkit-border-radius: 10px; | |||
|
1638 | border-radius: 10px; | |||
|
1639 | } | |||
|
1640 | .ui-slider .ui-slider-handle | |||
|
1641 | { | |||
|
1642 | position: absolute; | |||
|
1643 | z-index: 2; | |||
|
1644 | width: 16px; | |||
|
1645 | height: 16px; | |||
|
1646 | cursor: default; | |||
|
1647 | -moz-border-radius: 10px; | |||
|
1648 | -webkit-border-radius: 10px; | |||
|
1649 | border-radius: 10px; | |||
|
1650 | } | |||
|
1651 | .ui-slider .ui-slider-range | |||
|
1652 | { | |||
|
1653 | position: absolute; | |||
|
1654 | z-index: 1; | |||
|
1655 | font-size: .7em; | |||
|
1656 | display: block; | |||
|
1657 | border: 0; | |||
|
1658 | background-position: 0 0; | |||
|
1659 | } | |||
|
1660 | ||||
|
1661 | ||||
|
1662 | .ui-slider | |||
|
1663 | { | |||
|
1664 | background: #cbcbcb; | |||
|
1665 | -moz-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1666 | -webkit-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1667 | box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1668 | } | |||
|
1669 | ||||
|
1670 | .ui-slider .ui-slider-range | |||
|
1671 | { | |||
|
1672 | background: #a3cae0; | |||
|
1673 | -moz-box-shadow: inset 0 2px 2px #7d9aab; | |||
|
1674 | -webkit-box-shadow: inset 0 2px 2px #7d9aab; | |||
|
1675 | box-shadow: inset 0 2px 2px #7d9aab; | |||
|
1676 | } | |||
|
1677 | ||||
|
1678 | .ui-slider-vertical | |||
|
1679 | { | |||
|
1680 | background: #cbcbcb; | |||
|
1681 | -moz-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1682 | -webkit-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1683 | box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
1684 | } | |||
|
1685 | ||||
|
1686 | .ui-slider-vertical .ui-slider-range | |||
|
1687 | { | |||
|
1688 | background: #a3cae0; | |||
|
1689 | -moz-box-shadow: inset 2px 0 2px #7d9aab; | |||
|
1690 | -webkit-box-shadow: inset 2px 0 2px #7d9aab; | |||
|
1691 | box-shadow: inset 2px 0 2px #7d9aab; | |||
|
1692 | } | |||
|
1693 | ||||
|
1694 | ||||
|
1695 | .ui-slider .ui-slider-handle span | |||
|
1696 | { | |||
|
1697 | height: 16px !important; | |||
|
1698 | width: 16px !important; | |||
|
1699 | float: none !important; | |||
|
1700 | margin: 0 auto !important; | |||
|
1701 | } | |||
|
1702 | ||||
|
1703 | ||||
|
1704 | .ui-slider-horizontal | |||
|
1705 | { | |||
|
1706 | height: .4em; | |||
|
1707 | } | |||
|
1708 | .ui-slider-horizontal .ui-slider-handle | |||
|
1709 | { | |||
|
1710 | top: -.5em; | |||
|
1711 | margin-left: -.6em; | |||
|
1712 | } | |||
|
1713 | .ui-slider-horizontal .ui-slider-range | |||
|
1714 | { | |||
|
1715 | top: 0; | |||
|
1716 | height: 100%; | |||
|
1717 | } | |||
|
1718 | .ui-slider-horizontal .ui-slider-range-min | |||
|
1719 | { | |||
|
1720 | left: 0; | |||
|
1721 | } | |||
|
1722 | .ui-slider-horizontal .ui-slider-range-max | |||
|
1723 | { | |||
|
1724 | right: 0; | |||
|
1725 | } | |||
|
1726 | ||||
|
1727 | .ui-slider-vertical | |||
|
1728 | { | |||
|
1729 | width: .4em; | |||
|
1730 | height: 100px; | |||
|
1731 | } | |||
|
1732 | .ui-slider-vertical .ui-slider-handle | |||
|
1733 | { | |||
|
1734 | left: -.5em; | |||
|
1735 | margin-left: 0; | |||
|
1736 | margin-bottom: -.6em; | |||
|
1737 | } | |||
|
1738 | .ui-slider-vertical .ui-slider-range | |||
|
1739 | { | |||
|
1740 | left: 0; | |||
|
1741 | width: 100%; | |||
|
1742 | } | |||
|
1743 | .ui-slider-vertical .ui-slider-range-min | |||
|
1744 | { | |||
|
1745 | bottom: 0; | |||
|
1746 | } | |||
|
1747 | .ui-slider-vertical .ui-slider-range-max | |||
|
1748 | { | |||
|
1749 | top: 0; | |||
|
1750 | } | |||
|
1751 | .ui-slider .ui-slider-handle | |||
|
1752 | { | |||
|
1753 | background: #85b2cb; | |||
|
1754 | background: #85b2cb linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
1755 | background: #85b2cb -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
1756 | background: #85b2cb -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
1757 | } | |||
|
1758 | ||||
|
1759 | ||||
|
1760 | ||||
|
1761 | /* | |||
|
1762 | * jQuery UI Tabs @VERSION | |||
|
1763 | * | |||
|
1764 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1765 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1766 | * http://jquery.org/license | |||
|
1767 | * | |||
|
1768 | * http://docs.jquery.com/UI/Tabs#theming | |||
|
1769 | */ | |||
|
1770 | .ui-tabs | |||
|
1771 | { | |||
|
1772 | position: relative; | |||
|
1773 | padding: .2em; | |||
|
1774 | zoom: 1; | |||
|
1775 | } | |||
|
1776 | /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ | |||
|
1777 | .ui-tabs .ui-tabs-nav | |||
|
1778 | { | |||
|
1779 | margin: 0; | |||
|
1780 | padding: .2em .2em 0; | |||
|
1781 | } | |||
|
1782 | .ui-tabs .ui-tabs-nav li | |||
|
1783 | { | |||
|
1784 | list-style: none; | |||
|
1785 | float: left; | |||
|
1786 | position: relative; | |||
|
1787 | top: 1px; | |||
|
1788 | margin: 0 .2em 1px 0; | |||
|
1789 | border: 1px solid #a8a8a8; | |||
|
1790 | border-bottom: 0 !important; | |||
|
1791 | padding: 0; | |||
|
1792 | white-space: nowrap; | |||
|
1793 | } | |||
|
1794 | .ui-tabs .ui-tabs-nav li a | |||
|
1795 | { | |||
|
1796 | float: left; | |||
|
1797 | padding: .5em 1em; | |||
|
1798 | text-decoration: none; | |||
|
1799 | } | |||
|
1800 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected | |||
|
1801 | { | |||
|
1802 | margin-bottom: 0; | |||
|
1803 | padding-bottom: 1px; | |||
|
1804 | border: 1px solid #a8a8a8; | |||
|
1805 | border-bottom: 0 !important; | |||
|
1806 | } | |||
|
1807 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a | |||
|
1808 | { | |||
|
1809 | cursor: text; | |||
|
1810 | } | |||
|
1811 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a | |||
|
1812 | { | |||
|
1813 | cursor: pointer; | |||
|
1814 | } | |||
|
1815 | /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ | |||
|
1816 | .ui-tabs .ui-tabs-panel | |||
|
1817 | { | |||
|
1818 | display: block; | |||
|
1819 | border-width: 0; | |||
|
1820 | padding: 1em 1.4em; | |||
|
1821 | background: none; | |||
|
1822 | } | |||
|
1823 | .ui-tabs .ui-tabs-hide | |||
|
1824 | { | |||
|
1825 | display: none !important; | |||
|
1826 | } | |||
|
1827 | ||||
|
1828 | .ui-tabs | |||
|
1829 | { | |||
|
1830 | padding: 0; | |||
|
1831 | } | |||
|
1832 | ||||
|
1833 | .ui-tabs .ui-tabs-nav | |||
|
1834 | { | |||
|
1835 | background: #e3e3e3; | |||
|
1836 | background: #e3e3e3 linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
1837 | background: #e3e3e3 -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
1838 | background: #e3e3e3 -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
1839 | -moz-border-radius: 0; | |||
|
1840 | -webkit-border-radius: 0; | |||
|
1841 | border-radius: 0; | |||
|
1842 | } | |||
|
1843 | ||||
|
1844 | ||||
|
1845 | .ui-tabs .ui-tabs-nav .ui-tabs-selected | |||
|
1846 | { | |||
|
1847 | background: #fff; | |||
|
1848 | border-bottom: none; | |||
|
1849 | -moz-box-shadow: none; | |||
|
1850 | -webkit-box-shadow: none; | |||
|
1851 | box-shadow: none; | |||
|
1852 | } | |||
|
1853 | ||||
|
1854 | ||||
|
1855 | ||||
|
1856 | /* | |||
|
1857 | * jQuery UI Datepicker @VERSION | |||
|
1858 | * | |||
|
1859 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1860 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1861 | * http://jquery.org/license | |||
|
1862 | * | |||
|
1863 | * http://docs.jquery.com/UI/Datepicker#theming | |||
|
1864 | */ | |||
|
1865 | .ui-datepicker | |||
|
1866 | { | |||
|
1867 | width: 17em; | |||
|
1868 | padding: .2em .2em 0; | |||
|
1869 | } | |||
|
1870 | .ui-datepicker .ui-datepicker-header | |||
|
1871 | { | |||
|
1872 | position: relative; | |||
|
1873 | padding: .2em 0; | |||
|
1874 | } | |||
|
1875 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next | |||
|
1876 | { | |||
|
1877 | position: absolute; | |||
|
1878 | top: 2px; | |||
|
1879 | width: 1.8em; | |||
|
1880 | height: 1.8em; | |||
|
1881 | cursor: pointer; | |||
|
1882 | } | |||
|
1883 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover | |||
|
1884 | { | |||
|
1885 | top: 1px; | |||
|
1886 | } | |||
|
1887 | .ui-datepicker .ui-datepicker-prev | |||
|
1888 | { | |||
|
1889 | left: 2px; | |||
|
1890 | } | |||
|
1891 | .ui-datepicker .ui-datepicker-next | |||
|
1892 | { | |||
|
1893 | right: 2px; | |||
|
1894 | } | |||
|
1895 | .ui-datepicker .ui-datepicker-prev-hover | |||
|
1896 | { | |||
|
1897 | left: 1px; | |||
|
1898 | } | |||
|
1899 | .ui-datepicker .ui-datepicker-next-hover | |||
|
1900 | { | |||
|
1901 | right: 1px; | |||
|
1902 | } | |||
|
1903 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span | |||
|
1904 | { | |||
|
1905 | display: block; | |||
|
1906 | position: absolute; | |||
|
1907 | left: 50%; | |||
|
1908 | margin-left: -8px; | |||
|
1909 | top: 50%; | |||
|
1910 | margin-top: -8px; | |||
|
1911 | } | |||
|
1912 | .ui-datepicker .ui-datepicker-title | |||
|
1913 | { | |||
|
1914 | margin: 0 2.3em; | |||
|
1915 | line-height: 1.8em; | |||
|
1916 | text-align: center; | |||
|
1917 | } | |||
|
1918 | .ui-datepicker .ui-datepicker-title select | |||
|
1919 | { | |||
|
1920 | font-size: 1em; | |||
|
1921 | margin: 1px 0; | |||
|
1922 | } | |||
|
1923 | .ui-datepicker select.ui-datepicker-month-year | |||
|
1924 | { | |||
|
1925 | width: 100%; | |||
|
1926 | } | |||
|
1927 | .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year | |||
|
1928 | { | |||
|
1929 | width: 49%; | |||
|
1930 | } | |||
|
1931 | .ui-datepicker table | |||
|
1932 | { | |||
|
1933 | width: 100%; | |||
|
1934 | font-size: .9em; | |||
|
1935 | border-collapse: collapse; | |||
|
1936 | margin: 0 0 .4em; | |||
|
1937 | } | |||
|
1938 | .ui-datepicker th | |||
|
1939 | { | |||
|
1940 | padding: .7em .3em; | |||
|
1941 | text-align: center; | |||
|
1942 | font-weight: bold; | |||
|
1943 | border: 0; | |||
|
1944 | } | |||
|
1945 | .ui-datepicker td | |||
|
1946 | { | |||
|
1947 | border: 0; | |||
|
1948 | padding: 1px; | |||
|
1949 | } | |||
|
1950 | .ui-datepicker td span, .ui-datepicker td a | |||
|
1951 | { | |||
|
1952 | display: block; | |||
|
1953 | padding: 2px 3px 3px; | |||
|
1954 | text-align: right; | |||
|
1955 | text-decoration: none; | |||
|
1956 | } | |||
|
1957 | .ui-datepicker .ui-datepicker-buttonpane | |||
|
1958 | { | |||
|
1959 | background-image: none; | |||
|
1960 | margin: .7em 0 0 0; | |||
|
1961 | padding: 0 .2em; | |||
|
1962 | border-left: 0; | |||
|
1963 | border-right: 0; | |||
|
1964 | border-bottom: 0; | |||
|
1965 | } | |||
|
1966 | .ui-datepicker .ui-datepicker-buttonpane button | |||
|
1967 | { | |||
|
1968 | float: right; | |||
|
1969 | margin: .5em .2em .4em; | |||
|
1970 | cursor: pointer; | |||
|
1971 | padding: .2em .6em .3em .6em; | |||
|
1972 | width: auto; | |||
|
1973 | overflow: visible; | |||
|
1974 | } | |||
|
1975 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current | |||
|
1976 | { | |||
|
1977 | float: left; | |||
|
1978 | } | |||
|
1979 | ||||
|
1980 | ||||
|
1981 | .ui-datepicker table | |||
|
1982 | { | |||
|
1983 | table-layout: fixed; | |||
|
1984 | } | |||
|
1985 | ||||
|
1986 | .ui-datepicker .ui-datepicker-calendar .ui-state-default | |||
|
1987 | { | |||
|
1988 | background: none; | |||
|
1989 | border: none; | |||
|
1990 | color: #5F83B9; | |||
|
1991 | } | |||
|
1992 | ||||
|
1993 | .ui-datepicker .ui-datepicker-calendar .ui-state-hover | |||
|
1994 | { | |||
|
1995 | color: #1C4257; | |||
|
1996 | -moz-box-shadow: none; | |||
|
1997 | -webkit-box-shadow: none; | |||
|
1998 | box-shadow: none; | |||
|
1999 | } | |||
|
2000 | ||||
|
2001 | .ui-datepicker .ui-datepicker-current-day .ui-state-highlight, .ui-datepicker .ui-datepicker-current-day .ui-state-default | |||
|
2002 | { | |||
|
2003 | background: #5F83B9; | |||
|
2004 | color: #FFFFFF !important; | |||
|
2005 | font-weight: bold; | |||
|
2006 | text-shadow: 0 1px 1px #234386; | |||
|
2007 | -moz-box-shadow: none; | |||
|
2008 | -webkit-box-shadow: none; | |||
|
2009 | box-shadow: none; | |||
|
2010 | } | |||
|
2011 | ||||
|
2012 | .ui-datepicker | |||
|
2013 | { | |||
|
2014 | padding: 0; | |||
|
2015 | } | |||
|
2016 | ||||
|
2017 | .ui-datepicker .ui-datepicker-header | |||
|
2018 | { | |||
|
2019 | background: #e3e3e3; | |||
|
2020 | background: #e3e3e3 linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
2021 | background: #e3e3e3 -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
2022 | background: #e3e3e3 -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); /* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; */ | |||
|
2023 | border-right: none; | |||
|
2024 | border-left: none; | |||
|
2025 | border-top: none; | |||
|
2026 | -moz-border-radius: 0; | |||
|
2027 | -webkit-border-radius: 0; | |||
|
2028 | border-radius: 0; | |||
|
2029 | } | |||
|
2030 | ||||
|
2031 | .ui-datepicker .ui-datepicker-next-hover, .ui-datepicker .ui-datepicker-prev-hover | |||
|
2032 | { | |||
|
2033 | background: none; | |||
|
2034 | border: solid 1px transparent; | |||
|
2035 | -moz-box-shadow: none; | |||
|
2036 | } | |||
|
2037 | ||||
|
2038 | ||||
|
2039 | /* with multiple calendars */ | |||
|
2040 | .ui-datepicker.ui-datepicker-multi | |||
|
2041 | { | |||
|
2042 | width: auto; | |||
|
2043 | } | |||
|
2044 | .ui-datepicker-multi .ui-datepicker-group | |||
|
2045 | { | |||
|
2046 | float: left; | |||
|
2047 | } | |||
|
2048 | .ui-datepicker-multi .ui-datepicker-group table | |||
|
2049 | { | |||
|
2050 | width: 95%; | |||
|
2051 | margin: 0 auto .4em; | |||
|
2052 | } | |||
|
2053 | .ui-datepicker-multi-2 .ui-datepicker-group | |||
|
2054 | { | |||
|
2055 | width: 50%; | |||
|
2056 | } | |||
|
2057 | .ui-datepicker-multi-3 .ui-datepicker-group | |||
|
2058 | { | |||
|
2059 | width: 33.3%; | |||
|
2060 | } | |||
|
2061 | .ui-datepicker-multi-4 .ui-datepicker-group | |||
|
2062 | { | |||
|
2063 | width: 25%; | |||
|
2064 | } | |||
|
2065 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header | |||
|
2066 | { | |||
|
2067 | border-left-width: 0; | |||
|
2068 | } | |||
|
2069 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header | |||
|
2070 | { | |||
|
2071 | border-left-width: 0; | |||
|
2072 | } | |||
|
2073 | .ui-datepicker-multi .ui-datepicker-buttonpane | |||
|
2074 | { | |||
|
2075 | clear: left; | |||
|
2076 | } | |||
|
2077 | .ui-datepicker-row-break | |||
|
2078 | { | |||
|
2079 | clear: both; | |||
|
2080 | width: 100%; | |||
|
2081 | } | |||
|
2082 | ||||
|
2083 | /* RTL support */ | |||
|
2084 | .ui-datepicker-rtl | |||
|
2085 | { | |||
|
2086 | direction: rtl; | |||
|
2087 | } | |||
|
2088 | .ui-datepicker-rtl .ui-datepicker-prev | |||
|
2089 | { | |||
|
2090 | right: 2px; | |||
|
2091 | left: auto; | |||
|
2092 | } | |||
|
2093 | .ui-datepicker-rtl .ui-datepicker-next | |||
|
2094 | { | |||
|
2095 | left: 2px; | |||
|
2096 | right: auto; | |||
|
2097 | } | |||
|
2098 | .ui-datepicker-rtl .ui-datepicker-prev:hover | |||
|
2099 | { | |||
|
2100 | right: 1px; | |||
|
2101 | left: auto; | |||
|
2102 | } | |||
|
2103 | .ui-datepicker-rtl .ui-datepicker-next:hover | |||
|
2104 | { | |||
|
2105 | left: 1px; | |||
|
2106 | right: auto; | |||
|
2107 | } | |||
|
2108 | .ui-datepicker-rtl .ui-datepicker-buttonpane | |||
|
2109 | { | |||
|
2110 | clear: right; | |||
|
2111 | } | |||
|
2112 | .ui-datepicker-rtl .ui-datepicker-buttonpane button | |||
|
2113 | { | |||
|
2114 | float: left; | |||
|
2115 | } | |||
|
2116 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current | |||
|
2117 | { | |||
|
2118 | float: right; | |||
|
2119 | } | |||
|
2120 | .ui-datepicker-rtl .ui-datepicker-group | |||
|
2121 | { | |||
|
2122 | float: right; | |||
|
2123 | } | |||
|
2124 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header | |||
|
2125 | { | |||
|
2126 | border-right-width: 0; | |||
|
2127 | border-left-width: 1px; | |||
|
2128 | } | |||
|
2129 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header | |||
|
2130 | { | |||
|
2131 | border-right-width: 0; | |||
|
2132 | border-left-width: 1px; | |||
|
2133 | } | |||
|
2134 | ||||
|
2135 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ | |||
|
2136 | .ui-datepicker-cover | |||
|
2137 | { | |||
|
2138 | display: none; /*sorry for IE5*/ | |||
|
2139 | display: /**/ block; /*sorry for IE5*/ | |||
|
2140 | position: absolute; /*must have*/ | |||
|
2141 | z-index: -1; /*must have*/ | |||
|
2142 | filter: mask(); /*must have*/ | |||
|
2143 | top: -4px; /*must have*/ | |||
|
2144 | left: -4px; /*must have*/ | |||
|
2145 | width: 200px; /*must have*/ | |||
|
2146 | height: 200px; /*must have*/ | |||
|
2147 | } | |||
|
2148 | /* | |||
|
2149 | * jQuery UI Progressbar @VERSION | |||
|
2150 | * | |||
|
2151 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
2152 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
2153 | * http://jquery.org/license | |||
|
2154 | * | |||
|
2155 | * http://docs.jquery.com/UI/Progressbar#theming | |||
|
2156 | */ | |||
|
2157 | .ui-progressbar | |||
|
2158 | { | |||
|
2159 | height: 1.1em; | |||
|
2160 | text-align: left; | |||
|
2161 | -moz-border-radius: 10px; | |||
|
2162 | -webkit-border-radius: 10px; | |||
|
2163 | border-radius: 10px; | |||
|
2164 | -moz-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2165 | -webkit-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2166 | box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2167 | } | |||
|
2168 | .ui-progressbar .ui-progressbar-value | |||
|
2169 | { | |||
|
2170 | margin: -1px; | |||
|
2171 | height: 100%; | |||
|
2172 | } | |||
|
2173 | .ui-progressbar .ui-widget-header | |||
|
2174 | { | |||
|
2175 | background: #85b2cb; | |||
|
2176 | background: #85b2cb linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
2177 | background: #85b2cb -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
2178 | background: #85b2cb -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
2179 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF); | |||
|
2180 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#DDFFFFFF, endColorstr=#00FFFFFF)"; | |||
|
2181 | -moz-border-radius: 10px; | |||
|
2182 | -webkit-border-radius: 10px; | |||
|
2183 | border-radius: 10px; | |||
|
2184 | } | |||
|
2185 | /* | |||
|
2186 | * jQuery UI AutoComplete @VERSION | |||
|
2187 | * | |||
|
2188 | */ | |||
|
2189 | .wijmo-wijinput, .wijmo-wijtextbox | |||
|
2190 | { | |||
|
2191 | background: #fff !important; | |||
|
2192 | -moz-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2193 | -webkit-box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2194 | box-shadow: inset 0 2px 2px #8f8f8f; | |||
|
2195 | } | |||
|
2196 | .wijmo-wijinput.ui-state-focus, .wijmo-wijtextbox.ui-state-focus | |||
|
2197 | { | |||
|
2198 | background: #fff !important; | |||
|
2199 | -moz-box-shadow: 0px 0px 5px #85b2cb, inset 0 2px 2px #8f8f8f; | |||
|
2200 | -webkit-box-shadow: 0px 0px 5px #85b2cb, inset 0 2px 2px #8f8f8f; | |||
|
2201 | box-shadow: 0px 0px 5px #85b2cb, inset 0 2px 2px #8f8f8f; | |||
|
2202 | } | |||
|
2203 | .ui-autocomplete | |||
|
2204 | { | |||
|
2205 | -moz-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2206 | -webkit-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2207 | box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2208 | } | |||
|
2209 | .wijmo-wijcalendar .ui-datepicker-header .ui-state-default | |||
|
2210 | { | |||
|
2211 | -moz-box-shadow: none; | |||
|
2212 | -webkit-box-shadow: none; | |||
|
2213 | box-shadow: none; | |||
|
2214 | } | |||
|
2215 | .wijmo-wijmenu | |||
|
2216 | { | |||
|
2217 | background: #c4c4c4 url(images/ui-bg_highlight-hard_80_c4c4c4_1x100.png) top repeat-x; | |||
|
2218 | background: #c4c4c4 linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
2219 | background: #c4c4c4 -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0))); | |||
|
2220 | background: #c4c4c4 -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0)); | |||
|
2221 | } | |||
|
2222 | .wijmo-wijmenu .ui-state-default | |||
|
2223 | { | |||
|
2224 | -moz-box-shadow: none; | |||
|
2225 | -webkit-box-shadow: none; | |||
|
2226 | box-shadow: none; | |||
|
2227 | } | |||
|
2228 | ||||
|
2229 | .wijmo-wijmenu .wijmo-wijmenu-child | |||
|
2230 | { | |||
|
2231 | -moz-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2232 | -webkit-box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2233 | box-shadow: 0px 5px 10px rgba(0,0,0,0.8); | |||
|
2234 | } | |||
|
2235 | .wij-menu-ipod .wijmo-wijmenu-list | |||
|
2236 | { | |||
|
2237 | -moz-box-shadow: none; | |||
|
2238 | -webkit-box-shadow: none; | |||
|
2239 | box-shadow: none; | |||
|
2240 | } | |||
|
2241 | ||||
|
2242 | *html .wijmo-wijmenu .wijmo-wijsuperpanel, *html .wijmo-wijmenu .wijmo-wijmenu-list | |||
|
2243 | { | |||
|
2244 | background: none; | |||
|
2245 | } | |||
|
2246 | ||||
|
2247 | *html .wijmo-wijmenu-horizontal .wijmo-wijmenu-child | |||
|
2248 | { | |||
|
2249 | background: #ffffff; | |||
|
2250 | } | |||
|
2251 | ||||
|
2252 | ||||
|
2253 | *html .wijmo-wijmenu .wijmo-wijmenu-link | |||
|
2254 | { | |||
|
2255 | border-color: #c4c4c4; | |||
|
2256 | filter: chroma(color=#c4c4c4); | |||
|
2257 | } | |||
|
2258 | ||||
|
2259 | ||||
|
2260 | .wijmo-wijtooltip | |||
|
2261 | { | |||
|
2262 | background: #000; | |||
|
2263 | background: rgba(0,0,0,0.8); | |||
|
2264 | border: none; | |||
|
2265 | color: #fff; | |||
|
2266 | -moz-box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #999; | |||
|
2267 | -webkit-box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #999; | |||
|
2268 | box-shadow: 0px 0px 8px #85b2cb, inset 0px 1px 0px #999; | |||
|
2269 | } | |||
|
2270 | ||||
|
2271 | .wijmo-wijtooltip-arrow-lb .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-lc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-lt .wijmo-wijtooltip-pointer-inner | |||
|
2272 | { | |||
|
2273 | border-right-color: #000 !important; | |||
|
2274 | } | |||
|
2275 | ||||
|
2276 | .wijmo-wijtooltip-arrow-rb .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-rc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-rt .wijmo-wijtooltip-pointer-inner | |||
|
2277 | { | |||
|
2278 | border-left-color: #000 !important; | |||
|
2279 | } | |||
|
2280 | ||||
|
2281 | .wijmo-wijtooltip-arrow-br .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-bc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-bl .wijmo-wijtooltip-pointer-inner | |||
|
2282 | { | |||
|
2283 | border-top-color: #000 !important; | |||
|
2284 | } | |||
|
2285 | ||||
|
2286 | .wijmo-wijtooltip-arrow-tb .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-tc .wijmo-wijtooltip-pointer-inner, .wijmo-wijtooltip-arrow-tt .wijmo-wijtooltip-pointer-inner | |||
|
2287 | { | |||
|
2288 | border-bottom-color: #000 !important; | |||
|
2289 | } | |||
|
2290 | ||||
|
2291 | ||||
|
2292 | .wijmo-wijtooltip .wijmo-wijtooltip-pointer | |||
|
2293 | { | |||
|
2294 | opacity: 0.8; | |||
|
2295 | } |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
This diff has been collapsed as it changes many lines, (2312 lines changed) Show them Hide them | |||||
@@ -0,0 +1,2312 b'' | |||||
|
1 | /* | |||
|
2 | * | |||
|
3 | * Wijmo Rocket Theme | |||
|
4 | * http://wijmo.com/ | |||
|
5 | * | |||
|
6 | * Copyright(c) ComponentOne, LLC. All rights reserved. | |||
|
7 | * | |||
|
8 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
9 | * licensing@wijmo.com | |||
|
10 | * http://wijmo.com/license | |||
|
11 | * | |||
|
12 | * | |||
|
13 | */ | |||
|
14 | ||||
|
15 | /* Layout helpers | |||
|
16 | ----------------------------------*/ | |||
|
17 | .ui-helper-hidden | |||
|
18 | { | |||
|
19 | display: none; | |||
|
20 | } | |||
|
21 | .ui-helper-hidden-accessible | |||
|
22 | { | |||
|
23 | position: absolute !important; | |||
|
24 | clip: rect(1px 1px 1px 1px); | |||
|
25 | clip: rect(1px,1px,1px,1px); | |||
|
26 | } | |||
|
27 | .ui-helper-reset | |||
|
28 | { | |||
|
29 | margin: 0; | |||
|
30 | padding: 0; | |||
|
31 | border: 0; | |||
|
32 | outline: 0; | |||
|
33 | line-height: 1.3; | |||
|
34 | text-decoration: none; | |||
|
35 | font-size: 100%; | |||
|
36 | list-style: none; | |||
|
37 | } | |||
|
38 | .ui-helper-clearfix:after | |||
|
39 | { | |||
|
40 | content: "."; | |||
|
41 | display: block; | |||
|
42 | height: 0; | |||
|
43 | clear: both; | |||
|
44 | visibility: hidden; | |||
|
45 | } | |||
|
46 | .ui-helper-clearfix | |||
|
47 | { | |||
|
48 | display: inline-block; | |||
|
49 | } | |||
|
50 | /* required comment for clearfix to work in Opera \*/ | |||
|
51 | * html .ui-helper-clearfix | |||
|
52 | { | |||
|
53 | height: 1%; | |||
|
54 | } | |||
|
55 | .ui-helper-clearfix | |||
|
56 | { | |||
|
57 | display: block; | |||
|
58 | } | |||
|
59 | /* end clearfix */ | |||
|
60 | .ui-helper-zfix | |||
|
61 | { | |||
|
62 | width: 100%; | |||
|
63 | height: 100%; | |||
|
64 | top: 0; | |||
|
65 | left: 0; | |||
|
66 | position: absolute; | |||
|
67 | opacity: 0; | |||
|
68 | filter: Alpha(Opacity=0); | |||
|
69 | } | |||
|
70 | ||||
|
71 | ||||
|
72 | /* Interaction Cues | |||
|
73 | ----------------------------------*/ | |||
|
74 | .ui-state-disabled | |||
|
75 | { | |||
|
76 | cursor: default !important; | |||
|
77 | } | |||
|
78 | ||||
|
79 | ||||
|
80 | /* Icons | |||
|
81 | ----------------------------------*/ | |||
|
82 | ||||
|
83 | /* states and images */ | |||
|
84 | .ui-icon | |||
|
85 | { | |||
|
86 | display: block; | |||
|
87 | text-indent: -99999px; | |||
|
88 | overflow: hidden; | |||
|
89 | background-repeat: no-repeat; | |||
|
90 | } | |||
|
91 | ||||
|
92 | ||||
|
93 | /* Misc visuals | |||
|
94 | ----------------------------------*/ | |||
|
95 | ||||
|
96 | /* Overlays */ | |||
|
97 | .ui-widget-overlay | |||
|
98 | { | |||
|
99 | position: absolute; | |||
|
100 | top: 0; | |||
|
101 | left: 0; | |||
|
102 | width: 100%; | |||
|
103 | height: 100%; | |||
|
104 | } | |||
|
105 | ||||
|
106 | ||||
|
107 | /* | |||
|
108 | * jQuery UI CSS Framework 1.8.7 | |||
|
109 | * | |||
|
110 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
111 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
112 | * http://jquery.org/license | |||
|
113 | * | |||
|
114 | * http://docs.jquery.com/UI/Theming/API | |||
|
115 | * | |||
|
116 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,%20Helvetica,%20sans-serif&fwDefault=normal&fsDefault=1.2em&cornerRadius=4px&bgColorHeader=242122&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=15&borderColorHeader=404040&fcHeader=f4f4f9&iconColorHeader=f4f4f9&bgColorContent=f1f1f1&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=e3e3e3&fcContent=404040&iconColorContent=00a6dd&bgColorDefault=242122&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=15&borderColorDefault=404040&fcDefault=fafafa&iconColorDefault=00a6dd&bgColorHover=00a6dd&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=35&borderColorHover=00a6dd&fcHover=fafafa&iconColorHover=fafafa&bgColorActive=242122&bgTextureActive=05_inset_soft.png&bgImgOpacityActive=15&borderColorActive=404040&fcActive=f1f1f1&iconColorActive=00a6dd&bgColorHighlight=9eca38&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=15&borderColorHighlight=9eca38&fcHighlight=eaffb9&iconColorHighlight=eaffb9&bgColorError=ca3838&bgTextureError=03_highlight_soft.png&bgImgOpacityError=15&borderColorError=ca3838&fcError=ff8f8f&iconColorError=ff8f8f&bgColorOverlay=00a6dd&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=50&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px | |||
|
117 | */ | |||
|
118 | ||||
|
119 | ||||
|
120 | /* Component containers | |||
|
121 | ----------------------------------*/ | |||
|
122 | .ui-widget | |||
|
123 | { | |||
|
124 | font-family: Arial, Helvetica, sans-serif; | |||
|
125 | font-size: 1.2em; | |||
|
126 | } | |||
|
127 | .ui-widget .ui-widget | |||
|
128 | { | |||
|
129 | font-size: 1em; | |||
|
130 | } | |||
|
131 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button | |||
|
132 | { | |||
|
133 | font-family: Arial, Helvetica, sans-serif; | |||
|
134 | font-size: 1em; | |||
|
135 | } | |||
|
136 | .ui-widget-content | |||
|
137 | { | |||
|
138 | border: 1px solid #e3e3e3; | |||
|
139 | background: #f1f1f1 url(images/ui-bg_flat_100_f1f1f1_40x100.png) 50% 50% repeat-x; | |||
|
140 | color: #404040; | |||
|
141 | } | |||
|
142 | .ui-widget-content a | |||
|
143 | { | |||
|
144 | color: #404040; | |||
|
145 | } | |||
|
146 | .ui-widget-header | |||
|
147 | { | |||
|
148 | border: 1px solid #404040; | |||
|
149 | background: #242122 url(images/ui-bg_highlight-soft_15_242122_1x100.png) 50% 50% repeat-x; | |||
|
150 | color: #f4f4f9; | |||
|
151 | font-weight: bold; | |||
|
152 | } | |||
|
153 | .ui-widget-header a | |||
|
154 | { | |||
|
155 | color: #f4f4f9; | |||
|
156 | } | |||
|
157 | ||||
|
158 | /* Interaction states | |||
|
159 | ----------------------------------*/ | |||
|
160 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default | |||
|
161 | { | |||
|
162 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
163 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
164 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
165 | border: 1px solid #404040; | |||
|
166 | background: #242122 url(images/ui-bg_highlight-soft_15_242122_1x100.png) 50% 50% repeat-x; | |||
|
167 | font-weight: normal; | |||
|
168 | color: #fafafa; | |||
|
169 | } | |||
|
170 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited | |||
|
171 | { | |||
|
172 | color: #fafafa; | |||
|
173 | text-decoration: none; | |||
|
174 | } | |||
|
175 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus | |||
|
176 | { | |||
|
177 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
178 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
179 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
180 | border: 1px solid #00a6dd; | |||
|
181 | background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x; | |||
|
182 | font-weight: normal; | |||
|
183 | color: #fafafa; | |||
|
184 | } | |||
|
185 | .ui-state-hover a, .ui-state-hover a:hover | |||
|
186 | { | |||
|
187 | color: #fafafa; | |||
|
188 | text-decoration: none; | |||
|
189 | } | |||
|
190 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active | |||
|
191 | { | |||
|
192 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
193 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
194 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
195 | border: 1px solid transparent; | |||
|
196 | background: #606154 url(images/ui-bg_highlight-soft_15_333333_1x100.png) top repeat-x; | |||
|
197 | font-weight: normal; | |||
|
198 | color: #fafafa; | |||
|
199 | } | |||
|
200 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited | |||
|
201 | { | |||
|
202 | color: #fafafa; | |||
|
203 | text-decoration: none; | |||
|
204 | } | |||
|
205 | .ui-widget :active | |||
|
206 | { | |||
|
207 | outline: none; | |||
|
208 | } | |||
|
209 | ||||
|
210 | /* Interaction Cues | |||
|
211 | ----------------------------------*/ | |||
|
212 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight | |||
|
213 | { | |||
|
214 | background: #9eca38 url(images/ui-bg_highlight-soft_15_9eca38_1x100.png) 50% 50% repeat-x; | |||
|
215 | border: 1px solid #9eca38; | |||
|
216 | color: #304915; | |||
|
217 | -moz-box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
218 | -webkit-box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
219 | box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
220 | text-shadow: 1px 1px 0 rgba(255,255,255,0.50); | |||
|
221 | } | |||
|
222 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a | |||
|
223 | { | |||
|
224 | color: #eaffb9; | |||
|
225 | } | |||
|
226 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error | |||
|
227 | { | |||
|
228 | border: 1px solid #ca3838; | |||
|
229 | background: #ca3838 url(images/ui-bg_highlight-soft_15_ca3838_1x100.png) 50% top repeat-x; | |||
|
230 | color: #fafafa; | |||
|
231 | -moz-box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
232 | -webkit-box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
233 | box-shadow: inset 0px 1px 0 rgba(255,255,255,0.15); | |||
|
234 | } | |||
|
235 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a | |||
|
236 | { | |||
|
237 | color: #ff8f8f; | |||
|
238 | } | |||
|
239 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text | |||
|
240 | { | |||
|
241 | color: #ff8f8f; | |||
|
242 | } | |||
|
243 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary | |||
|
244 | { | |||
|
245 | font-weight: bold; | |||
|
246 | } | |||
|
247 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary | |||
|
248 | { | |||
|
249 | opacity: .7; | |||
|
250 | filter: Alpha(Opacity=70); | |||
|
251 | font-weight: normal; | |||
|
252 | } | |||
|
253 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled | |||
|
254 | { | |||
|
255 | opacity: .35; | |||
|
256 | filter: Alpha(Opacity=35); | |||
|
257 | background-image: none; | |||
|
258 | } | |||
|
259 | ||||
|
260 | /* Icons | |||
|
261 | ----------------------------------*/ | |||
|
262 | ||||
|
263 | /* states and images */ | |||
|
264 | .ui-icon | |||
|
265 | { | |||
|
266 | width: 16px; | |||
|
267 | height: 16px; | |||
|
268 | background-image: url(images/ui-icons_00a6dd_256x240.png); | |||
|
269 | } | |||
|
270 | .ui-widget-content .ui-icon | |||
|
271 | { | |||
|
272 | background-image: url(images/ui-icons_00a6dd_256x240.png); | |||
|
273 | } | |||
|
274 | .ui-widget-header .ui-icon | |||
|
275 | { | |||
|
276 | background-image: url(images/ui-icons_f4f4f9_256x240.png); | |||
|
277 | } | |||
|
278 | .ui-state-default .ui-icon | |||
|
279 | { | |||
|
280 | background-image: url(images/ui-icons_00a6dd_256x240.png); | |||
|
281 | } | |||
|
282 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon | |||
|
283 | { | |||
|
284 | background-image: url(images/ui-icons_fafafa_256x240.png); | |||
|
285 | } | |||
|
286 | .ui-state-active .ui-icon | |||
|
287 | { | |||
|
288 | background-image: url(images/ui-icons_00a6dd_256x240.png); | |||
|
289 | } | |||
|
290 | .ui-state-highlight .ui-icon | |||
|
291 | { | |||
|
292 | background-image: url(images/ui-icons_304915_256x240.png); | |||
|
293 | } | |||
|
294 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon | |||
|
295 | { | |||
|
296 | background-image: url(images/ui-icons_ff8f8f_256x240.png); | |||
|
297 | } | |||
|
298 | ||||
|
299 | /* positioning */ | |||
|
300 | .ui-icon-carat-1-n | |||
|
301 | { | |||
|
302 | background-position: 0 0; | |||
|
303 | } | |||
|
304 | .ui-icon-carat-1-ne | |||
|
305 | { | |||
|
306 | background-position: -16px 0; | |||
|
307 | } | |||
|
308 | .ui-icon-carat-1-e | |||
|
309 | { | |||
|
310 | background-position: -32px 0; | |||
|
311 | } | |||
|
312 | .ui-icon-carat-1-se | |||
|
313 | { | |||
|
314 | background-position: -48px 0; | |||
|
315 | } | |||
|
316 | .ui-icon-carat-1-s | |||
|
317 | { | |||
|
318 | background-position: -64px 0; | |||
|
319 | } | |||
|
320 | .ui-icon-carat-1-sw | |||
|
321 | { | |||
|
322 | background-position: -80px 0; | |||
|
323 | } | |||
|
324 | .ui-icon-carat-1-w | |||
|
325 | { | |||
|
326 | background-position: -96px 0; | |||
|
327 | } | |||
|
328 | .ui-icon-carat-1-nw | |||
|
329 | { | |||
|
330 | background-position: -112px 0; | |||
|
331 | } | |||
|
332 | .ui-icon-carat-2-n-s | |||
|
333 | { | |||
|
334 | background-position: -128px 0; | |||
|
335 | } | |||
|
336 | .ui-icon-carat-2-e-w | |||
|
337 | { | |||
|
338 | background-position: -144px 0; | |||
|
339 | } | |||
|
340 | .ui-icon-triangle-1-n | |||
|
341 | { | |||
|
342 | background-position: 0 -16px; | |||
|
343 | } | |||
|
344 | .ui-icon-triangle-1-ne | |||
|
345 | { | |||
|
346 | background-position: -16px -16px; | |||
|
347 | } | |||
|
348 | .ui-icon-triangle-1-e | |||
|
349 | { | |||
|
350 | background-position: -32px -16px; | |||
|
351 | } | |||
|
352 | .ui-icon-triangle-1-se | |||
|
353 | { | |||
|
354 | background-position: -48px -16px; | |||
|
355 | } | |||
|
356 | .ui-icon-triangle-1-s | |||
|
357 | { | |||
|
358 | background-position: -64px -16px; | |||
|
359 | } | |||
|
360 | .ui-icon-triangle-1-sw | |||
|
361 | { | |||
|
362 | background-position: -80px -16px; | |||
|
363 | } | |||
|
364 | .ui-icon-triangle-1-w | |||
|
365 | { | |||
|
366 | background-position: -96px -16px; | |||
|
367 | } | |||
|
368 | .ui-icon-triangle-1-nw | |||
|
369 | { | |||
|
370 | background-position: -112px -16px; | |||
|
371 | } | |||
|
372 | .ui-icon-triangle-2-n-s | |||
|
373 | { | |||
|
374 | background-position: -128px -16px; | |||
|
375 | } | |||
|
376 | .ui-icon-triangle-2-e-w | |||
|
377 | { | |||
|
378 | background-position: -144px -16px; | |||
|
379 | } | |||
|
380 | .ui-icon-arrow-1-n | |||
|
381 | { | |||
|
382 | background-position: 0 -32px; | |||
|
383 | } | |||
|
384 | .ui-icon-arrow-1-ne | |||
|
385 | { | |||
|
386 | background-position: -16px -32px; | |||
|
387 | } | |||
|
388 | .ui-icon-arrow-1-e | |||
|
389 | { | |||
|
390 | background-position: -32px -32px; | |||
|
391 | } | |||
|
392 | .ui-icon-arrow-1-se | |||
|
393 | { | |||
|
394 | background-position: -48px -32px; | |||
|
395 | } | |||
|
396 | .ui-icon-arrow-1-s | |||
|
397 | { | |||
|
398 | background-position: -64px -32px; | |||
|
399 | } | |||
|
400 | .ui-icon-arrow-1-sw | |||
|
401 | { | |||
|
402 | background-position: -80px -32px; | |||
|
403 | } | |||
|
404 | .ui-icon-arrow-1-w | |||
|
405 | { | |||
|
406 | background-position: -96px -32px; | |||
|
407 | } | |||
|
408 | .ui-icon-arrow-1-nw | |||
|
409 | { | |||
|
410 | background-position: -112px -32px; | |||
|
411 | } | |||
|
412 | .ui-icon-arrow-2-n-s | |||
|
413 | { | |||
|
414 | background-position: -128px -32px; | |||
|
415 | } | |||
|
416 | .ui-icon-arrow-2-ne-sw | |||
|
417 | { | |||
|
418 | background-position: -144px -32px; | |||
|
419 | } | |||
|
420 | .ui-icon-arrow-2-e-w | |||
|
421 | { | |||
|
422 | background-position: -160px -32px; | |||
|
423 | } | |||
|
424 | .ui-icon-arrow-2-se-nw | |||
|
425 | { | |||
|
426 | background-position: -176px -32px; | |||
|
427 | } | |||
|
428 | .ui-icon-arrowstop-1-n | |||
|
429 | { | |||
|
430 | background-position: -192px -32px; | |||
|
431 | } | |||
|
432 | .ui-icon-arrowstop-1-e | |||
|
433 | { | |||
|
434 | background-position: -208px -32px; | |||
|
435 | } | |||
|
436 | .ui-icon-arrowstop-1-s | |||
|
437 | { | |||
|
438 | background-position: -224px -32px; | |||
|
439 | } | |||
|
440 | .ui-icon-arrowstop-1-w | |||
|
441 | { | |||
|
442 | background-position: -240px -32px; | |||
|
443 | } | |||
|
444 | .ui-icon-arrowthick-1-n | |||
|
445 | { | |||
|
446 | background-position: 0 -48px; | |||
|
447 | } | |||
|
448 | .ui-icon-arrowthick-1-ne | |||
|
449 | { | |||
|
450 | background-position: -16px -48px; | |||
|
451 | } | |||
|
452 | .ui-icon-arrowthick-1-e | |||
|
453 | { | |||
|
454 | background-position: -32px -48px; | |||
|
455 | } | |||
|
456 | .ui-icon-arrowthick-1-se | |||
|
457 | { | |||
|
458 | background-position: -48px -48px; | |||
|
459 | } | |||
|
460 | .ui-icon-arrowthick-1-s | |||
|
461 | { | |||
|
462 | background-position: -64px -48px; | |||
|
463 | } | |||
|
464 | .ui-icon-arrowthick-1-sw | |||
|
465 | { | |||
|
466 | background-position: -80px -48px; | |||
|
467 | } | |||
|
468 | .ui-icon-arrowthick-1-w | |||
|
469 | { | |||
|
470 | background-position: -96px -48px; | |||
|
471 | } | |||
|
472 | .ui-icon-arrowthick-1-nw | |||
|
473 | { | |||
|
474 | background-position: -112px -48px; | |||
|
475 | } | |||
|
476 | .ui-icon-arrowthick-2-n-s | |||
|
477 | { | |||
|
478 | background-position: -128px -48px; | |||
|
479 | } | |||
|
480 | .ui-icon-arrowthick-2-ne-sw | |||
|
481 | { | |||
|
482 | background-position: -144px -48px; | |||
|
483 | } | |||
|
484 | .ui-icon-arrowthick-2-e-w | |||
|
485 | { | |||
|
486 | background-position: -160px -48px; | |||
|
487 | } | |||
|
488 | .ui-icon-arrowthick-2-se-nw | |||
|
489 | { | |||
|
490 | background-position: -176px -48px; | |||
|
491 | } | |||
|
492 | .ui-icon-arrowthickstop-1-n | |||
|
493 | { | |||
|
494 | background-position: -192px -48px; | |||
|
495 | } | |||
|
496 | .ui-icon-arrowthickstop-1-e | |||
|
497 | { | |||
|
498 | background-position: -208px -48px; | |||
|
499 | } | |||
|
500 | .ui-icon-arrowthickstop-1-s | |||
|
501 | { | |||
|
502 | background-position: -224px -48px; | |||
|
503 | } | |||
|
504 | .ui-icon-arrowthickstop-1-w | |||
|
505 | { | |||
|
506 | background-position: -240px -48px; | |||
|
507 | } | |||
|
508 | .ui-icon-arrowreturnthick-1-w | |||
|
509 | { | |||
|
510 | background-position: 0 -64px; | |||
|
511 | } | |||
|
512 | .ui-icon-arrowreturnthick-1-n | |||
|
513 | { | |||
|
514 | background-position: -16px -64px; | |||
|
515 | } | |||
|
516 | .ui-icon-arrowreturnthick-1-e | |||
|
517 | { | |||
|
518 | background-position: -32px -64px; | |||
|
519 | } | |||
|
520 | .ui-icon-arrowreturnthick-1-s | |||
|
521 | { | |||
|
522 | background-position: -48px -64px; | |||
|
523 | } | |||
|
524 | .ui-icon-arrowreturn-1-w | |||
|
525 | { | |||
|
526 | background-position: -64px -64px; | |||
|
527 | } | |||
|
528 | .ui-icon-arrowreturn-1-n | |||
|
529 | { | |||
|
530 | background-position: -80px -64px; | |||
|
531 | } | |||
|
532 | .ui-icon-arrowreturn-1-e | |||
|
533 | { | |||
|
534 | background-position: -96px -64px; | |||
|
535 | } | |||
|
536 | .ui-icon-arrowreturn-1-s | |||
|
537 | { | |||
|
538 | background-position: -112px -64px; | |||
|
539 | } | |||
|
540 | .ui-icon-arrowrefresh-1-w | |||
|
541 | { | |||
|
542 | background-position: -128px -64px; | |||
|
543 | } | |||
|
544 | .ui-icon-arrowrefresh-1-n | |||
|
545 | { | |||
|
546 | background-position: -144px -64px; | |||
|
547 | } | |||
|
548 | .ui-icon-arrowrefresh-1-e | |||
|
549 | { | |||
|
550 | background-position: -160px -64px; | |||
|
551 | } | |||
|
552 | .ui-icon-arrowrefresh-1-s | |||
|
553 | { | |||
|
554 | background-position: -176px -64px; | |||
|
555 | } | |||
|
556 | .ui-icon-arrow-4 | |||
|
557 | { | |||
|
558 | background-position: 0 -80px; | |||
|
559 | } | |||
|
560 | .ui-icon-arrow-4-diag | |||
|
561 | { | |||
|
562 | background-position: -16px -80px; | |||
|
563 | } | |||
|
564 | .ui-icon-extlink | |||
|
565 | { | |||
|
566 | background-position: -32px -80px; | |||
|
567 | } | |||
|
568 | .ui-icon-newwin | |||
|
569 | { | |||
|
570 | background-position: -48px -80px; | |||
|
571 | } | |||
|
572 | .ui-icon-refresh | |||
|
573 | { | |||
|
574 | background-position: -64px -80px; | |||
|
575 | } | |||
|
576 | .ui-icon-shuffle | |||
|
577 | { | |||
|
578 | background-position: -80px -80px; | |||
|
579 | } | |||
|
580 | .ui-icon-transfer-e-w | |||
|
581 | { | |||
|
582 | background-position: -96px -80px; | |||
|
583 | } | |||
|
584 | .ui-icon-transferthick-e-w | |||
|
585 | { | |||
|
586 | background-position: -112px -80px; | |||
|
587 | } | |||
|
588 | .ui-icon-folder-collapsed | |||
|
589 | { | |||
|
590 | background-position: 0 -96px; | |||
|
591 | } | |||
|
592 | .ui-icon-folder-open | |||
|
593 | { | |||
|
594 | background-position: -16px -96px; | |||
|
595 | } | |||
|
596 | .ui-icon-document | |||
|
597 | { | |||
|
598 | background-position: -32px -96px; | |||
|
599 | } | |||
|
600 | .ui-icon-document-b | |||
|
601 | { | |||
|
602 | background-position: -48px -96px; | |||
|
603 | } | |||
|
604 | .ui-icon-note | |||
|
605 | { | |||
|
606 | background-position: -64px -96px; | |||
|
607 | } | |||
|
608 | .ui-icon-mail-closed | |||
|
609 | { | |||
|
610 | background-position: -80px -96px; | |||
|
611 | } | |||
|
612 | .ui-icon-mail-open | |||
|
613 | { | |||
|
614 | background-position: -96px -96px; | |||
|
615 | } | |||
|
616 | .ui-icon-suitcase | |||
|
617 | { | |||
|
618 | background-position: -112px -96px; | |||
|
619 | } | |||
|
620 | .ui-icon-comment | |||
|
621 | { | |||
|
622 | background-position: -128px -96px; | |||
|
623 | } | |||
|
624 | .ui-icon-person | |||
|
625 | { | |||
|
626 | background-position: -144px -96px; | |||
|
627 | } | |||
|
628 | .ui-icon-print | |||
|
629 | { | |||
|
630 | background-position: -160px -96px; | |||
|
631 | } | |||
|
632 | .ui-icon-trash | |||
|
633 | { | |||
|
634 | background-position: -176px -96px; | |||
|
635 | } | |||
|
636 | .ui-icon-locked | |||
|
637 | { | |||
|
638 | background-position: -192px -96px; | |||
|
639 | } | |||
|
640 | .ui-icon-unlocked | |||
|
641 | { | |||
|
642 | background-position: -208px -96px; | |||
|
643 | } | |||
|
644 | .ui-icon-bookmark | |||
|
645 | { | |||
|
646 | background-position: -224px -96px; | |||
|
647 | } | |||
|
648 | .ui-icon-tag | |||
|
649 | { | |||
|
650 | background-position: -240px -96px; | |||
|
651 | } | |||
|
652 | .ui-icon-home | |||
|
653 | { | |||
|
654 | background-position: 0 -112px; | |||
|
655 | } | |||
|
656 | .ui-icon-flag | |||
|
657 | { | |||
|
658 | background-position: -16px -112px; | |||
|
659 | } | |||
|
660 | .ui-icon-calendar | |||
|
661 | { | |||
|
662 | background-position: -32px -112px; | |||
|
663 | } | |||
|
664 | .ui-icon-cart | |||
|
665 | { | |||
|
666 | background-position: -48px -112px; | |||
|
667 | } | |||
|
668 | .ui-icon-pencil | |||
|
669 | { | |||
|
670 | background-position: -64px -112px; | |||
|
671 | } | |||
|
672 | .ui-icon-clock | |||
|
673 | { | |||
|
674 | background-position: -80px -112px; | |||
|
675 | } | |||
|
676 | .ui-icon-disk | |||
|
677 | { | |||
|
678 | background-position: -96px -112px; | |||
|
679 | } | |||
|
680 | .ui-icon-calculator | |||
|
681 | { | |||
|
682 | background-position: -112px -112px; | |||
|
683 | } | |||
|
684 | .ui-icon-zoomin | |||
|
685 | { | |||
|
686 | background-position: -128px -112px; | |||
|
687 | } | |||
|
688 | .ui-icon-zoomout | |||
|
689 | { | |||
|
690 | background-position: -144px -112px; | |||
|
691 | } | |||
|
692 | .ui-icon-search | |||
|
693 | { | |||
|
694 | background-position: -160px -112px; | |||
|
695 | } | |||
|
696 | .ui-icon-wrench | |||
|
697 | { | |||
|
698 | background-position: -176px -112px; | |||
|
699 | } | |||
|
700 | .ui-icon-gear | |||
|
701 | { | |||
|
702 | background-position: -192px -112px; | |||
|
703 | } | |||
|
704 | .ui-icon-heart | |||
|
705 | { | |||
|
706 | background-position: -208px -112px; | |||
|
707 | } | |||
|
708 | .ui-icon-star | |||
|
709 | { | |||
|
710 | background-position: -224px -112px; | |||
|
711 | } | |||
|
712 | .ui-icon-link | |||
|
713 | { | |||
|
714 | background-position: -240px -112px; | |||
|
715 | } | |||
|
716 | .ui-icon-cancel | |||
|
717 | { | |||
|
718 | background-position: 0 -128px; | |||
|
719 | } | |||
|
720 | .ui-icon-plus | |||
|
721 | { | |||
|
722 | background-position: -16px -128px; | |||
|
723 | } | |||
|
724 | .ui-icon-plusthick | |||
|
725 | { | |||
|
726 | background-position: -32px -128px; | |||
|
727 | } | |||
|
728 | .ui-icon-minus | |||
|
729 | { | |||
|
730 | background-position: -48px -128px; | |||
|
731 | } | |||
|
732 | .ui-icon-minusthick | |||
|
733 | { | |||
|
734 | background-position: -64px -128px; | |||
|
735 | } | |||
|
736 | .ui-icon-close | |||
|
737 | { | |||
|
738 | background-position: -80px -128px; | |||
|
739 | } | |||
|
740 | .ui-icon-closethick | |||
|
741 | { | |||
|
742 | background-position: -96px -128px; | |||
|
743 | } | |||
|
744 | .ui-icon-key | |||
|
745 | { | |||
|
746 | background-position: -112px -128px; | |||
|
747 | } | |||
|
748 | .ui-icon-lightbulb | |||
|
749 | { | |||
|
750 | background-position: -128px -128px; | |||
|
751 | } | |||
|
752 | .ui-icon-scissors | |||
|
753 | { | |||
|
754 | background-position: -144px -128px; | |||
|
755 | } | |||
|
756 | .ui-icon-clipboard | |||
|
757 | { | |||
|
758 | background-position: -160px -128px; | |||
|
759 | } | |||
|
760 | .ui-icon-copy | |||
|
761 | { | |||
|
762 | background-position: -176px -128px; | |||
|
763 | } | |||
|
764 | .ui-icon-contact | |||
|
765 | { | |||
|
766 | background-position: -192px -128px; | |||
|
767 | } | |||
|
768 | .ui-icon-image | |||
|
769 | { | |||
|
770 | background-position: -208px -128px; | |||
|
771 | } | |||
|
772 | .ui-icon-video | |||
|
773 | { | |||
|
774 | background-position: -224px -128px; | |||
|
775 | } | |||
|
776 | .ui-icon-script | |||
|
777 | { | |||
|
778 | background-position: -240px -128px; | |||
|
779 | } | |||
|
780 | .ui-icon-alert | |||
|
781 | { | |||
|
782 | background-position: 0 -144px; | |||
|
783 | } | |||
|
784 | .ui-icon-info | |||
|
785 | { | |||
|
786 | background-position: -16px -144px; | |||
|
787 | } | |||
|
788 | .ui-icon-notice | |||
|
789 | { | |||
|
790 | background-position: -32px -144px; | |||
|
791 | } | |||
|
792 | .ui-icon-help | |||
|
793 | { | |||
|
794 | background-position: -48px -144px; | |||
|
795 | } | |||
|
796 | .ui-icon-check | |||
|
797 | { | |||
|
798 | background-position: -64px -144px; | |||
|
799 | } | |||
|
800 | .ui-icon-bullet | |||
|
801 | { | |||
|
802 | background-position: -80px -144px; | |||
|
803 | } | |||
|
804 | .ui-icon-radio-off | |||
|
805 | { | |||
|
806 | background-position: -96px -144px; | |||
|
807 | } | |||
|
808 | .ui-icon-radio-on | |||
|
809 | { | |||
|
810 | background-position: -112px -144px; | |||
|
811 | } | |||
|
812 | .ui-icon-pin-w | |||
|
813 | { | |||
|
814 | background-position: -128px -144px; | |||
|
815 | } | |||
|
816 | .ui-icon-pin-s | |||
|
817 | { | |||
|
818 | background-position: -144px -144px; | |||
|
819 | } | |||
|
820 | .ui-icon-play | |||
|
821 | { | |||
|
822 | background-position: 0 -160px; | |||
|
823 | } | |||
|
824 | .ui-icon-pause | |||
|
825 | { | |||
|
826 | background-position: -16px -160px; | |||
|
827 | } | |||
|
828 | .ui-icon-seek-next | |||
|
829 | { | |||
|
830 | background-position: -32px -160px; | |||
|
831 | } | |||
|
832 | .ui-icon-seek-prev | |||
|
833 | { | |||
|
834 | background-position: -48px -160px; | |||
|
835 | } | |||
|
836 | .ui-icon-seek-end | |||
|
837 | { | |||
|
838 | background-position: -64px -160px; | |||
|
839 | } | |||
|
840 | .ui-icon-seek-start | |||
|
841 | { | |||
|
842 | background-position: -80px -160px; | |||
|
843 | } | |||
|
844 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ | |||
|
845 | .ui-icon-seek-first | |||
|
846 | { | |||
|
847 | background-position: -80px -160px; | |||
|
848 | } | |||
|
849 | .ui-icon-stop | |||
|
850 | { | |||
|
851 | background-position: -96px -160px; | |||
|
852 | } | |||
|
853 | .ui-icon-eject | |||
|
854 | { | |||
|
855 | background-position: -112px -160px; | |||
|
856 | } | |||
|
857 | .ui-icon-volume-off | |||
|
858 | { | |||
|
859 | background-position: -128px -160px; | |||
|
860 | } | |||
|
861 | .ui-icon-volume-on | |||
|
862 | { | |||
|
863 | background-position: -144px -160px; | |||
|
864 | } | |||
|
865 | .ui-icon-power | |||
|
866 | { | |||
|
867 | background-position: 0 -176px; | |||
|
868 | } | |||
|
869 | .ui-icon-signal-diag | |||
|
870 | { | |||
|
871 | background-position: -16px -176px; | |||
|
872 | } | |||
|
873 | .ui-icon-signal | |||
|
874 | { | |||
|
875 | background-position: -32px -176px; | |||
|
876 | } | |||
|
877 | .ui-icon-battery-0 | |||
|
878 | { | |||
|
879 | background-position: -48px -176px; | |||
|
880 | } | |||
|
881 | .ui-icon-battery-1 | |||
|
882 | { | |||
|
883 | background-position: -64px -176px; | |||
|
884 | } | |||
|
885 | .ui-icon-battery-2 | |||
|
886 | { | |||
|
887 | background-position: -80px -176px; | |||
|
888 | } | |||
|
889 | .ui-icon-battery-3 | |||
|
890 | { | |||
|
891 | background-position: -96px -176px; | |||
|
892 | } | |||
|
893 | .ui-icon-circle-plus | |||
|
894 | { | |||
|
895 | background-position: 0 -192px; | |||
|
896 | } | |||
|
897 | .ui-icon-circle-minus | |||
|
898 | { | |||
|
899 | background-position: -16px -192px; | |||
|
900 | } | |||
|
901 | .ui-icon-circle-close | |||
|
902 | { | |||
|
903 | background-position: -32px -192px; | |||
|
904 | } | |||
|
905 | .ui-icon-circle-triangle-e | |||
|
906 | { | |||
|
907 | background-position: -48px -192px; | |||
|
908 | } | |||
|
909 | .ui-icon-circle-triangle-s | |||
|
910 | { | |||
|
911 | background-position: -64px -192px; | |||
|
912 | } | |||
|
913 | .ui-icon-circle-triangle-w | |||
|
914 | { | |||
|
915 | background-position: -80px -192px; | |||
|
916 | } | |||
|
917 | .ui-icon-circle-triangle-n | |||
|
918 | { | |||
|
919 | background-position: -96px -192px; | |||
|
920 | } | |||
|
921 | .ui-icon-circle-arrow-e | |||
|
922 | { | |||
|
923 | background-position: -112px -192px; | |||
|
924 | } | |||
|
925 | .ui-icon-circle-arrow-s | |||
|
926 | { | |||
|
927 | background-position: -128px -192px; | |||
|
928 | } | |||
|
929 | .ui-icon-circle-arrow-w | |||
|
930 | { | |||
|
931 | background-position: -144px -192px; | |||
|
932 | } | |||
|
933 | .ui-icon-circle-arrow-n | |||
|
934 | { | |||
|
935 | background-position: -160px -192px; | |||
|
936 | } | |||
|
937 | .ui-icon-circle-zoomin | |||
|
938 | { | |||
|
939 | background-position: -176px -192px; | |||
|
940 | } | |||
|
941 | .ui-icon-circle-zoomout | |||
|
942 | { | |||
|
943 | background-position: -192px -192px; | |||
|
944 | } | |||
|
945 | .ui-icon-circle-check | |||
|
946 | { | |||
|
947 | background-position: -208px -192px; | |||
|
948 | } | |||
|
949 | .ui-icon-circlesmall-plus | |||
|
950 | { | |||
|
951 | background-position: 0 -208px; | |||
|
952 | } | |||
|
953 | .ui-icon-circlesmall-minus | |||
|
954 | { | |||
|
955 | background-position: -16px -208px; | |||
|
956 | } | |||
|
957 | .ui-icon-circlesmall-close | |||
|
958 | { | |||
|
959 | background-position: -32px -208px; | |||
|
960 | } | |||
|
961 | .ui-icon-squaresmall-plus | |||
|
962 | { | |||
|
963 | background-position: -48px -208px; | |||
|
964 | } | |||
|
965 | .ui-icon-squaresmall-minus | |||
|
966 | { | |||
|
967 | background-position: -64px -208px; | |||
|
968 | } | |||
|
969 | .ui-icon-squaresmall-close | |||
|
970 | { | |||
|
971 | background-position: -80px -208px; | |||
|
972 | } | |||
|
973 | .ui-icon-grip-dotted-vertical | |||
|
974 | { | |||
|
975 | background-position: 0 -224px; | |||
|
976 | } | |||
|
977 | .ui-icon-grip-dotted-horizontal | |||
|
978 | { | |||
|
979 | background-position: -16px -224px; | |||
|
980 | } | |||
|
981 | .ui-icon-grip-solid-vertical | |||
|
982 | { | |||
|
983 | background-position: -32px -224px; | |||
|
984 | } | |||
|
985 | .ui-icon-grip-solid-horizontal | |||
|
986 | { | |||
|
987 | background-position: -48px -224px; | |||
|
988 | } | |||
|
989 | .ui-icon-gripsmall-diagonal-se | |||
|
990 | { | |||
|
991 | background-position: -64px -224px; | |||
|
992 | } | |||
|
993 | .ui-icon-grip-diagonal-se | |||
|
994 | { | |||
|
995 | background-position: -80px -224px; | |||
|
996 | } | |||
|
997 | ||||
|
998 | ||||
|
999 | /* Misc visuals | |||
|
1000 | ----------------------------------*/ | |||
|
1001 | ||||
|
1002 | /* Corner radius */ | |||
|
1003 | .ui-corner-tl | |||
|
1004 | { | |||
|
1005 | -moz-border-radius-topleft: 4px; | |||
|
1006 | -webkit-border-top-left-radius: 4px; | |||
|
1007 | border-top-left-radius: 4px; | |||
|
1008 | } | |||
|
1009 | .ui-corner-tr | |||
|
1010 | { | |||
|
1011 | -moz-border-radius-topright: 4px; | |||
|
1012 | -webkit-border-top-right-radius: 4px; | |||
|
1013 | border-top-right-radius: 4px; | |||
|
1014 | } | |||
|
1015 | .ui-corner-bl | |||
|
1016 | { | |||
|
1017 | -moz-border-radius-bottomleft: 4px; | |||
|
1018 | -webkit-border-bottom-left-radius: 4px; | |||
|
1019 | border-bottom-left-radius: 4px; | |||
|
1020 | } | |||
|
1021 | .ui-corner-br | |||
|
1022 | { | |||
|
1023 | -moz-border-radius-bottomright: 4px; | |||
|
1024 | -webkit-border-bottom-right-radius: 4px; | |||
|
1025 | border-bottom-right-radius: 4px; | |||
|
1026 | } | |||
|
1027 | .ui-corner-top | |||
|
1028 | { | |||
|
1029 | -moz-border-radius-topleft: 4px; | |||
|
1030 | -webkit-border-top-left-radius: 4px; | |||
|
1031 | border-top-left-radius: 4px; | |||
|
1032 | -moz-border-radius-topright: 4px; | |||
|
1033 | -webkit-border-top-right-radius: 4px; | |||
|
1034 | border-top-right-radius: 4px; | |||
|
1035 | } | |||
|
1036 | .ui-corner-bottom | |||
|
1037 | { | |||
|
1038 | -moz-border-radius-bottomleft: 4px; | |||
|
1039 | -webkit-border-bottom-left-radius: 4px; | |||
|
1040 | border-bottom-left-radius: 4px; | |||
|
1041 | -moz-border-radius-bottomright: 4px; | |||
|
1042 | -webkit-border-bottom-right-radius: 4px; | |||
|
1043 | border-bottom-right-radius: 4px; | |||
|
1044 | } | |||
|
1045 | .ui-corner-right | |||
|
1046 | { | |||
|
1047 | -moz-border-radius-topright: 4px; | |||
|
1048 | -webkit-border-top-right-radius: 4px; | |||
|
1049 | border-top-right-radius: 4px; | |||
|
1050 | -moz-border-radius-bottomright: 4px; | |||
|
1051 | -webkit-border-bottom-right-radius: 4px; | |||
|
1052 | border-bottom-right-radius: 4px; | |||
|
1053 | } | |||
|
1054 | .ui-corner-left | |||
|
1055 | { | |||
|
1056 | -moz-border-radius-topleft: 4px; | |||
|
1057 | -webkit-border-top-left-radius: 4px; | |||
|
1058 | border-top-left-radius: 4px; | |||
|
1059 | -moz-border-radius-bottomleft: 4px; | |||
|
1060 | -webkit-border-bottom-left-radius: 4px; | |||
|
1061 | border-bottom-left-radius: 4px; | |||
|
1062 | } | |||
|
1063 | .ui-corner-all | |||
|
1064 | { | |||
|
1065 | -moz-border-radius: 4px; | |||
|
1066 | -webkit-border-radius: 4px; | |||
|
1067 | border-radius: 4px; | |||
|
1068 | } | |||
|
1069 | ||||
|
1070 | /* Overlays */ | |||
|
1071 | .ui-widget-overlay | |||
|
1072 | { | |||
|
1073 | background: #00a6dd url(images/ui-bg_diagonals-thick_50_00a6dd_40x40.png) 50% 50% repeat; | |||
|
1074 | opacity: .30; | |||
|
1075 | filter: Alpha(Opacity=30); | |||
|
1076 | } | |||
|
1077 | .ui-widget-shadow | |||
|
1078 | { | |||
|
1079 | margin: -8px 0 0 -8px; | |||
|
1080 | padding: 8px; | |||
|
1081 | background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; | |||
|
1082 | opacity: .30; | |||
|
1083 | filter: Alpha(Opacity=30); | |||
|
1084 | -moz-border-radius: 8px; | |||
|
1085 | -webkit-border-radius: 8px; | |||
|
1086 | border-radius: 8px; | |||
|
1087 | } | |||
|
1088 | /* | |||
|
1089 | * jQuery UI Resizable 1.8.7 | |||
|
1090 | * | |||
|
1091 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1092 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1093 | * http://jquery.org/license | |||
|
1094 | * | |||
|
1095 | * http://docs.jquery.com/UI/Resizable#theming | |||
|
1096 | */ | |||
|
1097 | .ui-resizable | |||
|
1098 | { | |||
|
1099 | position: relative; | |||
|
1100 | } | |||
|
1101 | .ui-resizable-handle | |||
|
1102 | { | |||
|
1103 | position: absolute; | |||
|
1104 | font-size: 0.1px; | |||
|
1105 | z-index: 99999; | |||
|
1106 | display: block; | |||
|
1107 | } | |||
|
1108 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle | |||
|
1109 | { | |||
|
1110 | display: none; | |||
|
1111 | } | |||
|
1112 | .ui-resizable-n | |||
|
1113 | { | |||
|
1114 | cursor: n-resize; | |||
|
1115 | height: 7px; | |||
|
1116 | width: 100%; | |||
|
1117 | top: -5px; | |||
|
1118 | left: 0; | |||
|
1119 | } | |||
|
1120 | .ui-resizable-s | |||
|
1121 | { | |||
|
1122 | cursor: s-resize; | |||
|
1123 | height: 7px; | |||
|
1124 | width: 100%; | |||
|
1125 | bottom: -5px; | |||
|
1126 | left: 0; | |||
|
1127 | } | |||
|
1128 | .ui-resizable-e | |||
|
1129 | { | |||
|
1130 | cursor: e-resize; | |||
|
1131 | width: 7px; | |||
|
1132 | right: -5px; | |||
|
1133 | top: 0; | |||
|
1134 | height: 100%; | |||
|
1135 | } | |||
|
1136 | .ui-resizable-w | |||
|
1137 | { | |||
|
1138 | cursor: w-resize; | |||
|
1139 | width: 7px; | |||
|
1140 | left: -5px; | |||
|
1141 | top: 0; | |||
|
1142 | height: 100%; | |||
|
1143 | } | |||
|
1144 | .ui-resizable-se | |||
|
1145 | { | |||
|
1146 | cursor: se-resize; | |||
|
1147 | width: 12px; | |||
|
1148 | height: 12px; | |||
|
1149 | right: 1px; | |||
|
1150 | bottom: 1px; | |||
|
1151 | } | |||
|
1152 | .ui-resizable-sw | |||
|
1153 | { | |||
|
1154 | cursor: sw-resize; | |||
|
1155 | width: 9px; | |||
|
1156 | height: 9px; | |||
|
1157 | left: -5px; | |||
|
1158 | bottom: -5px; | |||
|
1159 | } | |||
|
1160 | .ui-resizable-nw | |||
|
1161 | { | |||
|
1162 | cursor: nw-resize; | |||
|
1163 | width: 9px; | |||
|
1164 | height: 9px; | |||
|
1165 | left: -5px; | |||
|
1166 | top: -5px; | |||
|
1167 | } | |||
|
1168 | .ui-resizable-ne | |||
|
1169 | { | |||
|
1170 | cursor: ne-resize; | |||
|
1171 | width: 9px; | |||
|
1172 | height: 9px; | |||
|
1173 | right: -5px; | |||
|
1174 | top: -5px; | |||
|
1175 | } | |||
|
1176 | /* | |||
|
1177 | * jQuery UI Selectable 1.8.7 | |||
|
1178 | * | |||
|
1179 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1180 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1181 | * http://jquery.org/license | |||
|
1182 | * | |||
|
1183 | * http://docs.jquery.com/UI/Selectable#theming | |||
|
1184 | */ | |||
|
1185 | .ui-selectable-helper | |||
|
1186 | { | |||
|
1187 | position: absolute; | |||
|
1188 | z-index: 100; | |||
|
1189 | border: 1px dotted black; | |||
|
1190 | } | |||
|
1191 | /* | |||
|
1192 | * jQuery UI Accordion 1.8.7 | |||
|
1193 | * | |||
|
1194 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1195 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1196 | * http://jquery.org/license | |||
|
1197 | * | |||
|
1198 | * http://docs.jquery.com/UI/Accordion#theming | |||
|
1199 | */ | |||
|
1200 | /* IE/Win - Fix animation bug - #4615 */ | |||
|
1201 | .ui-accordion | |||
|
1202 | { | |||
|
1203 | width: 100%; | |||
|
1204 | } | |||
|
1205 | .ui-accordion .ui-accordion-header | |||
|
1206 | { | |||
|
1207 | cursor: pointer; | |||
|
1208 | position: relative; | |||
|
1209 | margin-top: 1px; | |||
|
1210 | zoom: 1; | |||
|
1211 | } | |||
|
1212 | .ui-accordion .ui-accordion-li-fix | |||
|
1213 | { | |||
|
1214 | display: inline; | |||
|
1215 | } | |||
|
1216 | .ui-accordion .ui-accordion-header-active | |||
|
1217 | { | |||
|
1218 | border-bottom: 0 !important; | |||
|
1219 | } | |||
|
1220 | .ui-accordion .ui-accordion-header a | |||
|
1221 | { | |||
|
1222 | display: block; | |||
|
1223 | font-size: 1em; | |||
|
1224 | padding: .5em .5em .5em .7em; | |||
|
1225 | } | |||
|
1226 | .ui-accordion-icons .ui-accordion-header a | |||
|
1227 | { | |||
|
1228 | padding-left: 2.2em; | |||
|
1229 | } | |||
|
1230 | .ui-accordion .ui-accordion-header .ui-icon | |||
|
1231 | { | |||
|
1232 | position: absolute; | |||
|
1233 | left: .5em; | |||
|
1234 | top: 50%; | |||
|
1235 | margin-top: -8px; | |||
|
1236 | } | |||
|
1237 | .ui-accordion .ui-accordion-content | |||
|
1238 | { | |||
|
1239 | padding: 1em 2.2em; | |||
|
1240 | border-top: 0; | |||
|
1241 | margin-top: -2px; | |||
|
1242 | position: relative; | |||
|
1243 | top: 1px; | |||
|
1244 | margin-bottom: 2px; | |||
|
1245 | overflow: auto; | |||
|
1246 | display: none; | |||
|
1247 | zoom: 1; | |||
|
1248 | } | |||
|
1249 | .ui-accordion .ui-accordion-content-active | |||
|
1250 | { | |||
|
1251 | display: block; | |||
|
1252 | } | |||
|
1253 | /* | |||
|
1254 | * jQuery UI Autocomplete 1.8.7 | |||
|
1255 | * | |||
|
1256 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1257 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1258 | * http://jquery.org/license | |||
|
1259 | * | |||
|
1260 | * http://docs.jquery.com/UI/Autocomplete#theming | |||
|
1261 | */ | |||
|
1262 | .ui-autocomplete | |||
|
1263 | { | |||
|
1264 | position: absolute; | |||
|
1265 | cursor: default; | |||
|
1266 | } | |||
|
1267 | ||||
|
1268 | /* workarounds */ | |||
|
1269 | * html .ui-autocomplete | |||
|
1270 | { | |||
|
1271 | width: 1px; | |||
|
1272 | } | |||
|
1273 | /* without this, the menu expands to 100% in IE6 */ | |||
|
1274 | ||||
|
1275 | /* | |||
|
1276 | * jQuery UI Menu 1.8.7 | |||
|
1277 | * | |||
|
1278 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1279 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1280 | * http://jquery.org/license | |||
|
1281 | * | |||
|
1282 | * http://docs.jquery.com/UI/Menu#theming | |||
|
1283 | */ | |||
|
1284 | .ui-menu | |||
|
1285 | { | |||
|
1286 | list-style: none; | |||
|
1287 | padding: 2px; | |||
|
1288 | margin: 0; | |||
|
1289 | display: block; | |||
|
1290 | float: left; | |||
|
1291 | } | |||
|
1292 | .ui-menu .ui-menu | |||
|
1293 | { | |||
|
1294 | margin-top: -3px; | |||
|
1295 | } | |||
|
1296 | .ui-menu .ui-menu-item | |||
|
1297 | { | |||
|
1298 | margin: 0; | |||
|
1299 | padding: 0; | |||
|
1300 | zoom: 1; | |||
|
1301 | float: left; | |||
|
1302 | clear: left; | |||
|
1303 | width: 100%; | |||
|
1304 | } | |||
|
1305 | .ui-menu .ui-menu-item a | |||
|
1306 | { | |||
|
1307 | text-decoration: none; | |||
|
1308 | display: block; | |||
|
1309 | padding: .2em .4em; | |||
|
1310 | line-height: 1.5; | |||
|
1311 | zoom: 1; | |||
|
1312 | } | |||
|
1313 | .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active | |||
|
1314 | { | |||
|
1315 | font-weight: normal; | |||
|
1316 | margin: -1px; | |||
|
1317 | } | |||
|
1318 | /* | |||
|
1319 | * jQuery UI Button 1.8.7 | |||
|
1320 | * | |||
|
1321 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1322 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1323 | * http://jquery.org/license | |||
|
1324 | * | |||
|
1325 | * http://docs.jquery.com/UI/Button#theming | |||
|
1326 | */ | |||
|
1327 | .ui-button | |||
|
1328 | { | |||
|
1329 | display: inline-block; | |||
|
1330 | position: relative; | |||
|
1331 | padding: 0; | |||
|
1332 | margin-right: .1em; | |||
|
1333 | text-decoration: none !important; | |||
|
1334 | cursor: pointer; | |||
|
1335 | text-align: center; | |||
|
1336 | zoom: 1; | |||
|
1337 | overflow: visible; | |||
|
1338 | } | |||
|
1339 | /* the overflow property removes extra width in IE */ | |||
|
1340 | .ui-button-icon-only | |||
|
1341 | { | |||
|
1342 | width: 2.2em; | |||
|
1343 | } | |||
|
1344 | /* to make room for the icon, a width needs to be set here */ | |||
|
1345 | button.ui-button-icon-only | |||
|
1346 | { | |||
|
1347 | width: 2.4em; | |||
|
1348 | } | |||
|
1349 | /* button elements seem to need a little more width */ | |||
|
1350 | .ui-button-icons-only | |||
|
1351 | { | |||
|
1352 | width: 3.4em; | |||
|
1353 | } | |||
|
1354 | button.ui-button-icons-only | |||
|
1355 | { | |||
|
1356 | width: 3.7em; | |||
|
1357 | } | |||
|
1358 | ||||
|
1359 | /*button text element */ | |||
|
1360 | .ui-button .ui-button-text | |||
|
1361 | { | |||
|
1362 | display: block; | |||
|
1363 | line-height: 1.4; | |||
|
1364 | } | |||
|
1365 | .ui-button-text-only .ui-button-text | |||
|
1366 | { | |||
|
1367 | padding: .4em 1em; | |||
|
1368 | } | |||
|
1369 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text | |||
|
1370 | { | |||
|
1371 | padding: .4em; | |||
|
1372 | text-indent: -9999999px; | |||
|
1373 | } | |||
|
1374 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text | |||
|
1375 | { | |||
|
1376 | padding: .4em 1em .4em 2.1em; | |||
|
1377 | } | |||
|
1378 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text | |||
|
1379 | { | |||
|
1380 | padding: .4em 2.1em .4em 1em; | |||
|
1381 | } | |||
|
1382 | .ui-button-text-icons .ui-button-text | |||
|
1383 | { | |||
|
1384 | padding-left: 2.1em; | |||
|
1385 | padding-right: 2.1em; | |||
|
1386 | } | |||
|
1387 | /* no icon support for input elements, provide padding by default */ | |||
|
1388 | input.ui-button | |||
|
1389 | { | |||
|
1390 | padding: .4em 1em; | |||
|
1391 | } | |||
|
1392 | ||||
|
1393 | /*button icon element(s) */ | |||
|
1394 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon | |||
|
1395 | { | |||
|
1396 | position: absolute; | |||
|
1397 | top: 50%; | |||
|
1398 | margin-top: -8px; | |||
|
1399 | } | |||
|
1400 | .ui-button-icon-only .ui-icon | |||
|
1401 | { | |||
|
1402 | left: 50%; | |||
|
1403 | margin-left: -8px; | |||
|
1404 | } | |||
|
1405 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary | |||
|
1406 | { | |||
|
1407 | left: .5em; | |||
|
1408 | } | |||
|
1409 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary | |||
|
1410 | { | |||
|
1411 | right: .5em; | |||
|
1412 | } | |||
|
1413 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary | |||
|
1414 | { | |||
|
1415 | right: .5em; | |||
|
1416 | } | |||
|
1417 | ||||
|
1418 | /*button sets*/ | |||
|
1419 | .ui-buttonset | |||
|
1420 | { | |||
|
1421 | margin-right: 7px; | |||
|
1422 | } | |||
|
1423 | .ui-buttonset .ui-button | |||
|
1424 | { | |||
|
1425 | margin-left: 0; | |||
|
1426 | margin-right: -.3em; | |||
|
1427 | } | |||
|
1428 | ||||
|
1429 | /* workarounds */ | |||
|
1430 | button.ui-button::-moz-focus-inner | |||
|
1431 | { | |||
|
1432 | border: 0; | |||
|
1433 | padding: 0; | |||
|
1434 | } | |||
|
1435 | /* reset extra padding in Firefox */ | |||
|
1436 | /* | |||
|
1437 | * jQuery UI Dialog 1.8.7 | |||
|
1438 | * | |||
|
1439 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1440 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1441 | * http://jquery.org/license | |||
|
1442 | * | |||
|
1443 | * http://docs.jquery.com/UI/Dialog#theming | |||
|
1444 | */ | |||
|
1445 | .ui-dialog | |||
|
1446 | { | |||
|
1447 | position: absolute; | |||
|
1448 | padding: .2em; | |||
|
1449 | width: 300px; | |||
|
1450 | overflow: hidden; | |||
|
1451 | } | |||
|
1452 | .ui-dialog .ui-dialog-titlebar | |||
|
1453 | { | |||
|
1454 | padding: .5em 1em .3em; | |||
|
1455 | position: relative; | |||
|
1456 | } | |||
|
1457 | .ui-dialog .ui-dialog-title | |||
|
1458 | { | |||
|
1459 | float: left; | |||
|
1460 | margin: .1em 16px .2em 0; | |||
|
1461 | } | |||
|
1462 | .ui-dialog .ui-dialog-titlebar-close | |||
|
1463 | { | |||
|
1464 | position: absolute; | |||
|
1465 | right: .3em; | |||
|
1466 | top: 50%; | |||
|
1467 | width: 19px; | |||
|
1468 | margin: -10px 0 0 0; | |||
|
1469 | padding: 1px; | |||
|
1470 | height: 18px; | |||
|
1471 | } | |||
|
1472 | .ui-dialog .ui-dialog-titlebar-close span | |||
|
1473 | { | |||
|
1474 | display: block; | |||
|
1475 | margin: 1px; | |||
|
1476 | } | |||
|
1477 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus | |||
|
1478 | { | |||
|
1479 | padding: 0; | |||
|
1480 | } | |||
|
1481 | .ui-dialog .ui-dialog-content | |||
|
1482 | { | |||
|
1483 | position: relative; | |||
|
1484 | border: 0; | |||
|
1485 | padding: .5em 1em; | |||
|
1486 | background: none; | |||
|
1487 | overflow: auto; | |||
|
1488 | zoom: 1; | |||
|
1489 | } | |||
|
1490 | .ui-dialog .ui-dialog-buttonpane | |||
|
1491 | { | |||
|
1492 | text-align: left; | |||
|
1493 | border-width: 1px 0 0 0; | |||
|
1494 | background-image: none; | |||
|
1495 | margin: .5em 0 0 0; | |||
|
1496 | padding: .3em 1em .5em .4em; | |||
|
1497 | } | |||
|
1498 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset | |||
|
1499 | { | |||
|
1500 | float: right; | |||
|
1501 | } | |||
|
1502 | .ui-dialog .ui-dialog-buttonpane button | |||
|
1503 | { | |||
|
1504 | margin: .5em .4em .5em 0; | |||
|
1505 | cursor: pointer; | |||
|
1506 | } | |||
|
1507 | .ui-dialog .ui-resizable-se | |||
|
1508 | { | |||
|
1509 | width: 14px; | |||
|
1510 | height: 14px; | |||
|
1511 | right: 3px; | |||
|
1512 | bottom: 3px; | |||
|
1513 | } | |||
|
1514 | .ui-draggable .ui-dialog-titlebar | |||
|
1515 | { | |||
|
1516 | cursor: move; | |||
|
1517 | } | |||
|
1518 | /* | |||
|
1519 | * jQuery UI Slider 1.8.7 | |||
|
1520 | * | |||
|
1521 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1522 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1523 | * http://jquery.org/license | |||
|
1524 | * | |||
|
1525 | * http://docs.jquery.com/UI/Slider#theming | |||
|
1526 | */ | |||
|
1527 | .ui-slider | |||
|
1528 | { | |||
|
1529 | position: relative; | |||
|
1530 | text-align: left; | |||
|
1531 | } | |||
|
1532 | .ui-slider .ui-slider-handle | |||
|
1533 | { | |||
|
1534 | position: absolute; | |||
|
1535 | z-index: 2; | |||
|
1536 | width: 1.2em; | |||
|
1537 | height: 1.2em; | |||
|
1538 | cursor: default; | |||
|
1539 | } | |||
|
1540 | .ui-slider .ui-slider-range | |||
|
1541 | { | |||
|
1542 | position: absolute; | |||
|
1543 | z-index: 1; | |||
|
1544 | font-size: .7em; | |||
|
1545 | display: block; | |||
|
1546 | border: 0; | |||
|
1547 | background-position: 0 0; | |||
|
1548 | } | |||
|
1549 | ||||
|
1550 | .ui-slider-horizontal | |||
|
1551 | { | |||
|
1552 | height: .8em; | |||
|
1553 | } | |||
|
1554 | .ui-slider-horizontal .ui-slider-handle | |||
|
1555 | { | |||
|
1556 | top: -.3em; | |||
|
1557 | margin-left: -.6em; | |||
|
1558 | } | |||
|
1559 | .ui-slider-horizontal .ui-slider-range | |||
|
1560 | { | |||
|
1561 | top: 0; | |||
|
1562 | height: 100%; | |||
|
1563 | } | |||
|
1564 | .ui-slider-horizontal .ui-slider-range-min | |||
|
1565 | { | |||
|
1566 | left: 0; | |||
|
1567 | } | |||
|
1568 | .ui-slider-horizontal .ui-slider-range-max | |||
|
1569 | { | |||
|
1570 | right: 0; | |||
|
1571 | } | |||
|
1572 | ||||
|
1573 | .ui-slider-vertical | |||
|
1574 | { | |||
|
1575 | width: .8em; | |||
|
1576 | height: 100px; | |||
|
1577 | } | |||
|
1578 | .ui-slider-vertical .ui-slider-handle | |||
|
1579 | { | |||
|
1580 | left: -.3em; | |||
|
1581 | margin-left: 0; | |||
|
1582 | margin-bottom: -.6em; | |||
|
1583 | } | |||
|
1584 | .ui-slider-vertical .ui-slider-range | |||
|
1585 | { | |||
|
1586 | left: 0; | |||
|
1587 | width: 100%; | |||
|
1588 | } | |||
|
1589 | .ui-slider-vertical .ui-slider-range-min | |||
|
1590 | { | |||
|
1591 | bottom: 0; | |||
|
1592 | } | |||
|
1593 | .ui-slider-vertical .ui-slider-range-max | |||
|
1594 | { | |||
|
1595 | top: 0; | |||
|
1596 | } | |||
|
1597 | /* | |||
|
1598 | * jQuery UI Tabs 1.8.7 | |||
|
1599 | * | |||
|
1600 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1601 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1602 | * http://jquery.org/license | |||
|
1603 | * | |||
|
1604 | * http://docs.jquery.com/UI/Tabs#theming | |||
|
1605 | */ | |||
|
1606 | .ui-tabs | |||
|
1607 | { | |||
|
1608 | position: relative; | |||
|
1609 | padding: .2em; | |||
|
1610 | zoom: 1; | |||
|
1611 | } | |||
|
1612 | /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ | |||
|
1613 | .ui-tabs .ui-tabs-nav | |||
|
1614 | { | |||
|
1615 | margin: 0; | |||
|
1616 | padding: .2em .2em 0; | |||
|
1617 | } | |||
|
1618 | .ui-tabs .ui-tabs-nav li | |||
|
1619 | { | |||
|
1620 | list-style: none; | |||
|
1621 | float: left; | |||
|
1622 | position: relative; | |||
|
1623 | top: 1px; | |||
|
1624 | margin: 0 .2em 1px 0; | |||
|
1625 | border-bottom: 0 !important; | |||
|
1626 | padding: 0; | |||
|
1627 | white-space: nowrap; | |||
|
1628 | } | |||
|
1629 | .ui-tabs .ui-tabs-nav li a | |||
|
1630 | { | |||
|
1631 | float: left; | |||
|
1632 | padding: .5em 1em; | |||
|
1633 | text-decoration: none; | |||
|
1634 | } | |||
|
1635 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected | |||
|
1636 | { | |||
|
1637 | margin-bottom: 0; | |||
|
1638 | padding-bottom: 1px; | |||
|
1639 | } | |||
|
1640 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a | |||
|
1641 | { | |||
|
1642 | cursor: text; | |||
|
1643 | } | |||
|
1644 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a | |||
|
1645 | { | |||
|
1646 | cursor: pointer; | |||
|
1647 | } | |||
|
1648 | /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ | |||
|
1649 | .ui-tabs .ui-tabs-panel | |||
|
1650 | { | |||
|
1651 | display: block; | |||
|
1652 | border-width: 0; | |||
|
1653 | padding: 1em 1.4em; | |||
|
1654 | background: none; | |||
|
1655 | } | |||
|
1656 | .ui-tabs .ui-tabs-hide | |||
|
1657 | { | |||
|
1658 | display: none !important; | |||
|
1659 | } | |||
|
1660 | /* | |||
|
1661 | * jQuery UI Datepicker 1.8.7 | |||
|
1662 | * | |||
|
1663 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1664 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1665 | * http://jquery.org/license | |||
|
1666 | * | |||
|
1667 | * http://docs.jquery.com/UI/Datepicker#theming | |||
|
1668 | */ | |||
|
1669 | .ui-datepicker | |||
|
1670 | { | |||
|
1671 | width: 17em; | |||
|
1672 | padding: .2em .2em 0; | |||
|
1673 | display: none; | |||
|
1674 | } | |||
|
1675 | .ui-datepicker .ui-datepicker-header | |||
|
1676 | { | |||
|
1677 | position: relative; | |||
|
1678 | padding: .2em 0; | |||
|
1679 | } | |||
|
1680 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next | |||
|
1681 | { | |||
|
1682 | position: absolute; | |||
|
1683 | top: 2px; | |||
|
1684 | width: 1.8em; | |||
|
1685 | height: 1.8em; | |||
|
1686 | } | |||
|
1687 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover | |||
|
1688 | { | |||
|
1689 | top: 1px; | |||
|
1690 | } | |||
|
1691 | .ui-datepicker .ui-datepicker-prev | |||
|
1692 | { | |||
|
1693 | left: 2px; | |||
|
1694 | } | |||
|
1695 | .ui-datepicker .ui-datepicker-next | |||
|
1696 | { | |||
|
1697 | right: 2px; | |||
|
1698 | } | |||
|
1699 | .ui-datepicker .ui-datepicker-prev-hover | |||
|
1700 | { | |||
|
1701 | left: 1px; | |||
|
1702 | } | |||
|
1703 | .ui-datepicker .ui-datepicker-next-hover | |||
|
1704 | { | |||
|
1705 | right: 1px; | |||
|
1706 | } | |||
|
1707 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span | |||
|
1708 | { | |||
|
1709 | display: block; | |||
|
1710 | position: absolute; | |||
|
1711 | left: 50%; | |||
|
1712 | margin-left: -8px; | |||
|
1713 | top: 50%; | |||
|
1714 | margin-top: -8px; | |||
|
1715 | } | |||
|
1716 | .ui-datepicker .ui-datepicker-title | |||
|
1717 | { | |||
|
1718 | margin: 0 2.3em; | |||
|
1719 | line-height: 1.8em; | |||
|
1720 | text-align: center; | |||
|
1721 | } | |||
|
1722 | .ui-datepicker .ui-datepicker-title select | |||
|
1723 | { | |||
|
1724 | font-size: 1em; | |||
|
1725 | margin: 1px 0; | |||
|
1726 | } | |||
|
1727 | .ui-datepicker select.ui-datepicker-month-year | |||
|
1728 | { | |||
|
1729 | width: 100%; | |||
|
1730 | } | |||
|
1731 | .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year | |||
|
1732 | { | |||
|
1733 | width: 49%; | |||
|
1734 | } | |||
|
1735 | .ui-datepicker table | |||
|
1736 | { | |||
|
1737 | width: 100%; | |||
|
1738 | font-size: .9em; | |||
|
1739 | border-collapse: collapse; | |||
|
1740 | margin: 0 0 .4em; | |||
|
1741 | } | |||
|
1742 | .ui-datepicker th | |||
|
1743 | { | |||
|
1744 | padding: .7em .3em; | |||
|
1745 | text-align: center; | |||
|
1746 | font-weight: bold; | |||
|
1747 | border: 0; | |||
|
1748 | } | |||
|
1749 | .ui-datepicker td | |||
|
1750 | { | |||
|
1751 | border: 0; | |||
|
1752 | padding: 1px; | |||
|
1753 | } | |||
|
1754 | .ui-datepicker td span, .ui-datepicker td a | |||
|
1755 | { | |||
|
1756 | display: block; | |||
|
1757 | padding: .2em; | |||
|
1758 | text-align: right; | |||
|
1759 | text-decoration: none; | |||
|
1760 | } | |||
|
1761 | .ui-datepicker .ui-datepicker-buttonpane | |||
|
1762 | { | |||
|
1763 | background-image: none; | |||
|
1764 | margin: .7em 0 0 0; | |||
|
1765 | padding: 0 .2em; | |||
|
1766 | border-left: 0; | |||
|
1767 | border-right: 0; | |||
|
1768 | border-bottom: 0; | |||
|
1769 | } | |||
|
1770 | .ui-datepicker .ui-datepicker-buttonpane button | |||
|
1771 | { | |||
|
1772 | float: right; | |||
|
1773 | margin: .5em .2em .4em; | |||
|
1774 | cursor: pointer; | |||
|
1775 | padding: .2em .6em .3em .6em; | |||
|
1776 | width: auto; | |||
|
1777 | overflow: visible; | |||
|
1778 | } | |||
|
1779 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current | |||
|
1780 | { | |||
|
1781 | float: left; | |||
|
1782 | } | |||
|
1783 | ||||
|
1784 | /* with multiple calendars */ | |||
|
1785 | .ui-datepicker.ui-datepicker-multi | |||
|
1786 | { | |||
|
1787 | width: auto; | |||
|
1788 | } | |||
|
1789 | .ui-datepicker-multi .ui-datepicker-group | |||
|
1790 | { | |||
|
1791 | float: left; | |||
|
1792 | } | |||
|
1793 | .ui-datepicker-multi .ui-datepicker-group table | |||
|
1794 | { | |||
|
1795 | width: 95%; | |||
|
1796 | margin: 0 auto .4em; | |||
|
1797 | } | |||
|
1798 | .ui-datepicker-multi-2 .ui-datepicker-group | |||
|
1799 | { | |||
|
1800 | width: 50%; | |||
|
1801 | } | |||
|
1802 | .ui-datepicker-multi-3 .ui-datepicker-group | |||
|
1803 | { | |||
|
1804 | width: 33.3%; | |||
|
1805 | } | |||
|
1806 | .ui-datepicker-multi-4 .ui-datepicker-group | |||
|
1807 | { | |||
|
1808 | width: 25%; | |||
|
1809 | } | |||
|
1810 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header | |||
|
1811 | { | |||
|
1812 | border-left-width: 0; | |||
|
1813 | } | |||
|
1814 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header | |||
|
1815 | { | |||
|
1816 | border-left-width: 0; | |||
|
1817 | } | |||
|
1818 | .ui-datepicker-multi .ui-datepicker-buttonpane | |||
|
1819 | { | |||
|
1820 | clear: left; | |||
|
1821 | } | |||
|
1822 | .ui-datepicker-row-break | |||
|
1823 | { | |||
|
1824 | clear: both; | |||
|
1825 | width: 100%; | |||
|
1826 | } | |||
|
1827 | ||||
|
1828 | /* RTL support */ | |||
|
1829 | .ui-datepicker-rtl | |||
|
1830 | { | |||
|
1831 | direction: rtl; | |||
|
1832 | } | |||
|
1833 | .ui-datepicker-rtl .ui-datepicker-prev | |||
|
1834 | { | |||
|
1835 | right: 2px; | |||
|
1836 | left: auto; | |||
|
1837 | } | |||
|
1838 | .ui-datepicker-rtl .ui-datepicker-next | |||
|
1839 | { | |||
|
1840 | left: 2px; | |||
|
1841 | right: auto; | |||
|
1842 | } | |||
|
1843 | .ui-datepicker-rtl .ui-datepicker-prev:hover | |||
|
1844 | { | |||
|
1845 | right: 1px; | |||
|
1846 | left: auto; | |||
|
1847 | } | |||
|
1848 | .ui-datepicker-rtl .ui-datepicker-next:hover | |||
|
1849 | { | |||
|
1850 | left: 1px; | |||
|
1851 | right: auto; | |||
|
1852 | } | |||
|
1853 | .ui-datepicker-rtl .ui-datepicker-buttonpane | |||
|
1854 | { | |||
|
1855 | clear: right; | |||
|
1856 | } | |||
|
1857 | .ui-datepicker-rtl .ui-datepicker-buttonpane button | |||
|
1858 | { | |||
|
1859 | float: left; | |||
|
1860 | } | |||
|
1861 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current | |||
|
1862 | { | |||
|
1863 | float: right; | |||
|
1864 | } | |||
|
1865 | .ui-datepicker-rtl .ui-datepicker-group | |||
|
1866 | { | |||
|
1867 | float: right; | |||
|
1868 | } | |||
|
1869 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header | |||
|
1870 | { | |||
|
1871 | border-right-width: 0; | |||
|
1872 | border-left-width: 1px; | |||
|
1873 | } | |||
|
1874 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header | |||
|
1875 | { | |||
|
1876 | border-right-width: 0; | |||
|
1877 | border-left-width: 1px; | |||
|
1878 | } | |||
|
1879 | ||||
|
1880 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ | |||
|
1881 | .ui-datepicker-cover | |||
|
1882 | { | |||
|
1883 | display: none; /*sorry for IE5*/ | |||
|
1884 | display: /**/ block; /*sorry for IE5*/ | |||
|
1885 | position: absolute; /*must have*/ | |||
|
1886 | z-index: -1; /*must have*/ | |||
|
1887 | filter: mask(); /*must have*/ | |||
|
1888 | top: -4px; /*must have*/ | |||
|
1889 | left: -4px; /*must have*/ | |||
|
1890 | width: 200px; /*must have*/ | |||
|
1891 | height: 200px; /*must have*/ | |||
|
1892 | } | |||
|
1893 | /* | |||
|
1894 | * jQuery UI Progressbar 1.8.7 | |||
|
1895 | * | |||
|
1896 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
1897 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
1898 | * http://jquery.org/license | |||
|
1899 | * | |||
|
1900 | * http://docs.jquery.com/UI/Progressbar#theming | |||
|
1901 | */ | |||
|
1902 | .ui-progressbar | |||
|
1903 | { | |||
|
1904 | height: 2em; | |||
|
1905 | text-align: left; | |||
|
1906 | } | |||
|
1907 | .ui-progressbar .ui-progressbar-value | |||
|
1908 | { | |||
|
1909 | margin: -1px; | |||
|
1910 | height: 100%; | |||
|
1911 | } | |||
|
1912 | ||||
|
1913 | /* Custom */ | |||
|
1914 | ||||
|
1915 | ||||
|
1916 | ||||
|
1917 | ||||
|
1918 | .wijmo-dropdown-trigger | |||
|
1919 | { | |||
|
1920 | -moz-border-radius-topright: 2px; | |||
|
1921 | -webkit-border-top-right-radius: 2px; | |||
|
1922 | border-top-right-radius: 2px; | |||
|
1923 | -moz-border-radius-bottomright: 2px; | |||
|
1924 | -webkit-border-bottom-right-radius: 2px; | |||
|
1925 | border-bottom-right-radius: 2px; | |||
|
1926 | } | |||
|
1927 | ||||
|
1928 | ||||
|
1929 | .wijmo-wijdropdown label.wijmo-dropdown-label | |||
|
1930 | { | |||
|
1931 | -moz-border-radius: 2px; | |||
|
1932 | -webkit-border-radius: 2px; | |||
|
1933 | border-radius: 2px; | |||
|
1934 | } | |||
|
1935 | ||||
|
1936 | .wijmo-wijinput, .wijmo-wijtextbox, .wijmo-checkbox-box, .wijmo-wijradio-box, .wijmo-wijgrid .wijmo-wijinput | |||
|
1937 | { | |||
|
1938 | /*background: #242122 url(images/ui-bg_inset-soft_15_242122_1x100.png) 50% 50% repeat-x !important;*/ /*background: #e1e1e1 url(images/ui-bg_inset-soft_100_e1e1e1_1x100.png) 50% 50% repeat-x !important;*/ | |||
|
1939 | background: #f1f1f1 !important; | |||
|
1940 | color: #404040; | |||
|
1941 | border: solid 1px #e1e1e1; | |||
|
1942 | } | |||
|
1943 | .wijmo-wijinput.ui-state-focus, .wijmo-wijtextbox.ui-state-focus | |||
|
1944 | { | |||
|
1945 | /*background: #e1e1e1 url(images/ui-bg_inset-soft_100_e1e1e1_1x100.png) 50% 50% repeat-x !important;*/ | |||
|
1946 | background: #fafafa !important; | |||
|
1947 | color: #404040 !important; | |||
|
1948 | } | |||
|
1949 | ||||
|
1950 | .wijmo-checkbox .ui-state-hover, .wijmo-wijradio .ui-state-hover | |||
|
1951 | { | |||
|
1952 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1953 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1954 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1955 | border: 1px solid #00a6dd; | |||
|
1956 | background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x; | |||
|
1957 | font-weight: normal; | |||
|
1958 | color: #fafafa; | |||
|
1959 | text-shadow: none; | |||
|
1960 | } | |||
|
1961 | ||||
|
1962 | .wijmo-checkbox .ui-state-active, .wijmo-wijradio .ui-state-active | |||
|
1963 | { | |||
|
1964 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1965 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1966 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
1967 | border: 1px solid transparent; | |||
|
1968 | background: #606154 url(images/ui-bg_highlight-soft_15_333333_1x100.png) top repeat-x; | |||
|
1969 | font-weight: normal; | |||
|
1970 | color: #fafafa; | |||
|
1971 | } | |||
|
1972 | ||||
|
1973 | ||||
|
1974 | ||||
|
1975 | .wijmo-wijgrid .wijmo-wijgrid-table .wijmo-wijgrid-filter-input | |||
|
1976 | { | |||
|
1977 | background: #e1e1e1 url(images/ui-bg_inset-soft_100_e1e1e1_1x100.png) 50% 50% repeat-x !important; | |||
|
1978 | color: #404040 !important; | |||
|
1979 | } | |||
|
1980 | ||||
|
1981 | .wijmo-wijgrid-row .ui-state-highlight | |||
|
1982 | { | |||
|
1983 | border-right: solid 1px transparent !important; | |||
|
1984 | } | |||
|
1985 | ||||
|
1986 | .wijmo-wijmenu .wijmo-wijmenu-list .wijmo-wijmenu-item | |||
|
1987 | { | |||
|
1988 | -moz-box-shadow: none; | |||
|
1989 | -webkit-box-shadow: none; | |||
|
1990 | box-shadow: none; | |||
|
1991 | } | |||
|
1992 | ||||
|
1993 | .wijmo-wijdropdown .wijmo-dropdown, .wijmo-wijmenu-child, .wijmo-wijcombobox-list, .wijmo-wijgrid-filterlist | |||
|
1994 | { | |||
|
1995 | -moz-box-shadow: 3px 3px 3px rgba(0,0,0,0.15); | |||
|
1996 | -webkit-box-shadow: 3px 3px 3px rgba(0,0,0,0.15); | |||
|
1997 | box-shadow: 3px 3px 3px rgba(0,0,0,0.15); | |||
|
1998 | } | |||
|
1999 | ||||
|
2000 | .wijmo-wijmenu-child .ui-state-default .wijmo-wijmenu-text, .wijmo-wijmenu-child a.wijmo-wijmenu-text | |||
|
2001 | { | |||
|
2002 | color: #404040; | |||
|
2003 | } | |||
|
2004 | .wijmo-wijmenu-ipod .wijmo-wijmenu-list .ui-state-default .wijmo-wijmenu-text | |||
|
2005 | { | |||
|
2006 | color: #fafafa; | |||
|
2007 | } | |||
|
2008 | .wijmo-wijmenu-ipod .wijmo-wijmenu-list | |||
|
2009 | { | |||
|
2010 | -moz-box-shadow: none; | |||
|
2011 | -webkit-box-shadow: none; | |||
|
2012 | box-shadow: none; | |||
|
2013 | } | |||
|
2014 | ||||
|
2015 | .wijmo-wijmenu .wijmo-wijsuperpanel | |||
|
2016 | { | |||
|
2017 | background: none !important; | |||
|
2018 | } | |||
|
2019 | ||||
|
2020 | ||||
|
2021 | .wijmo-wijmenu-child .ui-state-hover .wijmo-wijmenu-text, .wijmo-wijmenu-child .ui-state-active .wijmo-wijmenu-text, .wijmo-wijmenu-child .ui-state-focus .wijmo-wijmenu-text | |||
|
2022 | { | |||
|
2023 | color: #fafafa; | |||
|
2024 | } | |||
|
2025 | ||||
|
2026 | ||||
|
2027 | .wijmo-wijmenu-child a:hover | |||
|
2028 | { | |||
|
2029 | color: #fafafa !important; | |||
|
2030 | } | |||
|
2031 | ||||
|
2032 | .wijmo-wijmenu-child a:focus, .wijmo-wijmenu-child a:active | |||
|
2033 | { | |||
|
2034 | color: #fafafa !important; | |||
|
2035 | } | |||
|
2036 | ||||
|
2037 | .ui-progressbar-value, .ui-slider-range | |||
|
2038 | { | |||
|
2039 | border: 1px solid #00a6dd; | |||
|
2040 | background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x; | |||
|
2041 | font-weight: normal; | |||
|
2042 | color: #fafafa; | |||
|
2043 | } | |||
|
2044 | ||||
|
2045 | .wijmo-wijsuperpanel-vbarcontainer, .wijmo-wijsuperpanel-hbarcontainer | |||
|
2046 | { | |||
|
2047 | background: #888978; | |||
|
2048 | } | |||
|
2049 | ||||
|
2050 | .wijmo-wijsuperpanel-vbarcontainer | |||
|
2051 | { | |||
|
2052 | -moz-box-shadow: inset 3px 0 10px rgba(0,0,0,0.25); | |||
|
2053 | -webkit-box-shadow: inset 3px 0 10px rgba(0,0,0,0.25); | |||
|
2054 | box-shadow: inset 3px 0 10px rgba(0,0,0,0.25); | |||
|
2055 | } | |||
|
2056 | ||||
|
2057 | ||||
|
2058 | .wijmo-wijsuperpanel-hbarcontainer | |||
|
2059 | { | |||
|
2060 | -moz-box-shadow: inset 0 3px 10px rgba(0,0,0,0.25); | |||
|
2061 | -webkit-box-shadow: inset 0 3px 10px rgba(0,0,0,0.25); | |||
|
2062 | box-shadow: inset 0 3px 10px rgba(0,0,0,0.25); | |||
|
2063 | } | |||
|
2064 | ||||
|
2065 | .wijmo-wijcalendar | |||
|
2066 | { | |||
|
2067 | display: block; | |||
|
2068 | } | |||
|
2069 | ||||
|
2070 | ||||
|
2071 | .wijmo-wijgrid .ui-state-highlight | |||
|
2072 | { | |||
|
2073 | -moz-box-shadow: none; | |||
|
2074 | -webkit-box-shadow: none; | |||
|
2075 | box-shadow: none; | |||
|
2076 | background: transparent url(images/ui-bg_highlight-soft_15_9eca38_1x100_50.png) 50% 50% repeat-x; | |||
|
2077 | text-shadow: none; | |||
|
2078 | color: inherit; | |||
|
2079 | } | |||
|
2080 | ||||
|
2081 | ||||
|
2082 | .wijmo-wijgrid .wijmo-wijgrid-currency-cell | |||
|
2083 | { | |||
|
2084 | -moz-box-shadow: none; | |||
|
2085 | -webkit-box-shadow: none; | |||
|
2086 | box-shadow: none; | |||
|
2087 | background: transparent url(images/ui-bg_highlight-soft_15_333333_1x100_50.png) repeat-x scroll center top; | |||
|
2088 | text-shadow: none; | |||
|
2089 | color: inherit; | |||
|
2090 | border-top: solid 1px #d3d3d3; | |||
|
2091 | } | |||
|
2092 | ||||
|
2093 | .wijmo-wijcalendar-day-selectable .ui-state-default | |||
|
2094 | { | |||
|
2095 | background: none; | |||
|
2096 | border: solid 1px transparent; | |||
|
2097 | color: #404040; | |||
|
2098 | } | |||
|
2099 | ||||
|
2100 | .wijmo-wijcalendar-day-selectable .ui-state-highlight | |||
|
2101 | { | |||
|
2102 | background: #9eca38 url(images/ui-bg_highlight-soft_15_9eca38_1x100.png) 50% 50% repeat-x; | |||
|
2103 | border: 1px solid #9eca38; | |||
|
2104 | color: #304915; | |||
|
2105 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25); | |||
|
2106 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25); | |||
|
2107 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25); | |||
|
2108 | text-shadow: 1px 1px 0 rgba(255,255,255,0.50); | |||
|
2109 | } | |||
|
2110 | ||||
|
2111 | ||||
|
2112 | ||||
|
2113 | .wijmo-wijcalendar-day-selectable .ui-state-hover | |||
|
2114 | { | |||
|
2115 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2116 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2117 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2118 | border: 1px solid #00a6dd; | |||
|
2119 | background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x; | |||
|
2120 | font-weight: normal; | |||
|
2121 | color: #fafafa; | |||
|
2122 | text-shadow: none; | |||
|
2123 | } | |||
|
2124 | ||||
|
2125 | .wijmo-wijmenu .wijmo-wijmenu-separator | |||
|
2126 | { | |||
|
2127 | border: 1px solid #00a6dd; | |||
|
2128 | background: #00a6dd url(images/ui-bg_highlight-soft_35_00a6dd_1x100.png) 50% 50% repeat-x; | |||
|
2129 | } | |||
|
2130 | ||||
|
2131 | .wijmo-wijmenu .wij-menu-breadcrumb a | |||
|
2132 | { | |||
|
2133 | color: #fafafa; | |||
|
2134 | line-height: 22px; | |||
|
2135 | } | |||
|
2136 | ||||
|
2137 | .wijmo-wijcalendar-day-selectable .ui-state-active | |||
|
2138 | { | |||
|
2139 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2140 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2141 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15); | |||
|
2142 | border: 1px solid transparent; | |||
|
2143 | background: #606154 url(images/ui-bg_highlight-soft_15_333333_1x100.png) top repeat-x; | |||
|
2144 | font-weight: normal; | |||
|
2145 | color: #fafafa; | |||
|
2146 | } | |||
|
2147 | ||||
|
2148 | .wijmo-wijcalendar-day-selectable .ui-priority-secondary | |||
|
2149 | { | |||
|
2150 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2151 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2152 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2153 | border: 1px solid #404040; | |||
|
2154 | background: #242122 url(images/ui-bg_highlight-soft_15_242122_1x100.png) 50% 50% repeat-x; | |||
|
2155 | font-weight: normal; | |||
|
2156 | color: #fafafa; | |||
|
2157 | opacity: 0.25; | |||
|
2158 | } | |||
|
2159 | .wijmo-wijcombobox .wijmo-wijcombobox-input | |||
|
2160 | { | |||
|
2161 | background: #f1f1f1; | |||
|
2162 | -moz-border-radius: 2px; | |||
|
2163 | -webkit-border-radius: 2px; | |||
|
2164 | border-radius: 2px; | |||
|
2165 | color: #404040; | |||
|
2166 | } | |||
|
2167 | ||||
|
2168 | .ui-expander-top .ui-expander-content | |||
|
2169 | { | |||
|
2170 | border-top: solid 1px #E3E3E3 !important; | |||
|
2171 | } | |||
|
2172 | ||||
|
2173 | .ui-expander-right .ui-expander-content | |||
|
2174 | { | |||
|
2175 | border-top: solid 1px #E3E3E3 !important; | |||
|
2176 | border-right: solid 1px #E3E3E3 !important; | |||
|
2177 | border-bottom: solid 1px #E3E3E3 !important; | |||
|
2178 | padding: 0 1em !important; | |||
|
2179 | } | |||
|
2180 | ||||
|
2181 | .ui-expander-left .ui-expander-content | |||
|
2182 | { | |||
|
2183 | border-top: solid 1px #E3E3E3 !important; | |||
|
2184 | border-left: solid 1px #E3E3E3 !important; | |||
|
2185 | border-bottom: solid 1px #E3E3E3 !important; | |||
|
2186 | padding: 0 1em !important; | |||
|
2187 | } | |||
|
2188 | ||||
|
2189 | .ui-accordion-top .ui-accordion-content | |||
|
2190 | { | |||
|
2191 | border-top: solid 1px #E3E3E3 !important; | |||
|
2192 | } | |||
|
2193 | ||||
|
2194 | .ui-accordion-right .ui-accordion-content | |||
|
2195 | { | |||
|
2196 | border-top: solid 1px #E3E3E3 !important; | |||
|
2197 | border-right: solid 1px #E3E3E3 !important; | |||
|
2198 | border-bottom: solid 1px #E3E3E3 !important; | |||
|
2199 | padding: 0 1em !important; | |||
|
2200 | } | |||
|
2201 | ||||
|
2202 | .ui-accordion-left .ui-accordion-content | |||
|
2203 | { | |||
|
2204 | border-top: solid 1px #E3E3E3 !important; | |||
|
2205 | border-left: solid 1px #E3E3E3 !important; | |||
|
2206 | border-bottom: solid 1px #E3E3E3 !important; | |||
|
2207 | padding: 0 1em !important; | |||
|
2208 | } | |||
|
2209 | ||||
|
2210 | ||||
|
2211 | .ui-tabs .ui-tabs-nav | |||
|
2212 | { | |||
|
2213 | -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2214 | -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2215 | box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05); | |||
|
2216 | border: 1px solid #404040; | |||
|
2217 | background: #242122 url(images/ui-bg_highlight-soft_15_242122_1x100_bottom.png) 50% 50% repeat-x; | |||
|
2218 | font-weight: normal; | |||
|
2219 | color: #fafafa; | |||
|
2220 | } | |||
|
2221 | ||||
|
2222 | .wijmo-wijgrid .wijmo-wijcombobox-wrapper .wijmo-wijcombobox-input | |||
|
2223 | { | |||
|
2224 | -moz-border-radius: 0; | |||
|
2225 | -webkit-border-radius: 0; | |||
|
2226 | border-radius: 0; | |||
|
2227 | } | |||
|
2228 | ||||
|
2229 | ||||
|
2230 | .wijmo-wijgrid .wijmo-wijcombobox-trigger .ui-icon, .wijmo-wijgrid .wijmo-wijinput .ui-icon | |||
|
2231 | { | |||
|
2232 | background-image: url(images/ui-icons_fafafa_256x240.png); | |||
|
2233 | } | |||
|
2234 | ||||
|
2235 | .wijmo-wijgrid .wijmo-wijcombobox-wrapper | |||
|
2236 | { | |||
|
2237 | background: none; | |||
|
2238 | } | |||
|
2239 | ||||
|
2240 | .wijmo-wijgrid .ui-input-spinner-right .wijmo-wijinput-spinup | |||
|
2241 | { | |||
|
2242 | -moz-border-radius: 0; | |||
|
2243 | -webkit-border-radius: 0; | |||
|
2244 | border-radius: 0; | |||
|
2245 | } | |||
|
2246 | ||||
|
2247 | .wijmo-wijgrid .ui-input-spinner-right .wijmo-wijinput-spindown | |||
|
2248 | { | |||
|
2249 | -moz-border-radius: 0; | |||
|
2250 | -webkit-border-radius: 0; | |||
|
2251 | border-radius: 0; | |||
|
2252 | } | |||
|
2253 | ||||
|
2254 | .ui-datepicker-group .ui-datepicker-header | |||
|
2255 | { | |||
|
2256 | -moz-border-radius: 0; | |||
|
2257 | border: none; | |||
|
2258 | } | |||
|
2259 | ||||
|
2260 | .ui-datepicker-group .ui-datepicker-header .ui-datepicker-title | |||
|
2261 | { | |||
|
2262 | -moz-box-shadow: none; | |||
|
2263 | -webkit-box-shadow: none; | |||
|
2264 | box-shadow: none; | |||
|
2265 | } | |||
|
2266 | ||||
|
2267 | .ui-datepicker-group-first .ui-datepicker-header | |||
|
2268 | { | |||
|
2269 | -moz-border-radius-topleft: 4px; | |||
|
2270 | -webkit-border-top-left-radius: 4px; | |||
|
2271 | border-top-left-radius: 4px; | |||
|
2272 | -moz-border-radius-bottomleft: 4px; | |||
|
2273 | -webkit-border-bottom-left-radius: 4px; | |||
|
2274 | border-bottom-left-radius: 4px; | |||
|
2275 | } | |||
|
2276 | ||||
|
2277 | .ui-datepicker-group-last .ui-datepicker-header | |||
|
2278 | { | |||
|
2279 | -moz-border-radius-topright: 4px; | |||
|
2280 | -webkit-border-top-right-radius: 4px; | |||
|
2281 | border-top-right-radius: 4px; | |||
|
2282 | -moz-border-radius-bottomright: 4px; | |||
|
2283 | -webkit-border-bottom-right-radius: 4px; | |||
|
2284 | border-bottom-right-radius: 4px; | |||
|
2285 | } | |||
|
2286 | ||||
|
2287 | a.ui-button:link, a.ui-button | |||
|
2288 | { | |||
|
2289 | color: #fafafa; | |||
|
2290 | } | |||
|
2291 | ||||
|
2292 | .wijmo-wijwizard .wijmo-wijsuperpanel | |||
|
2293 | { | |||
|
2294 | background: none; | |||
|
2295 | border: none; | |||
|
2296 | } | |||
|
2297 | ||||
|
2298 | .wijmo-wijmenu .wijmo-wijmenu-link .wijmo-wijmenu-icon-right | |||
|
2299 | { | |||
|
2300 | color: #404040; | |||
|
2301 | } | |||
|
2302 | ||||
|
2303 | .wijmo-wijmenu .wijmo-wijmenu-link:hover .wijmo-wijmenu-icon-right | |||
|
2304 | { | |||
|
2305 | color: #fafafa; | |||
|
2306 | } | |||
|
2307 | ||||
|
2308 | ||||
|
2309 | .wijmo-wijmenu .wijmo-wijmenu-link label | |||
|
2310 | { | |||
|
2311 | color: #404040; | |||
|
2312 | } |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
This diff has been collapsed as it changes many lines, (568 lines changed) Show them Hide them | |||||
@@ -0,0 +1,568 b'' | |||||
|
1 | /* | |||
|
2 | * jQuery UI CSS Framework 1.8.14 | |||
|
3 | * | |||
|
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
5 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
6 | * http://jquery.org/license | |||
|
7 | * | |||
|
8 | * http://docs.jquery.com/UI/Theming/API | |||
|
9 | */ | |||
|
10 | ||||
|
11 | /* Layout helpers | |||
|
12 | ----------------------------------*/ | |||
|
13 | .ui-helper-hidden { display: none; } | |||
|
14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } | |||
|
15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } | |||
|
16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } | |||
|
17 | .ui-helper-clearfix { display: inline-block; } | |||
|
18 | /* required comment for clearfix to work in Opera \*/ | |||
|
19 | * html .ui-helper-clearfix { height:1%; } | |||
|
20 | .ui-helper-clearfix { display:block; } | |||
|
21 | /* end clearfix */ | |||
|
22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } | |||
|
23 | ||||
|
24 | ||||
|
25 | /* Interaction Cues | |||
|
26 | ----------------------------------*/ | |||
|
27 | .ui-state-disabled { cursor: default !important; } | |||
|
28 | ||||
|
29 | ||||
|
30 | /* Icons | |||
|
31 | ----------------------------------*/ | |||
|
32 | ||||
|
33 | /* states and images */ | |||
|
34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } | |||
|
35 | ||||
|
36 | ||||
|
37 | /* Misc visuals | |||
|
38 | ----------------------------------*/ | |||
|
39 | ||||
|
40 | /* Overlays */ | |||
|
41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } | |||
|
42 | ||||
|
43 | ||||
|
44 | /* | |||
|
45 | * jQuery UI CSS Framework 1.8.14 | |||
|
46 | * | |||
|
47 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
48 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
49 | * http://jquery.org/license | |||
|
50 | * | |||
|
51 | * http://docs.jquery.com/UI/Theming/API | |||
|
52 | * | |||
|
53 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px | |||
|
54 | */ | |||
|
55 | ||||
|
56 | ||||
|
57 | /* Component containers | |||
|
58 | ----------------------------------*/ | |||
|
59 | .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } | |||
|
60 | .ui-widget .ui-widget { font-size: 1em; } | |||
|
61 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } | |||
|
62 | .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } | |||
|
63 | .ui-widget-content a { color: #222222; } | |||
|
64 | .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } | |||
|
65 | .ui-widget-header a { color: #222222; } | |||
|
66 | ||||
|
67 | /* Interaction states | |||
|
68 | ----------------------------------*/ | |||
|
69 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } | |||
|
70 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } | |||
|
71 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } | |||
|
72 | .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } | |||
|
73 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } | |||
|
74 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } | |||
|
75 | .ui-widget :active { outline: none; } | |||
|
76 | ||||
|
77 | /* Interaction Cues | |||
|
78 | ----------------------------------*/ | |||
|
79 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } | |||
|
80 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } | |||
|
81 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } | |||
|
82 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } | |||
|
83 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } | |||
|
84 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } | |||
|
85 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } | |||
|
86 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } | |||
|
87 | ||||
|
88 | /* Icons | |||
|
89 | ----------------------------------*/ | |||
|
90 | ||||
|
91 | /* states and images */ | |||
|
92 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } | |||
|
93 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } | |||
|
94 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } | |||
|
95 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } | |||
|
96 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } | |||
|
97 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } | |||
|
98 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } | |||
|
99 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } | |||
|
100 | ||||
|
101 | /* positioning */ | |||
|
102 | .ui-icon-carat-1-n { background-position: 0 0; } | |||
|
103 | .ui-icon-carat-1-ne { background-position: -16px 0; } | |||
|
104 | .ui-icon-carat-1-e { background-position: -32px 0; } | |||
|
105 | .ui-icon-carat-1-se { background-position: -48px 0; } | |||
|
106 | .ui-icon-carat-1-s { background-position: -64px 0; } | |||
|
107 | .ui-icon-carat-1-sw { background-position: -80px 0; } | |||
|
108 | .ui-icon-carat-1-w { background-position: -96px 0; } | |||
|
109 | .ui-icon-carat-1-nw { background-position: -112px 0; } | |||
|
110 | .ui-icon-carat-2-n-s { background-position: -128px 0; } | |||
|
111 | .ui-icon-carat-2-e-w { background-position: -144px 0; } | |||
|
112 | .ui-icon-triangle-1-n { background-position: 0 -16px; } | |||
|
113 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } | |||
|
114 | .ui-icon-triangle-1-e { background-position: -32px -16px; } | |||
|
115 | .ui-icon-triangle-1-se { background-position: -48px -16px; } | |||
|
116 | .ui-icon-triangle-1-s { background-position: -64px -16px; } | |||
|
117 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } | |||
|
118 | .ui-icon-triangle-1-w { background-position: -96px -16px; } | |||
|
119 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } | |||
|
120 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } | |||
|
121 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } | |||
|
122 | .ui-icon-arrow-1-n { background-position: 0 -32px; } | |||
|
123 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } | |||
|
124 | .ui-icon-arrow-1-e { background-position: -32px -32px; } | |||
|
125 | .ui-icon-arrow-1-se { background-position: -48px -32px; } | |||
|
126 | .ui-icon-arrow-1-s { background-position: -64px -32px; } | |||
|
127 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } | |||
|
128 | .ui-icon-arrow-1-w { background-position: -96px -32px; } | |||
|
129 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } | |||
|
130 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } | |||
|
131 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } | |||
|
132 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } | |||
|
133 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } | |||
|
134 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } | |||
|
135 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } | |||
|
136 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } | |||
|
137 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } | |||
|
138 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } | |||
|
139 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } | |||
|
140 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } | |||
|
141 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } | |||
|
142 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } | |||
|
143 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } | |||
|
144 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } | |||
|
145 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } | |||
|
146 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } | |||
|
147 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } | |||
|
148 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } | |||
|
149 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } | |||
|
150 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } | |||
|
151 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } | |||
|
152 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } | |||
|
153 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } | |||
|
154 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } | |||
|
155 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } | |||
|
156 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } | |||
|
157 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } | |||
|
158 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } | |||
|
159 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } | |||
|
160 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } | |||
|
161 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } | |||
|
162 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } | |||
|
163 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } | |||
|
164 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } | |||
|
165 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } | |||
|
166 | .ui-icon-arrow-4 { background-position: 0 -80px; } | |||
|
167 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } | |||
|
168 | .ui-icon-extlink { background-position: -32px -80px; } | |||
|
169 | .ui-icon-newwin { background-position: -48px -80px; } | |||
|
170 | .ui-icon-refresh { background-position: -64px -80px; } | |||
|
171 | .ui-icon-shuffle { background-position: -80px -80px; } | |||
|
172 | .ui-icon-transfer-e-w { background-position: -96px -80px; } | |||
|
173 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } | |||
|
174 | .ui-icon-folder-collapsed { background-position: 0 -96px; } | |||
|
175 | .ui-icon-folder-open { background-position: -16px -96px; } | |||
|
176 | .ui-icon-document { background-position: -32px -96px; } | |||
|
177 | .ui-icon-document-b { background-position: -48px -96px; } | |||
|
178 | .ui-icon-note { background-position: -64px -96px; } | |||
|
179 | .ui-icon-mail-closed { background-position: -80px -96px; } | |||
|
180 | .ui-icon-mail-open { background-position: -96px -96px; } | |||
|
181 | .ui-icon-suitcase { background-position: -112px -96px; } | |||
|
182 | .ui-icon-comment { background-position: -128px -96px; } | |||
|
183 | .ui-icon-person { background-position: -144px -96px; } | |||
|
184 | .ui-icon-print { background-position: -160px -96px; } | |||
|
185 | .ui-icon-trash { background-position: -176px -96px; } | |||
|
186 | .ui-icon-locked { background-position: -192px -96px; } | |||
|
187 | .ui-icon-unlocked { background-position: -208px -96px; } | |||
|
188 | .ui-icon-bookmark { background-position: -224px -96px; } | |||
|
189 | .ui-icon-tag { background-position: -240px -96px; } | |||
|
190 | .ui-icon-home { background-position: 0 -112px; } | |||
|
191 | .ui-icon-flag { background-position: -16px -112px; } | |||
|
192 | .ui-icon-calendar { background-position: -32px -112px; } | |||
|
193 | .ui-icon-cart { background-position: -48px -112px; } | |||
|
194 | .ui-icon-pencil { background-position: -64px -112px; } | |||
|
195 | .ui-icon-clock { background-position: -80px -112px; } | |||
|
196 | .ui-icon-disk { background-position: -96px -112px; } | |||
|
197 | .ui-icon-calculator { background-position: -112px -112px; } | |||
|
198 | .ui-icon-zoomin { background-position: -128px -112px; } | |||
|
199 | .ui-icon-zoomout { background-position: -144px -112px; } | |||
|
200 | .ui-icon-search { background-position: -160px -112px; } | |||
|
201 | .ui-icon-wrench { background-position: -176px -112px; } | |||
|
202 | .ui-icon-gear { background-position: -192px -112px; } | |||
|
203 | .ui-icon-heart { background-position: -208px -112px; } | |||
|
204 | .ui-icon-star { background-position: -224px -112px; } | |||
|
205 | .ui-icon-link { background-position: -240px -112px; } | |||
|
206 | .ui-icon-cancel { background-position: 0 -128px; } | |||
|
207 | .ui-icon-plus { background-position: -16px -128px; } | |||
|
208 | .ui-icon-plusthick { background-position: -32px -128px; } | |||
|
209 | .ui-icon-minus { background-position: -48px -128px; } | |||
|
210 | .ui-icon-minusthick { background-position: -64px -128px; } | |||
|
211 | .ui-icon-close { background-position: -80px -128px; } | |||
|
212 | .ui-icon-closethick { background-position: -96px -128px; } | |||
|
213 | .ui-icon-key { background-position: -112px -128px; } | |||
|
214 | .ui-icon-lightbulb { background-position: -128px -128px; } | |||
|
215 | .ui-icon-scissors { background-position: -144px -128px; } | |||
|
216 | .ui-icon-clipboard { background-position: -160px -128px; } | |||
|
217 | .ui-icon-copy { background-position: -176px -128px; } | |||
|
218 | .ui-icon-contact { background-position: -192px -128px; } | |||
|
219 | .ui-icon-image { background-position: -208px -128px; } | |||
|
220 | .ui-icon-video { background-position: -224px -128px; } | |||
|
221 | .ui-icon-script { background-position: -240px -128px; } | |||
|
222 | .ui-icon-alert { background-position: 0 -144px; } | |||
|
223 | .ui-icon-info { background-position: -16px -144px; } | |||
|
224 | .ui-icon-notice { background-position: -32px -144px; } | |||
|
225 | .ui-icon-help { background-position: -48px -144px; } | |||
|
226 | .ui-icon-check { background-position: -64px -144px; } | |||
|
227 | .ui-icon-bullet { background-position: -80px -144px; } | |||
|
228 | .ui-icon-radio-off { background-position: -96px -144px; } | |||
|
229 | .ui-icon-radio-on { background-position: -112px -144px; } | |||
|
230 | .ui-icon-pin-w { background-position: -128px -144px; } | |||
|
231 | .ui-icon-pin-s { background-position: -144px -144px; } | |||
|
232 | .ui-icon-play { background-position: 0 -160px; } | |||
|
233 | .ui-icon-pause { background-position: -16px -160px; } | |||
|
234 | .ui-icon-seek-next { background-position: -32px -160px; } | |||
|
235 | .ui-icon-seek-prev { background-position: -48px -160px; } | |||
|
236 | .ui-icon-seek-end { background-position: -64px -160px; } | |||
|
237 | .ui-icon-seek-start { background-position: -80px -160px; } | |||
|
238 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ | |||
|
239 | .ui-icon-seek-first { background-position: -80px -160px; } | |||
|
240 | .ui-icon-stop { background-position: -96px -160px; } | |||
|
241 | .ui-icon-eject { background-position: -112px -160px; } | |||
|
242 | .ui-icon-volume-off { background-position: -128px -160px; } | |||
|
243 | .ui-icon-volume-on { background-position: -144px -160px; } | |||
|
244 | .ui-icon-power { background-position: 0 -176px; } | |||
|
245 | .ui-icon-signal-diag { background-position: -16px -176px; } | |||
|
246 | .ui-icon-signal { background-position: -32px -176px; } | |||
|
247 | .ui-icon-battery-0 { background-position: -48px -176px; } | |||
|
248 | .ui-icon-battery-1 { background-position: -64px -176px; } | |||
|
249 | .ui-icon-battery-2 { background-position: -80px -176px; } | |||
|
250 | .ui-icon-battery-3 { background-position: -96px -176px; } | |||
|
251 | .ui-icon-circle-plus { background-position: 0 -192px; } | |||
|
252 | .ui-icon-circle-minus { background-position: -16px -192px; } | |||
|
253 | .ui-icon-circle-close { background-position: -32px -192px; } | |||
|
254 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } | |||
|
255 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } | |||
|
256 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } | |||
|
257 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } | |||
|
258 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } | |||
|
259 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } | |||
|
260 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } | |||
|
261 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } | |||
|
262 | .ui-icon-circle-zoomin { background-position: -176px -192px; } | |||
|
263 | .ui-icon-circle-zoomout { background-position: -192px -192px; } | |||
|
264 | .ui-icon-circle-check { background-position: -208px -192px; } | |||
|
265 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } | |||
|
266 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } | |||
|
267 | .ui-icon-circlesmall-close { background-position: -32px -208px; } | |||
|
268 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } | |||
|
269 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } | |||
|
270 | .ui-icon-squaresmall-close { background-position: -80px -208px; } | |||
|
271 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } | |||
|
272 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } | |||
|
273 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } | |||
|
274 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } | |||
|
275 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } | |||
|
276 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } | |||
|
277 | ||||
|
278 | ||||
|
279 | /* Misc visuals | |||
|
280 | ----------------------------------*/ | |||
|
281 | ||||
|
282 | /* Corner radius */ | |||
|
283 | .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } | |||
|
284 | .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } | |||
|
285 | .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } | |||
|
286 | .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } | |||
|
287 | ||||
|
288 | /* Overlays */ | |||
|
289 | .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } | |||
|
290 | .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* | |||
|
291 | * jQuery UI Resizable 1.8.14 | |||
|
292 | * | |||
|
293 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
294 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
295 | * http://jquery.org/license | |||
|
296 | * | |||
|
297 | * http://docs.jquery.com/UI/Resizable#theming | |||
|
298 | */ | |||
|
299 | .ui-resizable { position: relative;} | |||
|
300 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } | |||
|
301 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } | |||
|
302 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } | |||
|
303 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } | |||
|
304 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } | |||
|
305 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } | |||
|
306 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } | |||
|
307 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } | |||
|
308 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } | |||
|
309 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* | |||
|
310 | * jQuery UI Selectable 1.8.14 | |||
|
311 | * | |||
|
312 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
313 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
314 | * http://jquery.org/license | |||
|
315 | * | |||
|
316 | * http://docs.jquery.com/UI/Selectable#theming | |||
|
317 | */ | |||
|
318 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } | |||
|
319 | /* | |||
|
320 | * jQuery UI Accordion 1.8.14 | |||
|
321 | * | |||
|
322 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
323 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
324 | * http://jquery.org/license | |||
|
325 | * | |||
|
326 | * http://docs.jquery.com/UI/Accordion#theming | |||
|
327 | */ | |||
|
328 | /* IE/Win - Fix animation bug - #4615 */ | |||
|
329 | .ui-accordion { width: 100%; } | |||
|
330 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } | |||
|
331 | .ui-accordion .ui-accordion-li-fix { display: inline; } | |||
|
332 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } | |||
|
333 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } | |||
|
334 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } | |||
|
335 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } | |||
|
336 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } | |||
|
337 | .ui-accordion .ui-accordion-content-active { display: block; } | |||
|
338 | /* | |||
|
339 | * jQuery UI Autocomplete 1.8.14 | |||
|
340 | * | |||
|
341 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
342 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
343 | * http://jquery.org/license | |||
|
344 | * | |||
|
345 | * http://docs.jquery.com/UI/Autocomplete#theming | |||
|
346 | */ | |||
|
347 | .ui-autocomplete { position: absolute; cursor: default; } | |||
|
348 | ||||
|
349 | /* workarounds */ | |||
|
350 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ | |||
|
351 | ||||
|
352 | /* | |||
|
353 | * jQuery UI Menu 1.8.14 | |||
|
354 | * | |||
|
355 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) | |||
|
356 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
357 | * http://jquery.org/license | |||
|
358 | * | |||
|
359 | * http://docs.jquery.com/UI/Menu#theming | |||
|
360 | */ | |||
|
361 | .ui-menu { | |||
|
362 | list-style:none; | |||
|
363 | padding: 2px; | |||
|
364 | margin: 0; | |||
|
365 | display:block; | |||
|
366 | float: left; | |||
|
367 | } | |||
|
368 | .ui-menu .ui-menu { | |||
|
369 | margin-top: -3px; | |||
|
370 | } | |||
|
371 | .ui-menu .ui-menu-item { | |||
|
372 | margin:0; | |||
|
373 | padding: 0; | |||
|
374 | zoom: 1; | |||
|
375 | float: left; | |||
|
376 | clear: left; | |||
|
377 | width: 100%; | |||
|
378 | } | |||
|
379 | .ui-menu .ui-menu-item a { | |||
|
380 | text-decoration:none; | |||
|
381 | display:block; | |||
|
382 | padding:.2em .4em; | |||
|
383 | line-height:1.5; | |||
|
384 | zoom:1; | |||
|
385 | } | |||
|
386 | .ui-menu .ui-menu-item a.ui-state-hover, | |||
|
387 | .ui-menu .ui-menu-item a.ui-state-active { | |||
|
388 | font-weight: normal; | |||
|
389 | margin: -1px; | |||
|
390 | } | |||
|
391 | /* | |||
|
392 | * jQuery UI Button 1.8.14 | |||
|
393 | * | |||
|
394 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
395 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
396 | * http://jquery.org/license | |||
|
397 | * | |||
|
398 | * http://docs.jquery.com/UI/Button#theming | |||
|
399 | */ | |||
|
400 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ | |||
|
401 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ | |||
|
402 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ | |||
|
403 | .ui-button-icons-only { width: 3.4em; } | |||
|
404 | button.ui-button-icons-only { width: 3.7em; } | |||
|
405 | ||||
|
406 | /*button text element */ | |||
|
407 | .ui-button .ui-button-text { display: block; line-height: 1.4; } | |||
|
408 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } | |||
|
409 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } | |||
|
410 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } | |||
|
411 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } | |||
|
412 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } | |||
|
413 | /* no icon support for input elements, provide padding by default */ | |||
|
414 | input.ui-button { padding: .4em 1em; } | |||
|
415 | ||||
|
416 | /*button icon element(s) */ | |||
|
417 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } | |||
|
418 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } | |||
|
419 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } | |||
|
420 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } | |||
|
421 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } | |||
|
422 | ||||
|
423 | /*button sets*/ | |||
|
424 | .ui-buttonset { margin-right: 7px; } | |||
|
425 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } | |||
|
426 | ||||
|
427 | /* workarounds */ | |||
|
428 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ | |||
|
429 | /* | |||
|
430 | * jQuery UI Dialog 1.8.14 | |||
|
431 | * | |||
|
432 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
433 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
434 | * http://jquery.org/license | |||
|
435 | * | |||
|
436 | * http://docs.jquery.com/UI/Dialog#theming | |||
|
437 | */ | |||
|
438 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } | |||
|
439 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } | |||
|
440 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } | |||
|
441 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } | |||
|
442 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } | |||
|
443 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } | |||
|
444 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } | |||
|
445 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } | |||
|
446 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } | |||
|
447 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } | |||
|
448 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } | |||
|
449 | .ui-draggable .ui-dialog-titlebar { cursor: move; } | |||
|
450 | /* | |||
|
451 | * jQuery UI Slider 1.8.14 | |||
|
452 | * | |||
|
453 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
454 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
455 | * http://jquery.org/license | |||
|
456 | * | |||
|
457 | * http://docs.jquery.com/UI/Slider#theming | |||
|
458 | */ | |||
|
459 | .ui-slider { position: relative; text-align: left; } | |||
|
460 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } | |||
|
461 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } | |||
|
462 | ||||
|
463 | .ui-slider-horizontal { height: .8em; } | |||
|
464 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } | |||
|
465 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } | |||
|
466 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } | |||
|
467 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } | |||
|
468 | ||||
|
469 | .ui-slider-vertical { width: .8em; height: 100px; } | |||
|
470 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } | |||
|
471 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } | |||
|
472 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } | |||
|
473 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/* | |||
|
474 | * jQuery UI Tabs 1.8.14 | |||
|
475 | * | |||
|
476 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
477 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
478 | * http://jquery.org/license | |||
|
479 | * | |||
|
480 | * http://docs.jquery.com/UI/Tabs#theming | |||
|
481 | */ | |||
|
482 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ | |||
|
483 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } | |||
|
484 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } | |||
|
485 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } | |||
|
486 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } | |||
|
487 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } | |||
|
488 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ | |||
|
489 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } | |||
|
490 | .ui-tabs .ui-tabs-hide { display: none !important; } | |||
|
491 | /* | |||
|
492 | * jQuery UI Datepicker 1.8.14 | |||
|
493 | * | |||
|
494 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
495 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
496 | * http://jquery.org/license | |||
|
497 | * | |||
|
498 | * http://docs.jquery.com/UI/Datepicker#theming | |||
|
499 | */ | |||
|
500 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } | |||
|
501 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } | |||
|
502 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } | |||
|
503 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } | |||
|
504 | .ui-datepicker .ui-datepicker-prev { left:2px; } | |||
|
505 | .ui-datepicker .ui-datepicker-next { right:2px; } | |||
|
506 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } | |||
|
507 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } | |||
|
508 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } | |||
|
509 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } | |||
|
510 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } | |||
|
511 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} | |||
|
512 | .ui-datepicker select.ui-datepicker-month, | |||
|
513 | .ui-datepicker select.ui-datepicker-year { width: 49%;} | |||
|
514 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } | |||
|
515 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } | |||
|
516 | .ui-datepicker td { border: 0; padding: 1px; } | |||
|
517 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } | |||
|
518 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } | |||
|
519 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } | |||
|
520 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } | |||
|
521 | ||||
|
522 | /* with multiple calendars */ | |||
|
523 | .ui-datepicker.ui-datepicker-multi { width:auto; } | |||
|
524 | .ui-datepicker-multi .ui-datepicker-group { float:left; } | |||
|
525 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } | |||
|
526 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } | |||
|
527 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } | |||
|
528 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } | |||
|
529 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } | |||
|
530 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } | |||
|
531 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } | |||
|
532 | .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } | |||
|
533 | ||||
|
534 | /* RTL support */ | |||
|
535 | .ui-datepicker-rtl { direction: rtl; } | |||
|
536 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } | |||
|
537 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } | |||
|
538 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } | |||
|
539 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } | |||
|
540 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } | |||
|
541 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } | |||
|
542 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } | |||
|
543 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } | |||
|
544 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } | |||
|
545 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } | |||
|
546 | ||||
|
547 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ | |||
|
548 | .ui-datepicker-cover { | |||
|
549 | display: none; /*sorry for IE5*/ | |||
|
550 | display/**/: block; /*sorry for IE5*/ | |||
|
551 | position: absolute; /*must have*/ | |||
|
552 | z-index: -1; /*must have*/ | |||
|
553 | filter: mask(); /*must have*/ | |||
|
554 | top: -4px; /*must have*/ | |||
|
555 | left: -4px; /*must have*/ | |||
|
556 | width: 200px; /*must have*/ | |||
|
557 | height: 200px; /*must have*/ | |||
|
558 | }/* | |||
|
559 | * jQuery UI Progressbar 1.8.14 | |||
|
560 | * | |||
|
561 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |||
|
562 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
563 | * http://jquery.org/license | |||
|
564 | * | |||
|
565 | * http://docs.jquery.com/UI/Progressbar#theming | |||
|
566 | */ | |||
|
567 | .ui-progressbar { height:2em; text-align: left; } | |||
|
568 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } No newline at end of file |
@@ -0,0 +1,18 b'' | |||||
|
1 | /*! | |||
|
2 | * jQuery JavaScript Library v1.6.2 | |||
|
3 | * http://jquery.com/ | |||
|
4 | * | |||
|
5 | * Copyright 2011, John Resig | |||
|
6 | * Dual licensed under the MIT or GPL Version 2 licenses. | |||
|
7 | * http://jquery.org/license | |||
|
8 | * | |||
|
9 | * Includes Sizzle.js | |||
|
10 | * http://sizzlejs.com/ | |||
|
11 | * Copyright 2011, The Dojo Foundation | |||
|
12 | * Released under the MIT, BSD, and GPL Licenses. | |||
|
13 | * | |||
|
14 | * Date: Thu Jun 30 14:16:56 2011 -0400 | |||
|
15 | */ | |||
|
16 | (function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. | |||
|
17 | shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j | |||
|
18 | )}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); No newline at end of file |
1 | NO CONTENT: new file 100755 |
|
NO CONTENT: new file 100755 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: new file 100644 |
|
NO CONTENT: new file 100644 | ||
The requested commit or file is too big and content was truncated. Show full diff |
@@ -4,6 +4,7 b' _build' | |||||
4 | docs/man/*.gz |
|
4 | docs/man/*.gz | |
5 | docs/source/api/generated |
|
5 | docs/source/api/generated | |
6 | docs/gh-pages |
|
6 | docs/gh-pages | |
|
7 | IPython/frontend/html/notebook/static/mathjax | |||
7 | *.py[co] |
|
8 | *.py[co] | |
8 | build |
|
9 | build | |
9 | *.egg-info |
|
10 | *.egg-info |
@@ -17,6 +17,13 b' Authors:' | |||||
17 | # Imports |
|
17 | # Imports | |
18 | #----------------------------------------------------------------------------- |
|
18 | #----------------------------------------------------------------------------- | |
19 |
|
19 | |||
|
20 | from .displaypub import ( | |||
|
21 | publish_pretty, publish_html, | |||
|
22 | publish_latex, publish_svg, | |||
|
23 | publish_png, publish_json, | |||
|
24 | publish_javascript, publish_jpeg | |||
|
25 | ) | |||
|
26 | ||||
20 | #----------------------------------------------------------------------------- |
|
27 | #----------------------------------------------------------------------------- | |
21 | # Main functions |
|
28 | # Main functions | |
22 | #----------------------------------------------------------------------------- |
|
29 | #----------------------------------------------------------------------------- | |
@@ -53,78 +60,314 b' def display(*objs, **kwargs):' | |||||
53 | publish('IPython.core.display.display', format_dict) |
|
60 | publish('IPython.core.display.display', format_dict) | |
54 |
|
61 | |||
55 |
|
62 | |||
56 | def display_pretty(*objs): |
|
63 | def display_pretty(*objs, **kwargs): | |
57 | """Display the pretty (default) representation of an object. |
|
64 | """Display the pretty (default) representation of an object. | |
58 |
|
65 | |||
59 | Parameters |
|
66 | Parameters | |
60 | ---------- |
|
67 | ---------- | |
61 | objs : tuple of objects |
|
68 | objs : tuple of objects | |
62 |
The Python objects to display |
|
69 | The Python objects to display, or if raw=True raw text data to | |
|
70 | display. | |||
|
71 | raw : bool | |||
|
72 | Are the data objects raw data or Python objects that need to be | |||
|
73 | formatted before display? [default: False] | |||
63 | """ |
|
74 | """ | |
64 | display(*objs, include=['text/plain']) |
|
75 | raw = kwargs.pop('raw',False) | |
|
76 | if raw: | |||
|
77 | for obj in objs: | |||
|
78 | publish_pretty(obj) | |||
|
79 | else: | |||
|
80 | display(*objs, include=['text/plain']) | |||
65 |
|
81 | |||
66 |
|
82 | |||
67 | def display_html(*objs): |
|
83 | def display_html(*objs, **kwargs): | |
68 | """Display the HTML representation of an object. |
|
84 | """Display the HTML representation of an object. | |
69 |
|
85 | |||
70 | Parameters |
|
86 | Parameters | |
71 | ---------- |
|
87 | ---------- | |
72 | objs : tuple of objects |
|
88 | objs : tuple of objects | |
73 |
The Python objects to display |
|
89 | The Python objects to display, or if raw=True raw HTML data to | |
74 | """ |
|
90 | display. | |
75 | display(*objs, include=['text/plain','text/html']) |
|
91 | raw : bool | |
|
92 | Are the data objects raw data or Python objects that need to be | |||
|
93 | formatted before display? [default: False] | |||
|
94 | """ | |||
|
95 | raw = kwargs.pop('raw',False) | |||
|
96 | if raw: | |||
|
97 | for obj in objs: | |||
|
98 | publish_html(obj) | |||
|
99 | else: | |||
|
100 | display(*objs, include=['text/plain','text/html']) | |||
76 |
|
101 | |||
77 |
|
102 | |||
78 | def display_svg(*objs): |
|
103 | def display_svg(*objs, **kwargs): | |
79 | """Display the SVG representation of an object. |
|
104 | """Display the SVG representation of an object. | |
80 |
|
105 | |||
81 | Parameters |
|
106 | Parameters | |
82 | ---------- |
|
107 | ---------- | |
83 | objs : tuple of objects |
|
108 | objs : tuple of objects | |
84 |
The Python objects to display |
|
109 | The Python objects to display, or if raw=True raw svg data to | |
|
110 | display. | |||
|
111 | raw : bool | |||
|
112 | Are the data objects raw data or Python objects that need to be | |||
|
113 | formatted before display? [default: False] | |||
85 | """ |
|
114 | """ | |
86 | display(*objs, include=['text/plain','image/svg+xml']) |
|
115 | raw = kwargs.pop('raw',False) | |
|
116 | if raw: | |||
|
117 | for obj in objs: | |||
|
118 | publish_svg(obj) | |||
|
119 | else: | |||
|
120 | display(*objs, include=['text/plain','image/svg+xml']) | |||
87 |
|
121 | |||
88 |
|
122 | |||
89 | def display_png(*objs): |
|
123 | def display_png(*objs, **kwargs): | |
90 | """Display the PNG representation of an object. |
|
124 | """Display the PNG representation of an object. | |
91 |
|
125 | |||
92 | Parameters |
|
126 | Parameters | |
93 | ---------- |
|
127 | ---------- | |
94 | objs : tuple of objects |
|
128 | objs : tuple of objects | |
95 |
The Python objects to display |
|
129 | The Python objects to display, or if raw=True raw png data to | |
|
130 | display. | |||
|
131 | raw : bool | |||
|
132 | Are the data objects raw data or Python objects that need to be | |||
|
133 | formatted before display? [default: False] | |||
96 | """ |
|
134 | """ | |
97 | display(*objs, include=['text/plain','image/png']) |
|
135 | raw = kwargs.pop('raw',False) | |
|
136 | if raw: | |||
|
137 | for obj in objs: | |||
|
138 | publish_png(obj) | |||
|
139 | else: | |||
|
140 | display(*objs, include=['text/plain','image/png']) | |||
|
141 | ||||
98 |
|
142 | |||
|
143 | def display_jpeg(*objs, **kwargs): | |||
|
144 | """Display the JPEG representation of an object. | |||
99 |
|
|
145 | ||
100 | def display_latex(*objs): |
|
146 | Parameters | |
|
147 | ---------- | |||
|
148 | objs : tuple of objects | |||
|
149 | The Python objects to display, or if raw=True raw JPEG data to | |||
|
150 | display. | |||
|
151 | raw : bool | |||
|
152 | Are the data objects raw data or Python objects that need to be | |||
|
153 | formatted before display? [default: False] | |||
|
154 | """ | |||
|
155 | raw = kwargs.pop('raw',False) | |||
|
156 | if raw: | |||
|
157 | for obj in objs: | |||
|
158 | publish_jpeg(obj) | |||
|
159 | else: | |||
|
160 | display(*objs, include=['text/plain','image/jpeg']) | |||
|
161 | ||||
|
162 | ||||
|
163 | def display_latex(*objs, **kwargs): | |||
101 | """Display the LaTeX representation of an object. |
|
164 | """Display the LaTeX representation of an object. | |
102 |
|
165 | |||
103 | Parameters |
|
166 | Parameters | |
104 | ---------- |
|
167 | ---------- | |
105 | objs : tuple of objects |
|
168 | objs : tuple of objects | |
106 |
The Python objects to display |
|
169 | The Python objects to display, or if raw=True raw latex data to | |
|
170 | display. | |||
|
171 | raw : bool | |||
|
172 | Are the data objects raw data or Python objects that need to be | |||
|
173 | formatted before display? [default: False] | |||
107 | """ |
|
174 | """ | |
108 | display(*objs, include=['text/plain','text/latex']) |
|
175 | raw = kwargs.pop('raw',False) | |
|
176 | if raw: | |||
|
177 | for obj in objs: | |||
|
178 | publish_latex(obj) | |||
|
179 | else: | |||
|
180 | display(*objs, include=['text/plain','text/latex']) | |||
109 |
|
181 | |||
110 |
|
182 | |||
111 | def display_json(*objs): |
|
183 | def display_json(*objs, **kwargs): | |
112 | """Display the JSON representation of an object. |
|
184 | """Display the JSON representation of an object. | |
113 |
|
185 | |||
114 | Parameters |
|
186 | Parameters | |
115 | ---------- |
|
187 | ---------- | |
116 | objs : tuple of objects |
|
188 | objs : tuple of objects | |
117 |
The Python objects to display |
|
189 | The Python objects to display, or if raw=True raw json data to | |
|
190 | display. | |||
|
191 | raw : bool | |||
|
192 | Are the data objects raw data or Python objects that need to be | |||
|
193 | formatted before display? [default: False] | |||
118 | """ |
|
194 | """ | |
119 | display(*objs, include=['text/plain','application/json']) |
|
195 | raw = kwargs.pop('raw',False) | |
|
196 | if raw: | |||
|
197 | for obj in objs: | |||
|
198 | publish_json(obj) | |||
|
199 | else: | |||
|
200 | display(*objs, include=['text/plain','application/json']) | |||
120 |
|
201 | |||
121 |
|
202 | |||
122 | def display_javascript(*objs): |
|
203 | def display_javascript(*objs, **kwargs): | |
123 | """Display the Javascript representation of an object. |
|
204 | """Display the Javascript representation of an object. | |
124 |
|
205 | |||
125 | Parameters |
|
206 | Parameters | |
126 | ---------- |
|
207 | ---------- | |
127 | objs : tuple of objects |
|
208 | objs : tuple of objects | |
128 |
The Python objects to display |
|
209 | The Python objects to display, or if raw=True raw javascript data to | |
|
210 | display. | |||
|
211 | raw : bool | |||
|
212 | Are the data objects raw data or Python objects that need to be | |||
|
213 | formatted before display? [default: False] | |||
129 | """ |
|
214 | """ | |
130 | display(*objs, include=['text/plain','application/javascript']) |
|
215 | raw = kwargs.pop('raw',False) | |
|
216 | if raw: | |||
|
217 | for obj in objs: | |||
|
218 | publish_javascript(obj) | |||
|
219 | else: | |||
|
220 | display(*objs, include=['text/plain','application/javascript']) | |||
|
221 | ||||
|
222 | #----------------------------------------------------------------------------- | |||
|
223 | # Smart classes | |||
|
224 | #----------------------------------------------------------------------------- | |||
|
225 | ||||
|
226 | ||||
|
227 | class DisplayObject(object): | |||
|
228 | """An object that wraps data to be displayed.""" | |||
|
229 | ||||
|
230 | _read_flags = 'r' | |||
|
231 | ||||
|
232 | def __init__(self, data=None, url=None, filename=None): | |||
|
233 | """Create a display object given raw data. | |||
|
234 | ||||
|
235 | When this object is returned by an expression or passed to the | |||
|
236 | display function, it will result in the data being displayed | |||
|
237 | in the frontend. The MIME type of the data should match the | |||
|
238 | subclasses used, so the Png subclass should be used for 'image/png' | |||
|
239 | data. If the data is a URL, the data will first be downloaded | |||
|
240 | and then displayed. If | |||
|
241 | ||||
|
242 | Parameters | |||
|
243 | ---------- | |||
|
244 | data : unicode, str or bytes | |||
|
245 | The raw data or a URL to download the data from. | |||
|
246 | url : unicode | |||
|
247 | A URL to download the data from. | |||
|
248 | filename : unicode | |||
|
249 | Path to a local file to load the data from. | |||
|
250 | """ | |||
|
251 | if data is not None and data.startswith('http'): | |||
|
252 | self.url = data | |||
|
253 | self.filename = None | |||
|
254 | self.data = None | |||
|
255 | else: | |||
|
256 | self.data = data | |||
|
257 | self.url = url | |||
|
258 | self.filename = None if filename is None else unicode(filename) | |||
|
259 | self.reload() | |||
|
260 | ||||
|
261 | def reload(self): | |||
|
262 | """Reload the raw data from file or URL.""" | |||
|
263 | if self.filename is not None: | |||
|
264 | with open(self.filename, self._read_flags) as f: | |||
|
265 | self.data = f.read() | |||
|
266 | elif self.url is not None: | |||
|
267 | try: | |||
|
268 | import urllib2 | |||
|
269 | response = urllib2.urlopen(self.url) | |||
|
270 | self.data = response.read() | |||
|
271 | except: | |||
|
272 | self.data = None | |||
|
273 | ||||
|
274 | class Pretty(DisplayObject): | |||
|
275 | ||||
|
276 | def _repr_pretty_(self): | |||
|
277 | return self.data | |||
|
278 | ||||
|
279 | ||||
|
280 | class HTML(DisplayObject): | |||
|
281 | ||||
|
282 | def _repr_html_(self): | |||
|
283 | return self.data | |||
|
284 | ||||
|
285 | ||||
|
286 | class Math(DisplayObject): | |||
|
287 | ||||
|
288 | def _repr_latex_(self): | |||
|
289 | return self.data | |||
|
290 | ||||
|
291 | ||||
|
292 | class SVG(DisplayObject): | |||
|
293 | ||||
|
294 | def _repr_svg_(self): | |||
|
295 | return self.data | |||
|
296 | ||||
|
297 | ||||
|
298 | class JSON(DisplayObject): | |||
|
299 | ||||
|
300 | def _repr_json_(self): | |||
|
301 | return self.data | |||
|
302 | ||||
|
303 | ||||
|
304 | class Javascript(DisplayObject): | |||
|
305 | ||||
|
306 | def _repr_javascript_(self): | |||
|
307 | return self.data | |||
|
308 | ||||
|
309 | ||||
|
310 | class Image(DisplayObject): | |||
|
311 | ||||
|
312 | _read_flags = 'rb' | |||
|
313 | ||||
|
314 | def __init__(self, data=None, url=None, filename=None, format=u'png', embed=False): | |||
|
315 | """Create a display an PNG/JPEG image given raw data. | |||
|
316 | ||||
|
317 | When this object is returned by an expression or passed to the | |||
|
318 | display function, it will result in the image being displayed | |||
|
319 | in the frontend. | |||
|
320 | ||||
|
321 | Parameters | |||
|
322 | ---------- | |||
|
323 | data : unicode, str or bytes | |||
|
324 | The raw data or a URL to download the data from. | |||
|
325 | url : unicode | |||
|
326 | A URL to download the data from. | |||
|
327 | filename : unicode | |||
|
328 | Path to a local file to load the data from. | |||
|
329 | format : unicode | |||
|
330 | The format of the image data (png/jpeg/jpg). If a filename or URL is given | |||
|
331 | for format will be inferred from the filename extension. | |||
|
332 | embed : bool | |||
|
333 | Should the image data be embedded in the notebook using a data URI (True) | |||
|
334 | or be loaded using an <img> tag. Set this to True if you want the image | |||
|
335 | to be viewable later with no internet connection. If a filename is given | |||
|
336 | embed is always set to True. | |||
|
337 | """ | |||
|
338 | if filename is not None: | |||
|
339 | ext = self._find_ext(filename) | |||
|
340 | elif url is not None: | |||
|
341 | ext = self._find_ext(url) | |||
|
342 | elif data.startswith('http'): | |||
|
343 | ext = self._find_ext(data) | |||
|
344 | else: | |||
|
345 | ext = None | |||
|
346 | if ext is not None: | |||
|
347 | if ext == u'jpg' or ext == u'jpeg': | |||
|
348 | format = u'jpeg' | |||
|
349 | if ext == u'png': | |||
|
350 | format = u'png' | |||
|
351 | self.format = unicode(format).lower() | |||
|
352 | self.embed = True if filename is not None else embed | |||
|
353 | super(Image, self).__init__(data=data, url=url, filename=filename) | |||
|
354 | ||||
|
355 | def reload(self): | |||
|
356 | """Reload the raw data from file or URL.""" | |||
|
357 | if self.embed: | |||
|
358 | super(Image,self).reload() | |||
|
359 | ||||
|
360 | def _repr_html_(self): | |||
|
361 | if not self.embed: | |||
|
362 | return u'<img src="%s" />' % self.url | |||
|
363 | ||||
|
364 | def _repr_png_(self): | |||
|
365 | if self.embed and self.format == u'png': | |||
|
366 | return self.data | |||
|
367 | ||||
|
368 | def _repr_jpeg_(self): | |||
|
369 | if self.embed and (self.format == u'jpeg' or self.format == u'jpg'): | |||
|
370 | return self.data | |||
|
371 | ||||
|
372 | def _find_ext(self, s): | |||
|
373 | return unicode(s.split('.')[-1].lower()) |
@@ -56,7 +56,7 b' class DisplayPublisher(Configurable):' | |||||
56 | Any metadata for the data. |
|
56 | Any metadata for the data. | |
57 | """ |
|
57 | """ | |
58 |
|
58 | |||
59 | if not isinstance(source, str): |
|
59 | if not isinstance(source, basestring): | |
60 | raise TypeError('source must be a str, got: %r' % source) |
|
60 | raise TypeError('source must be a str, got: %r' % source) | |
61 | if not isinstance(data, dict): |
|
61 | if not isinstance(data, dict): | |
62 | raise TypeError('data must be a dict, got: %r' % data) |
|
62 | raise TypeError('data must be a dict, got: %r' % data) | |
@@ -76,8 +76,10 b' class DisplayPublisher(Configurable):' | |||||
76 | * text/html |
|
76 | * text/html | |
77 | * text/latex |
|
77 | * text/latex | |
78 | * application/json |
|
78 | * application/json | |
|
79 | * application/javascript | |||
79 | * image/png |
|
80 | * image/png | |
80 |
* im |
|
81 | * image/jpeg | |
|
82 | * image/svg+xml | |||
81 |
|
83 | |||
82 | Parameters |
|
84 | Parameters | |
83 | ---------- |
|
85 | ---------- | |
@@ -103,7 +105,7 b' class DisplayPublisher(Configurable):' | |||||
103 | print(data['text/plain'], file=io.stdout) |
|
105 | print(data['text/plain'], file=io.stdout) | |
104 |
|
106 | |||
105 |
|
107 | |||
106 |
def publish_display_data( |
|
108 | def publish_display_data(source, data, metadata=None): | |
107 | """Publish data and metadata to all frontends. |
|
109 | """Publish data and metadata to all frontends. | |
108 |
|
110 | |||
109 | See the ``display_data`` message in the messaging documentation for |
|
111 | See the ``display_data`` message in the messaging documentation for | |
@@ -115,8 +117,10 b' def publish_display_data(self, source, data, metadata=None):' | |||||
115 | * text/html |
|
117 | * text/html | |
116 | * text/latex |
|
118 | * text/latex | |
117 | * application/json |
|
119 | * application/json | |
|
120 | * application/javascript | |||
118 | * image/png |
|
121 | * image/png | |
119 |
* im |
|
122 | * image/jpeg | |
|
123 | * image/svg+xml | |||
120 |
|
124 | |||
121 | Parameters |
|
125 | Parameters | |
122 | ---------- |
|
126 | ---------- | |
@@ -143,3 +147,152 b' def publish_display_data(self, source, data, metadata=None):' | |||||
143 | metadata |
|
147 | metadata | |
144 | ) |
|
148 | ) | |
145 |
|
149 | |||
|
150 | ||||
|
151 | def publish_pretty(data, metadata=None): | |||
|
152 | """Publish raw text data to all frontends. | |||
|
153 | ||||
|
154 | Parameters | |||
|
155 | ---------- | |||
|
156 | data : unicode | |||
|
157 | The raw text data to publish. | |||
|
158 | metadata : dict | |||
|
159 | A dictionary for metadata related to the data. This can contain | |||
|
160 | arbitrary key, value pairs that frontends can use to interpret | |||
|
161 | the data. | |||
|
162 | """ | |||
|
163 | publish_display_data( | |||
|
164 | u'IPython.core.displaypub.publish_pretty', | |||
|
165 | {'text/plain':data}, | |||
|
166 | metadata=metadata | |||
|
167 | ) | |||
|
168 | ||||
|
169 | ||||
|
170 | def publish_html(data, metadata=None): | |||
|
171 | """Publish raw HTML data to all frontends. | |||
|
172 | ||||
|
173 | Parameters | |||
|
174 | ---------- | |||
|
175 | data : unicode | |||
|
176 | The raw HTML data to publish. | |||
|
177 | metadata : dict | |||
|
178 | A dictionary for metadata related to the data. This can contain | |||
|
179 | arbitrary key, value pairs that frontends can use to interpret | |||
|
180 | the data. | |||
|
181 | """ | |||
|
182 | publish_display_data( | |||
|
183 | u'IPython.core.displaypub.publish_html', | |||
|
184 | {'text/html':data}, | |||
|
185 | metadata=metadata | |||
|
186 | ) | |||
|
187 | ||||
|
188 | ||||
|
189 | def publish_latex(data, metadata=None): | |||
|
190 | """Publish raw LaTeX data to all frontends. | |||
|
191 | ||||
|
192 | Parameters | |||
|
193 | ---------- | |||
|
194 | data : unicode | |||
|
195 | The raw LaTeX data to publish. | |||
|
196 | metadata : dict | |||
|
197 | A dictionary for metadata related to the data. This can contain | |||
|
198 | arbitrary key, value pairs that frontends can use to interpret | |||
|
199 | the data. | |||
|
200 | """ | |||
|
201 | publish_display_data( | |||
|
202 | u'IPython.core.displaypub.publish_latex', | |||
|
203 | {'text/latex':data}, | |||
|
204 | metadata=metadata | |||
|
205 | ) | |||
|
206 | ||||
|
207 | def publish_png(data, metadata=None): | |||
|
208 | """Publish raw binary PNG data to all frontends. | |||
|
209 | ||||
|
210 | Parameters | |||
|
211 | ---------- | |||
|
212 | data : str/bytes | |||
|
213 | The raw binary PNG data to publish. | |||
|
214 | metadata : dict | |||
|
215 | A dictionary for metadata related to the data. This can contain | |||
|
216 | arbitrary key, value pairs that frontends can use to interpret | |||
|
217 | the data. | |||
|
218 | """ | |||
|
219 | publish_display_data( | |||
|
220 | u'IPython.core.displaypub.publish_png', | |||
|
221 | {'image/png':data}, | |||
|
222 | metadata=metadata | |||
|
223 | ) | |||
|
224 | ||||
|
225 | ||||
|
226 | def publish_jpeg(data, metadata=None): | |||
|
227 | """Publish raw binary JPEG data to all frontends. | |||
|
228 | ||||
|
229 | Parameters | |||
|
230 | ---------- | |||
|
231 | data : str/bytes | |||
|
232 | The raw binary JPEG data to publish. | |||
|
233 | metadata : dict | |||
|
234 | A dictionary for metadata related to the data. This can contain | |||
|
235 | arbitrary key, value pairs that frontends can use to interpret | |||
|
236 | the data. | |||
|
237 | """ | |||
|
238 | publish_display_data( | |||
|
239 | u'IPython.core.displaypub.publish_jpeg', | |||
|
240 | {'image/jpeg':data}, | |||
|
241 | metadata=metadata | |||
|
242 | ) | |||
|
243 | ||||
|
244 | ||||
|
245 | def publish_svg(data, metadata=None): | |||
|
246 | """Publish raw SVG data to all frontends. | |||
|
247 | ||||
|
248 | Parameters | |||
|
249 | ---------- | |||
|
250 | data : unicode | |||
|
251 | The raw SVG data to publish. | |||
|
252 | metadata : dict | |||
|
253 | A dictionary for metadata related to the data. This can contain | |||
|
254 | arbitrary key, value pairs that frontends can use to interpret | |||
|
255 | the data. | |||
|
256 | """ | |||
|
257 | publish_display_data( | |||
|
258 | u'IPython.core.displaypub.publish_svg', | |||
|
259 | {'image/svg+xml':data}, | |||
|
260 | metadata=metadata | |||
|
261 | ) | |||
|
262 | ||||
|
263 | def publish_json(data, metadata=None): | |||
|
264 | """Publish raw JSON data to all frontends. | |||
|
265 | ||||
|
266 | Parameters | |||
|
267 | ---------- | |||
|
268 | data : unicode | |||
|
269 | The raw JSON data to publish. | |||
|
270 | metadata : dict | |||
|
271 | A dictionary for metadata related to the data. This can contain | |||
|
272 | arbitrary key, value pairs that frontends can use to interpret | |||
|
273 | the data. | |||
|
274 | """ | |||
|
275 | publish_display_data( | |||
|
276 | u'IPython.core.displaypub.publish_json', | |||
|
277 | {'application/json':data}, | |||
|
278 | metadata=metadata | |||
|
279 | ) | |||
|
280 | ||||
|
281 | def publish_javascript(data, metadata=None): | |||
|
282 | """Publish raw Javascript data to all frontends. | |||
|
283 | ||||
|
284 | Parameters | |||
|
285 | ---------- | |||
|
286 | data : unicode | |||
|
287 | The raw Javascript data to publish. | |||
|
288 | metadata : dict | |||
|
289 | A dictionary for metadata related to the data. This can contain | |||
|
290 | arbitrary key, value pairs that frontends can use to interpret | |||
|
291 | the data. | |||
|
292 | """ | |||
|
293 | publish_display_data( | |||
|
294 | u'IPython.core.displaypub.publish_javascript', | |||
|
295 | {'application/javascript':data}, | |||
|
296 | metadata=metadata | |||
|
297 | ) | |||
|
298 |
@@ -51,6 +51,7 b' class DisplayFormatter(Configurable):' | |||||
51 | HTMLFormatter, |
|
51 | HTMLFormatter, | |
52 | SVGFormatter, |
|
52 | SVGFormatter, | |
53 | PNGFormatter, |
|
53 | PNGFormatter, | |
|
54 | JPEGFormatter, | |||
54 | LatexFormatter, |
|
55 | LatexFormatter, | |
55 | JSONFormatter, |
|
56 | JSONFormatter, | |
56 | JavascriptFormatter |
|
57 | JavascriptFormatter | |
@@ -72,8 +73,10 b' class DisplayFormatter(Configurable):' | |||||
72 | * text/html |
|
73 | * text/html | |
73 | * text/latex |
|
74 | * text/latex | |
74 | * application/json |
|
75 | * application/json | |
|
76 | * application/javascript | |||
75 | * image/png |
|
77 | * image/png | |
76 |
* im |
|
78 | * image/jpeg | |
|
79 | * image/svg+xml | |||
77 |
|
80 | |||
78 | Parameters |
|
81 | Parameters | |
79 | ---------- |
|
82 | ---------- | |
@@ -495,6 +498,22 b' class PNGFormatter(BaseFormatter):' | |||||
495 | print_method = ObjectName('_repr_png_') |
|
498 | print_method = ObjectName('_repr_png_') | |
496 |
|
499 | |||
497 |
|
500 | |||
|
501 | class JPEGFormatter(BaseFormatter): | |||
|
502 | """A JPEG formatter. | |||
|
503 | ||||
|
504 | To define the callables that compute the JPEG representation of your | |||
|
505 | objects, define a :meth:`_repr_jpeg_` method or use the :meth:`for_type` | |||
|
506 | or :meth:`for_type_by_name` methods to register functions that handle | |||
|
507 | this. | |||
|
508 | ||||
|
509 | The return value of this formatter should be raw JPEG data, *not* | |||
|
510 | base64 encoded. | |||
|
511 | """ | |||
|
512 | format_type = Unicode('image/jpeg') | |||
|
513 | ||||
|
514 | print_method = ObjectName('_repr_jpeg_') | |||
|
515 | ||||
|
516 | ||||
498 | class LatexFormatter(BaseFormatter): |
|
517 | class LatexFormatter(BaseFormatter): | |
499 | """A LaTeX formatter. |
|
518 | """A LaTeX formatter. | |
500 |
|
519 | |||
@@ -546,6 +565,7 b' FormatterABC.register(PlainTextFormatter)' | |||||
546 | FormatterABC.register(HTMLFormatter) |
|
565 | FormatterABC.register(HTMLFormatter) | |
547 | FormatterABC.register(SVGFormatter) |
|
566 | FormatterABC.register(SVGFormatter) | |
548 | FormatterABC.register(PNGFormatter) |
|
567 | FormatterABC.register(PNGFormatter) | |
|
568 | FormatterABC.register(JPEGFormatter) | |||
549 | FormatterABC.register(LatexFormatter) |
|
569 | FormatterABC.register(LatexFormatter) | |
550 | FormatterABC.register(JSONFormatter) |
|
570 | FormatterABC.register(JSONFormatter) | |
551 | FormatterABC.register(JavascriptFormatter) |
|
571 | FormatterABC.register(JavascriptFormatter) | |
@@ -562,8 +582,10 b' def format_display_data(obj, include=None, exclude=None):' | |||||
562 | * text/html |
|
582 | * text/html | |
563 | * text/latex |
|
583 | * text/latex | |
564 | * application/json |
|
584 | * application/json | |
|
585 | * application/javascript | |||
565 | * image/png |
|
586 | * image/png | |
566 |
* im |
|
587 | * image/jpeg | |
|
588 | * image/svg+xml | |||
567 |
|
589 | |||
568 | Parameters |
|
590 | Parameters | |
569 | ---------- |
|
591 | ---------- | |
@@ -594,3 +616,4 b' def format_display_data(obj, include=None, exclude=None):' | |||||
594 | include, |
|
616 | include, | |
595 | exclude |
|
617 | exclude | |
596 | ) |
|
618 | ) | |
|
619 |
@@ -48,7 +48,7 b' from IPython.core.error import UsageError' | |||||
48 | from IPython.core.fakemodule import FakeModule |
|
48 | from IPython.core.fakemodule import FakeModule | |
49 | from IPython.core.profiledir import ProfileDir |
|
49 | from IPython.core.profiledir import ProfileDir | |
50 | from IPython.core.macro import Macro |
|
50 | from IPython.core.macro import Macro | |
51 | from IPython.core import page |
|
51 | from IPython.core import magic_arguments, page | |
52 | from IPython.core.prefilter import ESC_MAGIC |
|
52 | from IPython.core.prefilter import ESC_MAGIC | |
53 | from IPython.lib.pylabtools import mpl_runner |
|
53 | from IPython.lib.pylabtools import mpl_runner | |
54 | from IPython.testing.skipdoctest import skip_doctest |
|
54 | from IPython.testing.skipdoctest import skip_doctest | |
@@ -2118,7 +2118,8 b' Currently the magic system has the following functions:\\n"""' | |||||
2118 | response = urllib2.urlopen(arg_s) |
|
2118 | response = urllib2.urlopen(arg_s) | |
2119 | content = response.read() |
|
2119 | content = response.read() | |
2120 | else: |
|
2120 | else: | |
2121 |
|
|
2121 | with open(arg_s) as f: | |
|
2122 | content = f.read() | |||
2122 | self.set_next_input(content) |
|
2123 | self.set_next_input(content) | |
2123 |
|
2124 | |||
2124 | def _find_edit_target(self, args, opts, last_call): |
|
2125 | def _find_edit_target(self, args, opts, last_call): | |
@@ -3495,4 +3496,71 b' Defaulting color scheme to \'NoColor\'"""' | |||||
3495 | ptformatter.float_precision = s |
|
3496 | ptformatter.float_precision = s | |
3496 | return ptformatter.float_format |
|
3497 | return ptformatter.float_format | |
3497 |
|
3498 | |||
|
3499 | ||||
|
3500 | @magic_arguments.magic_arguments() | |||
|
3501 | @magic_arguments.argument( | |||
|
3502 | '-e', '--export', action='store_true', default=False, | |||
|
3503 | help='Export IPython history as a notebook. The filename argument ' | |||
|
3504 | 'is used to specify the notebook name and format. For example ' | |||
|
3505 | 'a filename of notebook.ipynb will result in a notebook name ' | |||
|
3506 | 'of "notebook" and a format of "xml". Likewise using a ".json" ' | |||
|
3507 | 'or ".py" file extension will write the notebook in the json ' | |||
|
3508 | 'or py formats.' | |||
|
3509 | ) | |||
|
3510 | @magic_arguments.argument( | |||
|
3511 | '-f', '--format', | |||
|
3512 | help='Convert an existing IPython notebook to a new format. This option ' | |||
|
3513 | 'specifies the new format and can have the values: xml, json, py. ' | |||
|
3514 | 'The target filename is choosen automatically based on the new ' | |||
|
3515 | 'format. The filename argument gives the name of the source file.' | |||
|
3516 | ) | |||
|
3517 | @magic_arguments.argument( | |||
|
3518 | 'filename', type=unicode, | |||
|
3519 | help='Notebook name or filename' | |||
|
3520 | ) | |||
|
3521 | def magic_notebook(self, s): | |||
|
3522 | """Export and convert IPython notebooks. | |||
|
3523 | ||||
|
3524 | This function can export the current IPython history to a notebook file | |||
|
3525 | or can convert an existing notebook file into a different format. For | |||
|
3526 | example, to export the history to "foo.ipynb" do "%notebook -e foo.ipynb". | |||
|
3527 | To export the history to "foo.py" do "%notebook -e foo.py". To convert | |||
|
3528 | "foo.ipynb" to "foo.json" do "%notebook -f json foo.ipynb". Possible | |||
|
3529 | formats include (json/ipynb, py). | |||
|
3530 | """ | |||
|
3531 | args = magic_arguments.parse_argstring(self.magic_notebook, s) | |||
|
3532 | ||||
|
3533 | from IPython.nbformat import current | |||
|
3534 | if args.export: | |||
|
3535 | fname, name, format = current.parse_filename(args.filename) | |||
|
3536 | cells = [] | |||
|
3537 | hist = list(self.history_manager.get_range()) | |||
|
3538 | for session, prompt_number, input in hist[:-1]: | |||
|
3539 | cells.append(current.new_code_cell(prompt_number=prompt_number, input=input)) | |||
|
3540 | worksheet = current.new_worksheet(cells=cells) | |||
|
3541 | nb = current.new_notebook(name=name,worksheets=[worksheet]) | |||
|
3542 | with open(fname, 'w') as f: | |||
|
3543 | current.write(nb, f, format); | |||
|
3544 | elif args.format is not None: | |||
|
3545 | old_fname, old_name, old_format = current.parse_filename(args.filename) | |||
|
3546 | new_format = args.format | |||
|
3547 | if new_format == u'xml': | |||
|
3548 | raise ValueError('Notebooks cannot be written as xml.') | |||
|
3549 | elif new_format == u'ipynb' or new_format == u'json': | |||
|
3550 | new_fname = old_name + u'.ipynb' | |||
|
3551 | new_format = u'json' | |||
|
3552 | elif new_format == u'py': | |||
|
3553 | new_fname = old_name + u'.py' | |||
|
3554 | else: | |||
|
3555 | raise ValueError('Invalid notebook format: %s' % new_format) | |||
|
3556 | with open(old_fname, 'r') as f: | |||
|
3557 | s = f.read() | |||
|
3558 | try: | |||
|
3559 | nb = current.reads(s, old_format) | |||
|
3560 | except: | |||
|
3561 | nb = current.reads(s, u'xml') | |||
|
3562 | with open(new_fname, 'w') as f: | |||
|
3563 | current.write(nb, f, new_format) | |||
|
3564 | ||||
|
3565 | ||||
3498 | # end Magic |
|
3566 | # end Magic |
@@ -193,6 +193,16 b' class ProfileCreate(BaseIPythonApplication):' | |||||
193 | pass |
|
193 | pass | |
194 | else: |
|
194 | else: | |
195 | apps.append(IPythonQtConsoleApp) |
|
195 | apps.append(IPythonQtConsoleApp) | |
|
196 | try: | |||
|
197 | from IPython.frontend.html.notebook.notebookapp import IPythonNotebookApp | |||
|
198 | except ImportError: | |||
|
199 | pass | |||
|
200 | except Exception: | |||
|
201 | self.log.debug('Unexpected error when importing IPythonNotebookApp', | |||
|
202 | exc_info=True | |||
|
203 | ) | |||
|
204 | else: | |||
|
205 | apps.append(IPythonNotebookApp) | |||
196 | if self.parallel: |
|
206 | if self.parallel: | |
197 | from IPython.parallel.apps.ipcontrollerapp import IPControllerApp |
|
207 | from IPython.parallel.apps.ipcontrollerapp import IPControllerApp | |
198 | from IPython.parallel.apps.ipengineapp import IPEngineApp |
|
208 | from IPython.parallel.apps.ipengineapp import IPEngineApp |
@@ -48,6 +48,14 b' def print_png(o):' | |||||
48 | png = latex_to_png(s) |
|
48 | png = latex_to_png(s) | |
49 | return png |
|
49 | return png | |
50 |
|
50 | |||
|
51 | ||||
|
52 | def print_latex(o): | |||
|
53 | """A function to generate the latex representation of sympy expressions.""" | |||
|
54 | s = latex(o, mode='equation', itex=True) | |||
|
55 | s = s.replace('\\dag','\\dagger') | |||
|
56 | return s | |||
|
57 | ||||
|
58 | ||||
51 | _loaded = False |
|
59 | _loaded = False | |
52 |
|
60 | |||
53 | def load_ipython_extension(ip): |
|
61 | def load_ipython_extension(ip): | |
@@ -71,5 +79,13 b' def load_ipython_extension(ip):' | |||||
71 | png_formatter.for_type_by_name( |
|
79 | png_formatter.for_type_by_name( | |
72 | 'sympy.core.basic', 'Basic', print_png |
|
80 | 'sympy.core.basic', 'Basic', print_png | |
73 | ) |
|
81 | ) | |
|
82 | ||||
|
83 | latex_formatter = ip.display_formatter.formatters['text/latex'] | |||
|
84 | latex_formatter.for_type_by_name( | |||
|
85 | 'sympy.core.basic', 'Basic', print_latex | |||
|
86 | ) | |||
|
87 | latex_formatter.for_type_by_name( | |||
|
88 | 'sympy.matrices.matrices', 'Matrix', print_latex | |||
|
89 | ) | |||
74 | _loaded = True |
|
90 | _loaded = True | |
75 |
|
91 |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: file renamed from docs/examples/newparallel/multiengine1.ipy to docs/examples/newparallel/multiengine1.py |
|
NO CONTENT: file renamed from docs/examples/newparallel/multiengine1.ipy to docs/examples/newparallel/multiengine1.py |
1 | NO CONTENT: file renamed from docs/examples/newparallel/mcpricer.py to docs/examples/newparallel/options/mckernel.py |
|
NO CONTENT: file renamed from docs/examples/newparallel/mcpricer.py to docs/examples/newparallel/options/mckernel.py | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: file renamed from docs/examples/newparallel/parallelpi.py to docs/examples/newparallel/pi/parallelpi.py |
|
NO CONTENT: file renamed from docs/examples/newparallel/parallelpi.py to docs/examples/newparallel/pi/parallelpi.py |
1 | NO CONTENT: file renamed from docs/examples/newparallel/pidigits.py to docs/examples/newparallel/pi/pidigits.py |
|
NO CONTENT: file renamed from docs/examples/newparallel/pidigits.py to docs/examples/newparallel/pi/pidigits.py |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed | ||
The requested commit or file is too big and content was truncated. Show full diff |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed | ||
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now