Compare commits

..

189 Commits

Author SHA1 Message Date
mdipierro
aac892364c R-2.8.2 2013-11-28 07:52:24 -06:00
mdipierro
64b670fd8f fixed issue with scheduler and cache.disk introduced in 2.8.1 2013-11-28 07:50:55 -06:00
mdipierro
a55c6777d3 R-2.8.1 2013-11-27 13:54:04 -06:00
mdipierro
f9e16557c4 Merge pull request #308 from niphlod/issue/1780
fixes issue 1780
2013-11-27 10:00:49 -08:00
mdipierro
165b682e01 no more drawer open in edit mode 2013-11-27 12:00:21 -06:00
niphlod
92ab6dc635 fix issue 1780 2013-11-25 22:46:27 +01:00
mdipierro
0385ce6eb2 allow add_button(...,'javascript:') 2013-11-25 15:22:21 -06:00
mdipierro
5ba6e8fea2 Merge pull request #307 from erikmontes/patch-1
Comment documentation typo correction
2013-11-25 10:50:05 -08:00
mdipierro
8979c0919f Merge pull request #306 from ilvalle/git-fix
fix issue-1789
2013-11-25 10:49:05 -08:00
Erik Montes
b9048b6d65 Comment documentation typo correction 2013-11-25 10:34:55 -08:00
ilvalle
3592dba7f5 fix issue-1789 2013-11-25 09:49:43 +01:00
mdipierro
a7defed64c no more Tkinter is not necessary 2013-11-24 20:33:31 -06:00
mdipierro
ff2f11a706 generic.jsonp raises HTTP(404) 2013-11-24 09:44:08 -06:00
mdipierro
84cc47920b Merge branch 'cm-3.20' of https://github.com/ilvalle/web2py into ilvalle-cm-3.20 2013-11-23 21:49:54 -06:00
mdipierro
f57d96d64d no more 2.5 testing on Travis 2013-11-23 21:49:34 -06:00
mdipierro
c310627d1b possibly fixed the PyPy testing problem 2013-11-23 21:42:09 -06:00
ilvalle
be66f53c7e fix form action 2013-11-24 00:20:13 +01:00
mdipierro
77f32a8f4b wmv in expand all 2013-11-22 21:20:47 -06:00
mdipierro
9b8a24eeb9 fixed undefined form last commit 2013-11-22 12:14:08 -06:00
mdipierro
c87bf553f6 fixed issue 1783:Forgot password and forgot username functionality breaks when multiple usernames are created against the same email address 2013-11-22 10:50:29 -06:00
mdipierro
2361eb4a84 fixed issue 1786:Allow formargs to override grid parameters., thanks iiijjjiii 2013-11-22 10:25:22 -06:00
mdipierro
4f4cc8f98f fixed link to download jquery plugin 2013-11-22 10:18:29 -06:00
mdipierro
5f1caf668b colnames in grid, thanks Niphlod, Arnon, and Paolo 2013-11-22 08:38:12 -06:00
mdipierro
054152f162 extract_oracle_models.py 2013-11-20 10:24:08 -06:00
mdipierro
78cf9df6ef Retire the Splash Screen and Beautify GUI., thanks skyscooby 2013-11-20 09:41:04 -06:00
mdipierro
2924b20c92 Merge pull request #303 from skyscooby/master
Retire the Splash Screen and Beautify GUI.
2013-11-20 07:19:50 -08:00
mdipierro
f6318ae86c Merge pull request #301 from gi0baro/issue1772
Issue #1772: let the user choose uploads_in_blob with mongodb
2013-11-20 07:17:49 -08:00
Massimo
e57907de35 do not truncate on delete 2013-11-19 17:38:13 -06:00
Massimo
df2f9e7119 NDB accepts set, list and tuple, thanks Quint 2013-11-19 17:07:19 -06:00
Andrew Greenwood
23d7eb7a43 Retire the Splash Screen and Beautify GUI.
Lets give 5 seconds back to most users on startup by retiring the
artificial Splash Screen. Replace with a prettier server manager window.

-Makes product feel faster.
-Looks much better
-Fixes bug where two windows are created when using (-Q)
-Blocks resize on UI window.
-Window is now labeled ProgramName
2013-11-19 16:49:28 -05:00
mdipierro
6868ddeed5 fixed 1779:Query class __str__ method should cast non string values, thanks Alan 2013-11-18 15:41:32 -06:00
mdipierro
8de6bff2fb fixed (again) issue 1774:CAS client broken when using routes.py, thanks remco.boerma 2013-11-18 15:37:52 -06:00
gi0baro
9028ec9857 Issue #1772: let the user choose uploads_in_blob with mongodb 2013-11-18 01:02:43 +01:00
mdipierro
8696a01eda some GAE optimization, thanks Quint 2013-11-17 13:36:35 -06:00
mdipierro
f8f91c6a6a experiment with mongodb and belongs 2013-11-17 12:03:20 -06:00
mdipierro
97739e9e8a in mongodb uploads_in_blob = False, because of https://code.google.com/p/web2py/issues/detail?id=1772, thanks Alan 2013-11-17 09:32:01 -06:00
mdipierro
16b68572cd attempt to support GAE IN operator, thanks Quint 2013-11-17 09:28:46 -06:00
mdipierro
d6e63b4d7c simpled int to hex conversion of mongo id, thanks Alan 2013-11-17 09:21:16 -06:00
mdipierro
a6e8111484 Merge pull request #300 from spametki/master
MongoDB: fixed object_id function (hex values)
2013-11-17 07:15:33 -08:00
Alan Etkin
bdc214f45b MongoDB: fixed object_id function (hex values) 2013-11-16 17:16:59 -03:00
mdipierro
a91570768e fixed typo 2013-11-16 11:52:18 -06:00
mdipierro
d35321c6c6 improvements to GoogleAdapter, thanks Quint 2013-11-16 04:10:18 -06:00
mdipierro
e482cba237 minor dal rewrite in real_referenced 2013-11-16 03:54:30 -06:00
mdipierro
c7cf13f8ea minor rewrite of mongoDB adapter 2013-11-16 03:39:39 -06:00
mdipierro
e0329ce59a fixed 1771:MongoDBAdapter ILIKE and widget.autocomplete, thanks Francisco 2013-11-16 03:32:36 -06:00
mdipierro
de7848ba21 Merge pull request #298 from chuckis/patch-1
Update ru.py
2013-11-16 01:28:14 -08:00
mdipierro
d6f5a5684f Merge pull request #297 from xbello/master
Added two libs and icon path to setup.py
2013-11-16 01:27:39 -08:00
mdipierro
9883590a91 Merge pull request #295 from niphlod/enhancement/mssql4
improved performance on mssql4
2013-11-16 01:24:55 -08:00
mdipierro
b11bdddfe2 Merge pull request #294 from timrichardson/issue/1773
replace write to stderr with LOGGER in failed database connection attemp...
2013-11-16 01:24:18 -08:00
mdipierro
623cd515de Merge pull request #293 from magnunleno/patch-1
Adds bind capability to OpenLDAP
2013-11-16 01:23:30 -08:00
mdipierro
f53da87f6f fixed 1774:CAS client broken when using routes.py, thanks remco.boerma 2013-11-16 03:23:03 -06:00
mdipierro
ff7ef47cc7 fix issue 1777:MongoDB: upload representation error, thanks Francisco Betancourt 2013-11-16 03:16:57 -06:00
chuckis
108b24abdd Update ru.py 2013-11-15 12:05:24 +02:00
xbello
2d309c6e81 Added two libs and icon path to setup.py 2013-11-15 10:16:09 +01:00
Massimo
07f0cdadcd memdb conflict check, thanks Luca 2013-11-14 13:29:46 -06:00
niphlod
7c8c9bc3af improved performance on mssql4 2013-11-13 23:18:07 +01:00
mdipierro
948e0b1f43 possible to fix to memdb threading issue 2013-11-13 14:07:26 -06:00
tim
be9027f36f replace write to stderr with LOGGER in failed database connection attempt 2013-11-13 17:42:21 +11:00
mdipierro
9bb4155460 adding spanish plurals, thanks Vlad Vladyslav 2013-11-11 17:42:58 -06:00
Magnun Leno
ad877b2305 Adds bind capability to OpenLDAP
Adds to OpenLDAP (mode=uid and mode=cn) the capability to bind to the directory with an admin account in order to search it.
2013-11-11 15:53:38 -02:00
mdipierro
fb9ad028f8 fixed problem with multiple uris and lazy tables 2013-11-11 10:16:38 -06:00
mdipierro
833694229d Merge pull request #292 from flavour/master
Support HTTP Status 509
2013-11-11 07:43:56 -08:00
mdipierro
d6a8a3d410 Espanol language patches, thanks Vladyslav Kozlovskyy 2013-11-11 09:40:57 -06:00
Fran Boon
4e9d228a60 Support HTTP Status 509
Whilst this isn't an official RFC, it's documented on e.g. Wikipedia. http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error
2013-11-08 10:46:47 +00:00
Massimo
db0d31260e NDB support for GAE, thanks Quint, needs testing 2013-11-07 11:16:04 -06:00
Massimo
9178b23473 Merge branch 'master' of github.com:web2py/web2py
Conflicts:
	VERSION
2013-11-07 11:06:37 -06:00
Massimo
40d5e5dfe9 fixed 1746:auth.wiki renders multi-line code as single-line, thanks Alan 2013-11-07 11:00:39 -06:00
Massimo
f95476c51e fixed colgroup issue in grid, thanks Anthony 2013-11-07 10:47:57 -06:00
Massimo
73ab77ad8b fixed 1765:Verify email message seams to only accept username, key and link 2013-11-07 10:31:54 -06:00
Massimo
e6f84c45b9 fixed 1756:scripts/sessions2trash.py doesn't work with 'separate=True', thanks Paolo Valleri 2013-11-07 10:25:29 -06:00
mdipierro
58c22b8ed0 synced web2py.js, thanks Vinicius 2013-11-06 16:57:33 -06:00
mdipierro
ee1de04544 Merge pull request #291 from viniciusban/master
Make component forms submit to their own action property
2013-11-06 14:55:12 -08:00
Vinicius Assef
9977aa571a Make component forms submit to their own action property 2013-11-06 19:37:55 -02:00
mdipierro
65b883749a fixed 1757:Broken support for 'belongs' with GAE datastore, thanks Alan 2013-11-06 11:14:56 -06:00
mdipierro
5cee4f8876 fixed issue 1763 user of arrows in numerical fields 2013-11-06 11:13:10 -06:00
mdipierro
3aec2c4568 Merge branch 'master' of github.com:web2py/web2py 2013-11-06 11:11:55 -06:00
mdipierro
3defd7d7b1 fixed issue 1763 user of arrows in numerical fields 2013-11-06 11:11:01 -06:00
mdipierro
ac97332393 Merge pull request #290 from erikmontes/patch-1
Closed html commment.
2013-11-06 08:32:01 -08:00
mdipierro
62bda4b917 Merge pull request #289 from michele-comitini/SQLCustomType_in_grid_fix
simple fix for wrong type detection of SQLCustomTypes
2013-11-06 08:31:34 -08:00
mdipierro
cb6857c16b Merge pull request #288 from hectord/translate_date_in_range_formatters
Translate the formatters for DATE/DATETIME_IN_RANGE validators
2013-11-06 08:31:06 -08:00
mdipierro
643e945540 fixed web2py.js for trapped non-self-submitting forms, thanks Vinicius 2013-11-06 10:30:41 -06:00
Erik Montes
b52b639eed Closed html commment. 2013-11-05 14:09:01 -08:00
Michele Comitini
e0ea9b78f8 simple fix for wrong type detection of SQLCustomTypes 2013-11-05 16:09:42 +01:00
mdipierro
8e4f92ac64 fixed TeradataAdapter CLOB, thnaks Andrew Willmott 2013-11-03 22:46:20 -06:00
mdipierro
350bd25404 another iteration to col/colgroup in grid, thanks Anthony for advice 2013-11-03 09:26:26 -06:00
mdipierro
6d3fe6cf89 col in colgroup for grid extracolumns, thanks Anthony 2013-11-02 10:09:11 -05:00
mdipierro
a3bf95e423 fixed colgroup wrapping, thanks Anthony 2013-11-02 09:26:19 -05:00
mdipierro
fc72cdf3d0 change in way args are parsed and less test_routes.py 2013-11-01 20:11:46 -05:00
mdipierro
b619bd3db7 minor rewrite in rewrite.py 2013-11-01 18:49:38 -05:00
mdipierro
b1631ae2b3 fixed issue 1758:Missing comment parameter in Recaptcha 2013-11-01 18:07:29 -05:00
mdipierro
a01aa78f36 fixed issue 1761:Add <col> elements to the grid for easier column formatting, thanks Anthony 2013-11-01 18:01:02 -05:00
mdipierro
975bc64fd0 fixed 1760:option -p or --port not working at command line 2013-11-01 17:45:43 -05:00
hectord
231fa489cb Translate the formatters for DATE/DATETIME_IN_RANGE validators 2013-11-01 22:43:31 +01:00
mdipierro
123f0f8269 Merge pull request #287 from niphlod/issue/1753
fixes issue 1753, web2py.js doesn't set the disabled state for inputs with name
2013-11-01 07:34:56 -07:00
niphlod
a6223cc319 fixes issue 1753, web2py.js doesn't set the disabled state for inputs with name 2013-10-31 21:10:37 +01:00
Massimo
8bdc5f20e7 fixed websocket_messaging.py, thanks Junior Phanter 2013-10-31 10:21:38 -05:00
Massimo
bb4f3d6e1a fixed issue 1755:IE11 vs gluon.contrib.user_agent - 'browser' key not existing anymore 2013-10-31 10:19:07 -05:00
Massimo
25f54356d4 fixed issue 1755:IE11 vs gluon.contrib.user_agent - 'browser' key not existing anymore 2013-10-31 09:42:03 -05:00
Massimo
5b3b5b6821 fixed issue 1736, Unable to create/re-create cache file error for cache.disk, thanks arglanir 2013-10-31 09:40:39 -05:00
mdipierro
1474a4fe79 link to pythonanywhere 2013-10-30 08:59:55 -05:00
mdipierro
c89ed53be1 Merge pull request #286 from ilvalle/fix-editor
fix for empty python file in admin editor
2013-10-29 14:05:21 -07:00
mdipierro
e692beafba Merge pull request #285 from niphlod/enhancement/dal_rname
fixed issue with ordereddict in python < 2.7, added rname support also for fields
2013-10-29 14:03:22 -07:00
mdipierro
850ef39bf7 Merge pull request #284 from spametki/master
Admin app: changed string interpolation in T calls
2013-10-29 14:01:38 -07:00
ilvalle
1bbb99b548 fix codemirror gutter managment 2013-10-29 17:24:46 +01:00
ilvalle
7675d605ea fix width after window resize 2013-10-29 17:02:50 +01:00
ilvalle
7d5cdb9220 fix for empty file in admin editor 2013-10-28 10:17:47 +01:00
mdipierro
78089bc0c4 small aesthetic change 2013-10-27 23:22:55 -05:00
mdipierro
eb9d7bf5c3 code simplification in wiki 2013-10-27 23:18:01 -05:00
mdipierro
8ce53e8dfa Wiki(...groups=['x','y']) allows to user groups names other then those set in auth_group.role, completely by-passing auth groups and memberships 2013-10-27 22:55:41 -05:00
niphlod
0f2b2daeab fixed issue with ordereddict in python < 2.7, added rname support also for fields 2013-10-27 14:36:38 +01:00
spametki
68ccf6510d admin app: changed string interpolation in T calls 2013-10-27 10:28:23 -03:00
mdipierro
d960513ef2 fixed issues 1742:dal Teradata connection issue. cursors not being closed at the end of sessions, thanks awilliman01 2013-10-26 21:46:48 -05:00
mdipierro
1865c0b1dd Merge pull request #283 from spametki/master
Fixed wiki get render method
2013-10-26 18:25:44 -07:00
mdipierro
af412e7e24 Merge pull request #282 from michele-comitini/make_executesql_as_dict_ordered
Make executesql as dict ordered
2013-10-26 18:24:57 -07:00
mdipierro
a74b1dd1bf Merge pull request #281 from niphlod/enhancement/update_pypyodbc
update pypyodbc to 1.2.0
2013-10-26 18:24:25 -07:00
mdipierro
7d9c853eeb Merge pull request #280 from gi0baro/mongo-binary
Fixing mongodb binary repr
2013-10-26 18:23:52 -07:00
mdipierro
7caf1c0794 Merge pull request #279 from ilvalle/fix-editor
Dynamic tab width in editor settings
2013-10-26 18:23:16 -07:00
spametki
70b3edcbeb Fixed wiki get render method 2013-10-26 21:39:26 -03:00
Michele Comitini
50543724d4 fix a docstring 2013-10-25 23:12:43 +02:00
Michele Comitini
ad81e641b3 optionally use OrderedDict in place of dict in executesql 2013-10-25 23:09:46 +02:00
niphlod
429ee8e423 update pypyodbc to 1.2.0 2013-10-25 21:41:50 +02:00
gi0baro
604795d6fc Fixing mongodb binary repr: if value is not a basestring we got type Exception in converting to Binary 2013-10-25 10:40:56 +02:00
ilvalle
6599e08d32 'Highlight current line' & 'Display line numbers' options in admin editor 2013-10-24 16:16:41 +02:00
ilvalle
94ddb6c11f dynamic tab size in admin editor (all tabs are placed along the same line) 2013-10-24 09:48:03 +02:00
mdipierro
a514060402 cleaning up pending references 2013-10-23 20:13:43 -05:00
mdipierro
fec5ddd150 Merge pull request #278 from niphlod/fix/dal_references
allow unordered references (NOT recommended but still possible with limitations)
2013-10-23 17:46:09 -07:00
mdipierro
811a44fd14 Merge pull request #277 from ilvalle/fix-editor
codemirror 3.19 and directory cleanup
2013-10-23 17:44:15 -07:00
mdipierro
1c5bad24f3 Merge pull request #276 from niphlod/enhancement/scheduler_current
inject W2P_TASK in current, so you can use current.W2P_TASK in imported ...
2013-10-23 17:43:36 -07:00
niphlod
17b4de18d7 allow unordered references (NOT recommended but still possible with limitations) 2013-10-23 21:42:55 +02:00
ilvalle
290cb2f1a7 simplified editor's options management 2013-10-23 14:33:15 +02:00
ilvalle
ff7cb99bfe jQuery -> $ in admin editor 2013-10-23 14:07:51 +02:00
ilvalle
339de2fa41 codemirror 3.19 and directory cleanup 2013-10-23 13:31:57 +02:00
Massimo
cafab17ee0 syncing 2013-10-22 17:05:52 -05:00
mdipierro
9fa1757ffb Merge pull request #275 from ilvalle/fix-editor
bootstrapSwitch in admin
2013-10-22 15:04:01 -07:00
Massimo
e94921c002 fixed issues with Rows.__or__, thanks Anthony 2013-10-22 17:03:54 -05:00
niphlod
d30098d646 inject W2P_TASK in current, so you can use current.W2P_TASK in imported modules. Thanks @Xiaonuo for the feature request 2013-10-23 00:03:04 +02:00
mdipierro
fba11869b6 Merge pull request #274 from Jaripekkaf/web2py_bs3
bootstrap3 formstyle
2013-10-22 14:59:48 -07:00
ilvalle
453412fa0c added bootstrap switch in editor settings 2013-10-22 17:36:45 +02:00
ilvalle
607897a1b0 boostrap switch plugin in admin 2013-10-22 17:36:19 +02:00
Jaripekkaf
221fdc51ba bootstrap3 formstyle 2013-10-22 13:15:21 +03:00
mdipierro
37551a8517 Merge pull request #272 from niphlod/enhancement/boostrap_232
bumped bootstrap to 2.3.2
2013-10-21 19:34:58 -07:00
mdipierro
8877eab977 Merge pull request #271 from niphlod/enhancement/windows_build
fix building on windows. New handler for gevented webserver
2013-10-21 19:32:34 -07:00
mdipierro
2d0205714c Merge pull request #270 from niphlod/fix/dal_reference
fix for references, DAL tests pass also on MSSQL now
2013-10-21 19:31:50 -07:00
mdipierro
49111345d1 Merge pull request #269 from ilvalle/fix-editor
Fix config to save checkboxes values when they are unchecked (false)
2013-10-21 19:31:14 -07:00
mdipierro
570564b0c4 fixed bug in compileapp models_to_run, thanks Anthony 2013-10-21 21:30:20 -05:00
niphlod
22dd63d77b bumped bootstrap to 2.3.2 2013-10-21 23:17:07 +02:00
niphlod
736311ff9a fix building on windows. New handler for gevented webserver 2013-10-21 12:52:43 -07:00
Massimo
34b377522a allow as_trees to deal with orphan children 2013-10-21 14:32:49 -05:00
niphlod
9f846dbe3c fix for references, DAL tests pass also on MSSQL now 2013-10-21 12:09:47 -07:00
ilvalle
845694beb6 Fix config to save checkboxes values when they are unchecked (false) 2013-10-21 09:57:36 +02:00
mdipierro
665f728946 db().select().as_trees() 2013-10-20 22:55:17 -05:00
mdipierro
d879e4a560 db().select().as_tree() 2013-10-20 22:51:03 -05:00
mdipierro
8e1a68d461 simplified logic 2013-10-20 16:58:08 -05:00
mdipierro
2738d12e0f fixed problem with _ot and rname 2013-10-20 16:51:34 -05:00
mdipierro
25148d06fe reverted to rname 2013-10-20 16:48:22 -05:00
mdipierro
4870b197de revering rname 2013-10-20 16:42:52 -05:00
mdipierro
12377794a6 remove actual_name 2013-10-20 15:48:15 -05:00
mdipierro
bf27623756 Merge branch 'master' of github.com:web2py/web2py 2013-10-20 15:47:10 -05:00
mdipierro
9afdf01430 PRAGMA foreign_keys=ON by default 2013-10-20 15:46:41 -05:00
mdipierro
80f16dadde Merge pull request #263 from niphlod/enhancement/dal_rname
add support for rname (meaning "real name") for table names
2013-10-20 13:45:00 -07:00
mdipierro
a68ac4fc02 Merge pull request #268 from spametki/master
imap: use common field types plus appadmin support
2013-10-20 07:56:59 -07:00
mdipierro
3dde465427 Merge pull request #267 from ilvalle/fix-editor
Tab width (new option in editor settings)
2013-10-20 07:56:18 -07:00
spametki
f77232740c imap: return to common field type for attachment and content plus appadmin imap support 2013-10-20 08:38:07 -03:00
ilvalle
56f251ca0c tab size in editor settings and better options management 2013-10-20 08:40:05 +02:00
mdipierro
9282bfcc60 fixed issue 1732:ignore_common_filters missing in appadmin, thanks mweissen 2013-10-19 17:41:17 -05:00
mdipierro
8d0bbbc9f1 Merge pull request #266 from niphlod/rm/windows_service
remove winservice support
2013-10-19 15:34:56 -07:00
mdipierro
ee33f2a4a8 Merge pull request #265 from spametki/master
Fixed imap get_last_message to return positive integer (google code issue 1729)
2013-10-19 15:33:46 -07:00
mdipierro
ab313c2d4d Merge pull request #264 from ilvalle/fix-editor
Code folding in admin editor
2013-10-19 15:32:03 -07:00
spametki
4c1de287cd dal imap: strip native folder names (google code issue 1734) 2013-10-19 16:50:20 -03:00
niphlod
9ea9f828bc remove winservice support 2013-10-19 20:44:56 +02:00
spametki
58e4cd91cc Fixed imap get_last_message to return positive integer 2013-10-19 09:57:08 -03:00
ilvalle
b5f17b1acb code folding in editor settings 2013-10-19 12:22:24 +02:00
ilvalle
e9c884d674 experimental code folding feature in admin editor 2013-10-19 12:18:46 +02:00
Massimo
492953c7f0 t -m "editor cleanup, thanks Paolo"
Merge branch 'master' of github.com:web2py/web2py
2013-10-18 12:31:13 -05:00
mdipierro
dd8d9d9d8d Merge pull request #261 from ilvalle/fix-editor
Editor cleanup
2013-10-18 10:30:36 -07:00
Massimo
9ff32ed9cd setup-web2py-debian-sid.sh, thanks Rusy 2013-10-18 12:27:23 -05:00
niphlod
c9b0c4547a add support for rname (meaning "real name") for table names 2013-10-18 00:09:32 +02:00
ilvalle
037b499cb2 correct editor's mode when editing javascript 2013-10-17 16:32:22 +02:00
ilvalle
f4fc987597 editor cleanup (second pass) 2013-10-17 16:20:06 +02:00
ilvalle
580bc6fd6e editor works again when is_mobile=True (No tabs when is mobile) 2013-10-17 16:10:53 +02:00
ilvalle
c91e6160fe initial editor cleanup and html fix 2013-10-17 15:25:12 +02:00
mdipierro
13c6c1ad37 Merge pull request #260 from spametki/master
New admin app plugin download
2013-10-16 07:15:08 -07:00
mdipierro
0faa7d3174 removed print statment, thanks Johann 2013-10-16 09:11:28 -05:00
mdipierro
cfe7c65987 fixed issue 1725:No debugging under WingIDE, thanks Joe 2013-10-16 09:09:22 -05:00
mdipierro
c5a2706c1b fixed issue 1724:webclient no longer handles integer post data, thanks iiijjjiii 2013-10-16 09:03:19 -05:00
mdipierro
a379d7020e fixed issue 1723:Missing translation for the word file in the upload widget, thanks mweissen 2013-10-16 09:00:42 -05:00
mdipierro
a74a16cfba fixed issue 1719:decorators ignore routes, thanks vladsalehov 2013-10-16 08:56:53 -05:00
spametki
37e0e1c384 Added missing plugin download views 2013-10-14 15:12:14 -03:00
spametki
62061ae737 admin app plugin download feature 2013-10-14 15:05:20 -03:00
141 changed files with 5672 additions and 3069 deletions

