THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

Fixed `temporarySaveHandler` typo

Fixed inappropriate comment
tags/v1.10.0
Wonju Jeon 1 year ago
parent
commit
f9bbab650f

+ 2
- 2
minify-js.sh View File

@@ -22,7 +22,7 @@ java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.tmpl.js $
# cat $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.tmpl.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.form.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.validate.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.requestAs.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.search.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.zclip.min.js $PUBLIC_JAVASCRIPTS/lib/jquery/jquery.placeholder.min.js $PUBLIC/bootstrap/js/bootstrap.js $PUBLIC_JAVASCRIPTS/lib/rgbcolor.js $PUBLIC_JAVASCRIPTS/lib/humanize.js $PUBLIC_JAVASCRIPTS/lib/validate.js $PUBLIC_JAVASCRIPTS/lib/xss.js $PUBLIC_JAVASCRIPTS/lib/clipboard.js > $OUT_DIR/yona-common.js

# yona-lib.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js $PUBLIC_JAVASCRIPTS/service/yona.temprarySaveHandler.js --js_output_file $OUT_DIR/yona-lib.js
java -jar $CLOSURE_COMPILER --js $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js $PUBLIC_JAVASCRIPTS/service/yona.temporarySaveHandler.js --js_output_file $OUT_DIR/yona-lib.js

# for dev
# cat $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js $PUBLIC_JAVASCRIPTS/service/yona.temprarySaveHandler.js > $OUT_DIR/yona-lib.js
# cat $PUBLIC_JAVASCRIPTS/common/yobi.Attachments.js $PUBLIC_JAVASCRIPTS/common/yobi.Files.js $PUBLIC_JAVASCRIPTS/common/yobi.Mention.js $PUBLIC_JAVASCRIPTS/common/yobi.Markdown.js $PUBLIC_JAVASCRIPTS/common/yobi.Pagination.js $PUBLIC_JAVASCRIPTS/common/yobi.ShortcutKey.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dropdown.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Typeahead.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Dialog.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Toast.js $PUBLIC_JAVASCRIPTS/common/yobi.ui.Tabs.js $PUBLIC_JAVASCRIPTS/common/yobi.OriginalMessage.js $PUBLIC_JAVASCRIPTS/service/yona.temporarySaveHandler.js > $OUT_DIR/yona-lib.js

+ 1
- 1
public/javascripts/common/yobi.Comment.js View File

