summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-06-27 18:23:00 +0200
committerLukas Reschke <lukas@owncloud.com>2016-06-27 18:23:00 +0200
commit6670d3765881a1a7579bd96a523a90c2a52aec4a (patch)
tree4251976f5699d7b9e0b1b0aa42b3a5baca5432b5 /settings
parentcee2f5dc65f743e0e6470e852978d8bb8e346012 (diff)
parentf8fa031e9f81ba052930d2de647d997af3c309c6 (diff)
downloadnextcloud-server-6670d3765881a1a7579bd96a523a90c2a52aec4a.tar.gz
nextcloud-server-6670d3765881a1a7579bd96a523a90c2a52aec4a.zip
Merge remote-tracking branch 'upstream/master' into master-sync-upstream
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/AuthSettingsController.php1
-rw-r--r--settings/css/settings.css16
-rw-r--r--settings/js/authtoken.js6
-rw-r--r--settings/js/authtoken_collection.js6
-rw-r--r--settings/js/authtoken_view.js21
-rw-r--r--settings/l10n/pl.js2
-rw-r--r--settings/l10n/pl.json2
-rw-r--r--settings/templates/personal.php12
8 files changed, 45 insertions, 21 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php
index fba663b034d..db2db6e5bfc 100644
--- a/settings/Controller/AuthSettingsController.php
+++ b/settings/Controller/AuthSettingsController.php
@@ -118,6 +118,7 @@ class AuthSettingsController extends Controller {
return [
'token' => $token,
+ 'loginName' => $loginName,
'deviceToken' => $deviceToken
];
}
diff --git a/settings/css/settings.css b/settings/css/settings.css
index c4854ecec32..0af53cebf31 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -131,11 +131,19 @@ table.nostyle td { padding: 0.2em 0; }
opacity: 0.6;
}
+#new-app-login-name,
#new-app-password {
width: 186px;
font-family: monospace;
background-color: lightyellow;
}
+.app-password-row {
+ display: table-row;
+}
+.app-password-label {
+ display: table-cell;
+ padding-right: 1em;
+}
/* USERS */
#newgroup-init a span { margin-left: 20px; }
@@ -161,10 +169,6 @@ table.nostyle td { padding: 0.2em 0; }
width: 32px;
}
-.ie8 #newgroup-form .icon-add {
- height: 30px;
-}
-
.isgroup .groupname {
width: 85%;
display: block;
@@ -281,10 +285,6 @@ input.userFilter {width: 200px;}
width: 32px;
}
-
-.ie8 table.hascontrols{border-collapse:collapse;width: 100%;}
-.ie8 table.hascontrols tbody tr{border-collapse:collapse;border: 1px solid #ddd !important;}
-
/* used to highlight a user row in red */
#userlist tr.row-warning {
background-color: #FDD;
diff --git a/settings/js/authtoken.js b/settings/js/authtoken.js
index 215192d7163..1d958a4d675 100644
--- a/settings/js/authtoken.js
+++ b/settings/js/authtoken.js
@@ -20,14 +20,14 @@
*
*/
-(function(OC, Backbone) {
+(function(OC) {
'use strict';
OC.Settings = OC.Settings || {};
- var AuthToken = Backbone.Model.extend({
+ var AuthToken = OC.Backbone.Model.extend({
});
OC.Settings.AuthToken = AuthToken;
-})(OC, Backbone);
+})(OC);
diff --git a/settings/js/authtoken_collection.js b/settings/js/authtoken_collection.js
index a78e053995f..ab7f7d5804a 100644
--- a/settings/js/authtoken_collection.js
+++ b/settings/js/authtoken_collection.js
@@ -20,12 +20,12 @@
*
*/
-(function(OC, Backbone) {
+(function(OC) {
'use strict';
OC.Settings = OC.Settings || {};
- var AuthTokenCollection = Backbone.Collection.extend({
+ var AuthTokenCollection = OC.Backbone.Collection.extend({
model: OC.Settings.AuthToken,
@@ -49,4 +49,4 @@
OC.Settings.AuthTokenCollection = AuthTokenCollection;
-})(OC, Backbone);
+})(OC);
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index da5861689a0..01fc1b2ea34 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -1,4 +1,4 @@
-/* global Backbone, Handlebars, moment */
+/* global Handlebars, moment */
/**
* @author Christoph Wurst <christoph@owncloud.com>
@@ -20,7 +20,7 @@
*
*/
-(function(OC, _, Backbone, $, Handlebars, moment) {
+(function(OC, _, $, Handlebars, moment) {
'use strict';
OC.Settings = OC.Settings || {};
@@ -32,7 +32,7 @@
+ '<td><a class="icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a></td>'
+ '<tr>';
- var SubView = Backbone.View.extend({
+ var SubView = OC.Backbone.View.extend({
collection: null,
/**
@@ -94,7 +94,7 @@
}
});
- var AuthTokenView = Backbone.View.extend({
+ var AuthTokenView = OC.Backbone.View.extend({
collection: null,
_views: [],
@@ -107,6 +107,8 @@
_result: undefined,
+ _newAppLoginName: undefined,
+
_newAppPassword: undefined,
_hideAppPasswordBtn: undefined,
@@ -136,6 +138,8 @@
this._addAppPasswordBtn.click(_.bind(this._addAppPassword, this));
this._result = $('#app-password-result');
+ this._newAppLoginName = $('#new-app-login-name');
+ this._newAppLoginName.on('focus', _.bind(this._onNewTokenLoginNameFocus, this));
this._newAppPassword = $('#new-app-password');
this._newAppPassword.on('focus', _.bind(this._onNewTokenFocus, this));
this._hideAppPasswordBtn = $('#app-password-hide');
@@ -181,6 +185,7 @@
$.when(creatingToken).done(function(resp) {
_this.collection.add(resp.deviceToken);
_this.render();
+ _this._newAppLoginName.val(resp.loginName);
_this._newAppPassword.val(resp.token);
_this._toggleFormResult(false);
_this._newAppPassword.select();
@@ -194,6 +199,10 @@
});
},
+ _onNewTokenLoginNameFocus: function() {
+ this._newAppLoginName.select();
+ },
+
_onNewTokenFocus: function() {
this._newAppPassword.select();
},
@@ -220,6 +229,8 @@
var destroyingToken = token.destroy();
+ $row.find('.icon-delete').tooltip('hide');
+
var _this = this;
$.when(destroyingToken).fail(function() {
OC.Notification.showTemporary(t('core', 'Error while deleting the token'));
@@ -237,4 +248,4 @@
OC.Settings.AuthTokenView = AuthTokenView;
-})(OC, _, Backbone, $, Handlebars, moment);
+})(OC, _, $, Handlebars, moment);
diff --git a/settings/l10n/pl.js b/settings/l10n/pl.js
index 0d68b384931..903b374e0af 100644
--- a/settings/l10n/pl.js
+++ b/settings/l10n/pl.js
@@ -28,6 +28,7 @@ OC.L10N.register(
"Email saved" : "E-mail zapisany",
"Your full name has been changed." : "Twoja pełna nazwa została zmieniona.",
"Unable to change full name" : "Nie można zmienić pełnej nazwy",
+ "Redis" : "Redis",
"Security & setup warnings" : "Ostrzeżenia bezpieczeństwa i konfiguracji",
"Sharing" : "Udostępnianie",
"Server-side encryption" : "Szyfrowanie po stronie serwera",
@@ -48,6 +49,7 @@ OC.L10N.register(
"Migration in progress. Please wait until the migration is finished" : "Trwa migracja. Proszę poczekać, aż migracja dobiegnie końca.",
"Migration started …" : "Migracja rozpoczęta...",
"Sending..." : "Wysyłam...",
+ "Experimental" : "Eksperymentalny",
"All" : "Wszystkie",
"No apps found for your version" : "Nie znaleziono aplikacji dla twojej wersji",
"Update to %s" : "Uaktualnij do %s",
diff --git a/settings/l10n/pl.json b/settings/l10n/pl.json
index bdae17d4eef..f1c1994dd1d 100644
--- a/settings/l10n/pl.json
+++ b/settings/l10n/pl.json
@@ -26,6 +26,7 @@
"Email saved" : "E-mail zapisany",
"Your full name has been changed." : "Twoja pełna nazwa została zmieniona.",
"Unable to change full name" : "Nie można zmienić pełnej nazwy",
+ "Redis" : "Redis",
"Security & setup warnings" : "Ostrzeżenia bezpieczeństwa i konfiguracji",
"Sharing" : "Udostępnianie",
"Server-side encryption" : "Szyfrowanie po stronie serwera",
@@ -46,6 +47,7 @@
"Migration in progress. Please wait until the migration is finished" : "Trwa migracja. Proszę poczekać, aż migracja dobiegnie końca.",
"Migration started …" : "Migracja rozpoczęta...",
"Sending..." : "Wysyłam...",
+ "Experimental" : "Eksperymentalny",
"All" : "Wszystkie",
"No apps found for your version" : "Nie znaleziono aplikacji dla twojej wersji",
"Update to %s" : "Uaktualnij do %s",
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 716570cad84..bcc803938ba 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -201,8 +201,16 @@ if($_['passwordChangeSupported']) {
<button id="add-app-password" class="button"><?php p($l->t('Create new app password')); ?></button>
</div>
<div id="app-password-result" class="hidden">
- <input id="new-app-password" type="text" readonly="readonly"/>
- <button id="app-password-hide" class="button"><?php p($l->t('Done')); ?></button>
+ <span><?php p($l->t('Use the credentials below to configure your app or device.')); ?></span>
+ <div class="app-password-row">
+ <span class="app-password-label"><?php p($l->t('Username')); ?></span>
+ <input id="new-app-login-name" type="text" readonly="readonly"/>
+ </div>
+ <div class="app-password-row">
+ <span class="app-password-label"><?php p($l->t('Password')); ?></span>
+ <input id="new-app-password" type="text" readonly="readonly"/>
+ <button id="app-password-hide" class="button"><?php p($l->t('Done')); ?></button>
+ </div>
</div>
</div>