Commit 72f6a5c3 authored by john's avatar john

2949

parent b7854a53
...@@ -14,6 +14,7 @@ class DocumentationAsset extends AssetBundle ...@@ -14,6 +14,7 @@ class DocumentationAsset extends AssetBundle
]; ];
public $js = [ public $js = [
'plugins/editormd/editormd.js', 'plugins/editormd/editormd.js',
'plugins/editormd/languages/en.js',
'plugins/editormd/documentation.js', 'plugins/editormd/documentation.js',
]; ];
public $depends = [ public $depends = [
......
...@@ -21,7 +21,7 @@ $(function () ...@@ -21,7 +21,7 @@ $(function ()
htmlDecode: "style,script,iframe|on*", // 开启 HTML 标签解析,为了安全性,默认不开启 htmlDecode: "style,script,iframe|on*", // 开启 HTML 标签解析,为了安全性,默认不开启
//toolbar : false, //关闭工具栏 //toolbar : false, //关闭工具栏
//previewCodeHighlight : false, // 关闭预览 HTML 的代码块高亮,默认开启 //previewCodeHighlight : false, // 关闭预览 HTML 的代码块高亮,默认开启
emoji: true, // emoji: true,
taskList: true, taskList: true,
tocm: true, // Using [TOCM] tocm: true, // Using [TOCM]
tex: true, // 开启科学公式TeX语言支持,默认关闭 tex: true, // 开启科学公式TeX语言支持,默认关闭
...@@ -32,6 +32,7 @@ $(function () ...@@ -32,6 +32,7 @@ $(function ()
//dialogDraggable : false, // 设置弹出层对话框不可拖动,全局通用,默认为true //dialogDraggable : false, // 设置弹出层对话框不可拖动,全局通用,默认为true
//dialogMaskOpacity : 0.4, // 设置透明遮罩层的透明度,全局通用,默认值为0.1 //dialogMaskOpacity : 0.4, // 设置透明遮罩层的透明度,全局通用,默认值为0.1
//dialogMaskBgColor : "#000", // 设置透明遮罩层的背景颜色,全局通用,默认为#fff //dialogMaskBgColor : "#000", // 设置透明遮罩层的背景颜色,全局通用,默认为#fff
imageUpload: true, imageUpload: true,
imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"], imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
imageUploadURL: "./php/upload.php", imageUploadURL: "./php/upload.php",
...@@ -58,7 +59,7 @@ $(function () ...@@ -58,7 +59,7 @@ $(function ()
var id = $(this).attr('id'); var id = $(this).attr('id');
$('#doccontentlang-' + data_id + '-markdown').val(testEditor[id].getMarkdown()) $('#doccontentlang-' + data_id + '-markdown').val(testEditor[id].getMarkdown())
$('#doccontentlang-' + data_id + '-html').val(testEditor[id].getHTML()) $('#doccontentlang-' + data_id + '-html').val(testEditor[id].getPreviewedHTML())
}) })
}); });
// $("#goto-line-btn").bind("click", function () // $("#goto-line-btn").bind("click", function ()
......
...@@ -43,9 +43,9 @@ DocumentationAsset::register($this); ...@@ -43,9 +43,9 @@ DocumentationAsset::register($this);
?> ?>
<div class="tab-pane fade <?= ($c == 1 ? 'active in' : '') ?>" id="lang-<?= $documentation->lang->url; ?>"> <div class="tab-pane fade <?= ($c == 1 ? 'active in' : '') ?>" id="lang-<?= $documentation->lang->url; ?>">
<?= $form->field($documentation, '[' . $lang_id . ']name')->textInput(['maxlength' => 250])->hint('Название страницы не будет отображаться пользователям сайта и служит исключительно для служебного пользования в Панель управления.') ?> <?= $form->field($documentation, '[' . $lang_id . ']name')->textInput(['maxlength' => 250])->hint('Заголовок страницы виден пользователю сайта и как правило оформляется в тег &lt;h1&gt;.') ?>
<?= $form->field($documentation, '[' . $lang_id . ']url')->textInput(['maxlength' => 250])->hint('Заголовок страницы виден пользователю сайта и как правило оформляется в тег &lt;h1&gt;. Если дизайном страницы не предусмотрен вывод заголовка, то он не будет выводиться даже если был введен в данное поле.') ?> <?= $form->field($documentation, '[' . $lang_id . ']url')->textInput(['maxlength' => 250])->hint('Для создания ЧПУ («Человеку Понятный Урл») укажите латинскими буквами путь, например, razdel/podrazdel/nazvanie_stranici.html') ?>
<div id="documentation-editormd_<?= $lang_id ?>" class="documentation-editormd" data-id="<?= $lang_id ?>"> <div id="documentation-editormd_<?= $lang_id ?>" class="documentation-editormd" data-id="<?= $lang_id ?>">
</div> </div>
......
...@@ -28,7 +28,7 @@ use common\modules\documentation\models\DocList; ...@@ -28,7 +28,7 @@ use common\modules\documentation\models\DocList;
'attribute' => 'url', 'attribute' => 'url',
'format' => 'raw', 'format' => 'raw',
'value' => function($data) { 'value' => function($data) {
return Html::a($data->url, Yii::$app->params['frontUrl'] . ($data->url != '/' ? '/' : '') . $data->url, ['target' => '_blank', 'title' => 'Просмотреть как страницу видит пользователь', 'data-toggle' => "tooltip"]); return Html::a($data->lang->url, Yii::$app->params['frontUrl'] . ($data->lang->url != '/' ? '/' : '') . $data->lang->url, ['target' => '_blank', 'title' => 'Просмотреть как страницу видит пользователь', 'data-toggle' => "tooltip"]);
} }
], ],
[ [
......
...@@ -13,6 +13,9 @@ class DocumentationAsset extends AssetBundle ...@@ -13,6 +13,9 @@ class DocumentationAsset extends AssetBundle
public $basePath = '@webroot'; public $basePath = '@webroot';
public $baseUrl = '@web'; public $baseUrl = '@web';
public $css = [ public $css = [
"css/editormd.css",
"css/vendor.min.css",
"css/styles.css",
'css/documentation.css', 'css/documentation.css',
]; ];
public $js = [ public $js = [
......
...@@ -5,17 +5,17 @@ RewriteCond %{HTTP_HOST} ^www.task-on\.com$ [NC] ...@@ -5,17 +5,17 @@ RewriteCond %{HTTP_HOST} ^www.task-on\.com$ [NC]
RewriteRule ^(.*)$ http://task-on.com/$1 [R=301,L] RewriteRule ^(.*)$ http://task-on.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://task-on.com/ [R=301,L] RewriteRule ^index\.php$ https://task-on.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP} off RewriteCond %{HTTPS} off
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$ RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ http://task-on.com/$1 [R=301,L] RewriteRule ^(.+)/$ https://task-on.com/$1 [R=301,L]
Redirect 301 /portfolio/appl /portfolio Redirect 301 /portfolio/appl /portfolio
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
$(function ()
{
alert('k')
})
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment