소스 검색

Fix variable definitions in oc dialogs

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v12.0.0beta1
Morris Jobke 7 년 전
부모
커밋
d222351c87
No account linked to committer's email address
3개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 1
    1
      core/js/js.js
  2. 4
    2
      core/js/oc-dialogs.js
  3. 1
    1
      core/js/octemplate.js

+ 1
- 1
core/js/js.js 파일 보기

@@ -150,7 +150,7 @@ var OCP = {},
_.defaults(allOptions, defaultOptions);

var _build = function (text, vars) {
var vars = vars || [];
vars = vars || [];
return text.replace(/{([^{}]*)}/g,
function (a, b) {
var r = (vars[b]);

+ 4
- 2
core/js/oc-dialogs.js 파일 보기

@@ -813,11 +813,13 @@ var OCdialogs = {

$.each(files, function(idx, entry) {
entry.icon = OC.MimeType.getIconUrl(entry.mimetype);
var simpleSize, sizeColor;
if (typeof(entry.size) !== 'undefined' && entry.size >= 0) {
var simpleSize = humanFileSize(parseInt(entry.size, 10), true);
var sizeColor = Math.round(160 - Math.pow((entry.size / (1024 * 1024)), 2));
simpleSize = humanFileSize(parseInt(entry.size, 10), true);
sizeColor = Math.round(160 - Math.pow((entry.size / (1024 * 1024)), 2));
} else {
simpleSize = t('files', 'Pending');
sizeColor = 80;
}
var $row = self.$listTmpl.octemplate({
type: entry.type,

+ 1
- 1
core/js/octemplate.js 파일 보기

@@ -94,7 +94,7 @@
};

$.fn.octemplate = function(vars, options) {
var vars = vars ? vars : {};
vars = vars || {};
if(this.length) {
var _template = Object.create(Template);
return _template.init(vars, options, this);

Loading…
취소
저장