Sfoglia il codice sorgente

#1203 bundle jquery with gogs

Unknwon 9 anni fa
parent
commit
a7686e8749

+ 3 - 3
conf/locale/locale_en-US.ini

@@ -426,15 +426,15 @@ issues.next = Next
 issues.open_title = Open
 issues.closed_title = Closed
 issues.num_comments = %d comments
-issues.commented_at = `commented at <a id="%[1]s" href="#%[1]s">%[2]s</a>`
+issues.commented_at = `commented <a id="%[1]s" href="#%[1]s">%[2]s</a>`
 issues.no_content = There is no content yet.
 issues.close_issue = Close
 issues.close_comment_issue = Close and comment
 issues.reopen_issue = Reopen
 issues.reopen_comment_issue = Reopen and comment
 issues.create_comment = Comment
-issues.closed_at = `closed at <a id="%[1]s" href="#%[1]s">%[2]s</a>`
-issues.reopened_at = `reopened at <a id="%[1]s" href="#%[1]s">%[2]s</a>`
+issues.closed_at = `closed <a id="%[1]s" href="#%[1]s">%[2]s</a>`
+issues.reopened_at = `reopened <a id="%[1]s" href="#%[1]s">%[2]s</a>`
 issues.poster = Poster
 issues.admin = Admin
 issues.owner = Owner

+ 0 - 3
modules/base/template.go

@@ -122,9 +122,6 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
 	"AppDomain": func() string {
 		return setting.Domain
 	},
-	"CdnMode": func() bool {
-		return setting.ProdMode && !setting.OfflineMode
-	},
 	"DisableGravatar": func() bool {
 		return setting.DisableGravatar
 	},

File diff suppressed because it is too large
+ 0 - 0
modules/bindata/bindata.go


+ 0 - 0
public/css/dropzone.css → public/css/dropzone-4.0.1.css


File diff suppressed because it is too large
+ 3 - 0
public/css/font-awesome-4.4.0.min.css


File diff suppressed because it is too large
+ 0 - 3
public/css/font-awesome.min.css


+ 0 - 0
public/css/highlightjs/default.css → public/css/highlight-8.7/default.css


+ 0 - 0
public/css/jquery.datetimepicker.css → public/css/jquery.datetimepicker-2.4.5.css


+ 0 - 0
public/css/jquery.minicolors.css → public/css/jquery.minicolors-2.1.12.css


+ 1 - 1
public/css/semantic.min.css → public/css/semantic-2.0.8.min.css

@@ -1,5 +1,5 @@
  /*
- * # Semantic UI - 2.0.7
+ * # Semantic UI - 2.0.8
  * https://github.com/Semantic-Org/Semantic-UI
  * http://www.semantic-ui.com/
  *

BIN
public/fonts/FontAwesome.otf


BIN
public/fonts/fontawesome-webfont.eot


File diff suppressed because it is too large
+ 5 - 5
public/fonts/fontawesome-webfont.svg


BIN
public/fonts/fontawesome-webfont.ttf


BIN
public/fonts/fontawesome-webfont.woff


BIN
public/fonts/fontawesome-webfont.woff2


+ 3 - 1
public/js/gogs.js

@@ -409,7 +409,9 @@ $(document).ready(function () {
     });
 
     // Highlight JS
-    hljs.initHighlightingOnLoad();
+    if (typeof hljs != 'undefined') {
+        hljs.initHighlightingOnLoad();
+    }
 
     // Dropzone
     if ($('#dropzone').length > 0) {

+ 0 - 0
public/js/libs/dropzone.js → public/js/libs/dropzone-4.0.1.js


+ 0 - 0
public/js/libs/highlight.pack.js → public/js/libs/highlight-8.7.pack.js


+ 0 - 0
public/js/libs/jquery.datetimepicker.js → public/js/libs/jquery.datetimepicker-2.4.5.js


+ 0 - 0
public/js/libs/jquery.minicolors.min.js → public/js/libs/jquery.minicolors-2.1.12.min.js


+ 1 - 1
public/js/semantic.min.js → public/js/semantic-2.0.8.min.js

@@ -1,5 +1,5 @@
  /*
- * # Semantic UI - 2.0.7
+ * # Semantic UI - 2.0.8
  * https://github.com/Semantic-Org/Semantic-UI
  * http://www.semantic-ui.com/
  *

+ 11 - 16
templates/base/head.tmpl

@@ -14,38 +14,33 @@
 
 	<link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
 
-	{{if CdnMode}}
-	<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
-	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
-	{{else}}
 	<script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome.min.css">
-	{{end}}
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
 
 	<!-- Stylesheet -->
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic.min.css?v={{AppVer}}">
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.0.8.min.css">
 	<link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.min.css?v={{AppVer}}">
 
 	<!-- JavaScript -->
-	<script src="{{AppSubUrl}}/js/semantic.min.js?v={{AppVer}}"></script>
+	<script src="{{AppSubUrl}}/js/semantic-2.0.8.min.js"></script>
 	<script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script>
 
 	<!-- Third-party libraries -->
 	{{if .RequireHighlightJS}}
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/highlightjs/default.css?v={{AppVer}}">
-	<script src="{{AppSubUrl}}/js/libs/highlight.pack.js?v={{AppVer}}"></script>
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.7/default.css">
+	<script src="{{AppSubUrl}}/js/libs/highlight-8.7.pack.js"></script>
 	{{end}}
 	{{if .RequireMinicolors}}
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors.css?v={{AppVer}}">
-	<script src="{{AppSubUrl}}/js/libs/jquery.minicolors.min.js?v={{AppVer}}"></script>
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css">
+	<script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script>
 	{{end}}
 	{{if .RequireDatetimepicker}}
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker.css?v={{AppVer}}">
-	<script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker.js?v={{AppVer}}"></script>
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css">
+	<script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script>
 	{{end}}
 	{{if .RequireDropzone}}
-	<link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone.css?v={{AppVer}}">
-	<script src="{{AppSubUrl}}/js/libs/dropzone.js?v={{AppVer}}"></script>
+	<link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.0.1.css">
+	<script src="{{AppSubUrl}}/js/libs/dropzone-4.0.1.js"></script>
 	{{end}}
 
 	<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>

+ 1 - 5
templates/ng/base/head.tmpl

@@ -12,15 +12,11 @@
 
 		<link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
 
-		{{if CdnMode}}
-		<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
 
-		<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
-		{{else}}
 		<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome.min.css">
 		
 		<script src="{{AppSubUrl}}/ng/js/lib/jquery-1.11.1.min.js"></script>
-		{{end}}
+
 		<!-- Stylesheet -->
 		<link rel="stylesheet" href="{{AppSubUrl}}/ng/css/ui.css">
 		<link rel="stylesheet" href="{{AppSubUrl}}/ng/css/gogs.css">

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