diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/update.php | 6 | ||||
-rw-r--r-- | core/command/upgrade.php | 6 | ||||
-rw-r--r-- | core/css/fixes.css | 13 | ||||
-rw-r--r-- | core/img/logo-icon-175px.png | bin | 0 -> 2946 bytes | |||
-rw-r--r-- | core/js/oc-dialogs.js | 93 | ||||
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 22 | ||||
-rw-r--r-- | core/l10n/es.js | 1 | ||||
-rw-r--r-- | core/l10n/es.json | 1 | ||||
-rw-r--r-- | core/templates/login.php | 2 |
9 files changed, 132 insertions, 12 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index a693deeb9cf..ff18d2bc04b 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -88,6 +88,12 @@ if (OC::checkUpgrade(false)) { $eventSource->close(); OC_Config::setValue('maintenance', false); }); + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Set log level to debug - current level: "%s"', [ $logLevelName ])); + }); + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Reset log level to "%s"', [ $logLevelName ])); + }); try { $updater->upgrade(); diff --git a/core/command/upgrade.php b/core/command/upgrade.php index 44e0b66c17c..fa160d9a1c0 100644 --- a/core/command/upgrade.php +++ b/core/command/upgrade.php @@ -177,6 +177,12 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) { $output->writeln("<error>$message</error>"); }); + $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) { + $output->writeln("<info>Set log level to debug - current level: '$logLevelName'</info>"); + }); + $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) { + $output->writeln("<info>Reset log level to '$logLevelName'</info>"); + }); if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { $updater->listen('\OC\Updater', 'repairInfo', function ($message) use($output) { diff --git a/core/css/fixes.css b/core/css/fixes.css index 7ef44ba6909..54852eb9beb 100644 --- a/core/css/fixes.css +++ b/core/css/fixes.css @@ -38,6 +38,10 @@ select { background-image: url('../img/actions/settings.png'); } +/* IE8 needs PNG image for header logo */ +.ie8 #header .logo { + background-image: url(../img/logo-icon-175px.png); +} /* IE8 needs background to be set to same color to make transparency look good. */ .lte9 #body-login form input[type="text"] { @@ -51,6 +55,15 @@ select { border-bottom: 1px solid lightgrey; background-color: white; /* don't change background on hover */ } +.ie8 #body-login input[type="submit"] { + padding: 10px 5px; + margin-top: 3px; +} +/* for whatever unexplained reason */ +.ie8 #password { + width: 271px !important; + min-width: auto !important; +} /* disable opacity of info text on gradient since we cannot set a good backround color to use the filter&background hack as with the input labels */ diff --git a/core/img/logo-icon-175px.png b/core/img/logo-icon-175px.png Binary files differnew file mode 100644 index 00000000000..67e76498670 --- /dev/null +++ b/core/img/logo-icon-175px.png diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 38b91be9d2e..c38250c79c6 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -342,11 +342,12 @@ var OCdialogs = { var crop = function(img) { var canvas = document.createElement('canvas'), - width = img.width, - height = img.height, - x, y, size; + targetSize = 96, + width = img.width, + height = img.height, + x, y, size; - // calculate the width and height, constraining the proportions + // Calculate the width and height, constraining the proportions if (width > height) { y = 0; x = (width - height) / 2; @@ -356,14 +357,90 @@ var OCdialogs = { } size = Math.min(width, height); - // resize the canvas and draw the image data into it - canvas.width = 64; - canvas.height = 64; + // Set canvas size to the cropped area + canvas.width = size; + canvas.height = size; var ctx = canvas.getContext("2d"); - ctx.drawImage(img, x, y, size, size, 0, 0, 64, 64); + ctx.drawImage(img, x, y, size, size, 0, 0, size, size); + + // Resize the canvas to match the destination (right size uses 96px) + resampleHermite(canvas, size, size, targetSize, targetSize); + return canvas.toDataURL("image/png", 0.7); }; + /** + * Fast image resize/resample using Hermite filter with JavaScript. + * + * @author: ViliusL + * + * @param {*} canvas + * @param {number} W + * @param {number} H + * @param {number} W2 + * @param {number} H2 + */ + var resampleHermite = function (canvas, W, H, W2, H2) { + W2 = Math.round(W2); + H2 = Math.round(H2); + var img = canvas.getContext("2d").getImageData(0, 0, W, H); + var img2 = canvas.getContext("2d").getImageData(0, 0, W2, H2); + var data = img.data; + var data2 = img2.data; + var ratio_w = W / W2; + var ratio_h = H / H2; + var ratio_w_half = Math.ceil(ratio_w / 2); + var ratio_h_half = Math.ceil(ratio_h / 2); + + for (var j = 0; j < H2; j++) { + for (var i = 0; i < W2; i++) { + var x2 = (i + j * W2) * 4; + var weight = 0; + var weights = 0; + var weights_alpha = 0; + var gx_r = 0; + var gx_g = 0; + var gx_b = 0; + var gx_a = 0; + var center_y = (j + 0.5) * ratio_h; + for (var yy = Math.floor(j * ratio_h); yy < (j + 1) * ratio_h; yy++) { + var dy = Math.abs(center_y - (yy + 0.5)) / ratio_h_half; + var center_x = (i + 0.5) * ratio_w; + var w0 = dy * dy; //pre-calc part of w + for (var xx = Math.floor(i * ratio_w); xx < (i + 1) * ratio_w; xx++) { + var dx = Math.abs(center_x - (xx + 0.5)) / ratio_w_half; + var w = Math.sqrt(w0 + dx * dx); + if (w >= -1 && w <= 1) { + //hermite filter + weight = 2 * w * w * w - 3 * w * w + 1; + if (weight > 0) { + dx = 4 * (xx + yy * W); + //alpha + gx_a += weight * data[dx + 3]; + weights_alpha += weight; + //colors + if (data[dx + 3] < 255) + weight = weight * data[dx + 3] / 250; + gx_r += weight * data[dx]; + gx_g += weight * data[dx + 1]; + gx_b += weight * data[dx + 2]; + weights += weight; + } + } + } + } + data2[x2] = gx_r / weights; + data2[x2 + 1] = gx_g / weights; + data2[x2 + 2] = gx_b / weights; + data2[x2 + 3] = gx_a / weights_alpha; + } + } + canvas.getContext("2d").clearRect(0, 0, Math.max(W, W2), Math.max(H, H2)); + canvas.width = W2; + canvas.height = H2; + canvas.getContext("2d").putImageData(img2, 0, 0); + }; + var addConflict = function($conflicts, original, replacement) { var $conflict = $conflicts.find('.template').clone().removeClass('template').addClass('conflict'); diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index cb9325231dd..3d8fb461461 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -144,17 +144,33 @@ }, onPasswordEntered: function() { - var password = this.$el.find('#linkPassText').val(); + var self = this; + var $loading = this.$el.find('#linkPass .icon-loading-small'); + if (!$loading.hasClass('hidden')) { + // still in process + return; + } + var $input = this.$el.find('#linkPassText'); + $input.removeClass('error'); + var password = $input.val(); if(password === '') { return; } - this.$el.find('#linkPass .icon-loading-small') + $loading .removeClass('hidden') .addClass('inlineblock'); this.model.setPassword(password); - this.model.saveLinkShare(); + this.model.saveLinkShare({}, { + error: function(model, msg) { + $loading.removeClass('inlineblock').addClass('hidden'); + $input.addClass('error'); + $input.attr('title', msg); + $input.tooltip({placement: 'bottom', trigger: 'manual'}); + $input.tooltip('show'); + } + }); }, onAllowPublicUploadChange: function() { diff --git a/core/l10n/es.js b/core/l10n/es.js index 1b026297565..a35f8464325 100644 --- a/core/l10n/es.js +++ b/core/l10n/es.js @@ -182,6 +182,7 @@ OC.L10N.register( "New Password" : "Contraseña nueva", "Reset password" : "Restablecer contraseña", "Searching other places" : "Buscando en otros lugares", + "No search results in other folders" : "Ningún resultado de búsqueda en otras carpetas", "Personal" : "Personal", "Users" : "Usuarios", "Apps" : "Aplicaciones", diff --git a/core/l10n/es.json b/core/l10n/es.json index a4f5ba0cf5c..2a1d8b79a28 100644 --- a/core/l10n/es.json +++ b/core/l10n/es.json @@ -180,6 +180,7 @@ "New Password" : "Contraseña nueva", "Reset password" : "Restablecer contraseña", "Searching other places" : "Buscando en otros lugares", + "No search results in other folders" : "Ningún resultado de búsqueda en otras carpetas", "Personal" : "Personal", "Users" : "Usuarios", "Apps" : "Aplicaciones", diff --git a/core/templates/login.php b/core/templates/login.php index db77f63bbd0..6751d92f656 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -55,7 +55,7 @@ script('core', [ autocomplete="on" autocapitalize="off" autocorrect="off" required> <label for="password" class="infield"><?php p($l->t('Password')); ?></label> <img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/> - <input type="submit" id="submit" class="login primary icon-confirm" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/> + <input type="submit" id="submit" class="login primary icon-confirm svg" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/> </p> <?php if (isset($_['invalidpassword']) && ($_['invalidpassword'])): ?> |