devel 코드 merge

This commit is contained in:
2019-04-07 22:58:44 +09:00
18 changed files with 944 additions and 142 deletions
+9 -1
View File
@@ -121,6 +121,14 @@ function drawArticle(idx, articleObj){
});
$article.find('.submitComment').click(submitComment);
$article.find('.commentText').on('keypress', function (e) {
if(e.which === 13){
$article.find('.submitComment').click();
}
});
$article.find('.inputCommentHeader').click(function(){
$article.find('.commentText').focus();
})
var $board = $('#board');
@@ -161,7 +169,7 @@ $(function(){
$('textarea.autosize').on('keydown keyup', function(){
resizeTextarea($(this));
})
$('#submitArticle').click(submitArticle);
loadArticles()
+5
View File
@@ -177,6 +177,10 @@ function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function linkifyStrWithOpt(text){
return linkifyStr(text, {});
}
/**
* 단순한 Template 함수. <%변수명%>으로 template 가능
* @see https://github.com/krasimir/absurd/blob/master/lib/processors/html/helpers/TemplateEngine.js
@@ -197,6 +201,7 @@ var TemplateEngine = function (html, options) {
return add;
}
options.e = escapeHtml;
options.linkifyStr = linkifyStrWithOpt;
while (match = re.exec(html)) {
add(html.slice(cursor, match.index))(match[1], true);
cursor = match.index + match[0].length;
+1 -1
View File
@@ -504,7 +504,7 @@ function activateMessageForm(){
jQuery(function($){
//tmp_template.html은 추후 msg.js에 통합될 수 있음
var getTemplate = $.get('js/templates/message.html?10',function(obj){
var getTemplate = $.get('js/templates/message.html?11',function(obj){
messageTemplate = obj;
});
+1 -1
View File
@@ -41,7 +41,7 @@
<%} %>
<span class="msg_time">&lt;<%e(time)%>&gt;</span>
</div>
<div class="msg_content <%invalidType%>"><%e(text)%></div>
<div class="msg_content <%invalidType%>"><%linkifyStr(text)%></div>
<%if(this.option && this.option.action) {%>
<div class="msg_prompt">
<button type="button" class="prompt_yes btn_prompt" <%allowButton?'':'disabled="disabled"'%>>수락</button> <button type="button" class="prompt_no btn_prompt" <%allowButton?'':'disabled="disabled"'%>>거절</button>