Skip to content

Commit

Permalink
#853 Change version from v1.12 to v1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
koda-masaru committed Sep 15, 2017
1 parent e778bba commit 48dc8d7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_0;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_1;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_2;
import org.support.project.knowledge.deploy.v1_12.Migrate_1_12_0;
import org.support.project.knowledge.deploy.v1_11_0.Migrate_1_11_3;
import org.support.project.knowledge.deploy.v1_1_0pre1.Migrate_1_1_0pre1;
import org.support.project.knowledge.deploy.v1_4_0.Migrate_1_4_0;
import org.support.project.knowledge.deploy.v1_5_0.Migrate_1_5_0;
Expand All @@ -51,7 +51,7 @@ public class InitDB {
private static final Map<String, Migrate> MAP = new LinkedHashMap<>();

private static final Migrate INIT = InitializeSystem.get();
public static final String CURRENT = "1.12.0";
public static final String CURRENT = "1.11.3";

public InitDB() {
super();
Expand Down Expand Up @@ -84,7 +84,7 @@ public InitDB() {
MAP.put("1.11.0", Migrate_1_11_0.get());
MAP.put("1.11.1", Migrate_1_11_1.get());
MAP.put("1.11.2", Migrate_1_11_2.get());
MAP.put("1.12.0", Migrate_1_12_0.get());
MAP.put("1.11.3", Migrate_1_11_3.get());
}

public static void main(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.support.project.knowledge.deploy.v1_12;
package org.support.project.knowledge.deploy.v1_11_0;

import org.support.project.knowledge.deploy.Migrate;
import org.support.project.ormapping.tool.dao.InitializeDao;

public class Migrate_1_12_0 implements Migrate {
public class Migrate_1_11_3 implements Migrate {

public static Migrate_1_12_0 get() {
return org.support.project.di.Container.getComp(Migrate_1_12_0.class);
public static Migrate_1_11_3 get() {
return org.support.project.di.Container.getComp(Migrate_1_11_3.class);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/admin/template/edit.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<textarea class="form-control" name="description" id="description" placeholder="Description" ><%= jspUtil.out("description") %></textarea>
</div>
<div class="form-group">
<label for="initialValue"><%= jspUtil.label("knowledge.template.label.initialValue") %></label>
<label for="initialValue"><%= jspUtil.label("knowledge.template.label.initial.value") %></label>
<textarea class="form-control" name="initialValue" id="initialValue" placeholder="Initia lValue" ><%= jspUtil.out("initialValue") %></textarea>
</div>

Expand Down
13 changes: 8 additions & 5 deletions src/main/webapp/js/template-item-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,16 @@ $(document).ready(function() {
$('#template_info').removeClass('hide');
$('#template_info').addClass('show');

if (!$('#content').val()) {
$('#content').val(template.initialValue);
initialValue = template.initialValue;
} else if (initialValue === $('#content').val()) {
// 初期値を指定してから変更していない
var contentStr = $('#content').val();
if (!contentStr) {
$('#content').val(template.initialValue);
initialValue = template.initialValue;
} else {
if (initialValue.replace(/\r?\n/g,"") == contentStr.replace(/\r?\n/g,"")) {
// 初期値を指定してから変更していない
$('#content').val(template.initialValue ? template.initialValue : '');
initialValue = template.initialValue;
}
}

$('#template_items').html('');
Expand Down

0 comments on commit 48dc8d7

Please sign in to comment.