]> source.dussan.org Git - gitea.git/commitdiff
#633 dix suburl
authorUnknwon <u@gogs.io>
Sun, 6 Sep 2015 10:57:25 +0000 (06:57 -0400)
committerUnknwon <u@gogs.io>
Sun, 6 Sep 2015 10:57:25 +0000 (06:57 -0400)
public/config.codekit
public/js/gogs.js
public/ng/js/gogs.js
templates/base/head.tmpl
templates/repo/issue/view_content.tmpl

index eb1258669d534cf0b9fe3ae15d3255e5b68c7c47..430de03f2a53d064947083c1f3d5eb032ee18403 100644 (file)
                },
        "\/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,
                "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,
index 982f976e0b5585fd3a53016ef87f6afcf64a6299..f8d9de662cdf264cf6bc19396623a4ef0ffc6094 100644 (file)
@@ -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]);
     });
 
index 142c6d660ef2ae49175659eef67474b13f94e923..e4a0afe9f98854fbbb830ab3b248da5e1b4f06d3 100644 (file)
@@ -937,7 +937,7 @@ $(document).ready(function () {
 
     homepage();
     emojify.setConfig({
-        img_dir:'/img/emoji'
+        img_dir: Gogs.AppSubUrl + '/img/emoji'
     });
     emojify.run();
 
index 17c26ea24855314ebc5769dd7b1fb2c80a816daa..2a5e8789b68c3de27c6ad9192ea587523fb0292a 100644 (file)
@@ -8,6 +8,7 @@
        <meta name="keywords" content="go, git, self-hosted, gogs">
        <meta name="referrer" content="no-referrer" />
        <meta name="_csrf" content="{{.CsrfToken}}" />
+       <meta name="_suburl" content="{{AppSubUrl}}" />
        {{if .GoGetImport}}
        <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
        {{end}}
index c15b82a01ad06146d594737f1b8225e72efc7f15..41b46c584486d17d87ad9a210df8435c04d639d3 100644 (file)
@@ -25,7 +25,7 @@
                                          </div>
                                        </div>
                            <div class="ui attached segment">
-                               <div class="render-content markdown">
+                               <div class="render-content markdown emojify">
                                        {{if .Issue.RenderedContent}}
                                                        {{.Issue.RenderedContent|Str2html}}
                                        {{else}}
@@ -77,7 +77,7 @@
                                          </div>
                                        </div>
                            <div class="ui attached segment">
-                               <div class="render-content markdown">
+                               <div class="render-content markdown emojify">
                                        {{if .RenderedContent}}
                                                        {{.RenderedContent|Str2html}}
                                        {{else}}
                <div class="ui bottom attached active write tab segment">
                  <textarea id="content" name="content"></textarea>
                </div>
-               <div class="ui bottom attached tab preview segment markdown">
+               <div class="ui bottom attached tab preview segment markdown emojify">
                  {{$.i18n.Tr "repo.release.loading"}}
                </div>
     <div class="text right edit buttons">