In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1420 [In-Portal CMS] Admin Interfaces feature request always 2012-10-22 18:02 2012-12-06 11:26
Dmitry  
alex  
normal  
needs testing 5.1.3  
open  
 
none  
https://groups.google.com/d/topic/in-portal-bugs/ckjKdgkBZbk/discussion
Added CodeMirror to SQL Query page in Admin
0
0001420: Using CodeMirror on SQL Query page in Admin
Using CodeMirror (from http://codemirror.net/) on SQL Query page in Admin for better syntax highlighting.

Perhaps we can use the same formatting as PMA does.
Implement this as "inp_edit_codemirror" block with "language" parameter, that would allow easily create multiple editors for needed languages on a page.
patch code_mirror_1420.patch (156,018) 2012-12-05 06:49
http://tracker.in-portal.org/file_download.php?file_id=1878&type=bug
png v1_screenshot.png (14,239) 2012-12-06 06:15
http://tracker.in-portal.org/file_download.php?file_id=1881&type=bug
png

png textarea_before_codemirror.png (67,645) 2012-12-06 06:16
http://tracker.in-portal.org/file_download.php?file_id=1882&type=bug
png

patch code_mirror_1420_v2.patch (381,496) 2012-12-06 11:23
http://tracker.in-portal.org/file_download.php?file_id=1883&type=bug
zip codemirror.zip (485,071) 2012-12-06 11:23
http://tracker.in-portal.org/file_download.php?file_id=1884&type=bug
Issue History
2012-12-06 11:26 erik Note Added: 0005322
2012-12-06 11:26 erik Assigned To erik => alex
2012-12-06 11:26 erik Status needs work => needs testing
2012-12-06 11:23 erik File Added: codemirror.zip
2012-12-06 11:23 erik File Added: code_mirror_1420_v2.patch
2012-12-06 06:16 alex File Added: textarea_before_codemirror.png
2012-12-06 06:15 alex File Added: v1_screenshot.png
2012-12-06 03:56 alex Note Added: 0005318
2012-12-06 03:56 alex Assigned To alex => erik
2012-12-06 03:56 alex Status needs testing => needs work
2012-12-05 06:50 erik Note Added: 0005316
2012-12-05 06:50 erik Assigned To => alex
2012-12-05 06:50 erik Developer => erik
2012-12-05 06:50 erik Status active => needs testing
2012-12-05 06:49 erik File Added: code_mirror_1420.patch
2012-12-05 06:40 erik File Deleted: code_mirror_1420.patch
2012-12-05 06:40 erik File Added: code_mirror_1420.patch
2012-12-05 02:42 alex Note Added: 0005312
2012-11-05 03:53 alex version => 5.1.3
2012-11-05 03:53 alex Target Version Icebox => 5.3.0
2012-11-05 03:52 alex Additional Information Updated bug_revision_view_page.php?rev_id=1062#r1062
2012-10-22 18:02 Dmitry New Issue
2012-10-22 18:02 Dmitry Reference => https://groups.google.com/d/topic/in-portal-bugs/ckjKdgkBZbk/discussion
2012-10-22 18:02 Dmitry Change Log Message => Added CodeMirror to SQL Query page in Admin
2012-10-22 18:02 Dmitry Estimate Points => 0

Notes
(0005312)
alex   
2012-12-05 02:42   
Plan:

1. create "core/admin_templates/incs/code_mirror" folder
2. place extracted code from downloaded CodeMirror version into folder created above
3. create block "inp_edit_codemirror" in "form_blocks.tpl" file and connect CodeMirror into it (similar to "inp_edit_codepress" block)
4. carefully test new block at least using following scenarios:
- 1/2 blocks on a page and attempt to save form OR go to next tab + is validation error = content is saved
- 1/2 blocks on a page and attempt to save form OR go to next tab + no validation error = content is saved
(0005316)
erik   
2012-12-05 06:50   
Patch attached. Needs testing
(0005318)
alex   
2012-12-06 03:56   
1. edit should be of same size as textarea, that were before him (e.g. all paddings, borders, position stays same), but only internals of textarea needs to be replaced by editor

2. new block "inp_edit_codemirror" is specially called this way to allow developer to use any language he pleases, that's why we need to:
- remove default language (will force developer to choose a language)
- add all supported languages (js/css files)
- add support for specifying codemirror options via tag parameters, like it's done with "control_options" parameter in "inp_edit_textarea" block

3. enable line numbers
(0005322)
erik   
2012-12-06 11:26   
Fixes done. New patch version attached. Codemirror full sources attached.