Skip to content

Commit

Permalink
Merge pull request #735 from support-project/fix/issue732_remove_base
Browse files Browse the repository at this point in the history
Fix/issue732 remove base
  • Loading branch information
koda-masaru authored May 22, 2017
2 parents 7778d31 + ec32ceb commit 0d73874
Show file tree
Hide file tree
Showing 29 changed files with 225 additions and 215 deletions.
12 changes: 12 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ gulp.task('min', function() {
return gulp.src([
'src/main/webapp/WEB-INF/views/**/*.jsp'
])
.pipe(replace('href="<%= request.getContextPath() %>/bower', 'href="/bower'))
.pipe(replace('href="<%= request.getContextPath() %>/css', 'href="/css'))
.pipe(replace('src="<%= request.getContextPath() %>/bower', 'src="/bower'))
.pipe(replace('src="<%= request.getContextPath() %>/js', 'src="/js'))
.pipe(usemin({
css: [rev],
htmlmin: [ function () {return minifyHtml({ empty: true });} ],
Expand All @@ -19,6 +23,14 @@ gulp.task('min', function() {
outputRelativePath: '../../'
}))
.pipe(replace('var _LOGGING_NOTIFY_DESKTOP = true;', 'var _LOGGING_NOTIFY_DESKTOP = false;'))
.pipe(replace('href="/bower', 'href="<%= request.getContextPath() %>/bower'))
.pipe(replace('href="/css', 'href="<%= request.getContextPath() %>/css'))
.pipe(replace('src="/bower', 'src="<%= request.getContextPath() %>/bower'))
.pipe(replace('src="/js', 'src="<%= request.getContextPath() %>/js'))
.pipe(replace('href="bower', 'href="<%= request.getContextPath() %>/bower'))
.pipe(replace('href="css', 'href="<%= request.getContextPath() %>/css'))
.pipe(replace('src="bower', 'src="<%= request.getContextPath() %>/bower'))
.pipe(replace('src="js', 'src="<%= request.getContextPath() %>/js'))
.pipe(gulp.dest('target/knowledge/WEB-INF/views/'));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-customservice.js -->
<script type="text/javascript" src="js/customservice.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/customservice.js"></script>
<!-- endbuild -->

</c:param>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/admin/database/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
}
</style>
<!-- build:css(src/main/webapp) css/page-database.css -->
<link rel="stylesheet" href="bower/bootstrap-fileinput/css/fileinput.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootstrap-fileinput/css/fileinput.min.css" />
<!-- endbuild -->
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-database.js -->
<script type="text/javascript" src="bower/bootstrap-fileinput/js/fileinput.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-fileinput/js/fileinput.min.js"></script>
<!-- endbuild -->

<script>
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/views/admin/mailhook/hook.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<c:param name="PARAM_HEAD">
<!-- build:css(src/main/webapp) css/page-mailhook.css -->
<link rel="stylesheet" href="bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" />
<!-- endbuild -->
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-mailhook.js -->
<script type="text/javascript" src="bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" src="js/mailhook.js"></script>
<script type="text/javascript" src="js/targetselect.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/mailhook.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/targetselect.js"></script>
<!-- endbuild -->

<script>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/admin/mailtemplate/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-mailtemplate.js -->
<script type="text/javascript" src="js/mailtemplate.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/mailtemplate.js"></script>
<!-- endbuild -->
</c:param>

Expand Down
18 changes: 9 additions & 9 deletions src/main/webapp/WEB-INF/views/admin/notice/list.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@

<c:param name="PARAM_HEAD">
<!-- build:css(src/main/webapp) css/page-notice-list.css -->
<link rel="stylesheet" href="bower/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="css/markdown.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/markdown.css" />
<!-- endbuild -->
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-notice-list.js -->
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js"></script>
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js"></script>
<script type="text/javascript" src="bower/moment/min/moment.min.js"></script>
<script type="text/javascript" src="js/knowledge-common.js"></script>
<script type="text/javascript" src="js/notice.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/moment/min/moment.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-common.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/notice.js"></script>
<!-- endbuild -->
<script type="text/javascript" src="bower/emoji-parser/main.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/emoji-parser/main.min.js"></script>
</c:param>

<c:param name="PARAM_CONTENT">
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/views/admin/template/edit.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

<c:param name="PARAM_HEAD">
<!-- build:css(src/main/webapp) css/page-template.css -->
<link rel="stylesheet" href="css/template.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/template.css" />
<!-- endbuild -->
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-template.js -->
<script type="text/javascript" src="js/template-item-edit.js"></script>
<script type="text/javascript" src="js/admin-template-edit.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/template-item-edit.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/admin-template-edit.js"></script>
<!-- endbuild -->
<jsp:include page="include_template_label.jsp"></jsp:include>
</c:param>
Expand Down
22 changes: 10 additions & 12 deletions src/main/webapp/WEB-INF/views/commons/layout/commonHeader.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,31 @@
<meta property="og:url" content="https://support-project.org/knowledge/index" />
<meta property="og:site_name" content="Knowledge"/>

<base href="<%= request.getContextPath() %>/" />

<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />

<% if (StringUtils.isNotEmpty(jspUtil.out("thema"))) { %>
<link rel="stylesheet" href="bower/bootswatch/<%= jspUtil.out("thema") %>/bootstrap.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootswatch/<%= jspUtil.out("thema") %>/bootstrap.min.css" />
<% } else { %>
<link rel="stylesheet" href="bower/bootswatch/<%= jspUtil.cookie(SystemConfig.COOKIE_KEY_THEMA, "flatly") %>/bootstrap.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootswatch/<%= jspUtil.cookie(SystemConfig.COOKIE_KEY_THEMA, "flatly") %>/bootstrap.min.css" />
<% } %>

<% if (StringUtils.isNotEmpty(jspUtil.out("highlight"))) { %>
<link rel="stylesheet" href="bower/highlightjs/styles/<%= jspUtil.out("highlight") %>.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/highlightjs/styles/<%= jspUtil.out("highlight") %>.css" />
<% } else { %>
<link rel="stylesheet" href="bower/highlightjs/styles/<%= jspUtil.cookie(SystemConfig.COOKIE_KEY_HIGHLIGHT, "darkula") %>.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/highlightjs/styles/<%= jspUtil.cookie(SystemConfig.COOKIE_KEY_HIGHLIGHT, "darkula") %>.css" />
<% } %>

<link rel="stylesheet" href="bower/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="bower/flag-icon-css/css/flag-icon.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/flag-icon-css/css/flag-icon.min.css" />

<!-- build:css(src/main/webapp) css/page-common.css -->
<link rel="stylesheet" href="bower/jquery-oembed-all/jquery.oembed.css" />
<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/jquery-oembed-all/jquery.oembed.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/common.css" />
<!-- endbuild -->

<!--[if lt IE 9]>
<script src="bower/html5shiv/dist/html5shiv.min.js"></script>
<script src="bower/respond/dest/respond.min.js"></script>
<script src="<%= request.getContextPath() %>/bower/html5shiv/dist/html5shiv.min.js"></script>
<script src="<%= request.getContextPath() %>/bower/respond/dest/respond.min.js"></script>
<![endif]-->

<!-- Knowledge - <%= jspUtil.label("label.version") %> -->
26 changes: 13 additions & 13 deletions src/main/webapp/WEB-INF/views/commons/layout/commonScripts.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@
<% JspUtil jspUtil = new JspUtil(request, pageContext); %>

<!-- build:js(src/main/webapp) js/page-common.js -->
<script type="text/javascript" src="bower/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap/dist/js/bootstrap.min.js"></script>

<script type="text/javascript" src="bower/bluebird/js/browser/bluebird.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bluebird/js/browser/bluebird.min.js"></script>

<script type="text/javascript" src="bower/notifyjs/dist/notify.min.js"></script>
<script type="text/javascript" src="bower/notifyjs/dist/notify-combined.min.js"></script>
<script type="text/javascript" src="bower/notifyjs/dist/styles/bootstrap/notify-bootstrap.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/notifyjs/dist/notify.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/notifyjs/dist/notify-combined.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/notifyjs/dist/styles/bootstrap/notify-bootstrap.js"></script>

<script type="text/javascript" src="bower/marked/lib/marked.js"></script>
<script type="text/javascript" src="bower/highlightjs/highlight.pack.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/marked/lib/marked.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/highlightjs/highlight.pack.js"></script>

<script type="text/javascript" src="bower/bootbox/bootbox.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootbox/bootbox.js"></script>

<script type="text/javascript" src="bower/notify.js/notify.js"></script>
<script type="text/javascript" src="bower/jquery-oembed-all/jquery.oembed.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/notify.js/notify.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/jquery-oembed-all/jquery.oembed.js"></script>

<script type="text/javascript" src="bower/jstzdetect/jstz.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/jstzdetect/jstz.min.js"></script>

<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/common.js"></script>
<!-- endbuild -->


Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/index/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<c:param name="PARAM_HEAD">
<!-- build:css(src/main/webapp) css/page-top.css -->
<link rel="stylesheet" href="css/top.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/top.css" />
<!-- endbuild -->
</c:param>
<c:param name="PARAM_SCRIPTS">
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/views/open/account/account.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

<c:param name="PARAM_HEAD">
<!-- build:css(src/main/webapp) css/page-open-account.css -->
<link rel="stylesheet" href="css/knowledge-list.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/knowledge-list.css" />
<!-- endbuild -->
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-open-account.js -->
<script type="text/javascript" src="bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="js/knowledge-list.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-list.js"></script>
<!-- endbuild -->
</c:param>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/open/knowledge/histories.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-knowledge-histories.js -->
<script type="text/javascript" src="bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/echojs/dist/echo.min.js"></script>
<!-- endbuild -->
<script>
echo.init();
Expand Down
10 changes: 5 additions & 5 deletions src/main/webapp/WEB-INF/views/open/knowledge/history.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<c:import url="/WEB-INF/views/commons/layout/layoutMain.jsp">

<c:param name="PARAM_HEAD">
<link rel="stylesheet" type="text/css" href="bower/diff2html/dist/diff2html.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/bower/diff2html/dist/diff2html.css">
</c:param>

<c:param name="PARAM_SCRIPTS">
<!-- build:js(src/main/webapp) js/page-knowledge-history.js -->
<script type="text/javascript" src="bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="bower/jsdiff/diff.min.js"></script>
<script type="text/javascript" src="bower/diff2html/dist/diff2html.min.js"></script>
<script type="text/javascript" src="bower/diff2html/dist/diff2html-ui.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/jsdiff/diff.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/diff2html/dist/diff2html.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/diff2html/dist/diff2html-ui.min.js"></script>
<!-- endbuild -->
<script>
echo.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<% JspUtil jspUtil = new JspUtil(request, pageContext); %>

<!-- build:js(src/main/webapp) js/page-knowledge-list.js -->
<script type="text/javascript" src="bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" src="bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="bower/moment/moment.js"></script>
<script type="text/javascript" src="bower/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js"></script>
<script type="text/javascript" src="bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/echojs/dist/echo.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/moment/moment.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js"></script>

<script type="text/javascript" src="js/knowledge-list.js"></script>
<script type="text/javascript" src="js/knowledge-common.js"></script>
<script type="text/javascript" src="js/knowledge-view-markdown.js"></script>
<script type="text/javascript" src="js/knowledge-view-emoji-select.js"></script>
<script type="text/javascript" src="js/event.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-list.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-common.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-view-markdown.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/knowledge-view-emoji-select.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/event.js"></script>
<!-- endbuild -->

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<% JspUtil jspUtil = new JspUtil(request, pageContext); %>

<!-- build:css(src/main/webapp) css/page-knowledge-list.css -->
<link rel="stylesheet" href="bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" />
<link rel="stylesheet" href="bower/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="css/knowledge-list.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/bower/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/knowledge-list.css" />
<!-- endbuild -->

<style>
Expand Down
Loading

0 comments on commit 0d73874

Please sign in to comment.