diff --git a/app/assets/stylesheets/less/_yobiUI.less b/app/assets/stylesheets/less/_yobiUI.less index 54f231088..1238fa780 100644 --- a/app/assets/stylesheets/less/_yobiUI.less +++ b/app/assets/stylesheets/less/_yobiUI.less @@ -589,9 +589,12 @@ span.issue-label { .toast { position:relative; display:inline-block; - width: 300px; height: 50px; - margin: 10px; padding: 10px; - outline:none; text-align: center; + width: 300px; + word-break: keep-all; + word-wrap: break-word; + margin: 10px; + padding: 10px; + outline:none; font-weight: bold; border: 2px solid @primary; diff --git a/app/views/common/scripts.scala.html b/app/views/common/scripts.scala.html index 1d222d7d5..6cbd60ab9 100644 --- a/app/views/common/scripts.scala.html +++ b/app/views/common/scripts.scala.html @@ -107,7 +107,8 @@ // yobi.Files yobi.Files.init({ "sListURL" : "@routes.AttachmentApp.getFileList()", - "sUploadURL": "@routes.AttachmentApp.uploadFile()" + "sUploadURL": "@routes.AttachmentApp.uploadFile()", + "maxFileSize": "@play.Configuration.root().getLong("application.maxFileSize", 2147483454L)" // 2Gb }); // ajax for issue link detail(ui.IssuePreview) diff --git a/conf/application.conf.default b/conf/application.conf.default index 25523a1d7..5dcd55e1c 100644 --- a/conf/application.conf.default +++ b/conf/application.conf.default @@ -256,4 +256,10 @@ application.displayPrivateRepositories = false # github.allow.migration = false github.client.id = "TYPE YOUR GITHUB CILENT ID" -github.client.secret = "TYPE YOUR GITHUB CILENT SECRET" \ No newline at end of file +github.client.secret = "TYPE YOUR GITHUB CILENT SECRET" + + +# Attachment Upload File Size Limit +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# 2,147,483,454 bytes = 2Gb +application.maxFileSize = 2147483454 \ No newline at end of file diff --git a/public/bootstrap/js/bootstrap.js b/public/bootstrap/js/bootstrap.js index c298ee42e..ffa8057d2 100644 --- a/public/bootstrap/js/bootstrap.js +++ b/public/bootstrap/js/bootstrap.js @@ -1,6 +1,9 @@ -/* =================================================== - * bootstrap-transition.js v2.3.1 - * http://twitter.github.com/bootstrap/javascript.html#transitions +/* + * Yona, 21st Century Project Hosting SW + *
+ * Copyright Yona & Yobi Authors & NAVER Corp.
+ * https://yona.io
+ */rap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
diff --git a/public/javascripts/common/yobi.Files.js b/public/javascripts/common/yobi.Files.js
index b3cfc5b87..ab7905611 100644
--- a/public/javascripts/common/yobi.Files.js
+++ b/public/javascripts/common/yobi.Files.js
@@ -57,7 +57,7 @@ yobi.Files = (function(){
&& (navigator.userAgent.indexOf("FireFox") === -1); // and not FireFox
// maximum filesize (<= 2,147,483,454 bytes = 2Gb)
- htVar.nMaxFileSize = 2147483454;
+ htVar.nMaxFileSize = htOptions.maxFileSize || 2147483454;
}
/**
@@ -122,7 +122,7 @@ yobi.Files = (function(){
// check maximum filesize (<= 2,147,483,454 bytes) if available
if(oFile.size && oFile.size > htVar.nMaxFileSize){
return _onErrorSubmit(nSubmitId, {
- "status" : 0,
+ "status" : humanize.filesize(oFile.size),
"statusText": Messages("error.toolargefile", humanize.filesize(htVar.nMaxFileSize))
}, sNamespace);
}
diff --git a/public/javascripts/yona-lib.js b/public/javascripts/yona-lib.js
index 943d5c94b..4ea3651af 100644
--- a/public/javascripts/yona-lib.js
+++ b/public/javascripts/yona-lib.js
@@ -1,43 +1,43 @@
-yobi.Attachments=function(h){function q(g){r({vFile:g.oFile.files?g.oFile.files[0]:g.oFile,bTemporary:!0})}function r(g){if("undefined"===typeof g.vFile)return 0;var p,b=0,a=[];(g.vFile instanceof Array?g.vFile:[g.vFile]).forEach(function(d){var e=g.bTemporary,f=$.tmpl(n.sTplFileItem,{fileId:d.id,fileName:d.name,fileHref:d.url,fileSize:d.size,fileSizeReadable:humanize.filesize(d.size),mimeType:d.mimeType});t(f,d.mimeType);e&&f.addClass("temporary");p=f;"undefined"!==typeof d.id&&""!==d.id?(p.addClass("complete"),
-0