View File

@@ -1,7 +1,6 @@
language: python
python:
- '2.5'
- '2.6'
- '2.7'
- 'pypy'

View File

@@ -1,3 +1,19 @@
## 2.8.1
- no more winservice (use nssm instead)
- better imap support in DAL
- db().select().as_tree()
- bootstrap 2.3.2
- codemirror 3.19
- improved mongoDB support, thanks Alan
- support for wiki custom render function
- Wiki(...groups=['x','y']) allows bypassing default permissions
- fixed websocket_messaging.py to support newer Tornado
- NDB support for GAE, thanks Quint
- fixed major concurrecy issue with MEMDB
- blocked generic.jsonp for security reasons
- many bug fixes, thanks Niphlod, Michele, Anthony, Tim, and many others.
## 2.7.1 - 2.7.4
- jQuery 1.10.2

View File

@@ -30,7 +30,7 @@ update:
echo "remember that pymysql was tweaked"
src:
### Use semantic versioning
echo 'Version 2.7.4-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
echo 'Version 2.8.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
### rm -f all junk files
make clean
### clean up baisc apps

View File

@@ -1 +1 @@
Version 2.7.4-stable+timestamp.2013.10.14.10.13.57
Version 2.8.2-stable+timestamp.2013.11.28.07.51.37

View File

@@ -186,6 +186,10 @@ def select():
import re
db = get_database(request)
dbname = request.args[0]
try:
is_imap = db._uri.startswith("imap://")
except (KeyError, AttributeError, TypeError):
is_imap = False
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
if len(request.args) > 1 and hasattr(db[request.args[1]], '_primarykey'):
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
@@ -203,7 +207,15 @@ def select():
else:
start = 0
nrows = 0
stop = start + 100
step = 100
fields = []
if is_imap:
step = 3
stop = start + step
table = None
rows = []
orderby = request.vars.orderby
@@ -235,21 +247,27 @@ def select():
if match:
table = match.group('table')
try:
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if form.vars.update_check and form.vars.update_fields:
db(query).update(**eval_in_global_env('dict(%s)'
% form.vars.update_fields))
db(query, ignore_common_filters=True).update(
**eval_in_global_env('dict(%s)' % form.vars.update_fields))
response.flash = T('%s %%{row} updated', nrows)
elif form.vars.delete_check:
db(query).delete()
db(query, ignore_common_filters=True).delete()
response.flash = T('%s %%{row} deleted', nrows)
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if is_imap:
fields = [db[table][name] for name in
("id", "uid", "created", "to",
"sender", "subject")]
if orderby:
rows = db(query, ignore_common_filters=True).select(limitby=(
start, stop), orderby=eval_in_global_env(orderby))
rows = db(query, ignore_common_filters=True).select(
*fields, limitby=(start, stop),
orderby=eval_in_global_env(orderby))
else:
rows = db(query, ignore_common_filters=True).select(
limitby=(start, stop))
*fields, limitby=(start, stop))
except Exception, e:
import traceback
tb = traceback.format_exc()
@@ -278,11 +296,12 @@ def select():
table=table,
start=start,
stop=stop,
step=step,
nrows=nrows,
rows=rows,
query=request.vars.query,
formcsv=formcsv,
tb=tb,
tb=tb
)

View File

