Changeset 5254:992f4b55d339
- Timestamp:
- 07/01/07 19:28:36 (6 years ago)
- Branch:
- default
- Parents:
- 5245:2b14ba7eb3fe (diff), 5253:4be54a6a85a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 8 edited
-
sage/server/notebook/config.py (modified) (1 diff)
-
sage/server/notebook/config.py (modified) (2 diffs)
-
sage/server/notebook/js.py (modified) (4 diffs)
-
sage/server/notebook/js.py (modified) (1 diff)
-
sage/server/notebook/worksheet.py (modified) (1 diff)
-
sage/server/notebook/worksheet.py (modified) (1 diff)
-
setup.py (modified) (1 diff)
-
setup.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/server/notebook/config.py
r5208 r5254 15 15 16 16 js.keyhandler.add('request_introspections', key = "KEY_SPC", ctrl=True) # control space 17 js.keyhandler.add('request_introspections', key = "KEY_TAB") # tab 17 js.keyhandler.add('request_introspections', key = "KEY_TAB", shift=False) # tab 18 js.keyhandler.add('indent', key = "KEY_TAB", shift=False) # tab 19 js.keyhandler.add('unindent', key = "KEY_TAB", shift=True) # tab 18 20 js.keyhandler.add('request_history', key = "KEY_Q", ctrl=True) 19 21 js.keyhandler.add('request_history', key = "KEY_QQ", ctrl=True) -
sage/server/notebook/config.py
r5253 r5254 1 """nodoctest 2 Customization of the Notebook 3 """ 4 1 5 ############################################################################# 2 6 # Copyright (C) 2007 William Stein <wstein@gmail.com> … … 5 9 # http://www.gnu.org/licenses/ 6 10 ############################################################################# 7 8 """9 Customization of the Notebook10 """11 11 12 12 #from js import JSKeyHandler -
sage/server/notebook/js.py
r5208 r5254 211 211 var function_pat = "([a-zA-Z_][a-zA-Z._0-9]*)\\([^()]*$"; 212 212 var one_word_pat = "([a-zA-Z_][a-zA-Z._0-9]*)"; 213 213 var unindent_pat = "^\\s{0,4}(.*)$"; 214 214 var whitespace_pat = "(\\s*)"; 215 215 … … 220 220 one_word_pat = new RegExp(one_word_pat); 221 221 whitespace_pat = new RegExp(whitespace_pat); 222 unindent_pat = new RegExp(unindent_pat); 222 223 } catch(e){} 223 224 … … 1415 1416 evaluate_cell(id, 1); 1416 1417 return false; 1417 } else if (key_request_introspections(e)) { 1418 } else if (key_unindent(e)) { //unfortunately, shift-tab needs to get caught before not-shift tab 1419 unindent_cell(cell_input); 1420 return false; 1421 } else if (key_request_introspections(e) && cell_input.selectionStart == cell_input.selectionEnd) { 1418 1422 // command introspection (tab completion, ?, ??) 1419 1423 evaluate_cell(id, 2); 1420 1424 focus_delay(id,true); 1425 return false; 1426 } else if (key_indent(e)) { 1427 indent_cell(cell_input); 1421 1428 return false; 1422 1429 } else if (key_interrupt(e)) { … … 1522 1529 } 1523 1530 1531 function indent_cell(input) { 1532 if(browser_ie) { 1533 } else { 1534 var start = 1+input.value.lastIndexOf("\n", input.selectionStart); 1535 var a = input.value.substring(0, start); 1536 var b = input.value.substring(start, input.selectionEnd); 1537 var c = input.value.substring(input.selectionEnd); 1538 var lines = b.split("\n"); 1539 for(var i = 0; i < lines.length; i++) 1540 lines[i] = " "+lines[i]; 1541 b = lines.join("\n"); 1542 input.value = a+b+c; 1543 input.selectionStart = a.length; 1544 input.selectionEnd = a.length + b.length;; 1545 } 1546 } 1547 1548 function unindent_cell(input) { 1549 if(browser_ie) { 1550 } else { 1551 var start = 1+input.value.lastIndexOf("\n", input.selectionStart); 1552 var a = input.value.substring(0, start); 1553 var b = input.value.substring(start, input.selectionEnd); 1554 var c = input.value.substring(input.selectionEnd); 1555 var lines = b.split("\n"); 1556 for(var i = 0; i < lines.length; i++) 1557 lines[i] = unindent_pat.exec(lines[i])[1]; //square brackets pull the captured pattern 1558 b = lines.join("\n"); 1559 input.value = a+b+c; 1560 input.selectionStart = a.length; 1561 input.selectionEnd = a.length + b.length;; 1562 } 1563 } 1564 1524 1565 function worksheet_command(cmd) { 1525 1566 return ('/home/' + worksheet_filename + '/' + cmd); -
sage/server/notebook/js.py
r5253 r5254 1 r""" 1 r"""nodoctest 2 2 Javascript (AJAX) Component of SAGE Notebook 3 3 -
sage/server/notebook/worksheet.py
r5208 r5254 702 702 cells = [self._new_cell()] 703 703 704 self.__cells = cells 705 706 # This *depends* on self.__cells being set!! 704 707 self.set_cell_counter() 705 708 706 self.__cells = cells707 709 708 710 -
sage/server/notebook/worksheet.py
r5252 r5254 1 """ 1 """nodoctest 2 2 A Worksheet. 3 3 -
setup.py
r5211 r5254 876 876 'sage.matrix', 877 877 # 'sage.matrix.padics', 878 878 'sage.media', 879 879 'sage.misc', 880 880 -
setup.py
r5246 r5254 64 64 ##################################################### 65 65 66 ec = Extension('sage.libs.ec.ec',67 sources = ["sage/libs/ec/ec.pyx"] + \68 ["sage/libs/ec/%s"%s for s in \69 ["analrank.c", "apcompute.c", "arderivs.c",70 "arintern.c", "arith.c", "artwists.c",71 "arutil.c", "checkit.c", "degphi.c",72 "diskio.c", "docurve.c", "dodisk.c",73 "equation.c", "exotic.c", "fixit.c",74 "iisog2.c", "iisog3.c", "isog.c", "isog2.c",75 "isog23.c", "isog24.c", "isog3.c", "isog5.c",76 "isog52.c", "isog713.c", "isogNprime.c",77 "isoggen.c", "isogsort.c", "isogx0.c",78 "isogx0branch.c", "isogx0branch1.c",79 "isogx0branch2.c", "isogx0branch3.c",80 "isogx0branch4.c", "isogx0branch5.c",81 "isogx0branch6.c", "isogx0getd.c",82 "isogx0period.c", "readit.c",83 "special.c", "util.c"]],84 libraries = ["pari", "m"])85 86 66 hanke = Extension(name = "sage.libs.hanke.hanke", 87 67 sources = ["sage/libs/hanke/hanke.pyx", … … 174 154 libsingular = Extension('sage.libs.singular.singular', 175 155 sources = ['sage/libs/singular/singular.pyx'], 176 libraries = ['gmp', 'm', 'readline', 'singular', 'singfac', 'singcf', 'omalloc' ],156 libraries = ['gmp', 'm', 'readline', 'singular', 'singfac', 'singcf', 'omalloc', 'givaro', 'gmpxx'], 177 157 language="c++", 178 158 ) … … 329 309 #vector_rational_sparse, 330 310 331 ec,332 311 pari, 333 312 … … 434 413 Extension('sage.rings.polynomial.multi_polynomial_libsingular', 435 414 sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'], 436 libraries = ['gmp', 'm', 'readline', 'singular', 'singcf', 'singfac', 'omalloc' ],415 libraries = ['gmp', 'm', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx'], 437 416 language="c++", 438 417 ), \ … … 892 871 'sage.libs.mwrank', 893 872 'sage.libs.ntl', 894 'sage.libs.ec',895 873 'sage.libs.pari', 896 874 'sage.libs.singular',
Note: See TracChangeset
for help on using the changeset viewer.