@@ -50,7 +50,7 @@ yobi.Comment = (function(){

setTimeout(function () {
htElement.commentEditforms.each(function (i, item) {
temprarySaveHandler($(item).find('textarea'), false);
temporarySaveHandler($(item).find('textarea'), false);
}.bind(this));
}, 0);
}

+ 1
- 1
public/javascripts/common/yobi.CommentForm.js View File

@@ -35,7 +35,7 @@ $(function(){
elements.commentForm.submit(onSubmitCommentForm);
$(window).on("keydown", onKeydownWindow);
$(window).on("beforeunload", onBeforeUnloadWindow);
temprarySaveHandler(elements.textarea);
temporarySaveHandler(elements.textarea);
}

/**

+ 1
- 1
public/javascripts/service/yobi.board.Write.js View File

@@ -52,7 +52,7 @@
function _attachEvent(){
htElement.welForm.submit(_onSubmitForm);

temprarySaveHandler(htElement.welTextarea);
temporarySaveHandler(htElement.welTextarea);

htElement.welTextarea.on("focus", function(){
$(window).on("beforeunload", _onBeforeUnload);

+ 1
- 1
public/javascripts/service/yobi.git.Write.js View File

@@ -72,7 +72,7 @@
$(this).next("pre.commitMsg.desc").toggleClass("hidden");
});

temprarySaveHandler(elements.body);
temporarySaveHandler(elements.body);

if(elements.state === "OPEN") {
_checkMergeResult();

+ 1
- 1
public/javascripts/service/yobi.issue.Write.js View File

@@ -68,7 +68,7 @@
}
});

temprarySaveHandler(htElement.welTextarea);
temporarySaveHandler(htElement.welTextarea);

htElement.welAssignee.on("change", function(weEvt){
htElement.welAssignee.select2("val", weEvt.val);

+ 1
- 1
public/javascripts/service/yobi.milestone.Write.js View File

@@ -49,7 +49,7 @@
* attach event handlers
*/
function _attachEvent(){
temprarySaveHandler(htElement.welInputContent);
temporarySaveHandler(htElement.welInputContent);
htElement.welForm.submit(_onSubmitForm);
}


public/javascripts/service/yona.temprarySaveHandler.js → public/javascripts/service/yona.temporarySaveHandler.js View File

@@ -5,8 +5,8 @@
* https://yona.io
**/

function temprarySaveHandler($textarea, contentInitialized) {
contentInitialized = contentInitialized !== false; // default : false
function temporarySaveHandler($textarea, contentInitialized) {
contentInitialized = contentInitialized !== false; // default : true
var noticePanel = $textarea.closest('div.write-comment-box').find(".editor-notice-label"); // 화면 어딘가 임시저장 상태 표시할 곳
var keydownTimer;


+ 1
- 1
public/javascripts/yona-lib.js View File

@@ -42,5 +42,5 @@ c.welMessage.html($yobi.nl2br(b));c.welDescription.html($yobi.nl2br(a||""));c.we
a.waItems.removeClass("active");b.addClass("active")}function f(c){c=c.attr("data-value");var e=a.welContainer.attr("data-name");b.sName=e;b.sValue=c;if("undefined"!==typeof e){var f=a.welContainer.find("input[name='"+e+"']");0===f.length&&(f=$('<input type="hidden" name="'+e+'">'),a.welContainer.append(f));f.val(c)}}function h(){"function"==typeof b.fOnChange&&setTimeout(function(){b.fOnChange(e())},0)}function e(){return b.sValue}function c(b){b=a.welContainer.find(b);if(0>=b.length)return!1;b=
$(b[0]);l(b);f(b);return!0}var b={sValue:""},a={};(function(d){a.welContainer=$(d.elContainer);a.welSelectedLabel=a.welContainer.find(".d-label");a.welList=a.welContainer.find(".dropdown-menu");a.waItems=a.welList.find("li");a.welList.on("click","li",q);a.welList.on("mousewheel",p);b.fOnChange=d.fOnChange;c("li[data-selected=true]")})(g);return{getValue:e,onChange:function(a){b.fOnChange=a;return!0},selectByValue:function(a){return c("li[data-value='"+a+"']")},selectItem:c}}})("yobi.ui.Dropdown");$(document).ready(function(){function g(g,f){var h;f=$("#"+g).find("li > a");(h=localStorage.getItem("yobitab-"+g))&&f[h]&&(h=$(f[h]))&&h.data(!1)&&h.tab("show")}var n,p,q;$(".nav-tabs[id]").each(function(l,f){p=$(f);q=p.attr("id");"undefined"!=typeof q&&(n=p.find("li"),n.click(function(){localStorage.setItem("yobitab-"+q,$(this).index())}),g(q,n))})});(function(g){g=$yobi.createNamespace(g);g.container[g.name]=function(g,p){function q(c){$(this).remove()}function l(c,b){c.bind("webkitTransitionEnd",function(){c.remove()});setTimeout(function(){c.css("opacity",0)},b)}var f,h,e;(function(c,b){b.sTplToast=b.sTplToast.replace("\n","");f=b.sTplToast||'<div class="toast" tabindex="-1"> <div class="btn-dismiss"><button type="button" class="btn-transparent">&times;</button></div> <div class="center-text msg"></div></div>';h=$(c);
e=$(f)})(g,p||{});return{push:function(c,b){var a=e.clone(),d=a.find(".msg");a.css("opacity","0");a.click(q);d.html($yobi.nl2br(c));h.prepend(a);a.css("opacity","1");b&&0<b&&l(a,b)},clear:function(){h.empty()}}}})("yobi.ui.Toast");(function(g){g=$yobi.createNamespace(g);g.container[g.name]=function(g,p){function q(f,e){f.match(l.sLastQuery)&&l.bIsLastRangeEntire?e(l.htCachedUsers):(l.htData.query=f,$yobi.sendForm({sURL:l.sActionURL,htOptForm:{method:"get"},htData:l.htData,sDataType:"json",fOnLoad:function(c,b,a){b=a.getResponseHeader("Content-Range");console.log(c);b=(b=l.rxContentRange.exec(b||""))?!(parseInt(b[1],10)<parseInt(b[2],10)):!0;l.bIsLastRangeEntire=b;l.sLastQuery=f;l.htCachedUsers=c;e(c)}}))}var l={},f;(function(g,
e){l.sActionURL=e.sActionURL||"/users";l.rxContentRange=/items\s+([0-9]+)\/([0-9]+)/;l.htData=e.htData||{};try{f=$(g);f.typeahead({minLength:l.htData.minLength||0,items:10});var c=f.data("typeahead")||{};c.items=l.htData.limit||10;c.source=l.htData.source||q;"function"===typeof l.htData.updater&&(c.updater=l.htData.updater);"function"===typeof l.htData.render&&(c.render=l.htData.render);c.minLength=l.htData.minLength||0;f.typeahead(c)}catch(b){"object"==typeof console&&console.log(b)}})(g,p||{})}})("yobi.ui.Typeahead");function temprarySaveHandler(g,n){n=!1!==n;var p=g.closest("div.write-comment-box").find(".editor-notice-label"),q;g.on("keyup",function(){g.val()!==localStorage.getItem(location.pathname)&&(clearTimeout(q),""===g.val()?localStorage.removeItem(location.pathname):q=setTimeout(function(){localStorage.setItem(location.pathname,g.val());p.html('<span class="saved">Draft saved</span>');p.children().fadeOut(1E3)},5E3))});n&&localStorage.getItem(location.pathname)&&g.val(localStorage.getItem(location.pathname))}
e){l.sActionURL=e.sActionURL||"/users";l.rxContentRange=/items\s+([0-9]+)\/([0-9]+)/;l.htData=e.htData||{};try{f=$(g);f.typeahead({minLength:l.htData.minLength||0,items:10});var c=f.data("typeahead")||{};c.items=l.htData.limit||10;c.source=l.htData.source||q;"function"===typeof l.htData.updater&&(c.updater=l.htData.updater);"function"===typeof l.htData.render&&(c.render=l.htData.render);c.minLength=l.htData.minLength||0;f.typeahead(c)}catch(b){"object"==typeof console&&console.log(b)}})(g,p||{})}})("yobi.ui.Typeahead");function temporarySaveHandler(g,n){n=!1!==n;var p=g.closest("div.write-comment-box").find(".editor-notice-label"),q;g.on("keyup",function(){g.val()!==localStorage.getItem(location.pathname)&&(clearTimeout(q),""===g.val()?localStorage.removeItem(location.pathname):q=setTimeout(function(){localStorage.setItem(location.pathname,g.val());p.html('<span class="saved">Draft saved</span>');p.children().fadeOut(1E3)},5E3))});n&&localStorage.getItem(location.pathname)&&g.val(localStorage.getItem(location.pathname))}
function removeCurrentPageTemprarySavedContent(){localStorage.removeItem(location.pathname)};

Loading…
Cancel
Save