diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-14 10:20:00 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-14 10:22:13 -0400 |
commit | 4c7fd8cd0191871e48704f693f48554d4ee7a726 (patch) | |
tree | a66a930783de938deaa3d2362dcf779e5c2b45af /core | |
parent | 64ef1e21819979d7fdc406d2628bc175b16fe554 (diff) | |
parent | 62e4f55f721971dacd06649cecefe0487626aa75 (diff) | |
download | nextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.tar.gz nextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.zip |
Merge branch 'master' into share_api
Conflicts:
lib/group.php
lib/group/backend.php
lib/group/database.php
lib/group/interface.php
lib/public/user.php
lib/user.php
lib/user/backend.php
lib/user/database.php
lib/user/interface.php
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/appconfig.php | 1 | ||||
-rw-r--r-- | core/ajax/grouplist.php | 47 | ||||
-rw-r--r-- | core/css/styles.css | 6 | ||||
-rw-r--r-- | core/js/backgroundjobs.js | 25 | ||||
-rw-r--r-- | core/js/js.js | 64 | ||||
-rw-r--r-- | core/l10n/zh_CN.GB2312.php | 64 | ||||
-rw-r--r-- | core/templates/login.php | 6 |
7 files changed, 129 insertions, 84 deletions
diff --git a/core/ajax/appconfig.php b/core/ajax/appconfig.php index 84e0710c74a..bf749be3e30 100644 --- a/core/ajax/appconfig.php +++ b/core/ajax/appconfig.php @@ -7,6 +7,7 @@ require_once ("../../lib/base.php"); OC_Util::checkAdminUser(); +OCP\JSON::callCheck(); $action=isset($_POST['action'])?$_POST['action']:$_GET['action']; $result=false; diff --git a/core/ajax/grouplist.php b/core/ajax/grouplist.php deleted file mode 100644 index e3e92fcfa16..00000000000 --- a/core/ajax/grouplist.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/** -* ownCloud - ajax group list -* -* @author Hans Bakker -* @copyright 2011 hansmbakker+kde@gmail.com -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -$RUNTIME_NOAPPS = TRUE; //no apps, yet -require_once('../../lib/base.php'); - -if(!OC_User::isLoggedIn()){ - if(!isset($_SERVER['PHP_AUTH_USER'])){ - header('WWW-Authenticate: Basic realm="ownCloud Server"'); - header('HTTP/1.0 401 Unauthorized'); - echo 'Valid credentials must be supplied'; - exit(); - } else { - if(!OC_User::checkPassword($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])){ - exit(); - } - } -} - -$groups = array(); - -foreach( OC_Group::getGroups() as $i ){ - // Do some more work here soon - $groups[] = array( "groupname" => $i ); -} - -OC_JSON::encodedPrint($groups); diff --git a/core/css/styles.css b/core/css/styles.css index 7e79a66fb49..dd6f9d4675d 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -160,9 +160,9 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd #category_addinput { width: 10em; } /* ---- APP SETTINGS ---- */ -.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: absolute; z-index: 200; } -.popup.topright { top: -8px; right: 1em; } -.popup.bottomleft { bottom: 1em; left: 8px; } +.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: fixed !important; z-index: 200; } +.popup.topright { top: 7em; right: 1em; } +.popup.bottomleft { bottom: 1em; left: 33em; } .popup .close { position:absolute; top: 0.2em; right:0.2em; height: 20px; width: 20px; background:url('../img/actions/delete.svg') no-repeat center; } .popup h2 { font-weight: bold; font-size: 1.2em; } .arrow { border-bottom: 10px solid white; border-left: 10px solid transparent; border-right: 10px solid transparent; display: block; height: 0; position: absolute; width: 0; z-index: 201; } diff --git a/core/js/backgroundjobs.js b/core/js/backgroundjobs.js new file mode 100644 index 00000000000..4a558a66b4b --- /dev/null +++ b/core/js/backgroundjobs.js @@ -0,0 +1,25 @@ +/** +* ownCloud +* +* @author Jakob Sack +* @copyright 2012 Jakob Sack owncloud@jakobsack.de +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +// start worker once page has loaded +$(document).ready(function(){ + $.get( OC.webroot+'/cron.php' ); +}); diff --git a/core/js/js.js b/core/js/js.js index 7bded8e1414..92a2660fd9c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -175,39 +175,41 @@ OC={ if(settings.length == 0) { throw { name: 'MissingDOMElement', message: 'There has be be an element with id "appsettings" for the popup to show.' }; } - if(settings.is(':visible')) { - settings.hide().find('.arrow').hide(); + var popup = $('#appsettings_popup'); + if(popup.length == 0) { + $('body').prepend('<div class="popup hidden" id="appsettings_popup"></div>'); + popup = $('#appsettings_popup'); + popup.addClass(settings.hasClass('topright') ? 'topright' : 'bottomleft'); + } + if(popup.is(':visible')) { + popup.hide().remove(); } else { - if($('#journal.settings').length == 0) { - var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; - var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) { - $('#appsettings').html(data).ready(function() { - settings.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show(); - settings.find('.close').bind('click', function() { - settings.hide(); - }) - if(typeof props.loadJS !== 'undefined') { - var scriptname; - if(props.loadJS === true) { - scriptname = 'settings.js'; - } else if(typeof props.loadJS === 'string') { - scriptname = props.loadJS; - } else { - throw { name: 'InvalidParameter', message: 'The "loadJS" parameter must be either boolean or a string.' }; - } - if(props.cache) { - $.ajaxSetup({cache: true}); - } - $.getScript(OC.filePath(props.appid, 'js', scriptname)) - .fail(function(jqxhr, settings, e) { - throw e; - }); + var arrowclass = settings.hasClass('topright') ? 'up' : 'left'; + var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) { + popup.html(data).ready(function() { + popup.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show(); + popup.find('.close').bind('click', function() { + popup.remove(); + }) + if(typeof props.loadJS !== 'undefined') { + var scriptname; + if(props.loadJS === true) { + scriptname = 'settings.js'; + } else if(typeof props.loadJS === 'string') { + scriptname = props.loadJS; + } else { + throw { name: 'InvalidParameter', message: 'The "loadJS" parameter must be either boolean or a string.' }; } - }); - }, 'html'); - } else { - settings.show().find('.arrow').show(); - } + if(props.cache) { + $.ajaxSetup({cache: true}); + } + $.getScript(OC.filePath(props.appid, 'js', scriptname)) + .fail(function(jqxhr, settings, e) { + throw e; + }); + } + }).show(); + }, 'html'); } } }; diff --git a/core/l10n/zh_CN.GB2312.php b/core/l10n/zh_CN.GB2312.php new file mode 100644 index 00000000000..770d2b6772d --- /dev/null +++ b/core/l10n/zh_CN.GB2312.php @@ -0,0 +1,64 @@ +<?php $TRANSLATIONS = array( +"Application name not provided." => "应用程序并没有被提供.", +"No category to add?" => "没有分类添加了?", +"This category already exists: " => "这个分类已经存在了:", +"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", +"Settings" => "设置", +"January" => "一月", +"February" => "二月", +"March" => "三月", +"April" => "四月", +"May" => "五月", +"June" => "六月", +"July" => "七月", +"August" => "八月", +"September" => "九月", +"October" => "十月", +"November" => "十一月", +"December" => "十二月", +"Cancel" => "取消", +"No" => "否", +"Yes" => "是", +"Ok" => "好的", +"No categories selected for deletion." => "没有选者要删除的分类.", +"Error" => "错误", +"ownCloud password reset" => "私有云密码重置", +"Use the following link to reset your password: {link}" => "使用下面的链接来重置你的密码:{link}", +"You will receive a link to reset your password via Email." => "你将会收到一个重置密码的链接", +"Requested" => "请求", +"Login failed!" => "登陆失败!", +"Username" => "用户名", +"Request reset" => "要求重置", +"Your password was reset" => "你的密码已经被重置了", +"To login page" => "转至登陆页面", +"New password" => "新密码", +"Reset password" => "重置密码", +"Personal" => "个人的", +"Users" => "用户", +"Apps" => "应用程序", +"Admin" => "管理", +"Help" => "帮助", +"Access forbidden" => "禁止访问", +"Cloud not found" => "云 没有被找到", +"Edit categories" => "编辑分类", +"Add" => "添加", +"Create an <strong>admin account</strong>" => "建立一个 <strong>管理帐户</strong>", +"Password" => "密码", +"Advanced" => "进阶", +"Data folder" => "数据存放文件夹", +"Configure the database" => "配置数据库", +"will be used" => "将会使用", +"Database user" => "数据库用户", +"Database password" => "数据库密码", +"Database name" => "数据库用户名", +"Database host" => "数据库主机", +"Finish setup" => "完成安装", +"web services under your control" => "你控制下的网络服务", +"Log out" => "注销", +"Lost your password?" => "忘记密码?", +"remember" => "备忘", +"Log in" => "登陆", +"You are logged out." => "你已经注销了", +"prev" => "后退", +"next" => "前进" +); diff --git a/core/templates/login.php b/core/templates/login.php index b35c4a33be8..2c9b766aa4d 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -2,16 +2,16 @@ <form action="index.php" method="post"> <fieldset> <?php if(!empty($_['redirect'])) { echo '<input type="hidden" name="redirect_url" value="'.$_['redirect'].'" />'; } ?> - <?php if($_['error']): ?> + <?php if($_['display_lostpassword']): ?> <a href="./core/lostpassword/"><?php echo $l->t('Lost your password?'); ?></a> <?php endif; ?> <p class="infield"> <label for="user" class="infield"><?php echo $l->t( 'Username' ); ?></label> - <input type="text" name="user" id="user" value="<?php echo !empty($_POST['user'])?OC_Util::sanitizeHTML($_POST['user'],ENT_COMPAT,'utf-8').'"':'" autofocus'; ?> autocomplete="on" required /> + <input type="text" name="user" id="user" value="<?php echo $_['username']; ?>"<?php echo $_['user_autofocus']?' autofocus':''; ?> autocomplete="on" required /> </p> <p class="infield"> <label for="password" class="infield"><?php echo $l->t( 'Password' ); ?></label> - <input type="password" name="password" id="password" value="" required <?php echo !empty($_POST['user'])?'autofocus':''; ?> /> + <input type="password" name="password" id="password" value="" required<?php echo $_['user_autofocus']?'':' autofocus'; ?> /> <input type="hidden" name="sectoken" id="sectoken" value="<?php echo($_['sectoken']); ?>" /> </p> <input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login"><?php echo $l->t('remember'); ?></label> |