aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-06-11 21:06:24 +0800
committerUnknwon <u@gogs.io>2018-06-11 21:06:24 +0800
commitdfd494c113cfa2a25ee0c2f5a12c6403f24742a4 (patch)
treea1b7e8c997bf77790fd8402e19cc642530f360bf /templates
parent57897cc8c2c90ab1566a65bcd1eabfd41a906070 (diff)
repo: minor improve for PR #5219 and support UTF-8 byte count
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/base/footer.tmpl3
-rw-r--r--templates/base/head.tmpl4
-rw-r--r--templates/repo/create.tmpl11
-rw-r--r--templates/repo/settings/options.tmpl11
5 files changed, 7 insertions, 24 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index 73c982eb..485ba71e 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.11.55.0609 \ No newline at end of file
+0.11.56.0611 \ No newline at end of file
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index 46cb676e..68595568 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -49,6 +49,9 @@
<link rel="stylesheet" href="{{AppSubURL}}/plugins/dropzone-4.2.0/dropzone.css">
<script src="{{AppSubURL}}/plugins/dropzone-4.2.0/dropzone.js"></script>
{{end}}
+{{if .RequireAutosize}}
+ <script src="{{AppSubURL}}/plugins/autosize-4.0.2/autosize.min.js"></script>
+{{end}}
<script src="{{AppSubURL}}/js/libs/emojify-1.1.0.min.js"></script>
<script src="{{AppSubURL}}/js/libs/clipboard-1.5.9.min.js"></script>
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index a7579680..1c8aa8c1 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -41,9 +41,7 @@
<script src="{{AppSubURL}}/js/libs/jquery.are-you-sure.js"></script>
<link rel="stylesheet" href="{{AppSubURL}}/assets/font-awesome-4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="{{AppSubURL}}/assets/octicons-4.3.0/octicons.min.css">
- {{if .RequireAutosize}}
- <script src="{{AppSubURL}}/plugins/autosize-4.0.2/dist/autosize.min.js"></script>
- {{end}}
+
<!-- notebook.js for rendering ipython notebooks and marked.js for rendering markdown in notebooks -->
{{if .IsIPythonNotebook}}
<script src="{{AppSubURL}}/plugins/notebookjs-0.3.0/notebook.min.js"></script>
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 89fe133c..a7580d72 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -52,7 +52,7 @@
</div>
<div class="inline field {{if .Err_Description}}error{{end}}">
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description" rows="3">{{.description}}</textarea>
+ <textarea class="autosize" id="description" name="description" rows="3">{{.description}}</textarea>
<span class="help">{{.i18n.Tr "repo.repo_description_helper" | Safe}}</span>
<span class="help">{{.i18n.Tr "repo.repo_description_length"}}: <span id="descLength"></span></span>
</div>
@@ -116,13 +116,4 @@
</div>
</div>
-<script type="text/javascript">
-$(document).ready(function(){
- if (typeof window.autosize !== "undefined") {
- autosize($('#description'));
- }
- showMessageMaxLength(512, 'description', 'descLength');
-});
-</script>
-
{{template "base/footer" .}}
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 976c6b21..83966254 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -19,7 +19,7 @@
</div>
<div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description" rows="3">{{.Repository.Description}}</textarea>
+ <textarea class="autosize" id="description" name="description" rows="3">{{.Repository.Description}}</textarea>
<p class="help">{{.i18n.Tr "repo.settings.description_desc"}}</p>
<p class="help">{{.i18n.Tr "repo.settings.description_length"}}: <span id="descLength"></span></p>
</div>
@@ -417,13 +417,4 @@
{{end}}
{{end}}
-<script type="text/javascript">
-$(document).ready(function(){
- if (typeof window.autosize !== "undefined") {
- autosize($('#description'));
- }
- showMessageMaxLength(512, 'description', 'descLength');
-});
-</script>
-
{{template "base/footer" .}}