@@ -1,6 +1,7 @@
# coding: utf8
EXPERIMENTAL_STUFF = True
MAXNFILES = 1000
if EXPERIMENTAL_STUFF:
if is_mobile:
@@ -230,7 +231,7 @@ def site():
redirect(URL('design', args=appname))
else:
session.flash = \
DIV(T('unable to create application "%s"' % appname),
DIV(T('unable to create application "%s"', appname),
PRE(error))
redirect(URL(r=request))
@@ -341,7 +342,7 @@ def pack():
response.headers['Content-Disposition'] = disposition
return safe_read(filename, 'rb')
else:
session.flash = T('internal error: %s' % e)
session.flash = T('internal error: %s', e)
redirect(URL('site'))
def pack_plugin():
@@ -375,7 +376,7 @@ def pack_custom():
response.headers['Content-Disposition'] = disposition
return safe_read(filename, 'rb')
else:
session.flash = T('internal error: %s' % e)
session.flash = T('internal error: %s', e)
redirect(URL(args=request.args))
def ignore(fs):
return [f for f in fs if not (
@@ -563,36 +564,30 @@ def edit():
# Load json only if it is ajax edited...
app = get_app(request.vars.app)
app_path = apath(app, r=request)
editor_defaults={'theme':'web2py', 'editor': 'default', 'closetag': 'true'}
editor_defaults={'theme':'web2py', 'editor': 'default', 'closetag': 'true', 'codefolding': 'false', 'tabwidth':'4', 'indentwithtabs':'false', 'linenumbers':'true', 'highlightline':'true'}
config = Config(os.path.join(request.folder, 'settings.cfg'),
section='editor', default_values=editor_defaults)
preferences = config.read()
if not(request.ajax):
if not(request.ajax) and not(is_mobile):
# return the scaffolding, the rest will be through ajax requests
response.title = T('Editing %s') % app
editarea_preferences = {}
editarea_preferences['FONT_SIZE'] = '10'
editarea_preferences['FULL_SCREEN'] = 'false'
editarea_preferences['ALLOW_TOGGLE'] = 'true'
editarea_preferences['REPLACE_TAB_BY_SPACES'] = '4'
editarea_preferences['DISPLAY'] = 'onload'
for key in editarea_preferences:
if key in globals():
editarea_preferences[key] = globals()[key]
return response.render ('default/edit.html', dict(app=request.args[0], editor_settings=preferences, editarea_preferences=editarea_preferences))
return response.render ('default/edit.html', dict(app=app, editor_settings=preferences))
# show settings tab and save prefernces
if 'settings' in request.vars:
if request.post_vars: #save new preferences
if config.save(request.post_vars.items()):
post_vars = request.post_vars.items()
# Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings
post_vars+= [(opt, 'false') for opt in editor_defaults if opt not in request.post_vars ]
if config.save(post_vars):
response.headers["web2py-component-flash"] = T('Preferences saved correctly')
else:
response.headers["web2py-component-flash"] = T('Preferences saved on session only')
response.headers["web2py-component-command"] = "update_editor('%s', '%s', '%s');jQuery('a[href=#editor_settings] button.close').click();" % (config.read()['theme'], config.read()['editor'], config.read()['closetag'])
response.headers["web2py-component-command"] = "update_editor(%s);$('a[href=#editor_settings] button.close').click();" % response.json(config.read())
return
else:
details = {'filename':'settings', 'id':'editor_settings', 'force': False}
details = {'realfilename':'settings', 'filename':'settings', 'id':'editor_settings', 'force': False}
details['plain_html'] = response.render('default/editor_settings.html', {'editor_settings':preferences})
return response.json(details)
@@ -600,7 +595,7 @@ def edit():
# Load json only if it is ajax edited...
app = get_app(request.vars.app)
filename = '/'.join(request.args)
response.title = request.args[-1]
realfilename = request.args[-1]
if request.vars.app:
path = abspath(filename)
else:
@@ -615,7 +610,7 @@ def edit():
elif filename[-4:] == '.css':
filetype = 'css'
elif filename[-3:] == '.js':
filetype = 'js'
filetype = 'javascript'
else:
filetype = 'html'
@@ -755,7 +750,9 @@ def edit():
return response.json({'file_hash': file_hash, 'saved_on': saved_on, 'functions': functions, 'controller': controller, 'application': request.args[0], 'highlight': highlight})
else:
file_details = dict(app=request.args[0],
editor_settings=preferences,
filename=filename,
realfilename=realfilename,
filetype=filetype,
data=data,
edit_controller=edit_controller,
@@ -766,10 +763,15 @@ def edit():
view_link=view_link,
editviewlinks=editviewlinks,
id=IS_SLUG()(filename)[0],
force= True if (request.vars.restore or request.vars.revert) else False)
force= True if (request.vars.restore or
request.vars.revert) else False)
plain_html = response.render('default/edit_js.html', file_details)
file_details['plain_html'] = plain_html
return response.json(file_details)
if is_mobile:
return response.render('default.mobile/edit.html',
file_details, editor_settings=preferences)
else:
return response.json(file_details)
def resolve():
@@ -1037,9 +1039,9 @@ def design():
privates.sort()
# Get all static files
MAXNFILES = 1000
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
statics = [x.replace('\\', '/') for x in statics[:MAXNFILES]]
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*',
maxnum = MAXNFILES)
statics = [x.replace(os.path.sep, '/') for x in statics]
statics.sort()
# Get all languages
@@ -1173,8 +1175,9 @@ def plugin():
privates.sort()
# Get all static files
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
statics = [x.replace('\\', '/') for x in statics]
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*',
maxnum = MAXNFILES)
statics = [x.replace(os.path.sep, '/') for x in statics]
statics.sort()
# Get all languages
@@ -1325,7 +1328,8 @@ def create_file():
from gluon import *\n""")[1:]
elif (path[-8:] == '/static/') or (path[-9:] == '/private/'):
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
if (request.vars.plugin and
not filename.startswith('plugin_%s/' % request.vars.plugin)):
filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
text = ''
@@ -1791,3 +1795,55 @@ def git_push():
session.flash = T("Push failed, there are unmerged entries in the cache. Resolve merge issues manually and try again.")
redirect(URL('site'))
return dict(app=app, form=form)
def plugins():
app = request.args(0)
from serializers import loads_json
if not session.plugins:
rawlist = urllib.urlopen("http://www.web2pyslices.com/" +
"public/api.json/action/list/content/Package?package" +
"_type=plugin&search_index=false").read()
session.plugins = loads_json(rawlist)
plugins = TABLE(
*[TR(TD(H5(article["article"]["title"]),
A(T("Install"),
_href=URL(c="default",
f="install_plugin",
args=[app,],
vars={"source":
article["package_data"]["download"],
"plugin": article["article"]["title"]}
))),
TD(article["article"]["description"], BR(),
A(T("Plugin page"),
_href="http://www.web2pyslices.com/slice/show/%s/" % \
article["article"]["id"])),
TD(IMG(_src="http://www.web2pyslices.com/download/%s" % \
article["article"]["thumbnail"])))
for article in session.plugins["results"]])
return dict(plugins=plugins, app=request.args(0))
def install_plugin():
app = request.args(0)
source = request.vars.source
plugin = request.vars.plugin
if not (source and app):
raise HTTP(500, T("Invalid request"))
form = SQLFORM.factory()
result = None
if form.process().accepted:
# get w2p plugin
if "web2py.plugin." in source:
filename = "web2py.plugin.%s.w2p" % \
source.split("web2py.plugin.")[-1].split(".w2p")[0]
else:
filename = "web2py.plugin.%s.w2p" % cleanpath(plugin)
if plugin_install(app, urllib.urlopen(source),
request, filename):
session.flash = T('New plugin installed: %s', filename)
else:
session.flash = \
T('unable to create application "%s"', filename)
redirect(URL(f="plugins", args=[app,]))
return dict(form=form, app=app, plugin=plugin, source=source)

View File

@@ -29,11 +29,13 @@
'An error occured, please %s the page': 'Ha ocurrido un error, por favor %s la página',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'App does not exist or you are not authorized': 'App does not exist or you are not authorized',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application %(appname)s installed with md5sum: %(digest)s': 'application %(appname)s installed with md5sum: %(digest)s',
'application compiled': 'aplicación compilada',
'Application exists already': 'Application exists already',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'Application name:': 'Nombre de la aplicación:',
'are not used': 'are not used',
@@ -44,6 +46,7 @@
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Are you sure you want to upgrade web2py now?': '¿Está seguro que desea actualizar web2py ahora?',
'Are you sure?': 'Are you sure?',
'arguments': 'argumentos',
'at char %s': 'en el caracter %s',
'at line %s': 'en la línea %s',
@@ -54,12 +57,14 @@
'Autocomplete Python Code': 'Autocompletar código Python',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'back': 'atrás',
'Back to the plugins list': 'Back to the plugins list',
'breakpoint': 'breakpoint',
'breakpoints': 'breakpoints',
'browse': 'buscar',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'can be a git repo': 'puede ser un repositorio git',
'Cancel': 'Cancel',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Cannot compile: there are errors in your app:': 'No se puede compilar: hay errores en su aplicación:',
@@ -129,6 +134,7 @@
'direction: ltr': 'direction: ltr',
'Disable': 'Deshabilitar',
'docs': 'docs',
'Done!': 'Done!',
'done!': 'listo!',
'Download': 'Descargar',
'download files via http:': 'descargar archivos via http:',
@@ -157,6 +163,7 @@
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Errors': 'errores',
'Errors in form, please check it out.': 'Errors in form, please check it out.',
'Exception instance attributes': 'Atributos de la instancia de Excepción',
'Exit Fullscreen': 'Exit Fullscreen',
'Expand Abbreviation': 'Expand Abbreviation',
@@ -188,14 +195,18 @@
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'Help': 'ayuda',
'here': 'here',
'htmledit': 'htmledit',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Si el reporte anterior contiene un número de tiquete este indica un falla en la ejecución del controlador, antes de cualquier intento de ejecutat doctests. Esto generalmente se debe a un error en la indentación o un error por fuera del código de la función.\r\nUn titulo verde indica que todas las pruebas pasaron (si existen). En dicho caso los resultados no se muestran.',
'Image': 'Image',
'Import/Export': 'Importar/Exportar',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'inspect attributes': 'inspect attributes',
'Install': 'instalar',
'Installation of %(plugin)s for %(app)s': 'Installation of %(plugin)s for %(app)s',
'Installation of %(plugin)s for %(app)s app': 'Installation of %(plugin)s for %(app)s app',
'Installed applications': 'Aplicaciones instaladas',
'Interaction at %s line %s': 'Interaction at %s line %s',
'Interactive console': 'Interactive console',
@@ -207,6 +218,7 @@
'invalid password.': 'invalid password.',
'Invalid Query': 'Consulta inválida',
'invalid request': 'solicitud inválida',
'Invalid request': 'Invalid request',
'invalid ticket': 'tiquete inválido',
'Key bindings': 'Key bindings',
'Key bindings for ZenCoding Plugin': 'Key bindings for ZenCoding Plugin',
@@ -218,6 +230,7 @@
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'License for': 'Licencia para',
'lists by ticket': 'lists by ticket',
'loading...': 'cargando...',
'locals': 'locals',
'Locals##debug': 'Locals',
@@ -237,6 +250,10 @@
'new application "%s" created': 'nueva aplicación "%s" creada',
'New application wizard': 'Asistente para nueva aplicación',
'new plugin installed': 'nuevo plugin instalado',
'New plugin installed: web2py.plugin.attachment.w2p': 'New plugin installed: web2py.plugin.attachment.w2p',
'New plugin installed: web2py.plugin.dialog.w2p': 'New plugin installed: web2py.plugin.dialog.w2p',
'New plugin installed: web2py.plugin.math2py.w2p': 'New plugin installed: web2py.plugin.math2py.w2p',
'New plugin installed: web2py.plugin.timezone.w2p': 'New plugin installed: web2py.plugin.timezone.w2p',
'New Record': 'Registro nuevo',
'new record inserted': 'nuevo registro insertado',
'New simple application': 'Nueva aplicación',
@@ -266,8 +283,10 @@
'password changed': 'contraseña cambiada',
'Peeking at file': 'Visualizando archivo',
'Please': 'Please',
'Plugin': 'Plugin',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
'Plugin "%s" in application': 'Plugin "%s" en aplicación',
'Plugin page': 'Plugin page',
'plugins': 'plugins',
'Plugins': 'Plugins',
'Plural-Forms:': 'Plural-Forms:',
@@ -275,6 +294,7 @@
'previous 100 rows': '100 filas anteriores',
'Private files': 'Archivos privados',
'private files': 'archivos privados',
'Project Progress': 'Project Progress',
'Query:': 'Consulta:',
'Rapid Search': 'Rapid Search',
'record': 'registro',
@@ -326,8 +346,10 @@
'stop': 'stop',
'submit': 'enviar',
'Submit': 'Submit',
'Success!': 'Success!',
'successful': 'exitoso',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'switch to : db': 'switch to : db',
'table': 'tabla',
'Table name': 'Nombre de la tabla',
'test': 'probar',
@@ -412,6 +434,8 @@
'web2py upgraded; please restart it': 'web2py actualizado; favor reiniciar',
'Welcome to web2py': 'Bienvenido a web2py',
'YES': 'SI',
'Yes': 'Yes',
'You are going to install': 'You are going to install',
'You need to set up and reach a': 'You need to set up and reach a',
'Your application will be blocked until you click an action button (next, step, continue, etc.)': 'Your application will be blocked until you click an action button (next, step, continue, etc.)',
'Your can inspect variables using the console below': 'Your can inspect variables using the console below',

View File

@@ -185,8 +185,8 @@
'Invalid Query': 'Неверный запрос',
'invalid request': 'неверный запрос',
'invalid ticket': 'неверный тикет',
'Key bindings': 'Связываник клавиш',
'Key bindings for ZenConding Plugin': 'Связывание клавиш для плагина ZenConding',
'Key bindings': 'Комбинации клавиш',
'Key bindings for ZenConding Plugin': 'Комбинации клавиш для плагина ZenConding',
'language file "%(filename)s" created/updated': 'Языковой файл "%(filename)s" создан/обновлен',
'Language files (static strings) updated': 'Языковые файлы (статичные строки) обновлены',
'languages': 'языки',
@@ -204,7 +204,7 @@
'Login to the Administrative Interface': 'Вход в интерфейс администратора',
'Logout': 'выход',
'Lost Password': 'Забыли пароль',
'lost password?': 'Пароль утерен?',
'lost password?': 'Пароль утерян?',
'Main Menu': 'Главное меню',
'Match Pair': 'Найти пару',
'Menu Model': 'Модель меню',

View File

@@ -8,42 +8,6 @@ WEB2PY_VERSION_URL = WEB2PY_URL + '/examples/default/version'
# the user-interface feature that allows you to edit files in your web
# browser.
## Default editor (to change editor you need web2py.admin.editors.zip)
## old editors like 'ace' or 'edit_area' or 'amy' are no longer supported
TEXT_EDITOR = 'codemirror'
## Editor Color scheme (only for ace)
TEXT_EDITOR_THEME = (
"chrome", "clouds", "clouds_midnight", "cobalt", "crimson_editor", "dawn",
"dreamweaver", "eclipse", "idle_fingers", "kr_theme", "merbivore",
"merbivore_soft", "monokai", "mono_industrial", "pastel_on_dark",
"solarized_dark", "solarized_light", "textmate", "tomorrow",
"tomorrow_night", "tomorrow_night_blue", "tomorrow_night_bright",
"tomorrow_night_eighties", "twilight", "vibrant_ink")[0]
## Editor Keyboard bindings (only for ace and codemirror)
TEXT_EDITOR_KEYBINDING = '' # 'emacs' or 'vi'
### edit_area only
# The default font size, measured in 'points'. The value must be an integer > 0
FONT_SIZE = 10
# Displays the editor in full screen mode. The value must be 'true' or 'false'
FULL_SCREEN = 'false'
# Display a check box under the editor to allow the user to switch
# between the editor and a simple
# HTML text area. The value must be 'true' or 'false'
ALLOW_TOGGLE = 'true'
# Replaces tab characters with space characters.
# The value can be 'false' (meaning that tabs are not replaced),
# or an integer > 0 that specifies the number of spaces to replace a tab with.
REPLACE_TAB_BY_SPACES = 4
# Toggle on/off the code editor instead of textarea on startup
DISPLAY = "onload" or "later"
# if demo mode is True then admin works readonly and does not require login
DEMO_MODE = False

View File

@@ -0,0 +1,17 @@
response.files.append(URL('static','plugin_statebutton/js/bootstrap-switch.js'))
response.files.append(URL('static','plugin_statebutton/css/bootstrap-switch.css'))
def stateWidget(field, value, data={'on-label':'Enabled', 'off-label':'Disabled', 'on':"primary", 'off':"default" }):
try:
fieldName = str(field).split('.')[1]
except:
fieldName = field
div = DIV(INPUT( _type='checkbox', _name='%s' % fieldName, _checked= 'checked' if value == 'true' else None, _value='true'),
_class='make-bootstrap-switch',
data=data)
script = SCRIPT("""
jQuery(".make-bootstrap-switch input[name='%s']").parent().bootstrapSwitch();
""" % fieldName)
return DIV(div, script)

View File

@@ -72,7 +72,7 @@
function autoCloseSlash(cm) {
var pos = cm.getCursor(), tok = cm.getTokenAt(pos);
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
if (tok.string.charAt(0) != "<" || inner.mode.name != "xml") return CodeMirror.Pass;
if (tok.string.charAt(0) != "<" || tok.start != pos.ch - 1 || inner.mode.name != "xml") return CodeMirror.Pass;
var tagName = state.context && state.context.tagName;
if (tagName) cm.replaceSelection("/" + tagName + ">", "end");

View File

@@ -6,7 +6,7 @@
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
var pos = cm.getCursor(),
inList = cm.getStateAfter(pos.line).list,
inList = cm.getStateAfter(pos.line).list !== false,
match;
if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {

View File

@@ -0,0 +1,40 @@
CodeMirror.registerHelper("fold", "comment", function(cm, start) {
var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
if (!startToken || !endToken) return;
var line = start.line, lineText = cm.getLine(line);
var startCh;
for (var at = start.ch, pass = 0;;) {
var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
if (found == -1) {
if (pass == 1) return;
pass = 1;
at = lineText.length;
continue;
}
if (pass == 1 && found < start.ch) return;
if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {
startCh = found + startToken.length;
break;
}
at = found - 1;
}
var depth = 1, lastLine = cm.lastLine(), end, endCh;
outer: for (var i = line; i <= lastLine; ++i) {
var text = cm.getLine(i), pos = i == line ? startCh : 0;
for (;;) {
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
if (nextOpen < 0) nextOpen = text.length;
if (nextClose < 0) nextClose = text.length;
pos = Math.min(nextOpen, nextClose);
if (pos == text.length) break;
if (pos == nextOpen) ++depth;
else if (!--depth) { end = i; endCh = pos; break outer; }
++pos;
}
}
if (end == null || line == end && endCh == startCh) return;
return {from: CodeMirror.Pos(line, startCh),
to: CodeMirror.Pos(end, endCh)};
});

View File

@@ -1,7 +1,7 @@
(function() {
"use strict";
function doFold(cm, pos, options) {
function doFold(cm, pos, options, force) {
var finder = options && (options.call ? options : options.rangeFinder);
if (!finder) finder = cm.getHelper(pos, "fold");
if (!finder) return;
@@ -13,7 +13,7 @@
if (!range || range.to.line - range.from.line < minSize) return null;
var marks = cm.findMarksAt(range.from);
for (var i = 0; i < marks.length; ++i) {
if (marks[i].__isFold) {
if (marks[i].__isFold && force !== "fold") {
if (!allowFolded) return null;
range.cleared = true;
marks[i].clear();
@@ -27,7 +27,7 @@
pos = CodeMirror.Pos(pos.line - 1, 0);
range = getRange(false);
}
if (!range || range.cleared) return;
if (!range || range.cleared || force === "unfold") return;
var myWidget = makeWidget(options);
CodeMirror.on(myWidget, "mousedown", function() { myRange.clear(); });
@@ -59,7 +59,9 @@
};
// New-style interface
CodeMirror.defineExtension("foldCode", function(pos, options) { doFold(this, pos, options); });
CodeMirror.defineExtension("foldCode", function(pos, options, force) {
doFold(this, pos, options, force);
});
CodeMirror.registerHelper("fold", "combine", function() {
var funcs = Array.prototype.slice.call(arguments, 0);

View File

@@ -0,0 +1,21 @@
.CodeMirror-foldmarker {
color: blue;
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
font-family: arial;
line-height: .3;
cursor: pointer;
}
.CodeMirror-foldgutter {
width: .7em;
}
.CodeMirror-foldgutter-open,
.CodeMirror-foldgutter-folded {
color: #555;
cursor: pointer;
}
.CodeMirror-foldgutter-open:after {
content: "\25BE";
}
.CodeMirror-foldgutter-folded:after {
content: "\25B8";
}

View File

@@ -0,0 +1,124 @@
(function() {
"use strict";
CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {
if (old && old != CodeMirror.Init) {
cm.clearGutter(cm.state.foldGutter.options.gutter);
cm.state.foldGutter = null;
cm.off("gutterClick", onGutterClick);
cm.off("change", onChange);
cm.off("viewportChange", onViewportChange);
cm.off("fold", onFold);
cm.off("unfold", onFold);
cm.off("swapDoc", updateInViewport);
}
if (val) {
cm.state.foldGutter = new State(parseOptions(val));
updateInViewport(cm);
cm.on("gutterClick", onGutterClick);
cm.on("change", onChange);
cm.on("viewportChange", onViewportChange);
cm.on("fold", onFold);
cm.on("unfold", onFold);
cm.on("swapDoc", updateInViewport);
}
});
var Pos = CodeMirror.Pos;
function State(options) {
this.options = options;
this.from = this.to = 0;
}
function parseOptions(opts) {
if (opts === true) opts = {};
if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";
if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";
if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";
return opts;
}
function isFolded(cm, line) {
var marks = cm.findMarksAt(Pos(line));
for (var i = 0; i < marks.length; ++i)
if (marks[i].__isFold && marks[i].find().from.line == line) return true;
}
function marker(spec) {
if (typeof spec == "string") {
var elt = document.createElement("div");
elt.className = spec;
return elt;
} else {
return spec.cloneNode(true);
}
}
function updateFoldInfo(cm, from, to) {
var opts = cm.state.foldGutter.options, cur = from;
cm.eachLine(from, to, function(line) {
var mark = null;
if (isFolded(cm, cur)) {
mark = marker(opts.indicatorFolded);
} else {
var pos = Pos(cur, 0), func = opts.rangeFinder || cm.getHelper(pos, "fold");
var range = func && func(cm, pos);
if (range && range.from.line + 1 < range.to.line)
mark = marker(opts.indicatorOpen);
}
cm.setGutterMarker(line, opts.gutter, mark);
++cur;
});
}
function updateInViewport(cm) {
var vp = cm.getViewport(), state = cm.state.foldGutter;
if (!state) return;
cm.operation(function() {
updateFoldInfo(cm, vp.from, vp.to);
});
state.from = vp.from; state.to = vp.to;
}
function onGutterClick(cm, line, gutter) {
var opts = cm.state.foldGutter.options;
if (gutter != opts.gutter) return;
cm.foldCode(Pos(line, 0), opts.rangeFinder);
}
function onChange(cm) {
var state = cm.state.foldGutter;
state.from = state.to = 0;
clearTimeout(state.changeUpdate);
state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, 600);
}
function onViewportChange(cm) {
var state = cm.state.foldGutter;
clearTimeout(state.changeUpdate);
state.changeUpdate = setTimeout(function() {
var vp = cm.getViewport();
if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
updateInViewport(cm);
} else {
cm.operation(function() {
if (vp.from < state.from) {
updateFoldInfo(cm, vp.from, state.from);
state.from = vp.from;
}
if (vp.to > state.to) {
updateFoldInfo(cm, state.to, vp.to);
state.to = vp.to;
}
});
}
}, 400);
}
function onFold(cm, from) {
var state = cm.state.foldGutter, line = from.line;
if (line >= state.from && line < state.to)
updateFoldInfo(cm, line, line + 1);
}
})();

View File

@@ -1,12 +1,27 @@
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);
var lastLine = cm.lastLine(),
tabSize = cm.getOption("tabSize"),
firstLine = cm.getLine(start.line);
if (!tabSize || !firstLine) return;
var myIndent = CodeMirror.countColumn(firstLine, null, tabSize);
for (var i = start.line + 1, end = cm.lineCount(); i < end; ++i) {
var curLine = cm.getLine(i);
if (CodeMirror.countColumn(curLine, null, tabSize) < myIndent &&
CodeMirror.countColumn(cm.getLine(i-1), null, tabSize) > myIndent)
function foldEnded(curColumn, prevColumn) {
return curColumn < myIndent ||
(curColumn == myIndent && prevColumn >= myIndent) ||
(curColumn > myIndent && i == lastLine);
}
for (var i = start.line + 1; i <= lastLine; i++) {
var curColumn = CodeMirror.countColumn(cm.getLine(i), null, tabSize);
var prevColumn = CodeMirror.countColumn(cm.getLine(i-1), null, tabSize);
if (foldEnded(curColumn, prevColumn)) {
var lastFoldLineNumber = curColumn > myIndent && i == lastLine ? i : i-1;
var lastFoldLine = cm.getLine(lastFoldLineNumber);
return {from: CodeMirror.Pos(start.line, firstLine.length),
to: CodeMirror.Pos(i, curLine.length)};
to: CodeMirror.Pos(lastFoldLineNumber, lastFoldLine.length)};
}
}
});
CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated

View File

@@ -33,21 +33,6 @@
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.string != ".") return;
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.string == ')') {
var level = 1;
do {
tprop = getToken(editor, Pos(cur.line, tprop.start));
switch (tprop.string) {
case ')': level++; break;
case '(': level--; break;
default: break;
}
} while (level > 0);
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.type.indexOf("variable") === 0)
tprop.type = "function";
else return; // no clue
}
if (!context) var context = [];
context.push(tprop);
}
@@ -110,11 +95,11 @@
for (var name in obj) maybeAdd(name);
}
if (context) {
if (context && context.length) {
// If this is a property, see if it belongs to some object we can
// find in the current environment.
var obj = context.pop(), base;
if (obj.type.indexOf("variable") === 0) {
if (obj.type && obj.type.indexOf("variable") === 0) {
if (options && options.additionalContext)
base = options.additionalContext[obj.string];
base = base || window[obj.string];
@@ -132,8 +117,7 @@
while (base != null && context.length)
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
}
else {
} else {
// If not, just look in the window object and any local scope
// (reading into JS mode internals to get at the local and global variables)
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);

View File

@@ -37,6 +37,7 @@
Pos(cur.line, token.type == "string" ? token.start : token.end));
var atName = before.match(/([^\s\u00a0=<>\"\']+)=$/), atValues;
if (!atName || !attrs.hasOwnProperty(atName[1]) || !(atValues = attrs[atName[1]])) return;
if (typeof atValues == 'function') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget
if (token.type == "string") {
prefix = token.string;
if (/['"]/.test(token.string.charAt(0))) {

View File

@@ -14,6 +14,7 @@
padding: 2px 5px;
position: fixed;
white-space: pre;
white-space: pre-wrap;
z-index: 100;
max-width: 600px;
opacity: 0;

View File

@@ -70,6 +70,7 @@
if (!cursor.find(rev)) return;
}
cm.setSelection(cursor.from(), cursor.to());
cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
state.posFrom = cursor.from(); state.posTo = cursor.to();
});}
function clearSearch(cm) {cm.operation(function() {
@@ -108,6 +109,7 @@
(start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
}
cm.setSelection(cursor.from(), cursor.to());
cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
confirmDialog(cm, doReplaceConfirm, "Replace?",
[function() {doReplace(match);}, advance]);
};

View File

@@ -76,8 +76,10 @@
{ keys: ['<C-p>'], type: 'keyToKey', toKeys: ['k'] },
{ keys: ['C-['], type: 'keyToKey', toKeys: ['<Esc>'] },
{ keys: ['<C-c>'], type: 'keyToKey', toKeys: ['<Esc>'] },
{ keys: ['s'], type: 'keyToKey', toKeys: ['c', 'l'] },
{ keys: ['S'], type: 'keyToKey', toKeys: ['c', 'c'] },
{ keys: ['s'], type: 'keyToKey', toKeys: ['c', 'l'], context: 'normal' },
{ keys: ['s'], type: 'keyToKey', toKeys: ['x', 'i'], context: 'visual'},
{ keys: ['S'], type: 'keyToKey', toKeys: ['c', 'c'], context: 'normal' },
{ keys: ['S'], type: 'keyToKey', toKeys: ['d', 'c', 'c'], context: 'visual' },
{ keys: ['<Home>'], type: 'keyToKey', toKeys: ['0'] },
{ keys: ['<End>'], type: 'keyToKey', toKeys: ['$'] },
{ keys: ['<PageUp>'], type: 'keyToKey', toKeys: ['<C-b>'] },
@@ -609,6 +611,9 @@
}
commandDispatcher.processCommand(cm, vim, command);
}
},
handleEx: function(cm, input) {
exCommandDispatcher.processCommand(cm, input);
}
};
@@ -695,6 +700,9 @@
if (linewise && text.charAt(0) == '\n') {
text = text.slice(1) + '\n';
}
if(linewise && text.charAt(text.length - 1) !== '\n'){
text += '\n';
}
// Lowercase and uppercase registers refer to the same register.
// Uppercase just means append.
var register = this.isValidRegister(registerName) ?
@@ -766,44 +774,74 @@
matchCommand: function(key, keyMap, vim) {
var inputState = vim.inputState;
var keys = inputState.keyBuffer.concat(key);
var matchedCommands = [];
var selectedCharacter;
for (var i = 0; i < keyMap.length; i++) {
var command = keyMap[i];
if (matchKeysPartial(keys, command.keys)) {
if (keys.length < command.keys.length) {
// Matches part of a multi-key command. Buffer and wait for next
// stroke.
inputState.keyBuffer.push(key);
return null;
}
if (inputState.operator && command.type == 'action') {
// Ignore matched action commands after an operator. Operators
// only operate on motions. This check is really for text
// objects since aW, a[ etcs conflicts with a.
continue;
}
// Matches whole comand. Return the command.
// Match commands that take <character> as an argument.
if (command.keys[keys.length - 1] == 'character') {
inputState.selectedCharacter = keys[keys.length - 1];
if(inputState.selectedCharacter.length>1){
switch(inputState.selectedCharacter){
selectedCharacter = keys[keys.length - 1];
if(selectedCharacter.length>1){
switch(selectedCharacter){
case '<CR>':
inputState.selectedCharacter='\n';
selectedCharacter='\n';
break;
case '<Space>':
inputState.selectedCharacter=' ';
selectedCharacter=' ';
break;
default:
continue;
}
}
}
// Add the command to the list of matched commands. Choose the best
// command later.
matchedCommands.push(command);
}
}
// Returns the command if it is a full match, or null if not.
function getFullyMatchedCommandOrNull(command) {
if (keys.length < command.keys.length) {
// Matches part of a multi-key command. Buffer and wait for next
// stroke.
inputState.keyBuffer.push(key);
return null;
} else {
if (command.keys[keys.length - 1] == 'character') {
inputState.selectedCharacter = selectedCharacter;
}
// Clear the buffer since a full match was found.
inputState.keyBuffer = [];
return command;
}
}
// Clear the buffer since there are no partial matches.
inputState.keyBuffer = [];
return null;
if (!matchedCommands.length) {
// Clear the buffer since there were no matches.
inputState.keyBuffer = [];
return null;
} else if (matchedCommands.length == 1) {
return getFullyMatchedCommandOrNull(matchedCommands[0]);
} else {
// Find the best match in the list of matchedCommands.
var context = vim.visualMode ? 'visual' : 'normal';
var bestMatch = matchedCommands[0]; // Default to first in the list.
for (var i = 0; i < matchedCommands.length; i++) {
if (matchedCommands[i].context == context) {
bestMatch = matchedCommands[i];
break;
}
}
return getFullyMatchedCommandOrNull(bestMatch);
}
},
processCommand: function(cm, vim, command) {
vim.inputState.repeatOverride = command.repeatOverride;

View File

@@ -74,7 +74,6 @@
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-error {color: #f00;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
@@ -91,6 +90,7 @@
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}

View File

@@ -1,4 +1,4 @@
// CodeMirror version 3.18
// CodeMirror version 3.19
//
// CodeMirror is the only global var we claim
window.CodeMirror = (function() {
@@ -355,8 +355,10 @@ window.CodeMirror = (function() {
d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
} else d.gutterFiller.style.display = "";
if (mac_geLion && scrollbarWidth(d.measure) === 0)
if (mac_geLion && scrollbarWidth(d.measure) === 0) {
d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
d.scrollbarV.style.pointerEvents = d.scrollbarH.style.pointerEvents = "none";
}
}
function visibleLines(display, doc, viewPort) {
@@ -937,8 +939,9 @@ window.CodeMirror = (function() {
// smallest indentation, which tends to need the least context to
// parse correctly.
function findStartLine(cm, n, precise) {
var minindent, minline, doc = cm.doc, maxScan = cm.doc.mode.innerMode ? 1000 : 100;
for (var search = n, lim = n - maxScan; search > lim; --search) {
var minindent, minline, doc = cm.doc;
var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
for (var search = n; search > lim; --search) {
if (search <= doc.first) return doc.first;
var line = getLine(doc, search - 1);
if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
@@ -963,6 +966,7 @@ window.CodeMirror = (function() {
line.stateAfter = save ? copyState(doc.mode, state) : null;
++pos;
});
if (precise) doc.frontier = pos;
return state;
}
@@ -1385,7 +1389,8 @@ window.CodeMirror = (function() {
display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = newScrollPos.scrollLeft;
alignHorizontally(cm);
if (op.scrollToPos)
scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos), op.scrollToPosMargin);
scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos.from),
clipPos(cm.doc, op.scrollToPos.to), op.scrollToPos.margin);
} else if (newScrollPos) {
scrollCursorIntoView(cm);
}
@@ -2181,7 +2186,11 @@ window.CodeMirror = (function() {
var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
if (!pos || opera) return; // Opera is difficult.
if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
// Reset the current text selection only if the click is done outside of the selection
// and 'resetSelectionOnContextMenu' option is true.
var reset = cm.options.resetSelectionOnContextMenu;
if (reset && (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)))
operation(cm, setSelection)(cm.doc, pos, pos);
var oldCSS = display.input.style.cssText;
@@ -2632,7 +2641,7 @@ window.CodeMirror = (function() {
// SCROLLING
function scrollCursorIntoView(cm) {
var coords = scrollPosIntoView(cm, cm.doc.sel.head, cm.options.cursorScrollMargin);
var coords = scrollPosIntoView(cm, cm.doc.sel.head, null, cm.options.cursorScrollMargin);
if (!cm.state.focused) return;
var display = cm.display, box = getRect(display.sizer), doScroll = null;
if (coords.top + box.top < 0) doScroll = true;
@@ -2649,11 +2658,15 @@ window.CodeMirror = (function() {
}
}
function scrollPosIntoView(cm, pos, margin) {
function scrollPosIntoView(cm, pos, end, margin) {
if (margin == null) margin = 0;
for (;;) {
var changed = false, coords = cursorCoords(cm, pos);
var scrollPos = calculateScrollPos(cm, coords.left, coords.top - margin, coords.left, coords.bottom + margin);
var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),
Math.min(coords.top, endCoords.top) - margin,
Math.max(coords.left, endCoords.left),
Math.max(coords.bottom, endCoords.bottom) + margin);
var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
if (scrollPos.scrollTop != null) {
setScrollTop(cm, scrollPos.scrollTop);
@@ -3171,17 +3184,23 @@ window.CodeMirror = (function() {
clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co};
},
scrollIntoView: operation(null, function(pos, margin) {
if (typeof pos == "number") pos = Pos(pos, 0);
scrollIntoView: operation(null, function(range, margin) {
if (range == null) range = {from: this.doc.sel.head, to: null};
else if (typeof range == "number") range = {from: Pos(range, 0), to: null};
else if (range.from == null) range = {from: range, to: null};
if (!range.to) range.to = range.from;
if (!margin) margin = 0;
var coords = pos;
if (!pos || pos.line != null) {
this.curOp.scrollToPos = pos ? clipPos(this.doc, pos) : this.doc.sel.head;
this.curOp.scrollToPosMargin = margin;
coords = cursorCoords(this, this.curOp.scrollToPos);
var coords = range;
if (range.from.line != null) {
this.curOp.scrollToPos = {from: range.from, to: range.to, margin: margin};
coords = {from: cursorCoords(this, range.from),
to: cursorCoords(this, range.to)};
}
var sPos = calculateScrollPos(this, coords.left, coords.top - margin, coords.right, coords.bottom + margin);
var sPos = calculateScrollPos(this, Math.min(coords.from.left, coords.to.left),
Math.min(coords.from.top, coords.to.top) - margin,
Math.max(coords.from.right, coords.to.right),
Math.max(coords.from.bottom, coords.to.bottom) + margin);
updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop);
}),
@@ -3213,6 +3232,7 @@ window.CodeMirror = (function() {
clearCaches(this);
resetInput(this, true);
updateScrollPos(this, doc.scrollLeft, doc.scrollTop);
signalLater(this, "swapDoc", this, old);
return old;
}),
@@ -3287,6 +3307,8 @@ window.CodeMirror = (function() {
option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
option("showCursorWhenSelecting", false, updateSelection, true);
option("resetSelectionOnContextMenu", true);
option("readOnly", false, function(cm, val) {
if (val == "nocursor") {onBlur(cm); cm.display.input.blur();}
else if (!val) resetInput(cm, true);
@@ -3523,7 +3545,8 @@ window.CodeMirror = (function() {
keyMap.basic = {
"Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
"End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
"Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
"Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
"Tab": "defaultTab", "Shift-Tab": "indentAuto",
"Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
};
// Note that the save and find-related commands aren't defined by
@@ -4463,7 +4486,7 @@ window.CodeMirror = (function() {
return out;
}
return function(builder, text, style, startStyle, endStyle, title) {
return inner(builder, text.replace(/ {3,}/, split), style, startStyle, endStyle, title);
return inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title);
};
}
@@ -5881,7 +5904,7 @@ window.CodeMirror = (function() {
// THE END
CodeMirror.version = "3.18.0";
CodeMirror.version = "3.19.0";
return CodeMirror;
})();

View File

@@ -3,7 +3,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
var indentUnit = config.indentUnit,
var indentUnit = config.indentUnit || config.tabSize || 2,
hooks = parserConfig.hooks || {},
atMediaTypes = parserConfig.atMediaTypes || {},
atMediaFeatures = parserConfig.atMediaFeatures || {},
@@ -259,8 +259,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
}
else if (type == "}") {
if (context == "interpolation") style = "operator";
state.stack.pop();
if (context == "propertyValue") state.stack.pop();
// Pop off end of array until { is reached
while(state.stack.length){
var removed = state.stack.pop();
if(removed.indexOf("{") > -1){
break;
}
}
}
else if (type == "interpolation") state.stack.push("interpolation");
else if (type == "@media") state.stack.push("@media");
@@ -278,11 +283,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
else state.stack.push("(");
}
else if (type == ")") {
if (context == "propertyValue") {
// In @mediaType( without closing ; after propertyValue
state.stack.pop();
// Pop off end of array until ( is reached
while(state.stack.length){
var removed = state.stack.pop();
if(removed.indexOf("(") > -1){
break;
}
}
state.stack.pop();
}
else if (type == ":" && state.lastToken == "property") state.stack.push("propertyValue");
else if (context == "propertyValue" && type == ";") state.stack.pop();
@@ -602,6 +609,11 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
}
return ["variable", "variable"];
},
",": function(_stream, state) {
if (state.stack[state.stack.length - 1] == "propertyValue") {
return ["operator", ";"];
}
},
"/": function(stream, state) {
if (stream.eat("/")) {
stream.skipToEnd();

View File

@@ -1,70 +0,0 @@
<!doctype html>
<title>CodeMirror: CSS mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="css.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">CSS</a>
</ul>
</div>
<article>
<h2>CSS mode</h2>
<form><textarea id="code" name="code">
/* Some example CSS */
@import url("something.css");
body {
margin: 0;
padding: 3em 6em;
font-family: tahoma, arial, sans-serif;
color: #000;
}
#navigation a {
font-weight: bold;
text-decoration: none !important;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.7em;
}
h1:before, h2:before {
content: "::";
}
code {
font-family: courier, monospace;
font-size: 80%;
color: #418A8A;
}
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
</script>
<p><strong>MIME types defined:</strong> <code>text/css</code>.</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#css_*">normal</a>, <a href="../../test/index.html#verbose,css_*">verbose</a>.</p>
</article>

View File

@@ -1,6 +1,7 @@
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "text/x-scss");
var mode = CodeMirror.getMode({tabSize: 1}, "text/x-scss");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); }
function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); }
MT('url_with_quotation',
"[tag foo] { [property background][operator :][string-2 url]([string test.jpg]) }");
@@ -77,4 +78,7 @@
MT('nested_structure_with_id_selector',
"[tag p] { [builtin #hello] { [property color][operator :][keyword red]; } }");
IT('mixin',
"@mixin container[1 (][2 $a: 10][1 , ][2 $b: 10][1 , ][2 $c: 10]) [1 {]}");
})();

View File

@@ -1,6 +1,7 @@
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "css");
var mode = CodeMirror.getMode({tabSize: 1}, "css");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1)); }
// Requires at least one media query
MT("atMediaEmpty",
@@ -123,4 +124,7 @@
MT("commentSGML",
"[comment <!--comment-->]");
IT("tagSelector",
"strong, em [1 { background][2 : rgba][3 (255, 255, 0, .2][2 )][1 ;]}");
})();

View File

@@ -1,60 +0,0 @@
<!doctype html>
<title>CodeMirror: Html Embedded Scripts mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../xml/xml.js"></script>
<script src="../javascript/javascript.js"></script>
<script src="../css/css.js"></script>
<script src="../htmlmixed/htmlmixed.js"></script>
<script src="htmlembedded.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">Html Embedded Scripts</a>
</ul>
</div>
<article>
<h2>Html Embedded Scripts mode</h2>
<form><textarea id="code" name="code">
<%
function hello(who) {
return "Hello " + who;
}
%>
This is an example of EJS (embedded javascript)
<p>The program says <%= hello("world") %>.</p>
<script>
alert("And here is some normal JS code"); // also colored
</script>
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
mode: "application/x-ejs",
indentUnit: 4,
indentWithTabs: true,
enterMode: "keep",
tabMode: "shift"
});
</script>
<p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on
JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p>
<p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET),
<code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>
</article>

View File

@@ -1,85 +0,0 @@
<!doctype html>
<title>CodeMirror: HTML mixed mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../xml/xml.js"></script>
<script src="../javascript/javascript.js"></script>
<script src="../css/css.js"></script>
<script src="../vbscript/vbscript.js"></script>
<script src="htmlmixed.js"></script>
<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">HTML mixed</a>
</ul>
</div>
<article>
<h2>HTML mixed mode</h2>
<form><textarea id="code" name="code">
<html style="color: green">
<!-- this is a comment -->
<head>
<title>Mixed HTML Example</title>
<style type="text/css">
h1 {font-family: comic sans; color: #f0f;}
div {background: yellow !important;}
body {
max-width: 50em;
margin: 1em 2em 1em 5em;
}
</style>
</head>
<body>
<h1>Mixed HTML Example</h1>
<script>
function jsFunc(arg1, arg2) {
if (arg1 && arg2) document.body.innerHTML = "achoo";
}
</script>
</body>
</html>
</textarea></form>
<script>
// Define an extended mixed-mode that understands vbscript and
// leaves mustache/handlebars embedded templates in html mode
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: mixedMode, tabMode: "indent"});
</script>
<p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>
<p>It takes an optional mode configuration
option, <code>scriptTypes</code>, which can be used to add custom
behavior for specific <code>&lt;script type="..."></code> tags. If
given, it should hold an array of <code>{matches, mode}</code>
objects, where <code>matches</code> is a string or regexp that
matches the script type, and <code>mode</code> is
either <code>null</code>, for script types that should stay in
HTML mode, or a <a href="../../doc/manual.html#option_mode">mode
spec</a> corresponding to the mode that should be used for the
script.</p>
<p><strong>MIME types defined:</strong> <code>text/html</code>
(redefined, only takes effect if you load this parser after the
XML parser).</p>
</article>

View File

@@ -1,107 +0,0 @@
<!doctype html>
<title>CodeMirror: JavaScript mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="../../addon/comment/continuecomment.js"></script>
<script src="../../addon/comment/comment.js"></script>
<script src="javascript.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">JavaScript</a>
</ul>
</div>
<article>
<h2>JavaScript mode</h2>
<div><textarea id="code" name="code">
// Demo code (the actual new parser character stream implementation)
function StringStream(string) {
this.pos = 0;
this.string = string;
}
StringStream.prototype = {
done: function() {return this.pos >= this.string.length;},
peek: function() {return this.string.charAt(this.pos);},
next: function() {
if (this.pos &lt; this.string.length)
return this.string.charAt(this.pos++);
},
eat: function(match) {
var ch = this.string.charAt(this.pos);
if (typeof match == "string") var ok = ch == match;
else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
if (ok) {this.pos++; return ch;}
},
eatWhile: function(match) {
var start = this.pos;
while (this.eat(match));
if (this.pos > start) return this.string.slice(start, this.pos);
},
backUp: function(n) {this.pos -= n;},
column: function() {return this.pos;},
eatSpace: function() {
var start = this.pos;
while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
return this.pos - start;
},
match: function(pattern, consume, caseInsensitive) {
if (typeof pattern == "string") {
function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
if (consume !== false) this.pos += str.length;
return true;
}
}
else {
var match = this.string.slice(this.pos).match(pattern);
if (match &amp;&amp; consume !== false) this.pos += match[0].length;
return match;
}
}
};
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
continueComments: "Enter",
extraKeys: {"Ctrl-Q": "toggleComment"}
});
</script>
<p>
JavaScript mode supports a two configuration
options:
<ul>
<li><code>json</code> which will set the mode to expect JSON
data rather than a JavaScript program.</li>
<li><code>typescript</code> which will activate additional
syntax highlighting and some other things for TypeScript code
(<a href="typescript.html">demo</a>).</li>
<li><code>statementIndent</code> which (given a number) will
determine the amount of indentation to use for statements
continued on a new line.</li>
</ul>
</p>
<p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>
</article>

View File

@@ -15,11 +15,13 @@ CodeMirror.modeInfo = [
{name: 'diff', mime: 'text/x-diff', mode: 'diff'},
{name: 'DTD', mime: 'application/xml-dtd', mode: 'dtd'},
{name: 'ECL', mime: 'text/x-ecl', mode: 'ecl'},
{name: 'Eiffel', mime: 'text/x-eiffel', mode: 'eiffel'},
{name: 'Erlang', mime: 'text/x-erlang', mode: 'erlang'},
{name: 'Fortran', mime: 'text/x-fortran', mode: 'fortran'},
{name: 'Gas', mime: 'text/x-gas', mode: 'gas'},
{name: 'Gherkin', mime: 'text/x-feature', mode: 'gherkin'},
{name: 'GitHub Flavored Markdown', mime: 'text/x-gfm', mode: 'gfm'},
{name: 'GO', mime: 'text/x-go', mode: 'go'},
{name: 'Go', mime: 'text/x-go', mode: 'go'},
{name: 'Groovy', mime: 'text/x-groovy', mode: 'groovy'},
{name: 'HAML', mime: 'text/x-haml', mode: 'haml'},
{name: 'Haskell', mime: 'text/x-haskell', mode: 'haskell'},

View File

@@ -1,187 +0,0 @@
<!doctype html>
<title>CodeMirror: Python mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="python.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">Python</a>
</ul>
</div>
<article>
<h2>Python mode</h2>
<div><textarea id="code" name="code">
# Literals
1234
0.0e101
.123
0b01010011100
0o01234567
0x0987654321abcdef
7
2147483647
3L
79228162514264337593543950336L
0x100000000L
79228162514264337593543950336
0xdeadbeef
3.14j
10.j
10j
.001j
1e100j
3.14e-10j
# String Literals
'For\''
"God\""
"""so loved
the world"""
'''that he gave
his only begotten\' '''
'that whosoever believeth \
in him'
''
# Identifiers
__a__
a.b
a.b.c
# Operators
+ - * / % & | ^ ~ < >
== != <= >= <> << >> // **
and or not in is
# Delimiters
() [] {} , : ` = ; @ . # Note that @ and . require the proper context.
+= -= *= /= %= &= |= ^=
//= >>= <<= **=
# Keywords
as assert break class continue def del elif else except
finally for from global if import lambda pass raise
return try while with yield
# Python 2 Keywords (otherwise Identifiers)
exec print
# Python 3 Keywords (otherwise Identifiers)
nonlocal
# Types
bool classmethod complex dict enumerate float frozenset int list object
property reversed set slice staticmethod str super tuple type
# Python 2 Types (otherwise Identifiers)
basestring buffer file long unicode xrange
# Python 3 Types (otherwise Identifiers)
bytearray bytes filter map memoryview open range zip
# Some Example code
import os
from package import ParentClass
@nonsenseDecorator
def doesNothing():
pass
class ExampleClass(ParentClass):
@staticmethod
def example(inputStr):
a = list(inputStr)
a.reverse()
return ''.join(a)
def __init__(self, mixin = 'Hello'):
self.mixin = mixin
</textarea></div>
<h2>Cython mode</h2>
<div><textarea id="code-cython" name="code-cython">
import numpy as np
cimport cython
from libc.math cimport sqrt
@cython.boundscheck(False)
@cython.wraparound(False)
def pairwise_cython(double[:, ::1] X):
cdef int M = X.shape[0]
cdef int N = X.shape[1]
cdef double tmp, d
cdef double[:, ::1] D = np.empty((M, M), dtype=np.float64)
for i in range(M):
for j in range(M):
d = 0.0
for k in range(N):
tmp = X[i, k] - X[j, k]
d += tmp * tmp
D[i, j] = sqrt(d)
return np.asarray(D)
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: {name: "python",
version: 2,
singleLineStringErrors: false},
lineNumbers: true,
indentUnit: 4,
tabMode: "shift",
matchBrackets: true
});
CodeMirror.fromTextArea(document.getElementById("code-cython"), {
mode: {name: "text/x-cython",
version: 2,
singleLineStringErrors: false},
lineNumbers: true,
indentUnit: 4,
tabMode: "shift",
matchBrackets: true
});
</script>
<h2>Configuration Options for Python mode:</h2>
<ul>
<li>version - 2/3 - The version of Python to recognize. Default is 2.</li>
<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>
</ul>
<h2>Advanced Configuration Options:</h2>
<p>Usefull for superset of python syntax like Enthought enaml, IPython magics and questionmark help</p>
<ul>
<li>singleOperators - RegEx - Regular Expression for single operator matching, default : <pre>^[\\+\\-\\*/%&amp;|\\^~&lt;&gt;!]</pre></li>
<li>singleDelimiters - RegEx - Regular Expression for single delimiter matching, default : <pre>^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]</pre></li>
<li>doubleOperators - RegEx - Regular Expression for double operators matching, default : <pre>^((==)|(!=)|(&lt;=)|(&gt;=)|(&lt;&gt;)|(&lt;&lt;)|(&gt;&gt;)|(//)|(\\*\\*))</pre></li>
<li>doubleDelimiters - RegEx - Regular Expressoin for double delimiters matching, default : <pre>^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&amp;=)|(\\|=)|(\\^=))</pre></li>
<li>tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default : <pre>^((//=)|(&gt;&gt;=)|(&lt;&lt;=)|(\\*\\*=))</pre></li>
<li>identifiers - RegEx - Regular Expression for identifier, default : <pre>^[_A-Za-z][_A-Za-z0-9]*</pre></li>
<li>extra_keywords - list of string - List of extra words ton consider as keywords</li>
<li>extra_builtins - list of string - List of extra words ton consider as builtins</li>
</ul>
<p><strong>MIME types defined:</strong> <code>text/x-python</code> and <code>text/x-cython</code>.</p>
</article>

View File

@@ -1,57 +0,0 @@
<!doctype html>
<title>CodeMirror: XML mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="xml.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">XML</a>
</ul>
</div>
<article>
<h2>XML mode</h2>
<form><textarea id="code" name="code">
&lt;html style="color: green"&gt;
&lt;!-- this is a comment --&gt;
&lt;head&gt;
&lt;title&gt;HTML Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
The indentation tries to be &lt;em&gt;somewhat &amp;quot;do what
I mean&amp;quot;&lt;/em&gt;... but might not match your style.
&lt;/body&gt;
&lt;/html&gt;
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: {name: "xml", alignCDATA: true},
lineNumbers: true
});
</script>
<p>The XML mode supports two configuration parameters:</p>
<dl>
<dt><code>htmlMode (boolean)</code></dt>
<dd>This switches the mode to parse HTML instead of XML. This
means attributes do not have to be quoted, and some elements
(such as <code>br</code>) do not require a closing tag.</dd>
<dt><code>alignCDATA (boolean)</code></dt>
<dd>Setting this to true will force the opening tag of CDATA
blocks to not be indented.</dd>
</dl>
<p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p>
</article>

View File

@@ -76,7 +76,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
tagName = "";
var c;
while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c;
if (!tagName) return "error";
if (!tagName) return "tag error";
type = isClose ? "closeTag" : "openTag";
state.tokenize = inTag;
return "tag";
@@ -109,7 +109,9 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
type = "equals";
return null;
} else if (ch == "<") {
return "error";
state.tokenize = inText;
var next = state.tokenize(stream, state);
return next ? next + " error" : "error";
} else if (/[\'\"]/.test(ch)) {
state.tokenize = inAttribute(ch);
state.stringStartCol = stream.column();
@@ -298,7 +300,9 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
}
}
state.startOfLine = false;
return setStyle || style;
if (setStyle)
style = setStyle == "error" ? style + " error" : setStyle;
return style;
},
indent: function(state, textAfter, fullLine) {

View File

@@ -1,6 +1,6 @@
{
"name": "codemirror",
"version":"3.18.0",
"version":"3.19.0",
"main": "lib/codemirror.js",
"description": "In-browser code editing made bearable",
"licenses": [{"type": "MIT",

View File

@@ -0,0 +1,34 @@
/*
Name: 3024 day
Author: Jan T. Sott (http://github.com/idleberg)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}
.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}
.cm-s-3024-day span.cm-comment {color: #cdab53;}
.cm-s-3024-day span.cm-atom {color: #a16a94;}
.cm-s-3024-day span.cm-number {color: #a16a94;}
.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}
.cm-s-3024-day span.cm-keyword {color: #db2d20;}
.cm-s-3024-day span.cm-string {color: #fded02;}
.cm-s-3024-day span.cm-variable {color: #01a252;}
.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}
.cm-s-3024-day span.cm-def {color: #e8bbd0;}
.cm-s-3024-day span.cm-bracket {color: #3a3432;}
.cm-s-3024-day span.cm-tag {color: #db2d20;}
.cm-s-3024-day span.cm-link {color: #a16a94;}
.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}
.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -0,0 +1,34 @@
/*
Name: 3024 night
Author: Jan T. Sott (http://github.com/idleberg)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}
.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}
.cm-s-3024-night span.cm-comment {color: #cdab53;}
.cm-s-3024-night span.cm-atom {color: #a16a94;}
.cm-s-3024-night span.cm-number {color: #a16a94;}
.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}
.cm-s-3024-night span.cm-keyword {color: #db2d20;}
.cm-s-3024-night span.cm-string {color: #fded02;}
.cm-s-3024-night span.cm-variable {color: #01a252;}
.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}
.cm-s-3024-night span.cm-def {color: #e8bbd0;}
.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}
.cm-s-3024-night span.cm-tag {color: #db2d20;}
.cm-s-3024-night span.cm-link {color: #a16a94;}
.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}
.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}
.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -15,7 +15,6 @@
.cm-s-ambiance .cm-string { color: #8f9d6a; }
.cm-s-ambiance .cm-string-2 { color: #9d937c; }
.cm-s-ambiance .cm-meta { color: #D2A8A1; }
.cm-s-ambiance .cm-error { color: #AF2018; }
.cm-s-ambiance .cm-qualifier { color: yellow; }
.cm-s-ambiance .cm-builtin { color: #9999cc; }
.cm-s-ambiance .cm-bracket { color: #24C2C7; }
@@ -26,6 +25,7 @@
.cm-s-ambiance .cm-hr { color: pink; }
.cm-s-ambiance .cm-link { color: #F4C20B; }
.cm-s-ambiance .cm-special { color: #FF9D00; }
.cm-s-ambiance .cm-error { color: #AF2018; }
.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }

View File

@@ -0,0 +1,34 @@
/*
Name: Base16 Default Dark
Author: Chris Kempson (http://chriskempson.com)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;}
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
.cm-s-base16-dark span.cm-comment {color: #8f5536;}
.cm-s-base16-dark span.cm-atom {color: #aa759f;}
.cm-s-base16-dark span.cm-number {color: #aa759f;}
.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}
.cm-s-base16-dark span.cm-keyword {color: #ac4142;}
.cm-s-base16-dark span.cm-string {color: #f4bf75;}
.cm-s-base16-dark span.cm-variable {color: #90a959;}
.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-dark span.cm-def {color: #d28445;}
.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}
.cm-s-base16-dark span.cm-tag {color: #ac4142;}
.cm-s-base16-dark span.cm-link {color: #aa759f;}
.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}
.cm-s-base16-dark .CodeMirror-activeline-background {background: #2F2F2F !important;}
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -0,0 +1,34 @@
/*
Name: Base16 Default Light
Author: Chris Kempson (http://chriskempson.com)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
.cm-s-base16-light span.cm-comment {color: #8f5536;}
.cm-s-base16-light span.cm-atom {color: #aa759f;}
.cm-s-base16-light span.cm-number {color: #aa759f;}
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
.cm-s-base16-light span.cm-string {color: #f4bf75;}
.cm-s-base16-light span.cm-variable {color: #90a959;}
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-light span.cm-def {color: #d28445;}
.cm-s-base16-light span.cm-bracket {color: #202020;}
.cm-s-base16-light span.cm-tag {color: #ac4142;}
.cm-s-base16-light span.cm-link {color: #aa759f;}
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -16,13 +16,13 @@
.cm-s-blackboard .cm-string { color: #61CE3C; }
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
.cm-s-blackboard .cm-header { color: #FF6400; }
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
.cm-s-blackboard .cm-link { color: #8DA6CE; }
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}
.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}

View File

@@ -12,10 +12,10 @@
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
.cm-s-cobalt span.cm-error { color: #9d1e15; }
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
.cm-s-cobalt span.cm-link { color: #845dc4; }
.cm-s-cobalt span.cm-error { color: #9d1e15; }
.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}
.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}

View File

@@ -11,13 +11,13 @@
.cm-s-eclipse span.cm-comment {color: #3F7F5F;}
.cm-s-eclipse span.cm-string {color: #2A00FF;}
.cm-s-eclipse span.cm-string-2 {color: #f50;}
.cm-s-eclipse span.cm-error {color: #f00;}
.cm-s-eclipse span.cm-qualifier {color: #555;}
.cm-s-eclipse span.cm-builtin {color: #30a;}
.cm-s-eclipse span.cm-bracket {color: #cc7;}
.cm-s-eclipse span.cm-tag {color: #170;}
.cm-s-eclipse span.cm-attribute {color: #00c;}
.cm-s-eclipse span.cm-link {color: #219;}
.cm-s-eclipse span.cm-error {color: #f00;}
.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}

View File

@@ -6,8 +6,8 @@
.cm-s-elegant span.cm-qualifier {color: #555;}
.cm-s-elegant span.cm-keyword {color: #730;}
.cm-s-elegant span.cm-builtin {color: #30a;}
.cm-s-elegant span.cm-error {background-color: #fdd;}
.cm-s-elegant span.cm-link {color: #762;}
.cm-s-elegant span.cm-error {background-color: #fdd;}
.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}

View File

@@ -10,7 +10,6 @@
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
.cm-s-erlang-dark span.cm-comment { color: #77f; }
.cm-s-erlang-dark span.cm-def { color: #e7a; }
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
@@ -25,6 +24,7 @@
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}
.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -32,7 +32,6 @@ Ported to CodeMirror by Peter Kroon
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
.cm-s-lesser-dark span.cm-string-2 {color: #f50;}
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
.cm-s-lesser-dark span.cm-qualifier {color: #555;}
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
@@ -42,6 +41,7 @@ Ported to CodeMirror by Peter Kroon
.cm-s-lesser-dark span.cm-quote {color: #090;}
.cm-s-lesser-dark span.cm-hr {color: #999;}
.cm-s-lesser-dark span.cm-link {color: #00c;}
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}
.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -0,0 +1,35 @@
/* Based on mbonaci's Brackets mbo theme */
.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffe9;}
.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
.cm-s-mbo .CodeMirror-linenumber {color: #dadada;}
.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;}
.cm-s-mbo span.cm-comment {color: #95958a;}
.cm-s-mbo span.cm-atom {color: #00a8c6;}
.cm-s-mbo span.cm-number {color: #00a8c6;}
.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;}
.cm-s-mbo span.cm-keyword {color: #ffb928;}
.cm-s-mbo span.cm-string {color: #ffcf6c;}
.cm-s-mbo span.cm-variable {color: #ffffec;}
.cm-s-mbo span.cm-variable-2 {color: #00a8c6;}
.cm-s-mbo span.cm-def {color: #ffffec;}
.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;}
.cm-s-mbo span.cm-tag {color: #9ddfe9;}
.cm-s-mbo span.cm-link {color: #f54b07;}
.cm-s-mbo span.cm-error {background: #636363; color: #ffffec;}
.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}
.cm-s-mbo .CodeMirror-matchingbracket {
text-decoration: underline;
color: #f5e107 !important;
}
div.CodeMirror span.CodeMirror-searching {
background-color: none;
background: none;
box-shadow: 0 0 0 1px #ffffec;
}

View File

@@ -32,10 +32,10 @@
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
.cm-s-midnight span.cm-def {color: #4DD;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
.cm-s-midnight span.cm-tag {color: #449;}
.cm-s-midnight span.cm-link {color: #AE81FF;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
.cm-s-midnight .CodeMirror-matchingbracket {
text-decoration: underline;

View File

@@ -17,10 +17,10 @@
.cm-s-monokai span.cm-variable {color: #a6e22e;}
.cm-s-monokai span.cm-variable-2 {color: #9effff;}
.cm-s-monokai span.cm-def {color: #fd971f;}
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
.cm-s-monokai span.cm-tag {color: #f92672;}
.cm-s-monokai span.cm-link {color: #ae81ff;}
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}
.cm-s-monokai .CodeMirror-matchingbracket {

View File

@@ -14,11 +14,11 @@
.cm-s-night span.cm-meta { color: #7678e2; }
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
.cm-s-night span.cm-error { color: #9d1e15; }
.cm-s-night span.cm-bracket { color: #8da6ce; }
.cm-s-night span.cm-comment { color: #6900a1; }
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
.cm-s-night span.cm-link { color: #845dc4; }
.cm-s-night span.cm-error { color: #9d1e15; }
.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}
.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -0,0 +1,34 @@
/*
Name: Paraíso (Dark)
Author: Jan T. Sott
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
.cm-s-paraiso-dark span.cm-number {color: #815ba4;}
.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-dark span.cm-string {color: #fec418;}
.cm-s-paraiso-dark span.cm-variable {color: #48b685;}
.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}
.cm-s-paraiso-dark span.cm-def {color: #f99b15;}
.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}
.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}
.cm-s-paraiso-dark span.cm-link {color: #815ba4;}
.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}
.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}
.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -0,0 +1,34 @@
/*
Name: Paraíso (Light)
Author: Jan T. Sott
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
.cm-s-paraiso-light span.cm-number {color: #815ba4;}
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-light span.cm-string {color: #fec418;}
.cm-s-paraiso-light span.cm-variable {color: #48b685;}
.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
.cm-s-paraiso-light span.cm-def {color: #f99b15;}
.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
.cm-s-paraiso-light span.cm-link {color: #815ba4;}
.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -14,10 +14,10 @@
.cm-s-rubyblue span.cm-meta { color: #F0F; }
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
.cm-s-rubyblue span.cm-error { color: #AF2018; }
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
.cm-s-rubyblue span.cm-error { color: #AF2018; }
.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}

View File

@@ -67,11 +67,6 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
.cm-s-solarized .cm-string-2 { color: #b58900; }
.cm-s-solarized .cm-meta { color: #859900; }
.cm-s-solarized .cm-error,
.cm-s-solarized .cm-invalidchar {
color: #586e75;
border-bottom: 1px dotted #dc322f;
}
.cm-s-solarized .cm-qualifier { color: #b58900; }
.cm-s-solarized .cm-builtin { color: #d33682; }
.cm-s-solarized .cm-bracket { color: #cb4b16; }
@@ -98,6 +93,11 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
content: "➤"; /*visualize tab character*/
color: #586e75;
}
.cm-s-solarized .cm-error,
.cm-s-solarized .cm-invalidchar {
color: #586e75;
border-bottom: 1px dotted #dc322f;
}
.cm-s-solarized.cm-s-dark .CodeMirror-selected {
background: #073642;
@@ -165,10 +165,10 @@ Active line. Negative margin compensates left padding of the text in the
view-port
*/
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
background: rgba(255, 255, 255, 0.05);
background: rgba(255, 255, 255, 0.10);
}
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.05);
background: rgba(0, 0, 0, 0.10);
}
/*

View File

@@ -0,0 +1,26 @@
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
.cm-s-the-matrix span.CodeMirror-selected { background: #a8f !important; }
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}
.cm-s-the-matrix span.cm-atom {color: #3FF;}
.cm-s-the-matrix span.cm-number {color: #FFB94F;}
.cm-s-the-matrix span.cm-def {color: #99C;}
.cm-s-the-matrix span.cm-variable {color: #F6C;}
.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}
.cm-s-the-matrix span.cm-variable-3 {color: #96F;}
.cm-s-the-matrix span.cm-property {color: #62FFA0;}
.cm-s-the-matrix span.cm-operator {color: #999}
.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}
.cm-s-the-matrix span.cm-string {color: #39C;}
.cm-s-the-matrix span.cm-meta {color: #C9F;}
.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}
.cm-s-the-matrix span.cm-builtin {color: #30a;}
.cm-s-the-matrix span.cm-bracket {color: #cc7;}
.cm-s-the-matrix span.cm-tag {color: #FFBD40;}
.cm-s-the-matrix span.cm-attribute {color: #FFF700;}
.cm-s-the-matrix span.cm-error {color: #FF0000;}
.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}

View File

@@ -0,0 +1,34 @@
/*
Name: Tomorrow Night - Eighties
Author: Chris Kempson
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}
.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}
.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}
.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@@ -16,13 +16,13 @@
.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/
.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
.cm-s-twilight .cm-tag { color: #997643; } /**/
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
.cm-s-twilight .cm-header { color: #FF6400; }
.cm-s-twilight .cm-hr { color: #AEAEAE; }
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -18,13 +18,13 @@
.cm-s-vibrant-ink .cm-string { color: #A5C25C }
.cm-s-vibrant-ink .cm-string-2 { color: red }
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
.cm-s-vibrant-ink .cm-link { color: blue; }
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -38,12 +38,12 @@ THE SOFTWARE.
.cm-s-xq-dark span.cm-comment {color: gray;}
.cm-s-xq-dark span.cm-string {color: #9FEE00;}
.cm-s-xq-dark span.cm-meta {color: yellow;}
.cm-s-xq-dark span.cm-error {color: #f00;}
.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}
.cm-s-xq-dark span.cm-builtin {color: #30a;}
.cm-s-xq-dark span.cm-bracket {color: #cc7;}
.cm-s-xq-dark span.cm-tag {color: #FFBD40;}
.cm-s-xq-dark span.cm-attribute {color: #FFF700;}
.cm-s-xq-dark span.cm-error {color: #f00;}
.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@@ -32,12 +32,12 @@ THE SOFTWARE.
.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}
.cm-s-xq-light span.cm-string {color: red;}
.cm-s-xq-light span.cm-meta {color: yellow;}
.cm-s-xq-light span.cm-error {color: #f00;}
.cm-s-xq-light span.cm-qualifier {color: grey}
.cm-s-xq-light span.cm-builtin {color: #7EA656;}
.cm-s-xq-light span.cm-bracket {color: #cc7;}
.cm-s-xq-light span.cm-tag {color: #3F7F7F;}
.cm-s-xq-light span.cm-attribute {color: #7F007F;}
.cm-s-xq-light span.cm-error {color: #f00;}
.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -16,3 +16,23 @@
background-repeat: repeat-x;
}
/* Close button on tab*/
.nav-tabs li a > .close {
font-size: 18px;
padding-left: 5px;
float: right;
margin-right: -10px;
padding-right: 5px;
}
.nav-tabs>li>a {
overflow: hidden;
white-space: nowrap;
word-wrap: normal;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
/*.nav-tabs>li {
min-width: 100px;
}*/

View File

@@ -1,3 +1,5 @@
var template_js = '<p class="repo-name">{{{a_tag}}}</p><small>{{address}}</small>';
function prepareDataForSave(name, data) {
var obj = new Object();
obj.Name = name;
@@ -22,8 +24,8 @@ function prepareMultiPartPOST(data) {
}
function on_error() {
jQuery("input[name='saved_on']").attr('style', 'background-color:red');
jQuery("input[name='saved_on']").val('communication error');
$("input[name='saved_on']").attr('style', 'background-color:red');
$("input[name='saved_on']").val('communication error');
}
function doHighlight(highlight) {
@@ -36,24 +38,24 @@ function doHighlight(highlight) {
function doClickSave() {
var currentTabID = '#' + jQuery('#edit_placeholder div.tab-pane.active').attr('id');
var editor = jQuery(currentTabID + ' textarea').data('editor');
var currentTabID = '#' + $('#edit_placeholder div.tab-pane.active').attr('id');
var editor = $(currentTabID + ' textarea').data('editor');
var data = editor.getValue();
var dataForPost = prepareMultiPartPOST(new Array(
prepareDataForSave('data', data),
prepareDataForSave('file_hash',
jQuery(currentTabID + " input[name='file_hash']").val()),
$(currentTabID + " input[name='file_hash']").val()),
prepareDataForSave('saved_on',
jQuery(currentTabID + " input[name='saved_on']").val()),
$(currentTabID + " input[name='saved_on']").val()),
prepareDataForSave('saved_on',
jQuery(currentTabID + " input[name='saved_on']").val()),
$(currentTabID + " input[name='saved_on']").val()),
prepareDataForSave('from_ajax', 'true')));
// console.info(area.textarea.value);
jQuery(currentTabID + " input[name='saved_on']").attr('style',
$(currentTabID + " input[name='saved_on']").attr('style',
'background-color:yellow');
jQuery(currentTabID + " input[name='saved_on']").val('saving now...')
currentUrl = jQuery(currentTabID + ' form').attr('action');
jQuery.ajax({
$(currentTabID + " input[name='saved_on']").val('saving now...')
currentUrl = $(currentTabID + ' form').attr('action');
$.ajax({
type: "POST",
contentType: 'multipart/form-data;boundary="' + dataForPost[1] + '"',
url: currentUrl,
@@ -67,38 +69,38 @@ function doClickSave() {
'doClickSave');
},
success: function (json, text, xhr) {
jQuery(editor).data('saved', true); // Set as saved
$(editor).data('saved', true); // Set as saved
editor.on("change", store_changes_function); // Re-enable change watcher
// reenable disabled submit button
var t = jQuery("input[name='save']");
var t = $("input[name='save']");
t.attr('class', '');
t.attr('disabled', '');
var flash = xhr.getResponseHeader('web2py-component-flash');
if(flash) {
jQuery('.flash').html(decodeURIComponent(flash))
$('.flash').html(decodeURIComponent(flash))
.append('<a href="#" class="close">&times;</a>')
.slideDown();
} else jQuery('.flash').hide();
} else $('.flash').hide();
try {
if(json.error) {
window.location.href = json.redirect;
} else {
// console.info( json.file_hash );
jQuery(currentTabID + " input[name='file_hash']").val(json.file_hash);
jQuery(currentTabID + " input[name='saved_on']").val(json.saved_on);
$(currentTabID + " input[name='file_hash']").val(json.file_hash);
$(currentTabID + " input[name='saved_on']").val(json.saved_on);
if(json.highlight) {
doHighlight(json.highlight);
} else {
jQuery(currentTabID + " input[name='saved_on']").attr('style', 'background-color:#99FF99');
//jQuery(".flash").delay(1000).fadeOut('slow');
$(currentTabID + " input[name='saved_on']").attr('style', 'background-color:#99FF99');
//$(".flash").delay(1000).fadeOut('slow');
}
// console.info(jQuery("input[name='file_hash']").val());
// console.info($("input[name='file_hash']").val());
var output = '<b>exposes:</b> ';
for(var i in json.functions) {
output += ' <a target="_blank" href="/' + json.application + '/' + json.controller + '/' + json.functions[i] + '">' + json.functions[i] + '</a>,';
}
if(output != '<b>exposes:</b> ') {
jQuery(currentTabID + " .exposed").html(output.substring(0, output.length - 1));
$(currentTabID + " .exposed").html(output.substring(0, output.length - 1));
}
}
} catch(e) {
@@ -113,8 +115,8 @@ function doClickSave() {
}
function getActiveEditor() {
var currentTabID = '#' + jQuery('#edit_placeholder div.tab-pane.active').attr('id');
var editor = jQuery(currentTabID + ' textarea').data('editor');
var currentTabID = '#' + $('#edit_placeholder div.tab-pane.active').attr('id');
var editor = $(currentTabID + ' textarea').data('editor');
return editor;
}
@@ -139,7 +141,7 @@ function doToggleBreakpoint(filename, url, sel) {
prepareDataForSave('sel_start', sel["start"]),
prepareDataForSave('sel_end', sel["end"]),
prepareDataForSave('data', sel['data'])));
jQuery.ajax({
$.ajax({
type: "POST",
contentType: 'multipart/form-data;boundary="' + dataForPost[1] + '"',
url: url,
@@ -156,10 +158,10 @@ function doToggleBreakpoint(filename, url, sel) {
// show flash message (if any)
var flash = xhr.getResponseHeader('web2py-component-flash');
if(flash) {
jQuery('.flash').html(decodeURIComponent(flash))
$('.flash').html(decodeURIComponent(flash))
.append('<a href="#" class="close">&times;</a>')
.slideDown();
} else jQuery('.flash').hide();
} else $('.flash').hide();
try {
if(json.error) {
window.location.href = json.redirect;
@@ -189,7 +191,7 @@ function doListBreakpoints(filename, url, editor) {
var dataForPost = prepareMultiPartPOST(new Array(
prepareDataForSave('filename', filename)
));
jQuery.ajax({
$.ajax({
type: "POST",
contentType: 'multipart/form-data;boundary="' + dataForPost[1] + '"',
url: url,
@@ -235,7 +237,7 @@ function makeMarker() {
function keepalive(url) {
jQuery.ajax({
$.ajax({
type: "GET",
url: url,
timeout: 1000,
@@ -247,7 +249,7 @@ function keepalive(url) {
}
function load_file(url) {
jQuery.ajax({
$.ajax({
type: "GET",
contentType: 'application/json',
cache: false,
@@ -256,18 +258,18 @@ function load_file(url) {
timeout: 1000,
success: function (json) {
if(typeof (json['plain_html']) !== undefined) {
if(jQuery('#' + json['id']).length === 0 || json['force'] === true) {
if($('#' + json['id']).length === 0 || json['force'] === true) {
// Create a tab and put the code in it
var tab_header = '<li><a href="#' + json['id'] + '" data-toggle="tab">' + json['filename'] + '<button type="button" class="close">&times;</button></a></li>';
var tab_header = '<li><a title="'+ json['filename'] +'" href="#' + json['id'] + '" data-toggle="tab"><button type="button" class="close">&times;</button>' + json['realfilename'] + '</a></li>';
var tab_body = '<div id="' + json['id'] + '" class="tab-pane fade in " >' + json['plain_html'] + '</div>';
if(json['force'] === false) {
jQuery('#filesTab').append(jQuery(tab_header));
jQuery('#myTabContent').append(jQuery(tab_body));
$('#filesTab').append($(tab_header));
$('#myTabContent').append($(tab_body));
} else {
jQuery('#' + json['id']).html(jQuery(tab_body));
$('#' + json['id']).html($(tab_body));
}
}
jQuery("a[href='#" + json['id'] + "']").click();
$("a[href='#" + json['id'] + "']").click();
}
},
error: function (x) {
@@ -279,11 +281,11 @@ function load_file(url) {
function set_font(editor, incr) {
var fontSize = '';
if(incr !== 0) {
fontSize = parseInt(jQuery(editor.getWrapperElement()).css('font-size'));
fontSize = parseInt($(editor.getWrapperElement()).css('font-size'));
fontSize = fontSize + incr + "px";
}
jQuery(editor.getWrapperElement()).css('font-size', fontSize);
$(editor.getWrapperElement()).css('font-size', fontSize);
editor.refresh();
}
var template_js = '<p class="repo-name">{{{a_tag}}}</p><small>{{address}}</small>';

File diff suppressed because one or more lines are too long

View File

@@ -167,10 +167,12 @@
else t.fadeOut();
});
doc.on('keyup', 'input.integer', function () {
this.value = this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g, '').reverse();
var nvalue = this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g, '').reverse();
if(this.value!=nvalue) this.value = nvalue;
});
doc.on('keyup', 'input.double, input.decimal', function () {
this.value = this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g, '').reverse();
var nvalue = this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g, '').reverse();
if(this.value!=nvalue) this.value = nvalue;
});
var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
doc.on('click', "input[type='checkbox'].delete", function () {
@@ -248,22 +250,33 @@
});
},
trap_form: function (action, target) {
/* traps any LOADed form */
$('#' + target + ' form').each(function (i) {
var form = $(this);
form.attr('data-w2p_target', target);
if(!form.hasClass('no_trap')) {
/* should be there by default */
form.submit(function (e) {
web2py.disableElement(form.find(web2py.formInputClickSelector));
web2py.hide_flash();
web2py.ajax_page('post', action, form.serialize(), target, form);
e.preventDefault();
});
if (form.hasClass('no_trap')) {
return;
}
form.attr('data-w2p_target', target);
var url = form.attr('action');
if ((url === "") || (url === "#")) {
/* form has no action. Use component url. */
url = action;
}
form.submit(function (e) {
web2py.disableElement(form.find(web2py.formInputClickSelector));
web2py.hide_flash();
web2py.ajax_page('post', url, form.serialize(), target, form);
e.preventDefault();
});
});
},
ajax_page: function (method, action, data, target, element) {
/* element is a new parameter, but should be put be put in front */
if(element == undefined) element = $(document);
@@ -295,7 +308,7 @@
},
'complete': function (xhr, status) {
web2py.fire(element, 'ajax:complete', [xhr, status], target);
web2py.updatePage(xhr, target); /* Parse and load the html received */
web2py.updatePage(xhr, target); /* Parse and load the html received */
web2py.trap_form(action, target);
web2py.ajax_init('#' + target);
web2py.after_ajax(xhr);
@@ -445,8 +458,8 @@
} else return false; /* not supported */
},
/* new from here */
/* Form input elements bound by jquery-uj */
formInputClickSelector: 'input[type=submit], input[type=image], button[type=submit], button:not([type])',
/* Form input elements bound by web2py.js */
formInputClickSelector: 'input[type=submit]:not([name]), input[type=image]:not([name]), button[type=submit]:not([name]), button:not([type]):not([name])',
/* Form input elements disabled during form submission */
disableSelector: 'input, button, textarea, select',
/* Form input elements re-enabled after form submission */
@@ -513,7 +526,7 @@
if(flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
},
hide_flash: function () {
$('.flash').hide().html('');
$('.flash').fadeOut(0).html('');
},
show_if_handler: function (target) {
var triggers = {};

View File

@@ -0,0 +1,408 @@
/* ============================================================
* bootstrapSwitch v1.8 by Larentis Mattia @SpiritualGuru
* http://www.larentis.eu/
*
* Enhanced for radiobuttons by Stein, Peter @BdMdesigN
* http://www.bdmdesign.org/
*
* Project site:
* http://www.larentis.eu/switch/
* ============================================================
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
* ============================================================ */
.has-switch {
display: inline-block;
cursor: pointer;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 1px solid;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
position: relative;
text-align: left;
overflow: hidden;
line-height: 8px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
vertical-align: middle;
min-width: 100px;
}
.has-switch.switch-mini {
min-width: 72px;
}
.has-switch.switch-mini i.switch-mini-icons {
height: 1.20em;
line-height: 9px;
vertical-align: text-top;
text-align: center;
transform: scale(0.6);
margin-top: -1px;
margin-bottom: -1px;
}
.has-switch.switch-small {
min-width: 80px;
}
.has-switch.switch-large {
min-width: 120px;
}
.has-switch.deactivate {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default !important;
}
.has-switch.deactivate label,
.has-switch.deactivate span {
cursor: default !important;
}
.has-switch > div {
display: inline-block;
width: 150%;
position: relative;
top: 0;
}
.has-switch > div.switch-animate {
-webkit-transition: left 0.5s;
-moz-transition: left 0.5s;
-o-transition: left 0.5s;
transition: left 0.5s;
}
.has-switch > div.switch-off {
left: -50%;
}
.has-switch > div.switch-on {
left: 0%;
}
.has-switch input[type=radio],
.has-switch input[type=checkbox] {
display: none;
}
.has-switch span,
.has-switch label {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
cursor: pointer;
position: relative;
display: inline-block;
height: 100%;
padding-bottom: 4px;
padding-top: 4px;
font-size: 14px;
line-height: 20px;
}
.has-switch span.switch-mini,
.has-switch label.switch-mini {
padding-bottom: 4px;
padding-top: 4px;
font-size: 10px;
line-height: 9px;
}
.has-switch span.switch-small,
.has-switch label.switch-small {
padding-bottom: 3px;
padding-top: 3px;
font-size: 12px;
line-height: 18px;
}
.has-switch span.switch-large,
.has-switch label.switch-large {
padding-bottom: 9px;
padding-top: 9px;
font-size: 16px;
line-height: normal;
}
.has-switch label {
text-align: center;
margin-top: -1px;
margin-bottom: -1px;
z-index: 100;
width: 34%;
border-left: 1px solid #cccccc;
border-right: 1px solid #cccccc;
color: #333333;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch label:hover,
.has-switch label:focus,
.has-switch label:active,
.has-switch label.active,
.has-switch label.disabled,
.has-switch label[disabled] {
color: #333333;
background-color: #e6e6e6;
*background-color: #d9d9d9;
}
.has-switch label:active,
.has-switch label.active {
background-color: #cccccc \9;
}
.has-switch label i {
color: #000;
text-shadow: 0 1px 0 #fff;
line-height: 18px;
pointer-events: none;
}
.has-switch span {
text-align: center;
z-index: 1;
width: 33%;
}
.has-switch span.switch-left {
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.has-switch span.switch-right {
color: #333333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f0f0f0;
background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
border-color: #ffffff #ffffff #d9d9d9;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #ffffff;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-right:hover,
.has-switch span.switch-right:focus,
.has-switch span.switch-right:active,
.has-switch span.switch-right.active,
.has-switch span.switch-right.disabled,
.has-switch span.switch-right[disabled] {
color: #333333;
background-color: #ffffff;
*background-color: #f2f2f2;
}
.has-switch span.switch-right:active,
.has-switch span.switch-right.active {
background-color: #e6e6e6 \9;
}
.has-switch span.switch-primary,
.has-switch span.switch-left {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #005fcc;
background-image: -moz-linear-gradient(top, #0044cc, #0088cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc));
background-image: -webkit-linear-gradient(top, #0044cc, #0088cc);
background-image: -o-linear-gradient(top, #0044cc, #0088cc);
background-image: linear-gradient(to bottom, #0044cc, #0088cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
border-color: #0088cc #0088cc #005580;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #0088cc;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-primary:hover,
.has-switch span.switch-left:hover,
.has-switch span.switch-primary:focus,
.has-switch span.switch-left:focus,
.has-switch span.switch-primary:active,
.has-switch span.switch-left:active,
.has-switch span.switch-primary.active,
.has-switch span.switch-left.active,
.has-switch span.switch-primary.disabled,
.has-switch span.switch-left.disabled,
.has-switch span.switch-primary[disabled],
.has-switch span.switch-left[disabled] {
color: #ffffff;
background-color: #0088cc;
*background-color: #0077b3;
}
.has-switch span.switch-primary:active,
.has-switch span.switch-left:active,
.has-switch span.switch-primary.active,
.has-switch span.switch-left.active {
background-color: #006699 \9;
}
.has-switch span.switch-info {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #41a7c5;
background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
border-color: #5bc0de #5bc0de #28a1c5;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #5bc0de;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-info:hover,
.has-switch span.switch-info:focus,
.has-switch span.switch-info:active,
.has-switch span.switch-info.active,
.has-switch span.switch-info.disabled,
.has-switch span.switch-info[disabled] {
color: #ffffff;
background-color: #5bc0de;
*background-color: #46b8da;
}
.has-switch span.switch-info:active,
.has-switch span.switch-info.active {
background-color: #31b0d5 \9;
}
.has-switch span.switch-success {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #58b058;
background-image: -moz-linear-gradient(top, #51a351, #62c462);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
background-image: -webkit-linear-gradient(top, #51a351, #62c462);
background-image: -o-linear-gradient(top, #51a351, #62c462);
background-image: linear-gradient(to bottom, #51a351, #62c462);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
border-color: #62c462 #62c462 #3b9e3b;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #62c462;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-success:hover,
.has-switch span.switch-success:focus,
.has-switch span.switch-success:active,
.has-switch span.switch-success.active,
.has-switch span.switch-success.disabled,
.has-switch span.switch-success[disabled] {
color: #ffffff;
background-color: #62c462;
*background-color: #4fbd4f;
}
.has-switch span.switch-success:active,
.has-switch span.switch-success.active {
background-color: #42b142 \9;
}
.has-switch span.switch-warning {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #f9a123;
background-image: -moz-linear-gradient(top, #f89406, #fbb450);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
background-image: -o-linear-gradient(top, #f89406, #fbb450);
background-image: linear-gradient(to bottom, #f89406, #fbb450);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
border-color: #fbb450 #fbb450 #f89406;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #fbb450;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-warning:hover,
.has-switch span.switch-warning:focus,
.has-switch span.switch-warning:active,
.has-switch span.switch-warning.active,
.has-switch span.switch-warning.disabled,
.has-switch span.switch-warning[disabled] {
color: #ffffff;
background-color: #fbb450;
*background-color: #faa937;
}
.has-switch span.switch-warning:active,
.has-switch span.switch-warning.active {
background-color: #fa9f1e \9;
}
.has-switch span.switch-danger {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #d14641;
background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
border-color: #ee5f5b #ee5f5b #e51d18;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #ee5f5b;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-danger:hover,
.has-switch span.switch-danger:focus,
.has-switch span.switch-danger:active,
.has-switch span.switch-danger.active,
.has-switch span.switch-danger.disabled,
.has-switch span.switch-danger[disabled] {
color: #ffffff;
background-color: #ee5f5b;
*background-color: #ec4844;
}
.has-switch span.switch-danger:active,
.has-switch span.switch-danger.active {
background-color: #e9322d \9;
}
.has-switch span.switch-default {
color: #333333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f0f0f0;
background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
border-color: #ffffff #ffffff #d9d9d9;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #ffffff;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.has-switch span.switch-default:hover,
.has-switch span.switch-default:focus,
.has-switch span.switch-default:active,
.has-switch span.switch-default.active,
.has-switch span.switch-default.disabled,
.has-switch span.switch-default[disabled] {
color: #333333;
background-color: #ffffff;
*background-color: #f2f2f2;
}
.has-switch span.switch-default:active,
.has-switch span.switch-default.active {
background-color: #e6e6e6 \9;
}

View File

@@ -0,0 +1,382 @@
/*! ============================================================
* bootstrapSwitch v1.8 by Larentis Mattia @SpiritualGuru
* http://www.larentis.eu/
*
* Enhanced for radiobuttons by Stein, Peter @BdMdesigN
* http://www.bdmdesign.org/
*
* Project site:
* http://www.larentis.eu/switch/
* ============================================================
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
* ============================================================ */
!function ($) {
"use strict";
$.fn['bootstrapSwitch'] = function (method) {
var inputSelector = 'input[type!="hidden"]';
var methods = {
init: function () {
return this.each(function () {
var $element = $(this)
, $div
, $switchLeft
, $switchRight
, $label
, $form = $element.closest('form')
, myClasses = ""
, classes = $element.attr('class')
, color
, moving
, onLabel = "ON"
, offLabel = "OFF"
, icon = false
, textLabel = false;
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
if (classes.indexOf(el) >= 0)
myClasses = el;
});
$element.addClass('has-switch');
if ($element.data('on') !== undefined)
color = "switch-" + $element.data('on');
if ($element.data('on-label') !== undefined)
onLabel = $element.data('on-label');
if ($element.data('off-label') !== undefined)
offLabel = $element.data('off-label');
if ($element.data('label-icon') !== undefined)
icon = $element.data('label-icon');
if ($element.data('text-label') !== undefined)
textLabel = $element.data('text-label');
$switchLeft = $('<span>')
.addClass("switch-left")
.addClass(myClasses)
.addClass(color)
.html('' + onLabel + '');
color = '';
if ($element.data('off') !== undefined)
color = "switch-" + $element.data('off');
$switchRight = $('<span>')
.addClass("switch-right")
.addClass(myClasses)
.addClass(color)
.html('' + offLabel + '');
$label = $('<label>')
.html("&nbsp;")
.addClass(myClasses)
.attr('for', $element.find(inputSelector).attr('id'));
if (icon) {
$label.html('<i class="icon ' + icon + '"></i>');
}
if (textLabel) {
$label.html('' + textLabel + '');
}
$div = $element.find(inputSelector).wrap($('<div>')).parent().data('animated', false);
if ($element.data('animated') !== false)
$div.addClass('switch-animate').data('animated', true);
$div
.append($switchLeft)
.append($label)
.append($switchRight);
$element.find('>div').addClass(
$element.find(inputSelector).is(':checked') ? 'switch-on' : 'switch-off'
);
if ($element.find(inputSelector).is(':disabled'))
$(this).addClass('deactivate');
var changeStatus = function ($this) {
if ($element.parent('label').is('.label-change-switch')) {
} else {
$this.siblings('label').trigger('mousedown').trigger('mouseup').trigger('click');
}
};
$element.on('keydown', function (e) {
if (e.keyCode === 32) {
e.stopImmediatePropagation();
e.preventDefault();
changeStatus($(e.target).find('span:first'));
}
});
$switchLeft.on('click', function (e) {
changeStatus($(this));
});
$switchRight.on('click', function (e) {
changeStatus($(this));
});
$element.find(inputSelector).on('change', function (e, skipOnChange) {
var $this = $(this)
, $element = $this.parent()
, thisState = $this.is(':checked')
, state = $element.is('.switch-off');
e.preventDefault();
$element.css('left', '');
if (state === thisState) {
if (thisState)
$element.removeClass('switch-off').addClass('switch-on');
else $element.removeClass('switch-on').addClass('switch-off');
if ($element.data('animated') !== false)
$element.addClass("switch-animate");
if (typeof skipOnChange === 'boolean' && skipOnChange)
return;
$element.parent().trigger('switch-change', {'el': $this, 'value': thisState})
}
});
$element.find('label').on('mousedown touchstart', function (e) {
var $this = $(this);
moving = false;
e.preventDefault();
e.stopImmediatePropagation();
$this.closest('div').removeClass('switch-animate');
if ($this.closest('.has-switch').is('.deactivate')) {
$this.unbind('click');
} else if ($this.closest('.switch-on').parent().is('.radio-no-uncheck')) {
$this.unbind('click');
} else {
$this.on('mousemove touchmove', function (e) {
var $element = $(this).closest('.make-switch')
, relativeX = (e.pageX || e.originalEvent.targetTouches[0].pageX) - $element.offset().left
, percent = (relativeX / $element.width()) * 100
, left = 25
, right = 75;
moving = true;
if (percent < left)
percent = left;
else if (percent > right)
percent = right;
$element.find('>div').css('left', (percent - right) + "%")
});
$this.on('click touchend', function (e) {
var $this = $(this)
, $myInputBox = $this.siblings('input');
e.stopImmediatePropagation();
e.preventDefault();
$this.unbind('mouseleave');
if (moving)
$myInputBox.prop('checked', !(parseInt($this.parent().css('left')) < -25));
else
$myInputBox.prop("checked", !$myInputBox.is(":checked"));
moving = false;
$myInputBox.trigger('change');
});
$this.on('mouseleave', function (e) {
var $this = $(this)
, $myInputBox = $this.siblings('input');
e.preventDefault();
e.stopImmediatePropagation();
$this.unbind('mouseleave mousemove');
$this.trigger('mouseup');
$myInputBox.prop('checked', !(parseInt($this.parent().css('left')) < -25)).trigger('change');
});
$this.on('mouseup', function (e) {
e.stopImmediatePropagation();
e.preventDefault();
$(this).trigger('mouseleave');
});
}
});
if ($form.data('bootstrapSwitch') !== 'injected') {
$form.bind('reset', function () {
setTimeout(function () {
$form.find('.make-switch').each(function () {
var $input = $(this).find(inputSelector);
$input.prop('checked', $input.is(':checked')).trigger('change');
});
}, 1);
});
$form.data('bootstrapSwitch', 'injected');
}
}
);
},
toggleActivation: function () {
var $this = $(this);
$this.toggleClass('deactivate');
$this.find(inputSelector).prop('disabled', $this.is('.deactivate'));
},
isActive: function () {
return !$(this).hasClass('deactivate');
},
setActive: function (active) {
var $this = $(this);
if (active) {
$this.removeClass('deactivate');
$this.find(inputSelector).removeAttr('disabled');
}
else {
$this.addClass('deactivate');
$this.find(inputSelector).attr('disabled', 'disabled');
}
},
toggleState: function (skipOnChange) {
var $input = $(this).find(':checkbox');
$input.prop('checked', !$input.is(':checked')).trigger('change', skipOnChange);
},
toggleRadioState: function (skipOnChange) {
var $radioinput = $(this).find(':radio');
$radioinput.not(':checked').prop('checked', !$radioinput.is(':checked')).trigger('change', skipOnChange);
},
toggleRadioStateAllowUncheck: function (uncheck, skipOnChange) {
var $radioinput = $(this).find(':radio');
if (uncheck) {
$radioinput.not(':checked').trigger('change', skipOnChange);
}
else {
$radioinput.not(':checked').prop('checked', !$radioinput.is(':checked')).trigger('change', skipOnChange);
}
},
setState: function (value, skipOnChange) {
$(this).find(inputSelector).prop('checked', value).trigger('change', skipOnChange);
},
setOnLabel: function (value) {
var $switchLeft = $(this).find(".switch-left");
$switchLeft.html(value);
},
setOffLabel: function (value) {
var $switchRight = $(this).find(".switch-right");
$switchRight.html(value);
},
setOnClass: function (value) {
var $switchLeft = $(this).find(".switch-left");
var color = '';
if (value !== undefined) {
if ($(this).attr('data-on') !== undefined) {
color = "switch-" + $(this).attr('data-on')
}
$switchLeft.removeClass(color);
color = "switch-" + value;
$switchLeft.addClass(color);
}
},
setOffClass: function (value) {
var $switchRight = $(this).find(".switch-right");
var color = '';
if (value !== undefined) {
if ($(this).attr('data-off') !== undefined) {
color = "switch-" + $(this).attr('data-off')
}
$switchRight.removeClass(color);
color = "switch-" + value;
$switchRight.addClass(color);
}
},
setAnimated: function (value) {
var $element = $(this).find(inputSelector).parent();
if (value === undefined) value = false;
$element.data('animated', value);
$element.attr('data-animated', value);
if ($element.data('animated') !== false) {
$element.addClass("switch-animate");
} else {
$element.removeClass("switch-animate");
}
},
setSizeClass: function (value) {
var $element = $(this);
var $switchLeft = $element.find(".switch-left");
var $switchRight = $element.find(".switch-right");
var $label = $element.find("label");
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
if (el !== value) {
$switchLeft.removeClass(el);
$switchRight.removeClass(el);
$label.removeClass(el);
} else {
$switchLeft.addClass(el);
$switchRight.addClass(el);
$label.addClass(el);
}
});
},
status: function () {
return $(this).find(inputSelector).is(':checked');
},
destroy: function () {
var $element = $(this)
, $div = $element.find('div')
, $form = $element.closest('form')
, $inputbox;
$div.find(':not(input)').remove();
$inputbox = $div.children();
$inputbox.unwrap().unwrap();
$inputbox.unbind('change');
if ($form) {
$form.unbind('reset');
$form.removeData('bootstrapSwitch');
}
return $inputbox;
}
};
if (methods[method])
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
else if (typeof method === 'object' || !method)
return methods.init.apply(this, arguments);
else
$.error('Method ' + method + ' does not exist!');
};
}(jQuery);
(function ($) {
$(function () {
$('.make-switch')['bootstrapSwitch']();
});
})(jQuery);

View File

@@ -62,8 +62,8 @@
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
<br/><br/>
<h4>{{=T("%s selected", nrows)}}</h4>
{{if start>0:}}{{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)),_class="btn")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)),_class="btn")}}{{pass}}
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn")}}{{pass}}
{{if rows:}}
<div style="overflow: auto;" width="80%">
{{linkto = lambda f, t, r: URL('update', args=[request.args[0], r, f]) if f else "#"}}

View File

@@ -1,77 +0,0 @@
<style>
.acw-chap pre, .acw-chap pre span, span.acw-char-check, .acw-chap .selection-area div
{
font:11px 'Courier', monospaced;
line-height:11px;
margin:0;
padding:0;
border:0;
}
.acw-chap .wrapped-row
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-wrapped-row.gif');
background-repeat:no-repeat;
background-position:25px 4px;
}
.acw-chap .sidebar
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bg-sidebar.gif');
line-height:11px;
}
.acw-chap .sidebar .row-number
{
text-align:right;
font-size:9px;
font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
color:#999;
}
.acw-chap .folding-expand-inner
{
width:14px;
height:10px;
margin-left:2px;
display:inline;
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand-inner.gif');
}
.acw-chap .folding-expand
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand.gif');
}
.acw-chap .folding-start
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-start.gif');
}
.acw-chap .folding-stop
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-stop.gif');
}
.acw-chap .bookmark-default
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bookmark-default.gif');
}
.acw-chap .void
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/void.gif');
}
</style>
<script src="{{=URL(r=request,c='static',f='eamy/eamy.js')}}" type="text/javascript"></script>
<script src="{{=URL(r=request,c='static',f='js/jquery.hotkeys.js')}}" type="text/javascript" charset="utf-8"></script>
{{if request.args[1]=="views":}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_markup.js')}}" type="text/javascript"></script>
{{else:}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_python.js')}}" type="text/javascript"></script>
{{pass}}
<script language="Javascript" type="text/javascript" src="/{{=request.application}}/static/js/ajax_editor.js"></script>
<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
});
jQuery(document).bind('keydown', 'alt+f1',function (evt){
doClickSave();
});
</script>

View File

@@ -1,55 +1,41 @@
{{extend 'default.mobile/layout.html'}}
{{
def shortcut(combo, description):
return XML('<li><tt>%s</tt> %s</li>' % (combo, description))
}}
{{if TEXT_EDITOR == 'amy':}}
{{include 'default/amy_ajax.html'}}
<script>
var current_theme = "{{=editor_settings['theme']}}"; //Default theme
var current_editor = "{{=editor_settings['editor']}}"; //Default editor
{{if editor_settings['closetag'] == 'true':}}
var current_closetag = true; //Default closetag
{{else:}}
<script language="Javascript" type="text/javascript" src="{{=URL(r=request,c='static',f='edit_area/edit_area_full.js')}}"></script><script language="Javascript" type="text/javascript">
editAreaLoader.init({id: "body",start_highlight: true,allow_resize: "both",allow_toggle: {{=editarea_preferences['ALLOW_TOGGLE']}},language: "en",syntax: "{{=filetype}}",replace_tab_by_spaces: {{=editarea_preferences['REPLACE_TAB_BY_SPACES']}}, font_size: {{=editarea_preferences['FONT_SIZE']}}, fullscreen: {{=editarea_preferences['FULL_SCREEN']}}, display: "{{=editarea_preferences['DISPLAY']}}", show_line_colors: true, word_wrap: true, save_callback: "doClickSave" {{if filetype=='html':}},plugins: "zencoding"{{pass}} });
</script>
<script language="Javascript" type="text/javascript" src="{{=URL('static','js/ajax_editor.js')}}"></script>
<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
});
</script>
var current_closetag = false; //Default closetag
{{pass}}
{{block sectionclass}}edit {{filename}}{{end}}
{{if functions:}}
<p>
<span style="text-align:left;" id="exposed">
{{=B(T('exposes:'))}}{{=XML(', '.join([A(f,_href=URL(a=app,c=controller,f=f)).xml() for f in functions]))}}
</span>
{{if editviewlinks:}}<br/>
{{=B(T('edit views:'))}}
{{=XML(', '.join([v.xml() for v in editviewlinks]))}}
{{pass}}
</p>
{{pass}}
<div id="editor_area">
<form action="{{=URL('edit',args=filename)}}" method="post" name="editform" id="editform">
<a value="save" name="save" onclick="return doClickSave();">
{{=IMG(_src=URL('static', 'images/save_icon.png'), _alt=T('Save'))}}
</a>
{{=T('Saved file hash:')}}
<input type="input" name="file_hash" value="{{=file_hash}}" readonly="readonly"/>
{{=T('Last saved on:')}} <input type="input" name="saved_on" value="{{=saved_on}}" readonly="readonly"/>
{{if TEXT_EDITOR=='amy':}}
<textarea style="width: auto; height:400px;direction:ltr;" rows="58" cols="100" -amy-enabled="true" id="body" name="data">{{=data}}</textarea>
{{else:}}
<textarea cols="80" rows="25" id="body" style="direction:ltr;" name="data">{{=data}}</textarea>
{{pass}}
<button onclick="window.location.reload(); return false">{{=T('restore')}}</button>
<button type="submit" name="revert">{{=T('revert')}}</button>
<br/>
</form>
</div>
var current_font_incr = 0; // Default font-size, 0 means don't set
</script>
{{cm=URL('static%s' % (response.static_version and '/_' + response.static_version or ''),'codemirror')}}
<link rel="stylesheet" href="{{=cm}}/lib/codemirror.css">
<link rel="stylesheet" href="{{='%s/theme/%s.css' % (cm, editor_settings['theme'])}}">
<script src="{{=cm}}/lib/codemirror.js"></script>
<script src="{{=cm}}/addon/edit/matchbrackets.js"></script>
<script src="{{=cm}}/addon/edit/closetag.js"></script>
{{if editor_settings['editor'] != 'default':}}<script src="{{='%s/keymap/%s.js' % (cm, editor_settings['editor'])}}"></script>{{pass}}
<script src="{{=cm}}/mode/python/python.js"></script>
<script src="{{=cm}}/mode/xml/xml.js"></script>
<script src="{{=cm}}/mode/css/css.js"></script>
<script src="{{=cm}}/mode/javascript/javascript.js"></script>
<script src="{{=cm}}/mode/htmlmixed/htmlmixed.js"></script>
<script src="{{=cm}}/addon/hint/show-hint.js"></script>
<script src="{{=cm}}/addon/hint/python-hint.js"></script>
<link rel="stylesheet" href="{{=cm}}/addon/hint/show-hint.css">
<script src="{{=cm}}/addon/search/search.js"></script>
<script src="{{=cm}}/addon/search/searchcursor.js"></script>
<script src="{{=cm}}/addon/dialog/dialog.js"></script>
<script src="{{=cm}}/addon/edit/trailingspace.js"></script>
<link rel="stylesheet" href="{{=cm}}/addon/dialog/dialog.css">
<script src="{{=cm}}/addon/selection/active-line.js"></script>
<script src="{{=cm}}/addon/display/fullscreen.js"></script>
<link rel="stylesheet" href="{{=cm}}/addon/display/fullscreen.css">
<script src="{{=cm}}/emmet.min.js"></script>
<script src="{{=URL('static','js/ajax_editor.js')}}"></script>
<link rel="stylesheet" href="{{=URL('static/css','typeahead.js-bootstrap.css')}}">
<link rel="stylesheet" href="{{=URL('static/css','web2py-codemirror.css')}}">
<div id='edit_placeholder'><div id="{{=id}}" class="tab-pane active" >{{=XML(plain_html)}}</div></div>

View File

@@ -1,77 +0,0 @@
<style>
.acw-chap pre, .acw-chap pre span, span.acw-char-check, .acw-chap .selection-area div
{
font:11px 'Courier', monospaced;
line-height:11px;
margin:0;
padding:0;
border:0;
}
.acw-chap .wrapped-row
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-wrapped-row.gif');
background-repeat:no-repeat;
background-position:25px 4px;
}
.acw-chap .sidebar
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bg-sidebar.gif');
line-height:11px;
}
.acw-chap .sidebar .row-number
{
text-align:right;
font-size:9px;
font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
color:#999;
}
.acw-chap .folding-expand-inner
{
width:14px;
height:10px;
margin-left:2px;
display:inline;
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand-inner.gif');
}
.acw-chap .folding-expand
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand.gif');
}
.acw-chap .folding-start
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-start.gif');
}
.acw-chap .folding-stop
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-stop.gif');
}
.acw-chap .bookmark-default
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bookmark-default.gif');
}
.acw-chap .void
{
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/void.gif');
}
</style>
<script src="{{=URL(r=request,c='static',f='eamy/eamy.js')}}" type="text/javascript"></script>
<script src="{{=URL(r=request,c='static',f='js/jquery.hotkeys.js')}}" type="text/javascript" charset="utf-8"></script>
{{if request.args[1]=="views":}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_markup.js')}}" type="text/javascript"></script>
{{else:}}
<script src="{{=URL(r=request,c='static',f='eamy/bundle_python.js')}}" type="text/javascript"></script>
{{pass}}
<script language="Javascript" type="text/javascript" src="/{{=request.application}}/static/js/ajax_editor.js"></script>
<script language="Javascript" type="text/javascript">
jQuery(document).ready(function(){
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
});
jQuery(document).bind('keydown', 'alt+f1',function (evt){
doClickSave();
});
</script>

View File

@@ -443,7 +443,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
</h3>
<div id="plugins_inner" class="component_contents">
<div class="controls comptools">
{{=button(PLUGINS_APP, T('download plugins'))}}
{{=button(URL(c="default", f="plugins", args=[app,]), T('download plugins'))}}
</div>
{{if plugins:}}
<ul class="unstyled act_edit">

View File

@@ -6,7 +6,7 @@
def listfiles(app, dir, regexp='.*\.py$'):
files = sorted(
listdir(apath('%(app)s/%(dir)s/' % {'app':app, 'dir':dir}, r=request), regexp))
files = [x.replace('\\', '/') for x in files if not x.endswith('.bak')]
files = [x.replace(os.path.sep, '/') for x in files if not x.endswith('.bak')]
return files
def editfile(path,file,vars={}):
@@ -15,6 +15,8 @@
return A(file, _class='editor_filelink', _href=url, _style='word-wrap: nowrap;')
}}
{{cm=URL('static%s' % (response.static_version and '/_' + response.static_version or ''),'codemirror')}}
{{js_url=URL('static%s' % (response.static_version and '/_' + response.static_version or ''),'js')}}
{{css_url=URL('static%s' % (response.static_version and '/_' + response.static_version or ''),'css')}}
<link rel="stylesheet" href="{{=cm}}/lib/codemirror.css">
<link rel="stylesheet" href="{{='%s/theme/%s.css' % (cm, editor_settings['theme'])}}">
<script src="{{=cm}}/lib/codemirror.js"></script>
@@ -37,46 +39,49 @@
<script src="{{=cm}}/addon/selection/active-line.js"></script>
<script src="{{=cm}}/addon/display/fullscreen.js"></script>
<link rel="stylesheet" href="{{=cm}}/addon/display/fullscreen.css">
<script src="{{=cm}}/addon/fold/foldcode.js"></script>
<script src="{{=cm}}/addon/fold/foldgutter.js"></script>
<script src="{{=cm}}/addon/fold/brace-fold.js"></script>
<script src="{{=cm}}/addon/fold/xml-fold.js"></script>
<script src="{{=cm}}/addon/fold/comment-fold.js"></script>
<script src="{{=cm}}/addon/fold/indent-fold.js"></script>
<link rel="stylesheet" href="{{=cm}}/addon/fold/foldgutter.css">
<script src="{{=cm}}/emmet.min.js"></script>
<script src="{{=URL('static','js/ajax_editor.js')}}"></script>
<link rel="stylesheet" href="{{=URL('static/css','typeahead.js-bootstrap.css')}}">
<link rel="stylesheet" href="{{=URL('static/css','web2py-codemirror.css')}}">
<script src="{{=js_url}}/ajax_editor.js"></script>
<link rel="stylesheet" href="{{=css_url}}/typeahead.js-bootstrap.css">
<link rel="stylesheet" href="{{=css_url}}/web2py-codemirror.css">
<script type="text/javascript">
var current_theme = "{{=editor_settings['theme']}}"; //Default theme
var current_editor = "{{=editor_settings['editor']}}"; //Default editor
{{if editor_settings['closetag'] == 'true':}}
var current_closetag = true; //Default closetag
{{else:}}
var current_closetag = false; //Default closetag
{{pass}}
var current_font_incr = 0; // Default font-size, 0 means don't set
jQuery(document).on('shown click', 'a[data-toggle="tab"]', function (e) {
var tab_id = jQuery(this).attr('href');
var editor = jQuery(tab_id + " textarea").data('editor');
var current_font_incr = 0; // Default font-size, 0 means isn't set
$(document).on('shown click', 'a[data-toggle="tab"]', function (e) {
var tab_id = $(this).attr('href');
var editor = $(tab_id + " textarea").data('editor');
if (editor) {
editor.setSize(jQuery(tab_id).width(), jQuery(tab_id).height());
editor.setSize('100%', $(tab_id).height());
editor.refresh();
}
//jQuery(function(){jQuery('.CodeMirror-scroll').css("height","auto").css("overflow-x","auto");});
var n_li = $('#filesTab li').length;
$.each($('#filesTab li'), function(index, element) {
$(element).css('max-width', 100/n_li + '%' );
});
//$(function(){$('.CodeMirror-scroll').css("height","auto").css("overflow-x","auto");});
});
// Close the selected tab
jQuery(document).on('click', '#filesTab button[class="close"]', function (e) {
var tab_body = jQuery(jQuery(this).parent().attr("href")); // it should be a div
var tab_header = jQuery(this).parent().parent(); // it should be a li
var saved = jQuery(tab_body.find('textarea').data('editor')).data('saved');
$(document).on('click', '#filesTab button[class="close"]', function (e) {
var tab_body = $($(this).parent().attr("href")); // it should be a div
var tab_header = $(this).parent().parent(); // it should be a li
var saved = $(tab_body.find('textarea').data('editor')).data('saved');
var close = true;
if (saved === false) {
close = confirm("You are closing an unsaved file")
}
if (close) {
if (tab_header.hasClass('active') === true) { //Set active an other tab
var $prev = jQuery(tab_header).prev();
var $prev = $(tab_header).prev();
if ($prev.length) {
$prev.children('a[data-toggle="tab"]').tab('show'); // select previous tab
} else {
jQuery(tab_header).next().children('a[data-toggle="tab"]').tab('show'); // select next tab
$(tab_header).next().children('a[data-toggle="tab"]').tab('show'); // select next tab
}
}
tab_header.remove(); //remove li of tab
@@ -85,84 +90,82 @@ jQuery(document).on('click', '#filesTab button[class="close"]', function (e) {
});
// Revert current file
jQuery(document).on('click', '#revert', function (e) {
$(document).on('click', '#revert', function (e) {
e.preventDefault();
load_file(jQuery(this).attr("href"));
load_file($(this).attr("href"));
});
// Restore current file
jQuery(document).on('click', '#restore', function (e) {
$(document).on('click', '#restore', function (e) {
e.preventDefault();
load_file(jQuery(this).attr("href"));
load_file($(this).attr("href"));
});
// open the selected file
jQuery(document).on('click', 'a.editor_filelink, a#editor_settingslink', function (e) {
$(document).on('click', 'a.editor_filelink, a#editor_settingslink', function (e) {
e.preventDefault();
var url = jQuery(this).attr("href");
var url = $(this).attr("href");
load_file(url);
});
function update_editor(editor_theme, editor_name, editor_closetag) {
var href = "{{="%s/theme/" % cm}}" + editor_theme + ".css";
var link = jQuery("<link>");
/* This method updates all editors already instantiated with the selected preferences*/
function update_editor(preferences) {
var href = "{{="%s/theme/" % cm}}" + preferences.theme + ".css";
var link = $("<link>");
link.attr({
type: 'text/css',
rel: 'stylesheet',
href: href
});
jQuery("head").append( link );
if (editor_name !='default'){
var src = "{{='%s/keymap/' % cm}}" + editor_name + ".js";
$("head").append( link );
if ( preferences.editor != 'default'){
var src = "{{='%s/keymap/' % cm}}" + preferences.editor + ".js";
//var src = "/admin/static/codemirror/keymap/" + editor_name + ".js";
var script = jQuery("<script>");
var script = $("<script>");
script.attr({
src: src
});
jQuery("head").append( script );
$("head").append( script );
}
current_theme = editor_theme;
current_editor = editor_name;
switch (editor_closetag){
case 'true': current_closetag = true; break;
case 'false': current_closetag = false;
}
jQuery('textarea[name="data"]') .each(function(id, ta) {
editor = jQuery(ta).data('editor');
editor.setOption("theme", current_theme);
editor.setOption("keyMap", current_editor);
editor.setOption("autoCloseTags", current_closetag);
$('textarea[name="data"]') .each(function(id, ta) {
editor = $(ta).data('editor');
editor.setOption("theme", preferences.theme);
editor.setOption("keyMap", preferences.editor);
editor.setOption("autoCloseTags", (preferences.closetag === 'true'));
editor.setOption("foldGutter", (preferences.codefolding === 'true'));
editor.setOption("indentUnit", parseInt(preferences.tabwidth));
editor.setOption("tabSize", parseInt(preferences.tabwidth));
editor.setOption("indentWithTabs", (preferences.indentwithtabs === 'true'));
gutters = editor.getOption("gutters");
if ( preferences.linenumbers === 'true' && $.inArray('CodeMirror-linenumbers', gutters) === -1 ) {
gutters.splice(0, 0, 'CodeMirror-linenumbers');
editor.setOption("gutter", gutters);
}
editor.setOption("lineNumbers", (preferences.linenumbers === 'true'));
editor.setOption("styleActiveLine", (preferences.highlightline === 'true'));
});
}
// incr/decr editor font-size
jQuery(document).on('click', 'a.font_button', function (e) {
$(document).on('click', 'a.font_button', function (e) {
e.preventDefault();
var id = jQuery(this).attr('id');
var id = $(this).attr('id');
var new_font_incr;
switch (id) {
case 'incr': new_incr = 2; break;
case 'decr': new_incr = -2; break;
case 'default': new_incr = 0;
}
jQuery('textarea[name="data"]').each(function(id, ta) {
editor = jQuery(ta).data('editor');
$('textarea[name="data"]').each(function(id, ta) {
editor = $(ta).data('editor');
set_font(editor, new_incr);
});
current_font_incr = (new_incr !== 0) ? current_font_incr + new_incr : 0;
});
function winHeight() {
return window.innerHeight || (document.documentElement || document.body).clientHeight;
}
CodeMirror.on(window, "resize", function() {
var showing = document.body.getElementsByClassName("CodeMirror-fullscreen")[0];
if (!showing) return;
showing.CodeMirror.getWrappererElement().style.height = winHeight() + "px";
});
{{if len(request.args) > 1:}}
load_file('{{=URL(f='edit', args=request.args, vars=request.get_vars)}}');
{{pass}}
{{if len(request.args) > 1:}}
load_file('{{=URL(f='edit', args=request.args, vars=request.get_vars)}}');
{{pass}}
</script>
@@ -171,7 +174,7 @@ jQuery(document).on('click', 'a.font_button', function (e) {
<div class='row-fluid'>
<div class="right controls btn-toolbar pull-right">
<div class="btn-group">
<a class="button btn" onclick="jQuery('#files').toggle(); return false" href="#">Files toggle</a>
<a class="button btn" onclick="$('#files').toggle(); return false" href="#">Files toggle</a>
</div>
<div class="btn-group">
<a id="decr" class="button btn font_button">-</a>
@@ -195,10 +198,9 @@ jQuery(document).on('click', 'a.font_button', function (e) {
<ul class="nav nav-list" rel="pagebookmark" id="filelist">
<li><input type="text" placeholder="{{=T('Rapid Search')}}" class="input-block-level typeahead-tw search-query"></li>
{{dirs=[{'name':'models', 'reg':'.*\.py$'},
{'name':'controllers', 'reg':'.*\.py$'},
{'name':'views', 'reg':'[\w/\-]+(\.\w+)+$'},
{'name':'modules', 'reg':'.*\.py$'},
{'name':'private', 'reg': '[^\.#].*'}]}}
{'name':'controllers', 'reg':'.*\.py$'},
{'name':'views', 'reg':'[\w/\-]+(\.\w+)+$'},
{'name':'modules', 'reg':'.*\.py$'}, ]}}
{{auto_complete_list=[]}}
{{for dir in dirs:}}
<li class="nav-header component" onclick="collapse('{{="%s_files" % dir['name']}}');">{{=dir['name']}}</li>
@@ -227,26 +229,26 @@ jQuery(document).on('click', 'a.font_button', function (e) {
</div>
</div>
<script>
jQuery(document).ready(function() {
var filesMenu = jQuery('#files');
$(document).ready(function() {
var filesMenu = $('#files');
var ow = filesMenu.outerWidth();
filesMenu.width(ow);
setTimeout( function(){jQuery('#files').css('left', '-'+ow+'px');}, 1000);
$('#files').css('left', '-'+ow+'px');
});
</script>
<!-- Typeahead scripts here so the page load faster -->
<script src="{{=URL('static%s' % (response.static_version and '/_' + response.static_version or ''), 'js/typeahead.min.js')}}"></script>
<script src="{{=URL('static%s' % (response.static_version and '/_' + response.static_version or ''), 'js/hogan-2.0.0.js')}}"></script>
<script>
jQuery('.typeahead-tw').typeahead({
$('.typeahead-tw').typeahead({
name: 'files',
local:{{from gluon.serializers import json}}{{=XML(json(auto_complete_list))}},
template: template_js,
engine: Hogan,
});
jQuery(document).on("typeahead:selected", '.typeahead', function(e, datum) {
$(document).on("typeahead:selected", '.typeahead', function(e, datum) {
load_file(datum.link);
jQuery(this).val('');
$(this).val('');
});
</script>
<!-- end "edit" block -->

View File

@@ -47,22 +47,26 @@
{{else:}}
mode: { name: '{{=filetype}}'{{if filetype=='python':}},version: 2,singleLineStringErrors: false, {{pass}} },
{{pass}}
lineNumbers: true,
indentUnit: 4,
styleActiveLine: true,
autoCloseTags: current_closetag,
theme: current_theme,
tabMode: "shift",
lineNumbers: {{=editor_settings['linenumbers']}},
indentUnit: {{=editor_settings['tabwidth']}},
indentWithTabs: {{=editor_settings['indentwithtabs']}},
tabSize: {{=editor_settings['tabwidth']}},
styleActiveLine: {{=editor_settings['highlightline']}},
autoCloseTags: {{=editor_settings['closetag']}},
theme: "{{=editor_settings['theme']}}",
lineWrapping: true,
gutters: ["CodeMirror-linenumbers", "breakpoints"],
keyMap: current_editor,
foldGutter: {{=editor_settings['codefolding']}},
gutters: ["CodeMirror-linenumbers", "breakpoints", "CodeMirror-foldgutter"],
keyMap: "{{=editor_settings['editor']}}",
matchBrackets: true,
autofocus: false,
height: "350px",
showTrailingSpace: true
});
editor.foldCode(CodeMirror.Pos(8, 0));
editor.on("gutterClick", function(cm, n) {
editor.on("gutterClick", function(cm, n, gutter) {
if (gutter !== "breakpoints" ) return;
var info = cm.lineInfo(n);
cm.setGutterMarker(n, "breakpoints", info.gutterMarkers ? null : makeMarker());
sel = {start: n, end: n, data: ''};
@@ -78,7 +82,7 @@
return marker;
}
{{if filetype in ('html', 'js', 'css'):}}
{{if filetype in ('html', 'javascript', 'css'):}}
// must be here or break emmet/zencoding
CodeMirror.defaults.extraKeys["Ctrl-S"] =
function(instance) {
@@ -137,7 +141,7 @@
<div class="row-fluid">
<div class="help alert alert-block alert-info">
{{if TEXT_EDITOR == 'codemirror' and filetype=='html':}}
{{if filetype=='html':}}
<h3>{{=T('Key bindings for ZenCoding Plugin')}}</h3>
<ul class="keybindings unstyled">
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
@@ -150,15 +154,15 @@
{{=shortcut('Shift-Ctrl-R / Shift-Cmd-Option-F', T('Replace All'))}}
{{=shortcut('Tab', T('Expand Abbreviation'))}}
</ul>
{{elif TEXT_EDITOR == 'codemirror':}}
{{else:}}
<h3>{{=T("Key bindings")}}</h3>
<ul class="keybindings unstyled">
{{=shortcut('Ctrl+S', T('Save via Ajax'))}}
{{=shortcut('Ctrl+F11', T('Toggle Fullscreen'))}}
{{=shortcut('Shift+Esc', T('Exit Fullscreen'))}}
{{if filetype=='python':}}
{{=shortcut('Ctrl-Space', T('Autocomplete Python Code'))}}
{{pass}}
{{=shortcut('Ctrl-Space', T('Autocomplete Python Code'))}}
{{pass}}
{{=shortcut('Ctrl-F / Cmd-F', T('Start searching'))}}
{{=shortcut('Ctrl-G / Cmd-G', T('Find Next'))}}
{{=shortcut('Shift-Ctrl-G / Shift-Cmd-G', T('Find Previous'))}}

View File

@@ -7,24 +7,47 @@
}}
{{themes = [f[:-4] for f in listfiles('admin', "static/codemirror/theme", regexp='.*\.css$' )]}}
{{editors = ['default', 'vim', 'emacs']}}
{{closetag = ['true', 'false']}}
<form id="editor_settings_form" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="selectTheme">{{=T('Theme')}}</label>
<div class="controls">{{=SELECT(themes, value=editor_settings['theme'], _name="theme" )}}</div>
<label class="control-label" for="selectEditor">{{=T('Editor')}}</label>
<div class="controls">{{=SELECT(editors, value=editor_settings['editor'], _name="editor" )}}</div>
<label class="control-label" for="closeTag">{{=T('Enable Close-Tag')}}</label>
<div class="controls">{{=SELECT(closetag, value=editor_settings['closetag'], _name="closetag" )}}</div>
</div>
<div class="control-group">
<div class="controls"><button type="submit" class="disabled btn btn-primary">{{=T('Save')}}</button></div>
</div>
<form id="editor_settings_form" class="form-horizontal" action="">
<div class="control-group">
<label class="control-label" for="selectTheme">{{=T('Theme')}}</label>
<div class="controls">{{=SELECT(themes, value=editor_settings['theme'], _name="theme" )}}</div>
</div>
<div class="control-group">
<label class="control-label" for="selectEditor">{{=T('Editor')}}</label>
<div class="controls">{{=SELECT(editors, value=editor_settings['editor'], _name="editor" )}}</div>
</div>
<div class="control-group">
<label class="control-label" for="closeTag">{{=T('Enable Close-Tag')}}</label>
<div class="controls">{{=stateWidget("closetag", value=editor_settings['closetag'])}}</div>
</div>
<div class="control-group">
<label class="control-label" for="codefolding">{{=T('Enable Code Folding')}}</label>
<div class="controls">{{=stateWidget("codefolding", value=editor_settings['codefolding'])}}</div>
</div>
<div class="control-group">
<label class="control-label" for="tabwidth">{{=T('Tab width (# characters)')}}</label>
<div class="controls">{{=SELECT(range(1,9, 1), value=editor_settings['tabwidth'], _name="tabwidth" )}}</div>
</div>
<div class="control-group">
<label class="control-label" for="indentwithtabs">{{=T('Indent with tabs')}}</label>
<div class="controls">{{=stateWidget("indentwithtabs", value=editor_settings['indentwithtabs'])}}</div>
</div>
<div class="control-group">
<label class="control-label" for="linenumbers">{{=T('Display line numbers')}}</label>
<div class="controls">{{=stateWidget("linenumbers", value=editor_settings['linenumbers'])}}</div>
</div>
<div class="control-group">
<label class="control-label" for="highlightline">{{=T('Highlight current line')}}</label>
<div class="controls">{{=stateWidget("highlightline", value=editor_settings['highlightline'])}}</div>
</div>
<div class="control-group">
<div class="controls"><button type="submit" class="disabled btn btn-primary">{{=T('Save')}}</button></div>
</div>
</form>
<script>
web2py_trap_form("{{=URL('default', 'edit', args=request.args, vars={'settings':True})}}", "editor_settings");
jQuery("#editor_settings_form").on('change', 'select, input', function (e) {
jQuery("#editor_settings_form button[type=submit]").removeClass('disabled');
$.web2py.trap_form("{{=URL('default', 'edit', args=request.args, vars={'settings':True})}}", "editor_settings");
$("#editor_settings_form").on('change', 'select, input', function (e) {
$("#editor_settings_form button[type=submit]").removeClass('disabled');
});
</script>

View File

@@ -15,11 +15,11 @@ pass}}
<p class="controls row-fluid">
<div class="controls controls-row">
{{if 'db' in method:}}
<span class="uneditable-input">source : db</span>
<span class="uneditable-input">{{=T('source : db')}}</span>
<a class="button btn" href="{{=URL(args=[app, 'new'])}}"><span>{{=T('switch to : filesystem')}}</span></a>
<a class="button btn" href="{{=URL(args=[app, 'dbold'])}}"><span>{{=T('lists by ticket')}}</span></a>
{{else:}}
<span class="uneditable-input">source : filesystem</span>
<span class="uneditable-input">{{=T('source : filesystem')}}</span>
{{=switchbutton}}
<a class="button btn" href="{{=URL(args=[app, 'old'])}}"><span>{{=T('lists by ticket')}}</span></a>
{{pass}}
@@ -66,11 +66,11 @@ pass}}
<p class="controls row-fluid">
<div class="controls controls-row">
{{if 'db' in method:}}
<span class="uneditable-input">source : db</span>
<span class="uneditable-input">{{=T('source : db')}}</span>
<a class="button btn" href="{{=URL(args=[app, 'old'])}}"><span>{{=T('switch to : filesystem')}}</span></a>
<a class="button btn" href="{{=URL(args=[app, 'dbnew'])}}"><span>{{=T('lists by exception')}}</span></a>
{{else:}}
<span class="uneditable-input">source : filesystem</span>
<span class="uneditable-input">{{=T('source : filesystem')}}</span>
{{=switchbutton}}
<a class="button btn" href="{{=URL(args=[app, 'new'])}}"><span>{{=T('lists by exception')}}</span></a>
{{pass}}

View File

@@ -0,0 +1,9 @@
{{extend 'layout.html'}}
{{if True:}}
{{=P(T("Installation of %(plugin)s for %(app)s") % dict(plugin=plugin, app=app))}}
{{=H3(T("Are you sure?"))}}
{{form.custom.submit["_value"] = T("Yes")}}
{{=form}}
{{pass}}
{{=A(T("Back to the plugins list"), _href=URL(f="plugins", args=[app,]))}}
{{=P("Note: this is an experimental feature; If you find problems using the automatic plugin installation, try uploading the installer directly from ", A(T("here"), _href=source))}}

View File

@@ -0,0 +1,5 @@
{{extend 'layout.html'}}
{{=H3("Available plugins")}}
{{=P("Source: web2pyslices")}}
{{=plugins}}

View File

@@ -153,5 +153,5 @@
</div><!-- /TWITTER TIMELINE -->
</div>
</div> <!-- /sidebar -->
</div> <!-- /row-fluid
</div> <!-- /row-fluid -->
<!-- end "site" block -->

View File

@@ -12,7 +12,6 @@
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
}}
{{include 'web2py_ajax.html'}}
<script>jQuery.noConflict();</script>
</head>
<body class="{{=T('direction: ltr') == 'direction: rtl' and 'RTLbody' or ''}} {{block sectionclass}}home{{end}}">

View File

@@ -51,7 +51,7 @@
MIT (same as jQuery Mobile)
<h3>Instructions</h3>
<ul>
<li><a href="http://web2py.com/plugins/static/web2py.plugin.jqmobile.w2p">Download</a>
<li><a href="/admin/default/pack_plugin/admin/jqmobile">Download</a>
and install the plugin in a web2py app.</li>
<li>Replace extend <tt>"layout.html"</tt> with extend <tt>"plugin_jqmobile/layout.html"</tt> in all your views.</li>
<li>Only link pages that extend this layout.</li>

View File

@@ -186,6 +186,10 @@ def select():
import re
db = get_database(request)
dbname = request.args[0]
try:
is_imap = db._uri.startswith("imap://")
except (KeyError, AttributeError, TypeError):
is_imap = False
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
if len(request.args) > 1 and hasattr(db[request.args[1]], '_primarykey'):
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
@@ -203,7 +207,15 @@ def select():
else:
start = 0
nrows = 0
stop = start + 100
step = 100
fields = []
if is_imap:
step = 3
stop = start + step
table = None
rows = []
orderby = request.vars.orderby
@@ -235,21 +247,27 @@ def select():
if match:
table = match.group('table')
try:
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if form.vars.update_check and form.vars.update_fields:
db(query).update(**eval_in_global_env('dict(%s)'
% form.vars.update_fields))
db(query, ignore_common_filters=True).update(
**eval_in_global_env('dict(%s)' % form.vars.update_fields))
response.flash = T('%s %%{row} updated', nrows)
elif form.vars.delete_check:
db(query).delete()
db(query, ignore_common_filters=True).delete()
response.flash = T('%s %%{row} deleted', nrows)
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if is_imap:
fields = [db[table][name] for name in
("id", "uid", "created", "to",
"sender", "subject")]
if orderby:
rows = db(query, ignore_common_filters=True).select(limitby=(
start, stop), orderby=eval_in_global_env(orderby))
rows = db(query, ignore_common_filters=True).select(
*fields, limitby=(start, stop),
orderby=eval_in_global_env(orderby))
else:
rows = db(query, ignore_common_filters=True).select(
limitby=(start, stop))
*fields, limitby=(start, stop))
except Exception, e:
import traceback
tb = traceback.format_exc()
@@ -278,11 +296,12 @@ def select():
table=table,
start=start,
stop=stop,
step=step,
nrows=nrows,
rows=rows,
query=request.vars.query,
formcsv=formcsv,
tb=tb,
tb=tb
)

File diff suppressed because one or more lines are too long

8
applications/examples/static/css/bootstrap.min.css vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

4
applications/examples/static/js/bootstrap.min.js vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

View File

@@ -167,10 +167,12 @@
else t.fadeOut();
});
doc.on('keyup', 'input.integer', function () {
this.value = this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g, '').reverse();
var nvalue = this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g, '').reverse();
if(this.value!=nvalue) this.value = nvalue;
});
doc.on('keyup', 'input.double, input.decimal', function () {
this.value = this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g, '').reverse();
var nvalue = this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g, '').reverse();
if(this.value!=nvalue) this.value = nvalue;
});
var confirm_message = (typeof w2p_ajax_confirm_message != 'undefined') ? w2p_ajax_confirm_message : "Are you sure you want to delete this object?";
doc.on('click', "input[type='checkbox'].delete", function () {
@@ -248,22 +250,33 @@
});
},
trap_form: function (action, target) {
/* traps any LOADed form */
$('#' + target + ' form').each(function (i) {
var form = $(this);
form.attr('data-w2p_target', target);
if(!form.hasClass('no_trap')) {
/* should be there by default */
form.submit(function (e) {
web2py.disableElement(form.find(web2py.formInputClickSelector));
web2py.hide_flash();
web2py.ajax_page('post', action, form.serialize(), target, form);
e.preventDefault();
});
if (form.hasClass('no_trap')) {
return;
}
form.attr('data-w2p_target', target);
var url = form.attr('action');
if ((url === "") || (url === "#")) {
/* form has no action. Use component url. */
url = action;
}
form.submit(function (e) {
web2py.disableElement(form.find(web2py.formInputClickSelector));
web2py.hide_flash();
web2py.ajax_page('post', url, form.serialize(), target, form);
e.preventDefault();
});
});
},
ajax_page: function (method, action, data, target, element) {
/* element is a new parameter, but should be put be put in front */
if(element == undefined) element = $(document);
@@ -295,7 +308,7 @@
},
'complete': function (xhr, status) {
web2py.fire(element, 'ajax:complete', [xhr, status], target);
web2py.updatePage(xhr, target); /* Parse and load the html received */
web2py.updatePage(xhr, target); /* Parse and load the html received */
web2py.trap_form(action, target);
web2py.ajax_init('#' + target);
web2py.after_ajax(xhr);
@@ -445,8 +458,8 @@
} else return false; /* not supported */
},
/* new from here */
/* Form input elements bound by jquery-uj */
formInputClickSelector: 'input[type=submit], input[type=image], button[type=submit], button:not([type])',
/* Form input elements bound by web2py.js */
formInputClickSelector: 'input[type=submit]:not([name]), input[type=image]:not([name]), button[type=submit]:not([name]), button:not([type]):not([name])',
/* Form input elements disabled during form submission */
disableSelector: 'input, button, textarea, select',
/* Form input elements re-enabled after form submission */
@@ -513,7 +526,7 @@
if(flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
},
hide_flash: function () {
$('.flash').hide().html('');
$('.flash').fadeOut(0).html('');
},
show_if_handler: function (target) {
var triggers = {};

View File

@@ -62,8 +62,8 @@
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
<br/><br/>
<h4>{{=T("%s selected", nrows)}}</h4>
{{if start>0:}}{{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)),_class="btn")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)),_class="btn")}}{{pass}}
{{if start>0:}}{{=A(T('previous %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start-step)),_class="btn")}}{{pass}}
{{if stop<nrows:}}{{=A(T('next %s rows') % step,_href=URL('select',args=request.args[0],vars=dict(start=start+step)),_class="btn")}}{{pass}}
{{if rows:}}
<div style="overflow: auto;" width="80%">
{{linkto = lambda f, t, r: URL('update', args=[request.args[0], r, f]) if f else "#"}}

View File

@@ -42,7 +42,7 @@ random.shuffle(quotes)
<div class="span4" style="text-align:center">
<a href="http://www.infoworld.com/slideshow/24605/infoworlds-2012-technology-of-the-year-award-winners-183313#slide23"><img src="{{=URL('static','images/infoworld2012.jpeg')}}" width="200px"/></a><br/>
<a class="btn btn-danger" href="{{=URL('download')}}" style="margin-top:10px; width:180px; color:white">Download Now</a><br/>
<a class="btn btn-danger" href="http://web2py.com/demo_admin" style="margin-top:10px; width:180px; color:white">Online Demo</a><br/>
<a class="btn btn-danger" href="https://www.pythonanywhere.com/try-web2py" style="margin-top:10px; width:180px; color:white">Try it now online</a><br/>
<a class="btn btn-danger" href="http://web2py.com/poweredby" style="margin-top:10px; width:180px; color:white">Sites Powered by web2py</a>
</div>
</div>

View File

@@ -186,6 +186,10 @@ def select():
import re
db = get_database(request)
dbname = request.args[0]
try:
is_imap = db._uri.startswith("imap://")
except (KeyError, AttributeError, TypeError):
is_imap = False
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
if len(request.args) > 1 and hasattr(db[request.args[1]], '_primarykey'):
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
@@ -203,7 +207,15 @@ def select():
else:
start = 0
nrows = 0
stop = start + 100
step = 100
fields = []
if is_imap:
step = 3
stop = start + step
table = None
rows = []
orderby = request.vars.orderby
@@ -235,21 +247,27 @@ def select():
if match:
table = match.group('table')
try:
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if form.vars.update_check and form.vars.update_fields:
db(query).update(**eval_in_global_env('dict(%s)'
% form.vars.update_fields))
db(query, ignore_common_filters=True).update(
**eval_in_global_env('dict(%s)' % form.vars.update_fields))
response.flash = T('%s %%{row} updated', nrows)
elif form.vars.delete_check:
db(query).delete()
db(query, ignore_common_filters=True).delete()
response.flash = T('%s %%{row} deleted', nrows)
nrows = db(query).count()
nrows = db(query, ignore_common_filters=True).count()
if is_imap:
fields = [db[table][name] for name in
("id", "uid", "created", "to",
"sender", "subject")]
if orderby:
rows = db(query, ignore_common_filters=True).select(limitby=(
start, stop), orderby=eval_in_global_env(orderby))
rows = db(query, ignore_common_filters=True).select(
*fields, limitby=(start, stop),
orderby=eval_in_global_env(orderby))
else:
rows = db(query, ignore_common_filters=True).select(
limitby=(start, stop))
*fields, limitby=(start, stop))
except Exception, e:
import traceback
tb = traceback.format_exc()
@@ -278,11 +296,12 @@ def select():
table=table,
start=start,
stop=stop,
step=step,
nrows=nrows,
rows=rows,
query=request.vars.query,
formcsv=formcsv,
tb=tb,
tb=tb
)

View File

@@ -1,37 +1,41 @@
# coding: utf8
# coding: utf-8
{
'!langcode!': 'es',
'!langname!': 'Español',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%s %%{row} deleted': '%s filas eliminadas',
'%s %%{row} updated': '%s filas actualizadas',
'%s selected': '%s seleccionado(s)',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s %%{row} deleted': '%s %%{fila} %%{eliminada}',
'%s %%{row} updated': '%s %%{fila} %%{actualizada}',
'%s selected': '%s %%{seleccionado}',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'(something like "it-it")': '(algo como "eso-eso")',
'@markmin\x01An error occured, please [[reload %s]] the page': 'Ha ocurrido un error, por favor [[recargar %s]] la página',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'about': 'acerca de',
'About': 'Acerca de',
'about': 'acerca de',
'About application': 'Acerca de la aplicación',
'Access Control': 'Control de Acceso',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because no admin password': 'admin deshabilitado por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrative Interface': 'Interfaz Administrativa',
'Administrative interface': 'Interfaz administrativa',
'Administrative Interface': 'Interfaz Administrativa',
'Administrator Password:': 'Contraseña del Administrador:',
'Ajax Recipes': 'Recetas AJAX',
'An error occured, please %s the page': 'Ha ocurrido un error, por favor %s la página',
'and rename it (required):': 'y renómbrela (requerido):',
'and rename it:': ' y renómbrelo:',
'Aplicar cambios': 'Aplicar cambios',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'Apply changes': 'Aplicar cambios',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to delete this object?': '¿Está seguro que desea borrar este objeto?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
@@ -42,22 +46,25 @@
'Authentication': 'Autenticación',
'Available Databases and Tables': 'Bases de datos y tablas disponibles',
'Buy this book': 'Compra este libro',
'cache': 'cache',
'Cache': 'Cache',
'Cache Keys': 'Llaves de la Cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'Cache': 'Caché',
'cache': 'caché',
'Cache Keys': 'Llaves de la Caché',
'cache, errors and sessions cleaned': 'caché, errores y sesiones eliminados',
'Cambie la contraseña': 'Cambie la contraseña',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'Change Password': 'Cambie la contraseña',
'Change Password': 'Cambie la Contraseña',
'Change password': 'Cambie la contraseña',
'change password': 'cambie la contraseña',
'check all': 'marcar todos',
'Check to delete': 'Marque para eliminar',
'clean': 'limpiar',
'Clear CACHE?': '¿Limpiar CACHE?',
'Clear CACHE?': '¿Limpiar CACHÉ?',
'Clear DISK': 'Limpiar DISCO',
'Clear RAM': 'Limpiar RAM',
'Click on the link %(link)s to reset your password': 'Pulse en el enlace %(link)s para reiniciar su contraseña',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'Client IP': 'IP del Cliente',
'Community': 'Comunidad',
@@ -68,57 +75,64 @@
'Controllers': 'Controladores',
'controllers': 'controladores',
'Copyright': 'Copyright',
'Correo electrónico inválido': 'Correo electrónico inválido',
'create file with filename:': 'cree archivo con nombre:',
'Create new application': 'Cree una nueva aplicación',
'create new application:': 'nombre de la nueva aplicación:',
'Created By': 'Creado Por',
'Created On': 'Creado En',
'crontab': 'crontab',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'customize me!': '¡Adáptame!',
'data uploaded': 'datos subidos',
'Database': 'base de datos',
'Database': 'Base de datos',
'Database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'Date and Time': 'Fecha y Hora',
'db': 'db',
'DB Model': 'Modelo "DB"',
'db': 'bdd',
'DB Model': 'Modelo BDD',
'defines tables': 'define tablas',
'Delete': 'Eliminar',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'Delete:': 'Eliminar:',
'Demo': 'Demo',
'Demo': 'Demostración',
'Deploy on Google App Engine': 'Despliegue en Google App Engine',
'Deployment Recipes': 'Recetas de despliegue',
'Description': 'Descripción',
'design': 'diseño',
'DESIGN': 'DISEÑO',
'design': 'modificar',
'Design for': 'Diseño por',
'DISK': 'DISK',
'Disk Cache Keys': 'Llaves de Cache en Disco',
'DISK': 'DISCO',
'Disk Cache Keys': 'Llaves de Caché en Disco',
'Disk Cleared': 'Disco limpiado',
'Documentation': 'Documentación',
"Don't know what to do?": '¿No sabe que hacer?',
'done!': '¡listo!',
'Download': 'Download',
'done!': '¡hecho!',
'Download': 'Descargas',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'edit': 'editar',
'EDIT': 'EDITAR',
'Edit': 'Editar',
'Edit application': 'Editar aplicación',
'edit controller': 'editar controlador',
'Edit current record': 'Edite el registro actual',
'edit profile': 'editar perfil',
'Edit Profile': 'Editar Perfil',
'edit profile': 'editar perfil',
'Edit This App': 'Edite esta App',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Email and SMS': 'Correo electrónico y SMS',
'Email sent': 'Correo electrónico enviado',
'enter a number between %(min)g and %(max)g': 'introduzca un número entre %(min)g y %(max)g',
'enter an integer between %(min)g and %(max)g': 'introduzca un entero entre %(min)g y %(max)g',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'Errors': 'Errores',
'errors': 'errores',
'Errors': 'Errores',
'Errors in form, please check it out.': 'Hay errores en el formulario, por favor comprúebelo.',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
@@ -134,32 +148,41 @@
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'First name': 'Nombre',
'Forgot username?': '¿Olvidó el nombre de usuario?',
'Forms and Validators': 'Formularios y validadores',
'Free Applications': 'Aplicaciones Libres',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group %(group_id)s created': 'Grupo %(group_id)s creado',
'Group ID': 'ID de Grupo',
'Group uniquely assigned to user %(id)s': 'Grupo asignado únicamente al usuario %(id)s',
'Groups': 'Grupos',
'Hello World': 'Hola Mundo',
'help': 'ayuda',
'Home': 'Home',
'Home': 'Inicio',
'How did you get here?': '¿Cómo llegaste aquí?',
'htmledit': 'htmledit',
'Impersonate': 'Suplantar',
'import': 'importar',
'Import/Export': 'Importar/Exportar',
'includes': 'incluye',
'Index': 'Índice',
'Inicio de sesión': 'Inicio de sesión',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'Installed applications': 'Aplicaciones instaladas',
'Insufficient privileges': 'Privilegios insuficientes',
'internal error': 'error interno',
'Internal State': 'Estado Interno',
'Introduction': 'Introducción',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo electrónico inválido',
'Invalid login': 'Inicio de sesión inválido',
'invalid password': 'contraseña inválida',
'Invalid Query': 'Consulta inválida',
'invalid request': 'solicitud inválida',
'Invalid reset password': 'Reinicio de contraseña inválido',
'invalid ticket': 'tiquete inválido',
'Is Active': 'Está Activo',
'Key': 'Llave',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
@@ -174,63 +197,90 @@
'License for': 'Licencia para',
'Live Chat': 'Chat en vivo',
'loading...': 'cargando...',
'login': 'inicio de sesión',
'Logged in': 'Sesión iniciada',
'Logged out': 'Sesión finalizada',
'Login': 'Inicio de sesión',
'login': 'inicio de sesión',
'Login disabled by administrator': 'Inicio de sesión deshabilitado por el administrador',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'logout': 'fin de sesión',
'Logout': 'Fin de sesión',
'Los campos de contraseña no coinciden': 'Los campos de contraseña no coinciden',
'Lost Password': 'Contraseña perdida',
'lost password?': '¿Olvido la contraseña?',
'Lost password?': '¿Olvidó la contraseña?',
'lost password?': '¿olvidó la contraseña?',
'Main Menu': 'Menú principal',
'Manage Cache': 'Manejar la Cache',
'Manage Cache': 'Gestionar la Caché',
'Menu Model': 'Modelo "menu"',
'merge': 'combinar',
'models': 'modelos',
'Models': 'Modelos',
'models': 'modelos',
'Modified By': 'Modificado Por',
'Modified On': 'Modificado En',
'Modules': 'Módulos',
'modules': 'módulos',
'must be YYYY-MM-DD HH:MM:SS!': '¡debe ser DD/MM/YYYY HH:MM:SS!',
'must be YYYY-MM-DD!': '¡debe ser DD/MM/YYYY!',
'My Sites': 'Mis Sitios',
'Name': 'Nombre',
'new application "%s" created': 'nueva aplicación "%s" creada',
'New password': 'Contraseña nueva',
'New Record': 'Registro nuevo',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'NO': 'NO',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Not authorized': 'No autorizado',
'Object or table name': 'Nombre del objeto o tabla',
'Old password': 'Contraseña vieja',
'Online examples': 'Ejemplos en línea',
'or import from csv file': 'o importar desde archivo CSV',
'or provide application url:': 'o provea URL de la aplicación:',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'Other Plugins': 'Otros Plugins',
'Other Recipes': 'Otas Recetas',
'Other Recipes': 'Otras Recetas',
'Overview': 'Resumen',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'Password': 'Contraseña',
'Password changed': 'Contraseña cambiada',
"Password fields don't match": 'Los campos de contraseña no coinciden',
'Password reset': 'Reinicio de contraseña',
'Peeking at file': 'Visualizando archivo',
'Phone': 'Teléfono',
'please input your password again': 'por favor introduzca su contraseña otra vez',
'Plugins': 'Plugins',
'Powered by': 'Este sitio usa',
'Preface': 'Preface',
'Preface': 'Prefacio',
'previous 100 rows': '100 filas anteriores',
'Profile': 'Perfil',
'Profile updated': 'Perfil actualizado',
'Python': 'Python',
'Query:': 'Consulta:',
'Quick Examples': 'Ejemplos Rápidos',
'RAM': 'RAM',
'RAM Cache Keys': 'Llaves de la RAM Cache',
'RAM Cache Keys': 'Llaves de la Caché en RAM',
'Ram Cleared': 'Ram Limpiada',
'Recipes': 'Recetas',
'Record': 'registro',
'Record': 'Registro',
'record does not exist': 'el registro no existe',
'Record ID': 'ID de Registro',
'Record id': 'id de registro',
'Register': 'Regístrese',
'Record id': 'Id de registro',
'register': 'regístrese',
'Registration key': 'Llave de Registro',
'Register': 'Regístrese',
'Registration identifier': 'Identificador de Registro',
'Registration key': 'Llave de registro',
'Registration successful': 'Registro con éxito',
'Regístrese': 'Regístrese',
'reload': 'recargar',
'Remember me (for 30 days)': 'Recuérdame (durante 30 días)',
'remove compiled': 'eliminar compiladas',
'Request reset password': 'Solicitar reinicio de contraseña',
'Reset Password key': 'Restaurar Llave de la Contraseña',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'restore': 'restaurar',
'Retrieve username': 'Recuperar nombre de usuario',
'revert': 'revertir',
'Role': 'Rol',
'Rows in Table': 'Filas en la tabla',
@@ -242,13 +292,14 @@
'session expired': 'sesión expirada',
'shell': 'terminal',
'site': 'sitio',
'Size of cache:': 'Tamaño del Cache:',
'Size of cache:': 'Tamaño de la Caché:',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'Static files': 'Archivos estáticos',
'Statistics': 'Estadísticas',
'Stylesheet': 'Hoja de estilo',
'Submit': 'Enviar',
'submit': 'enviar',
'Support': 'Soporte',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
@@ -271,10 +322,11 @@
'There are no views': 'No hay vistas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'This App': 'Esta Aplicación',
'This email already has an account': 'Este correo electrónico ya tiene una cuenta',
'This is a copy of the scaffolding application': 'Esta es una copia de la aplicación de andamiaje',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Time in Cache (h:m:s)': 'Tiempo en Cache (h:m:s)',
'Time in Cache (h:m:s)': 'Tiempo en Caché (h:m:s)',
'Timestamp': 'Marca de tiempo',
'to previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de carácteres de traducción para la aplicación',
@@ -297,22 +349,38 @@
'Upload existing application': 'Suba esta aplicación',
'upload file:': 'suba archivo:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User %(id)s is impersonating %(other_id)s': 'El usuario %(id)s está suplantando %(other_id)s',
'User %(id)s Logged-in': 'El usuario %(id)s inició la sesión',
'User %(id)s Logged-out': 'El usuario %(id)s finalizó la sesión',
'User %(id)s Password changed': 'Contraseña del usuario %(id)s cambiada',
'User %(id)s Password reset': 'Contraseña del usuario %(id)s reiniciada',
'User %(id)s Profile updated': 'Actualizado el perfil del usuario %(id)s',
'User %(id)s Registered': 'Usuario %(id)s Registrado',
'User %(id)s Username retrieved': 'Se ha recuperado el nombre de usuario del usuario %(id)s',
'User Id': 'Id de Usuario',
'User ID': 'ID de Usuario',
'Username': 'Nombre de usuario',
'Username retrieve': 'Recuperar nombre de usuario',
'value already in database or empty': 'el valor ya existe en la base de datos o está vacío',
'value not in database': 'el valor no está en la base de datos',
'Verify Password': 'Verificar Contraseña',
'versioning': 'versiones',
'Videos': 'Videos',
'Videos': 'Vídeos',
'View': 'Vista',
'view': 'vista',
'views': 'vistas',
'Views': 'Vistas',
'views': 'vistas',
'web2py is up to date': 'web2py está actualizado',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'Welcome': 'Bienvenido',
'Welcome %s': 'Bienvenido %s',
'Welcome to web2py': '¡Bienvenido a web2py!',
'Welcome to web2py!': '¡Bienvenido to web2py!',
'Welcome to web2py': 'Bienvenido a web2py',
'Welcome to web2py!': '¡Bienvenido a web2py!',
'Which called the function %s located in the file %s': 'La cual llamó la función %s localizada en el archivo %s',
'Working...': 'Trabajando...',
'YES': '',
'You are successfully running web2py': 'Usted está ejecutando web2py exitosamente',
'You can modify this application and adapt it to your needs': 'Usted puede modificar esta aplicación y adaptarla a sus necesidades',
'You visited the url %s': 'Usted visitó la url %s',
'Your username is: %(username)s': 'Su nombre de usuario es: %(username)s',
}

View File

@@ -0,0 +1,8 @@
# coding: utf-8
{
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
'fila': ['filas'],
'eliminada': ['eliminadas'],
'actualizada': ['actualizadas'],
'seleccionado': ['seleccionados'],
}

View File

@@ -28,7 +28,8 @@ response.generic_patterns = ['*'] if request.is_local else []
## (optional) optimize handling of static files
# response.optimize_css = 'concat,minify,inline'
# response.optimize_js = 'concat,minify,inline'
## (optional) static assets folder versioning
# response.static_version = '0.0.0'
#########################################################################
## Here is sample code if you need for
## - email capabilities

View File

@@ -16,7 +16,7 @@
# (where APP - is your application directory)
# 3. restart web2py (or reload routes in web2py admin interfase)
#
# YOU CAN COPY THIS FILE TO ANY APLLICATION'S ROOT DIRECTORY WITHOUT CHANGES!
# YOU CAN COPY THIS FILE TO ANY APPLICATION'S ROOT DIRECTORY WITHOUT CHANGES!
from fileutils import abspath
from languages import read_possible_languages

File diff suppressed because one or more lines are too long

8
applications/welcome/static/css/bootstrap.min.css vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Some files were not shown because too many files have changed in this diff Show More