From fc2d5383119f548f58b5000ebb94422b7feb08a7 Mon Sep 17 00:00:00 2001
From: Thomas Müller
Date: Fri, 12 Jul 2013 17:03:51 +0200
Subject: new admin setting added which allows to turn off anonymous uploads
---
core/js/share.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'core/js')
diff --git a/core/js/share.js b/core/js/share.js
index 21e352ee1c6..4c8fd874107 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -161,7 +161,12 @@ OC.Share={
// respective checkbox should be checked or
// not.
+ var publicUploadEnabled = $('#filestable').data('allow-public-upload');
+ if (typeof publicUploadEnabled == 'undefined') {
+ publicUploadEnabled = 'no';
+ }
var allowPublicUploadStatus = false;
+
$.each(data.shares, function(key, value) {
if (allowPublicUploadStatus) {
return true;
@@ -181,7 +186,7 @@ OC.Share={
html += '';
html += '';
html += '
';
- if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) {
+ if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE) && publicUploadEnabled === 'yes') {
html += '';
html += '';
html += '';
--
cgit v1.2.3
From 48948ccf5f6f1d7de2765fb955f956063d9bedc8 Mon Sep 17 00:00:00 2001
From: Jan-Christoph Borchardt
Date: Thu, 18 Jul 2013 22:15:26 +0200
Subject: finally remove the file size obfuscation as it had more
disadvantages. I was wrong, sorry.
---
apps/files/js/filelist.js | 3 +--
apps/files/js/files.js | 4 +---
apps/files/templates/index.php | 2 +-
apps/files/templates/part.list.php | 6 ++----
core/js/js.js | 10 ----------
lib/public/template.php | 10 ----------
lib/template.php | 18 ------------------
7 files changed, 5 insertions(+), 48 deletions(-)
(limited to 'core/js')
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index c847e2eff8b..04a9fb91649 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -47,7 +47,7 @@ var FileList={
//size column
if(size!=t('files', 'Pending')){
- simpleSize=simpleFileSize(size);
+ simpleSize = humanFileSize(size);
}else{
simpleSize=t('files', 'Pending');
}
@@ -55,7 +55,6 @@ var FileList={
var lastModifiedTime = Math.round(lastModified.getTime() / 1000);
td = $(' | ').attr({
"class": "filesize",
- "title": humanFileSize(size),
"style": 'color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')'
}).text(simpleSize);
tr.append(td);
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 51b3f31fb96..98fc53b71a9 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -756,9 +756,7 @@ function procesSelection(){
for(var i=0;i0){
if(selectedFolders.length==1){
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 7d679bc4bf6..fa4cda6f6b2 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -77,7 +77,7 @@
-
+
-
+
|
} ?>
|
-
+
|
|
diff --git a/core/js/js.js b/core/js/js.js
index 5158b66d73a..cf4e72324dc 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -666,8 +666,6 @@ $(document).ready(function(){
$('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
$('a.delete').tipsy({gravity: 'e', fade:true, live:true});
$('a.action').tipsy({gravity:'s', fade:true, live:true});
- $('#headerSize').tipsy({gravity:'s', fade:true, live:true});
- $('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
$('input').tipsy({gravity:'w', fade:true});
@@ -697,14 +695,6 @@ function humanFileSize(size) {
return relativeSize + ' ' + readableFormat;
}
-function simpleFileSize(bytes) {
- var mbytes = Math.round(bytes/(1024*1024/10))/10;
- if(bytes == 0) { return '0'; }
- else if(mbytes < 0.1) { return '< 0.1'; }
- else if(mbytes > 1000) { return '> 1000'; }
- else { return mbytes.toFixed(1); }
-}
-
function formatDate(date){
if(typeof date=='number'){
date=new Date(date);
diff --git a/lib/public/template.php b/lib/public/template.php
index ccf19cf052c..d81a169579e 100644
--- a/lib/public/template.php
+++ b/lib/public/template.php
@@ -76,16 +76,6 @@ function relative_modified_date($timestamp) {
}
-/**
- * @brief Return a human readable outout for a file size.
- * @param $byte size of a file in byte
- * @returns human readable interpretation of a file size
- */
-function simple_file_size($bytes) {
- return(\simple_file_size($bytes));
-}
-
-
/**
* @brief Generate html code for an options block.
* @param $options the options
diff --git a/lib/template.php b/lib/template.php
index ae9ea187445..08df168afc6 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -84,24 +84,6 @@ function human_file_size( $bytes ) {
return OC_Helper::humanFileSize( $bytes );
}
-function simple_file_size($bytes) {
- if ($bytes < 0) {
- return '?';
- }
- $mbytes = round($bytes / (1024 * 1024), 1);
- if ($bytes == 0) {
- return '0';
- }
- if ($mbytes < 0.1) {
- return '< 0.1';
- }
- if ($mbytes > 1000) {
- return '> 1000';
- } else {
- return number_format($mbytes, 1);
- }
-}
-
function relative_modified_date($timestamp) {
$l=OC_L10N::get('lib');
$timediff = time() - $timestamp;
--
cgit v1.2.3
From 5160ea60639d58a054359834d7ac6e82096c4d57 Mon Sep 17 00:00:00 2001
From: Victor Dubiniuk
Date: Mon, 22 Jul 2013 21:02:18 +0300
Subject: Show generic error when there is no error
---
core/js/share.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'core/js')
diff --git a/core/js/share.js b/core/js/share.js
index 4c8fd874107..71e6136bf71 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -122,7 +122,12 @@ OC.Share={
callback(result.data);
}
} else {
- OC.dialogs.alert(result.data.message, t('core', 'Error while sharing'));
+ if (result.data && result.data.message) {
+ var msg = result.data.message;
+ } else {
+ var msg = t('core', 'Error');
+ }
+ OC.dialogs.alert(msg, t('core', 'Error while sharing'));
}
});
},
--
cgit v1.2.3
From ab997bdc68042fa292877e17bb991d79cbed0738 Mon Sep 17 00:00:00 2001
From: Victor Dubiniuk
Date: Mon, 22 Jul 2013 21:02:56 +0300
Subject: Create an array entry before filling it
---
core/js/share.js | 1 +
1 file changed, 1 insertion(+)
(limited to 'core/js')
diff --git a/core/js/share.js b/core/js/share.js
index 71e6136bf71..e59669cbc2b 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -92,6 +92,7 @@ OC.Share={
}
}
if (shares) {
+ OC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {};
OC.Share.statuses[itemSource]['link'] = link;
} else {
delete OC.Share.statuses[itemSource];
--
cgit v1.2.3
From 284fb862589bb3a6441f464236abe735c6fe5dfc Mon Sep 17 00:00:00 2001
From: Jörn Friedrich Dreyer
Date: Wed, 24 Jul 2013 18:02:36 +0200
Subject: show tablespace only for oracle, hide dbhost for sqlite, remove
unnecessary js & html ids
---
core/js/setup.js | 26 ++++++++++----------------
core/templates/installation.php | 30 +++++++++++++++---------------
2 files changed, 25 insertions(+), 31 deletions(-)
(limited to 'core/js')
diff --git a/core/js/setup.js b/core/js/setup.js
index 76812b29979..c0df1ed96b0 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -11,42 +11,36 @@ $(document).ready(function() {
$('#selectDbType').buttonset();
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
- if($('#hasSQLite').val()=='true'){
+ if($('#hasSQLite').val()){
$('#use_other_db').hide();
- $('#dbhost').hide();
- $('#dbhostlabel').hide();
+ $('#use_oracle_db').hide();
}
$('#adminlogin').change(function(){
$('#adminlogin').val($.trim($('#adminlogin').val()));
});
$('#sqlite').click(function() {
$('#use_other_db').slideUp(250);
- $('#dbhost').hide(250);
- $('#dbhostlabel').hide(250);
+ $('#use_oracle_db').slideUp(250);
});
$('#mysql').click(function() {
$('#use_other_db').slideDown(250);
- $('#dbhost').show(250);
- $('#dbhostlabel').show(250);
+ $('#use_oracle_db').slideUp(250);
});
-
+
$('#pgsql').click(function() {
$('#use_other_db').slideDown(250);
- $('#dbhost').show(250);
- $('#dbhostlabel').show(250);
+ $('#use_oracle_db').slideUp(250);
});
-
+
$('#oci').click(function() {
$('#use_other_db').slideDown(250);
- $('#dbhost').show(250);
- $('#dbhostlabel').show(250);
+ $('#use_oracle_db').show(250);
});
-
+
$('#mssql').click(function() {
$('#use_other_db').slideDown(250);
- $('#dbhost').show(250);
- $('#dbhostlabel').show(250);
+ $('#use_oracle_db').slideUp(250);
});
$('input[checked]').trigger('click');
diff --git a/core/templates/installation.php b/core/templates/installation.php
index 6de67a83d42..77c455304d3 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -121,7 +121,7 @@
/>
-
+
@@ -131,7 +131,7 @@
/>
-
+
@@ -154,22 +154,22 @@
value=""
autocomplete="off" pattern="[0-9a-zA-Z$_-]+" />
-
-
-
-
-
-
-
-
--
cgit v1.2.3