summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/css/apps.css3
-rw-r--r--core/css/icons.css15
-rw-r--r--core/css/styles.css17
-rw-r--r--core/img/logo-mail.gifbin2196 -> 1191 bytes
-rw-r--r--core/js/config.php6
-rw-r--r--core/js/core.json1
-rw-r--r--core/js/jquery.avatar.js41
-rw-r--r--core/js/js.js62
-rw-r--r--core/js/router.js81
-rw-r--r--core/js/setup.js2
-rw-r--r--core/js/share.js4
-rw-r--r--core/js/tags.js18
-rw-r--r--core/js/tests/specHelper.js16
-rw-r--r--core/js/tests/specs/coreSpec.js23
-rw-r--r--core/lostpassword/controller.php2
-rw-r--r--core/routes.php2
-rw-r--r--core/templates/installation.php8
-rw-r--r--core/templates/mail.php22
18 files changed, 152 insertions, 171 deletions
diff --git a/core/css/apps.css b/core/css/apps.css
index f68f53d6999..58f2759f69a 100644
--- a/core/css/apps.css
+++ b/core/css/apps.css
@@ -187,6 +187,9 @@
}
#app-settings.open #app-settings-content {
display: block;
+ /* restrict height of settings and make scrollable */
+ max-height: 300px;
+ overflow-y: scroll;
}
.settings-button {
diff --git a/core/css/icons.css b/core/css/icons.css
index 814749c5af8..cdfdd8e43ef 100644
--- a/core/css/icons.css
+++ b/core/css/icons.css
@@ -1,4 +1,4 @@
-.icon {
+[class^="icon-"], [class*=" icon-"] {
background-repeat: no-repeat;
background-position: center;
}
@@ -24,7 +24,7 @@
.icon-noise {
background-image: url('../img/noise.png');
- background-repeat: no-repeat;
+ background-repeat: repeat;
}
@@ -66,7 +66,8 @@
.icon-delete {
background-image: url('../img/actions/delete.svg');
}
-.icon-delete-hover {
+.icon-delete:hover,
+.icon-delete:focus {
background-image: url('../img/actions/delete-hover.svg');
}
@@ -155,11 +156,15 @@
background-image: url('../img/actions/sound-off.svg');
}
-.icon-star {
+.icon-star,
+.icon-starred:hover,
+.icon-starred:focus {
background-image: url('../img/actions/star.svg');
}
-.icon-starred {
+.icon-starred,
+.icon-star:hover,
+.icon-star:focus {
background-image: url('../img/actions/starred.svg');
}
diff --git a/core/css/styles.css b/core/css/styles.css
index 341a507ce37..69cf6df07d0 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -175,6 +175,7 @@ button, .button,
border: 1px solid rgba(190,190,190,.9);
cursor: pointer;
border-radius: 3px;
+ outline: none;
}
input[type="submit"]:hover, input[type="submit"]:focus,
input[type="button"]:hover, input[type="button"]:focus,
@@ -204,18 +205,18 @@ textarea:disabled {
/* Primary action button, use sparingly */
.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary {
border: 1px solid #1d2d44;
- background: #35537a;
+ background-color: #35537a;
color: #ddd;
}
.primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover,
.primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus {
border: 1px solid #1d2d44;
- background: #304d76;
+ background-color: #304d76;
color: #fff;
}
.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active {
border: 1px solid #1d2d44;
- background: #1d2d44;
+ background-color: #1d2d44;
color: #bbb;
}
@@ -233,7 +234,7 @@ textarea:disabled {
}
input[type="submit"].enabled {
- background: #66f866;
+ background-color: #66f866;
border: 1px solid #5e5;
}
@@ -405,11 +406,9 @@ input[name="adminpass-clone"] { padding-left:1.8em; width:11.7em !important; }
/* General new input field look */
#body-login input[type="text"],
#body-login input[type="password"],
-#body-login input[type="email"] {
- border: 1px solid #323233;
- border-radius: 5px;
-}
-#body-login input[type='submit'] {
+#body-login input[type="email"],
+#body-login input[type="submit"] {
+ border: none;
border-radius: 5px;
}
diff --git a/core/img/logo-mail.gif b/core/img/logo-mail.gif
index 6a1caaa9188..f1dd108450e 100644
--- a/core/img/logo-mail.gif
+++ b/core/img/logo-mail.gif
Binary files differ
diff --git a/core/js/config.php b/core/js/config.php
index c606ef35056..7e23f3e2e41 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -61,8 +61,10 @@ $array = array(
"firstDay" => json_encode($l->l('firstday', 'firstday')) ,
"oc_config" => json_encode(
array(
- 'session_lifetime' => \OCP\Config::getSystemValue('session_lifetime', ini_get('session.gc_maxlifetime')),
- 'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true)
+ 'session_lifetime' => \OCP\Config::getSystemValue('session_lifetime', ini_get('session.gc_maxlifetime')),
+ 'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true),
+ 'version' => implode('.', OC_Util::getVersion()),
+ 'versionstring' => OC_Util::getVersionString(),
)
),
"oc_defaults" => json_encode(
diff --git a/core/js/core.json b/core/js/core.json
index 4beab7cf796..665e2485a90 100644
--- a/core/js/core.json
+++ b/core/js/core.json
@@ -17,7 +17,6 @@
"eventsource.js",
"config.js",
"multiselect.js",
- "router.js",
"oc-requesttoken.js"
]
}
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js
index 02a40c088b4..381c42d9dbb 100644
--- a/core/js/jquery.avatar.js
+++ b/core/js/jquery.avatar.js
@@ -75,31 +75,32 @@
var $div = this;
- OC.Router.registerLoadedCallback(function() {
- var url = OC.Router.generate('core_avatar_get', {user: user, size: size})+'?requesttoken='+oc_requesttoken;
- $.get(url, function(result) {
- if (typeof(result) === 'object') {
- if (!hidedefault) {
- if (result.data && result.data.displayname) {
- $div.imageplaceholder(user, result.data.displayname);
- } else {
- $div.imageplaceholder(user);
- }
+ var url = OC.generateUrl(
+ '/avatar/{user}/{size}?requesttoken={requesttoken}',
+ {user: user, size: size, requesttoken: oc_requesttoken});
+
+ $.get(url, function(result) {
+ if (typeof(result) === 'object') {
+ if (!hidedefault) {
+ if (result.data && result.data.displayname) {
+ $div.imageplaceholder(user, result.data.displayname);
} else {
- $div.hide();
+ $div.imageplaceholder(user);
}
} else {
- $div.show();
- if (ie8fix === true) {
- $div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">');
- } else {
- $div.html('<img src="'+url+'">');
- }
+ $div.hide();
}
- if(typeof callback === 'function') {
- callback();
+ } else {
+ $div.show();
+ if (ie8fix === true) {
+ $div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">');
+ } else {
+ $div.html('<img src="'+url+'">');
}
- });
+ }
+ if(typeof callback === 'function') {
+ callback();
+ }
});
};
}(jQuery));
diff --git a/core/js/js.js b/core/js/js.js
index ec890be4541..77aadd23e03 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -194,6 +194,30 @@ var OC={
linkToRemoteBase:function(service) {
return OC.webroot + '/remote.php/' + service;
},
+
+ /**
+ * Generates the absolute url for the given relative url, which can contain parameters.
+ *
+ * @returns {string}
+ * @param {string} url
+ * @param params
+ */
+ generateUrl: function(url, params) {
+ var _build = function (text, vars) {
+ return text.replace(/{([^{}]*)}/g,
+ function (a, b) {
+ var r = vars[b];
+ return typeof r === 'string' || typeof r === 'number' ? r : a;
+ }
+ );
+ };
+ if (url.charAt(0) !== '/') {
+ url = '/' + url;
+
+ }
+ return OC.webroot + '/index.php' + _build(url, params);
+ },
+
/**
* @brief Creates an absolute url for remote use
* @param string $service id
@@ -467,6 +491,34 @@ OC.search.lastResults={};
OC.addStyle.loaded=[];
OC.addScript.loaded=[];
+OC.msg={
+ startSaving:function(selector){
+ OC.msg.startAction(selector, t('core', 'Saving...'));
+ },
+ finishedSaving:function(selector, data){
+ OC.msg.finishedAction(selector, data);
+ },
+ startAction:function(selector, message){
+ $(selector)
+ .html( message )
+ .removeClass('success')
+ .removeClass('error')
+ .stop(true, true)
+ .show();
+ },
+ finishedAction:function(selector, data){
+ if( data.status === "success" ){
+ $(selector).html( data.data.message )
+ .addClass('success')
+ .stop(true, true)
+ .delay(3000)
+ .fadeOut(900);
+ }else{
+ $(selector).html( data.data.message ).addClass('error');
+ }
+ }
+};
+
OC.Notification={
queuedNotifications: [],
getDefaultNotificationFunction: null,
@@ -763,12 +815,10 @@ function initCore() {
if (interval < 60) {
interval = 60;
}
- OC.Router.registerLoadedCallback(function(){
- var url = OC.Router.generate('heartbeat');
- setInterval(function(){
- $.post(url);
- }, interval * 1000);
- });
+ var url = OC.generateUrl('/heartbeat');
+ setInterval(function(){
+ $.post(url);
+ }, interval * 1000);
}
// session heartbeat (defaults to enabled)
diff --git a/core/js/router.js b/core/js/router.js
deleted file mode 100644
index e6ef54a1864..00000000000
--- a/core/js/router.js
+++ /dev/null
@@ -1,81 +0,0 @@
-OC.router_base_url = OC.webroot + '/index.php';
-OC.Router = {
- // register your ajax requests to load after the loading of the routes
- // has finished. otherwise you face problems with race conditions
- registerLoadedCallback: function(callback){
- if (!this.routes_request){
- return;
- }
- this.routes_request.done(callback);
- },
- routes_request: !window.TESTING && $.ajax(OC.router_base_url + '/core/routes.json', {
- dataType: 'json',
- success: function(jsondata) {
- if (jsondata.status === 'success') {
- OC.Router.routes = jsondata.data;
- }
- }
- }),
- generate:function(name, opt_params) {
- if (!('routes' in this)) {
- if(this.routes_request.state() != 'resolved') {
- console.warn('To avoid race conditions, please register a callback');// wait
- }
- }
- if (!(name in this.routes)) {
- throw new Error('The route "' + name + '" does not exist.');
- }
- var route = this.routes[name];
- var params = opt_params || {};
- var unusedParams = $.extend(true, {}, params);
- var url = '';
- var optional = true;
- $(route.tokens).each(function(i, token) {
- if ('text' === token[0]) {
- url = token[1] + url;
- optional = false;
-
- return;
- }
-
- if ('variable' === token[0]) {
- if (false === optional || !(token[3] in route.defaults)
- || ((token[3] in params) && params[token[3]] != route.defaults[token[3]])) {
- var value;
- if (token[3] in params) {
- value = params[token[3]];
- delete unusedParams[token[3]];
- } else if (token[3] in route.defaults) {
- value = route.defaults[token[3]];
- } else if (optional) {
- return;
- } else {
- throw new Error('The route "' + name + '" requires the parameter "' + token[3] + '".');
- }
-
- var empty = true === value || false === value || '' === value;
-
- if (!empty || !optional) {
- url = token[1] + encodeURIComponent(value).replace(/%2F/g, '/') + url;
- }
-
- optional = false;
- }
-
- return;
- }
-
- throw new Error('The token type "' + token[0] + '" is not supported.');
- });
- if (url === '') {
- url = '/';
- }
-
- unusedParams = $.param(unusedParams);
- if (unusedParams.length > 0) {
- url += '?'+unusedParams;
- }
-
- return OC.router_base_url + url;
- }
-}
diff --git a/core/js/setup.js b/core/js/setup.js
index 279b5fbebb9..96719540f96 100644
--- a/core/js/setup.js
+++ b/core/js/setup.js
@@ -36,6 +36,7 @@ $(document).ready(function() {
$('#showAdvanced').click(function() {
$('#datadirContent').slideToggle(250);
+ $('#databaseBackend').slideToggle(250);
$('#databaseField').slideToggle(250);
});
$("form").submit(function(){
@@ -73,6 +74,7 @@ $(document).ready(function() {
if (currentDbType === 'sqlite' || (dbtypes.sqlite && currentDbType === undefined)){
$('#datadirContent').hide(250);
+ $('#databaseBackend').hide(250);
$('#databaseField').hide(250);
}
diff --git a/core/js/share.js b/core/js/share.js
index 0939259b7da..129e50b22d5 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -584,8 +584,8 @@ $(document).ready(function() {
$(checkboxes).filter('input[name="edit"]').attr('checked', false);
// Check Edit if Create, Update, or Delete is checked
} else if (($(this).attr('name') == 'create'
- || $(this).attr('name') == 'update'
- || $(this).attr('name') == 'delete'))
+ || $(this).attr('name') == 'update'
+ || $(this).attr('name') == 'delete'))
{
$(checkboxes).filter('input[name="edit"]').attr('checked', true);
}
diff --git a/core/js/tags.js b/core/js/tags.js
index bc6d7b4e071..bc2b42bf5ff 100644
--- a/core/js/tags.js
+++ b/core/js/tags.js
@@ -69,7 +69,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_ids_for_tag', {type: type});
+ url = OC.generateUrl('/tags/{type}/ids', {type: type});
$.getJSON(url, {tag: tag}, function(response) {
if(response.status === 'success') {
defer.resolve(response.ids);
@@ -90,7 +90,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_favorites', {type: type});
+ url = OC.generateUrl('/tags/{type}/favorites', {type: type});
$.getJSON(url, function(response) {
if(response.status === 'success') {
defer.resolve(response.ids);
@@ -111,7 +111,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_tags', {type: type});
+ url = OC.generateUrl('/tags/{type}', {type: type});
$.getJSON(url, function(response) {
if(response.status === 'success') {
defer.resolve(response.tags);
@@ -133,7 +133,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_tag', {type: type, id: id});
+ url = OC.generateUrl('/tags/{type}/tag/{id}/', {type: type, id: id});
$.post(url, {tag: tag}, function(response) {
if(response.status === 'success') {
defer.resolve(response);
@@ -157,7 +157,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_untag', {type: type, id: id});
+ url = OC.generateUrl('/tags/{type}/untag/{id}/', {type: type, id: id});
$.post(url, {tag: tag}, function(response) {
if(response.status === 'success') {
defer.resolve(response);
@@ -181,7 +181,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_favorite', {type: type, id: id});
+ url = OC.generateUrl('/tags/{type}/favorite/{id}/', {type: type, id: id});
$.post(url, function(response) {
if(response.status === 'success') {
defer.resolve(response);
@@ -205,7 +205,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_unfavorite', {type: type, id: id});
+ url = OC.generateUrl('/tags/{type}/unfavorite/{id}/', {type: type, id: id});
$.post(url, function(response) {
if(response.status === 'success') {
defer.resolve();
@@ -229,7 +229,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_add', {type: type});
+ url = OC.generateUrl('/tags/{type}/add', {type: type});
$.post(url,{tag:tag}, function(response) {
if(typeof cb == 'function') {
cb(response);
@@ -256,7 +256,7 @@ OC.Tags= {
type = type ? type : this.type;
var defer = $.Deferred(),
self = this,
- url = OC.Router.generate('core_tags_delete', {type: type});
+ url = OC.generateUrl('/tags/{type}/delete', {type: type});
if(!tags || !tags.length) {
throw new Error(t('core', 'No tags selected for deletion.'));
}
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index b1193240580..d86cd81cda8 100644
--- a/core/js/tests/specHelper.js
+++ b/core/js/tests/specHelper.js
@@ -68,9 +68,14 @@ window.oc_defaults = {};
// global setup for all tests
(function setupTests() {
var fakeServer = null,
+ $testArea = null,
routesRequestStub;
beforeEach(function() {
+ // test area for elements that need absolute selector access or measure widths/heights
+ // which wouldn't work for detached or hidden elements
+ $testArea = $('<div id="testArea" style="position: absolute; width: 1280px; height: 800px; top: -3000px; left: -3000px;"></div>');
+ $('body').append($testArea);
// enforce fake XHR, tests should not depend on the server and
// must use fake responses for expected calls
fakeServer = sinon.fakeServer.create();
@@ -86,21 +91,14 @@ window.oc_defaults = {};
// make it globally available, so that other tests can define
// custom responses
window.fakeServer = fakeServer;
-
- OC.Router.routes = [];
- OC.Router.routes_request = {
- state: sinon.stub().returns('resolved'),
- done: sinon.stub()
- };
});
afterEach(function() {
- OC.Router.routes_request.state.reset();
- OC.Router.routes_request.done.reset();
-
// uncomment this to log requests
// console.log(window.fakeServer.requests);
fakeServer.restore();
+
+ $testArea.remove();
});
})();
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 478505e9287..069546387c7 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -179,7 +179,7 @@ describe('Core base tests', function() {
});
it('Encodes special characters', function() {
expect(OC.buildQueryString({
- unicode: '汉字',
+ unicode: '汉字'
})).toEqual('unicode=%E6%B1%89%E5%AD%97');
expect(OC.buildQueryString({
b: 'spaace value',
@@ -199,22 +199,20 @@ describe('Core base tests', function() {
'booleantrue': true
})).toEqual('booleanfalse=false&booleantrue=true');
expect(OC.buildQueryString({
- 'number': 123,
+ 'number': 123
})).toEqual('number=123');
});
});
describe('Session heartbeat', function() {
var clock,
oldConfig,
- loadedStub,
routeStub,
counter;
beforeEach(function() {
clock = sinon.useFakeTimers();
oldConfig = window.oc_config;
- loadedStub = sinon.stub(OC.Router, 'registerLoadedCallback');
- routeStub = sinon.stub(OC.Router, 'generate').returns('/heartbeat');
+ routeStub = sinon.stub(OC, 'generateUrl').returns('/heartbeat');
counter = 0;
fakeServer.autoRespond = true;
@@ -227,7 +225,6 @@ describe('Core base tests', function() {
afterEach(function() {
clock.restore();
window.oc_config = oldConfig;
- loadedStub.restore();
routeStub.restore();
});
it('sends heartbeat half the session lifetime when heartbeat enabled', function() {
@@ -236,9 +233,7 @@ describe('Core base tests', function() {
session_lifetime: 300
};
window.initCore();
- expect(loadedStub.calledOnce).toEqual(true);
- loadedStub.yield();
- expect(routeStub.calledWith('heartbeat')).toEqual(true);
+ expect(routeStub.calledWith('/heartbeat')).toEqual(true);
expect(counter).toEqual(0);
@@ -264,7 +259,6 @@ describe('Core base tests', function() {
session_lifetime: 300
};
window.initCore();
- expect(loadedStub.notCalled).toEqual(true);
expect(routeStub.notCalled).toEqual(true);
expect(counter).toEqual(0);
@@ -276,5 +270,14 @@ describe('Core base tests', function() {
});
});
+ describe('Generate Url', function() {
+ it('returns absolute urls', function() {
+ expect(OC.generateUrl('heartbeat')).toEqual(OC.webroot + '/index.php/heartbeat');
+ expect(OC.generateUrl('/heartbeat')).toEqual(OC.webroot + '/index.php/heartbeat');
+ });
+ it('substitutes parameters', function() {
+ expect(OC.generateUrl('apps/files/download{file}', {file: '/Welcome.txt'})).toEqual(OC.webroot + '/index.php/apps/files/download/Welcome.txt');
+ });
+ });
});
diff --git a/core/lostpassword/controller.php b/core/lostpassword/controller.php
index fd20c6ba249..c858696885b 100644
--- a/core/lostpassword/controller.php
+++ b/core/lostpassword/controller.php
@@ -69,7 +69,7 @@ class Controller {
$defaults = new \OC_Defaults();
\OC_Mail::send($email, $_POST['user'], $l->t('%s password reset', array($defaults->getName())), $msg, $from, $defaults->getName());
} catch (Exception $e) {
- \OC_Template::printErrorPage( 'A problem occurs during sending the e-mail please contact your administrator.');
+ \OC_Template::printErrorPage( $l->t('A problem has occurred whilst sending the email, please contact your administrator.') );
}
self::displayLostPasswordPage(false, true);
} else {
diff --git a/core/routes.php b/core/routes.php
index aea788bdc6b..76cf03c3673 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -65,8 +65,6 @@ $this->create('core_tags_delete', '/tags/{type}/delete')
$this->create('js_config', '/core/js/oc.js')
->actionInclude('core/js/config.php');
// Routing
-$this->create('core_ajax_routes', '/core/routes.json')
- ->action('OC_Router', 'JSRoutes');
$this->create('core_ajax_preview', '/core/preview.png')
->actionInclude('core/ajax/preview.php');
$this->create('core_lostpassword_index', '/lostpassword/')
diff --git a/core/templates/installation.php b/core/templates/installation.php
index d3adb34f412..e2d296a713f 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -67,7 +67,7 @@
<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
<fieldset id="advancedHeader">
- <legend><a id="showAdvanced"><?php p($l->t( 'Advanced' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
+ <legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
</fieldset>
<?php endif; ?>
@@ -84,7 +84,7 @@
<?php endif; ?>
<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
- <fieldset id='databaseField'>
+ <fieldset id='databaseBackend'>
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL'])
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
<legend><?php p($l->t( 'Configure the database' )); ?></legend>
@@ -100,8 +100,10 @@
<?php endif; ?>
<?php endforeach; ?>
</div>
+ </fieldset>
<?php if($hasOtherDB): ?>
+ <fieldset id='databaseField'>
<div id="use_other_db">
<p class="infield grouptop">
<label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label>
@@ -141,8 +143,8 @@
autocomplete="off" autocapitalize="off" autocorrect="off" />
</p>
</div>
+ </fieldset>
<?php endif; ?>
- </fieldset>
<?php endif; ?>
<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>" /></div>
diff --git a/core/templates/mail.php b/core/templates/mail.php
index b8b0a2bfe96..ae46eaca788 100644
--- a/core/templates/mail.php
+++ b/core/templates/mail.php
@@ -2,15 +2,15 @@
<tr><td>
<table cellspacing="0" cellpadding="0" border="0" width="600px">
<tr>
-<td bgcolor="#1d2d44" width="20px">&nbsp;</td>
-<td bgcolor="#1d2d44">
-<img src="<?php print_unescaped(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/>
+<td bgcolor="<?php p($theme->getMailHeaderColor());?>" width="20px">&nbsp;</td>
+<td bgcolor="<?php p($theme->getMailHeaderColor());?>">
+<img src="<?php p(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/>
</td>
</tr>
-<tr><td bgcolor="#f8f8f8" colspan="2">&nbsp;</td></tr>
+<tr><td colspan="2">&nbsp;</td></tr>
<tr>
-<td bgcolor="#f8f8f8" width="20px">&nbsp;</td>
-<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
+<td width="20px">&nbsp;</td>
+<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
<?php
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
if ( isset($_['expiration']) ) {
@@ -21,17 +21,17 @@ p($l->t('Cheers!'));
?>
</td>
</tr>
-<tr><td bgcolor="#f8f8f8" colspan="2">&nbsp;</td></tr>
+<tr><td colspan="2">&nbsp;</td></tr>
<tr>
-<td bgcolor="#f8f8f8" width="20px">&nbsp;</td>
-<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
+<td width="20px">&nbsp;</td>
+<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
<?php p($theme->getName()); ?> -
<?php p($theme->getSlogan()); ?>
-<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a>
+<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a>
</td>
</tr>
<tr>
-<td bgcolor="#f8f8f8" colspan="2">&nbsp;</td>
+<td colspan="2">&nbsp;</td>
</tr>
</table>
</td></tr>