From 24658fcbdd507bd66cd76b6ca96e1ef5e1c15af5 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 6 Sep 2015 06:57:25 -0400 Subject: [PATCH] #633 dix suburl --- public/config.codekit | 15 ++------------- public/js/gogs.js | 6 ++++-- public/ng/js/gogs.js | 2 +- templates/base/head.tmpl | 1 + templates/repo/issue/view_content.tmpl | 6 +++--- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/public/config.codekit b/public/config.codekit index eb1258669d..430de03f2a 100644 --- a/public/config.codekit +++ b/public/config.codekit @@ -606,8 +606,8 @@ }, "\/ng\/js\/gogs.js": { "fileType": 64, - "ignore": 0, - "ignoreWasSetByUser": 0, + "ignore": 1, + "ignoreWasSetByUser": 1, "inputAbbreviatedPath": "\/ng\/js\/gogs.js", "outputAbbreviatedPath": "\/ng\/js\/min\/gogs-min.js", "outputPathIsOutsideProject": 0, @@ -670,17 +670,6 @@ "outputStyle": 1, "syntaxCheckerStyle": 1 }, - "\/ng\/js\/min\/gogs-min.js": { - "fileType": 64, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/ng\/js\/min\/gogs-min.js", - "outputAbbreviatedPath": "\/ng\/js\/min\/min\/gogs-min-min.js", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, "\/ng\/js\/utils\/preview.js": { "fileType": 64, "ignore": 1, diff --git a/public/js/gogs.js b/public/js/gogs.js index 982f976e0b..f8d9de662c 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -1,6 +1,7 @@ 'use strict'; var csrf; +var suburl; function initCommentPreviewTab($form) { var $tab_menu = $form.find('.tabular.menu'); @@ -407,6 +408,7 @@ function initWebhook() { $(document).ready(function () { csrf = $('meta[name=_csrf]').attr("content"); + suburl = $('meta[name=_suburl]').attr("content"); // Show exact time $('.time-since').each(function () { @@ -485,9 +487,9 @@ $(document).ready(function () { // Emojify emojify.setConfig({ - img_dir:'/img/emoji' + img_dir: suburl + '/img/emoji' }); - $('.markdown').each(function(){ + $('.emojify').each(function () { emojify.run($(this)[0]); }); diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index 142c6d660e..e4a0afe9f9 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -937,7 +937,7 @@ $(document).ready(function () { homepage(); emojify.setConfig({ - img_dir:'/img/emoji' + img_dir: Gogs.AppSubUrl + '/img/emoji' }); emojify.run(); diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 17c26ea248..2a5e8789b6 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -8,6 +8,7 @@ + {{if .GoGetImport}} {{end}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index c15b82a01a..41b46c5844 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -25,7 +25,7 @@
-
+
{{if .Issue.RenderedContent}} {{.Issue.RenderedContent|Str2html}} {{else}} @@ -77,7 +77,7 @@
-
+
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} @@ -317,7 +317,7 @@
-
+
{{$.i18n.Tr "repo.release.loading"}}