Skip to content

Commit

Permalink
Dev: updated ace editor, use twig highlighter
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jun 14, 2017
1 parent cf6675c commit 016f095
Show file tree
Hide file tree
Showing 354 changed files with 437 additions and 118 deletions.
4 changes: 4 additions & 0 deletions application/controllers/admin/templates.php
Expand Up @@ -719,6 +719,8 @@ protected function _templatesummary($templatename, $screenname, $editfile, $temp
$sTemplateEditorMode = getGlobalSetting('templateeditormode', 'full');
}
$sExtension=substr(strrchr($editfile, '.'), 1);

// Select ACE editor mode
switch ($sExtension)
{
case 'css':$sEditorFileType='css';
Expand All @@ -727,6 +729,8 @@ protected function _templatesummary($templatename, $screenname, $editfile, $temp
break;
case 'js':$sEditorFileType='javascript';
break;
case 'twig':$sEditorFileType='twig';
break;
default: $sEditorFileType='html';
break;
}
Expand Down
1 change: 1 addition & 0 deletions application/helpers/admin/template_helper.php
Expand Up @@ -167,6 +167,7 @@ function gettemplatefilename($template, $templatefile) {
switch (pathinfo($templatefile, PATHINFO_EXTENSION))
{
case 'twig':
// TODO: recursivity
$oEditedTemplate = Template::model()->getTemplateConfiguration($template);
return $oEditedTemplate->viewPath.$templatefile;
break;
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/templates/templatesummary_view.php
@@ -1,5 +1,5 @@
<?php
Yii::app()->clientScript->registerScript('editorfiletype',"editorfiletype ='".$sEditorFileType."';",CClientScript::POS_HEAD); // Is this deprecated (2013-09-25) ?
Yii::app()->clientScript->registerScript('editorfiletype',"editorfiletype ='".$sEditorFileType."';",CClientScript::POS_HEAD);
?>


Expand Down
13 changes: 8 additions & 5 deletions third_party/ace/ace.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions third_party/ace/ext-beautify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions third_party/ace/ext-chromevox.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion third_party/ace/ext-elastic_tabstops_lite.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions third_party/ace/ext-emmet.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions third_party/ace/ext-error_marker.js
@@ -0,0 +1,5 @@
;
(function() {
window.require(["ace/ext/error_marker"], function() {});
})();

0 comments on commit 016f095

Please sign in to comment.