diff options
author | Bart Visscher <bartv@thisnet.nl> | 2014-02-10 21:32:17 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2014-02-10 21:32:17 +0100 |
commit | 082abdc62080730f70ac0fac67628e4d3bb0cc7b (patch) | |
tree | 0054fcb95d954b31933aaafbbdcd69d66a6c944e /settings | |
parent | 5c3c379f351be913fe7abd500fadd69a83687ebc (diff) | |
parent | bea80ffe2060407e5d849a86f71fae2eed80b08e (diff) | |
download | nextcloud-server-082abdc62080730f70ac0fac67628e4d3bb0cc7b.tar.gz nextcloud-server-082abdc62080730f70ac0fac67628e4d3bb0cc7b.zip |
Merge branch 'master' into migration_unit_tests
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 19 | ||||
-rw-r--r-- | settings/img/log Icon License | 2 | ||||
-rw-r--r-- | settings/img/log.png | bin | 342 -> 0 bytes | |||
-rw-r--r-- | settings/img/log.svg | 10 | ||||
-rw-r--r-- | settings/js/apps.js | 30 | ||||
-rw-r--r-- | settings/js/personal.js | 43 | ||||
-rw-r--r-- | settings/js/users.js | 2 | ||||
-rw-r--r-- | settings/l10n/ru_RU.php | 10 | ||||
-rw-r--r-- | settings/personal.php | 4 | ||||
-rw-r--r-- | settings/templates/apps.php | 13 | ||||
-rw-r--r-- | settings/templates/personal.php | 50 |
11 files changed, 127 insertions, 56 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 2e464c3f110..8a96885b789 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -131,6 +131,12 @@ span.version { margin-left:1em; margin-right:1em; color:#555; } .appslink { text-decoration: underline; } .score { color:#666; font-weight:bold; font-size:0.8em; } +.appinfo .documentation { + margin-top: 1em; + margin-bottom: 1em; +} + + /* LOG */ #log { white-space:normal; } #lessLog { display:none; } @@ -147,3 +153,16 @@ table.shareAPI td { padding-bottom: 0.8em; } /* HELP */ .pressed {background-color:#DDD;} +/* PASSWORD */ +.strengthify-wrapper { + position: absolute; + left: 189px; + width: 131px; + margin-top: -7px; +} + +/* OPERA hack for strengthify*/ +doesnotexist:-o-prefocus, .strengthify-wrapper { + left: 185px; + width: 129px; +} diff --git a/settings/img/log Icon License b/settings/img/log Icon License deleted file mode 100644 index b5c3167d733..00000000000 --- a/settings/img/log Icon License +++ /dev/null @@ -1,2 +0,0 @@ -CC BY 3.0 -http://thenounproject.com/en-us/noun/printer/#icon-No109
\ No newline at end of file diff --git a/settings/img/log.png b/settings/img/log.png Binary files differdeleted file mode 100644 index b34a58f844c..00000000000 --- a/settings/img/log.png +++ /dev/null diff --git a/settings/img/log.svg b/settings/img/log.svg deleted file mode 100644 index a3939b73093..00000000000 --- a/settings/img/log.svg +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 100 100" xml:space="preserve" height="16px" viewBox="0 0 100 100" width="16px" version="1.1" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><g fill="#4d4d4d"> -<rect height="19" width="4" y="45" x="75"/> -<polygon points="21 0 21 19 25 19 25 4 75 4 75 19 79 19 79 0"/> -<polygon points="75 45 75 96 44 96 44 77 25 77 25 45 21 45 21 80 41 100 79 100 79 45"/> -<rect height="3" width="38" y="45" x="31"/> -<rect height="3" width="38" y="56" x="31"/> -<rect height="3" width="38" y="67" x="31"/> -<path d="m0 21v48h19v-10h-9v-28h80v28h-9v10h19v-48h-100zm97 7h-4v-4h4v4z"/> -</g></svg> diff --git a/settings/js/apps.js b/settings/js/apps.js index a55c55e24cf..2c6f77d9314 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -37,6 +37,30 @@ OC.Settings.Apps = OC.Settings.Apps || { } page.find('span.licence').text(appLicense); + var userDocumentation = false; + var adminDocumentation = false; + if (typeof(app.documentation) !== 'undefined') { + if (typeof(app.documentation.user) !== 'undefined') { + userDocumentation = true; + page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>"); + page.find('p.documentation').show(); + } + if (typeof(app.documentation.admin) !== 'undefined') { + adminDocumentation = true; + page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>"); + page.find('p.documentation').show(); + } + + if(userDocumentation && adminDocumentation) { + page.find('span.userDocumentation').after(', '); + } + } + + if (typeof(app.website) !== 'undefined') { + page.find('p.website').show(); + page.find('a#websitelink').attr('href', app.website); + } + if (app.update !== false) { page.find('input.update').show(); page.find('input.update').data('appid', app.id); @@ -51,8 +75,8 @@ OC.Settings.Apps = OC.Settings.Apps || { page.find('input.enable').data('active', app.active); if (app.internal === false) { page.find('span.score').show(); - page.find('p.appslink').show(); - page.find('a').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id); + page.find('p.appstore').show(); + page.find('a#appstorelink').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id); page.find('small.externalapp').hide(); } else { page.find('p.appslink').hide(); @@ -110,7 +134,7 @@ OC.Settings.Apps = OC.Settings.Apps || { element.val(t('settings','Disable')); } },'json') - .fail(function() { + .fail(function() { OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app')); appitem.data('errormsg', t('settings', 'Error while enabling app')); appitem.data('active',false); diff --git a/settings/js/personal.js b/settings/js/personal.js index 2934677f256..3b876467756 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -1,5 +1,6 @@ /** * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com> + * 2013, Morris Jobke <morris.jobke@gmail.com> * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ @@ -157,20 +158,37 @@ $(document).ready(function(){ if(typeof timeout !== 'undefined'){ clearTimeout(timeout); } - timeout = setTimeout('changeDisplayName()',1000); + timeout = setTimeout(changeDisplayName, 1000); } }); $('#email').keyup(function(){ if ($('#email').val() !== '' ){ + // if this is the enter key changeEmailAddress() is already invoked + // so it doesn't need to be triggered again + if(event.keyCode === 13) { + return; + } if(typeof timeout !== 'undefined'){ clearTimeout(timeout); } - timeout = setTimeout('changeEmailAddress()',1000); + timeout = setTimeout(changeEmailAddress, 1000); } }); + $('#email').keypress(function(event){ + // check for enter key and non empty email + if (event.keyCode === 13 && $('#email').val() !== '' ){ + event.preventDefault() + // clear timeout of previous keyup event - prevents duplicate changeEmailAddress call + if(typeof timeout !== 'undefined'){ + clearTimeout(timeout); + } + changeEmailAddress(); + } + }); + $("#languageinput").change( function(){ // Serialize the data var post = $( "#languageinput" ).serialize(); @@ -188,6 +206,8 @@ $(document).ready(function(){ $('button:button[name="submitDecryptAll"]').click(function() { var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val(); + $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true); + $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true); OC.Encryption.decryptAll(privateKeyPassword); }); @@ -196,6 +216,8 @@ $(document).ready(function(){ if (privateKeyPassword !== '' ) { $('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled"); if(event.which === 13) { + $('#decryptAll button:button[name="submitDecryptAll"]').prop("disabled", true); + $('#decryptAll input:password[name="privateKeyPassword"]').prop("disabled", true); OC.Encryption.decryptAll(privateKeyPassword); } } else { @@ -243,6 +265,17 @@ $(document).ready(function(){ $('#sendcropperbutton').click(function(){ sendCropData(); }); + + $('#pass2').strengthify({ + zxcvbn: OC.linkTo('3rdparty','zxcvbn/js/zxcvbn.js'), + titles: [ + t('core', 'Very weak password'), + t('core', 'Weak password'), + t('core', 'So-so password'), + t('core', 'Good password'), + t('core', 'Strong password') + ] + }); } ); OC.Encryption = { @@ -251,13 +284,13 @@ OC.Encryption = { $.post('ajax/decryptall.php', {password:password}, function(data) { if (data.status === "error") { OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); + $('#decryptAll input:password[name="privateKeyPassword"]').removeAttr("disabled"); } else { OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); } - } - ); + }); } -} +}; OC.Encryption.msg={ startDecrypting:function(selector){ diff --git a/settings/js/users.js b/settings/js/users.js index 5ae157b07c6..6886db668b5 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -44,7 +44,7 @@ var UserList = { // Provide user with option to undo $('#notification').data('deleteuser', true); - OC.Notification.showHtml(t('users', 'deleted') + ' ' + escapeHTML(uid) + '<span class="undo">' + t('users', 'undo') + '</span>'); + OC.Notification.showHtml(t('settings', 'deleted') + ' ' + escapeHTML(uid) + '<span class="undo">' + t('settings', 'undo') + '</span>'); }, /** diff --git a/settings/l10n/ru_RU.php b/settings/l10n/ru_RU.php deleted file mode 100644 index 938c0b1642c..00000000000 --- a/settings/l10n/ru_RU.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -$TRANSLATIONS = array( -"Error" => "Ошибка", -"Delete" => "Удалить", -"More" => "Подробнее", -"Password" => "Пароль", -"Create" => "Создать", -"Username" => "Имя пользователя" -); -$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/settings/personal.php b/settings/personal.php index 44e1048941b..cf1a496bdf0 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -13,6 +13,8 @@ $defaults = new OC_Defaults(); // initialize themable default strings and urls // Highlight navigation entry OC_Util::addScript( 'settings', 'personal' ); OC_Util::addStyle( 'settings', 'settings' ); +OC_Util::addScript( '3rdparty', 'strengthify/jquery.strengthify' ); +OC_Util::addStyle( '3rdparty', 'strengthify/strengthify' ); OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' ); OC_Util::addStyle( '3rdparty', 'chosen' ); \OC_Util::addScript('files', 'jquery.fileupload'); @@ -20,6 +22,8 @@ if (\OC_Config::getValue('enable_avatars', true) === true) { \OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min'); \OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min'); } + +// Highlight navigation entry OC_App::setActiveNavigationEntry( 'personal' ); $storageInfo=OC_Helper::getStorageInfo('/'); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 0b76f775fea..4c77c62f511 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -9,9 +9,11 @@ <ul id="leftcontent" class="applist"> + <?php if(OC_Config::getValue('appstoreenabled', true) === true): ?> <li> <a class="app-external" target="_blank" href="http://owncloud.org/dev"><?php p($l->t('Add your App'));?> …</a> </li> + <?php endif; ?> <?php foreach($_['apps'] as $app):?> <li <?php if($app['active']) print_unescaped('class="active"')?> data-id="<?php p($app['id']) ?>" @@ -24,9 +26,11 @@ </li> <?php endforeach;?> + <?php if(OC_Config::getValue('appstoreenabled', true) === true): ?> <li> <a class="app-external" target="_blank" href="http://apps.owncloud.com"><?php p($l->t('More Apps'));?> …</a> </li> + <?php endif; ?> </ul> <div id="rightcontent"> <div class="appinfo"> @@ -34,9 +38,16 @@ class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3> <span class="score"></span> <p class="description"></p> + <p class="documentation hidden"> + <?php p($l->t("Documentation:"));?> + <span class="userDocumentation appslink"></span> + <span class="adminDocumentation appslink"></span> + </p> <img src="" class="preview hidden" /> - <p class="appslink hidden"><a href="#" target="_blank"><?php + <p class="appslink appstore hidden"><a id="appstorelink" href="#" target="_blank"><?php p($l->t('See application page at apps.owncloud.com'));?></a></p> + <p class="appslink website hidden"><a id="websitelink" href="#" target="_blank"><?php + p($l->t('See application website'));?></a></p> <p class="license hidden"><?php print_unescaped($l->t('<span class="licence"></span>-licensed by <span class="author"></span>'));?></p> <input class="enable hidden" type="submit" /> diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 3eb864655bb..31ae3a991b6 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -39,11 +39,15 @@ if($_['passwordChangeSupported']) { <h2><?php p($l->t('Password'));?></h2> <div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div> <div id="passworderror"><?php echo $l->t('Unable to change your password');?></div> - <input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" /> + <input type="password" id="pass1" name="oldpassword" + placeholder="<?php echo $l->t('Current password');?>" autocomplete="off" /> <input type="password" id="pass2" name="personal-password" - placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" /> + placeholder="<?php echo $l->t('New password');?>" + data-typetoggle="#personal-show" autocomplete="off" /> <input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label> <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" /> + <br/> + <div class="strengthify-wrapper"></div> </fieldset> </form> <?php @@ -144,29 +148,27 @@ if($_['passwordChangeSupported']) { };?> <?php if($_['enableDecryptAll']): ?> -<form id="decryptAll"> - <fieldset class="personalblock"> - <h2> - <?php p( $l->t( 'Encryption' ) ); ?> - </h2> - <?php p($l->t( "The encryption app is no longer enabled, please decrypt all your files" )); ?> - <p> - <input - type="password" - name="privateKeyPassword" - id="privateKeyPassword" /> - <label for="privateKeyPassword"><?php p($l->t( "Log-in password" )); ?></label> - <br /> - <button - type="button" - disabled - name="submitDecryptAll"><?php p($l->t( "Decrypt all Files" )); ?> - </button> - <span class="msg"></span> - </p> +<fieldset class="personalblock" id="decryptAll"> + <h2> + <?php p( $l->t( 'Encryption' ) ); ?> + </h2> + <?php p($l->t( "The encryption app is no longer enabled, please decrypt all your files" )); ?> + <p> + <input + type="password" + name="privateKeyPassword" + id="privateKeyPassword" /> + <label for="privateKeyPassword"><?php p($l->t( "Log-in password" )); ?></label> <br /> - </fieldset> -</form> + <button + type="button" + disabled + name="submitDecryptAll"><?php p($l->t( "Decrypt all Files" )); ?> + </button> + <span class="msg"></span> + </p> + <br /> +</fieldset> <?php endif; ?> <fieldset class="personalblock"> |