summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/calendar/templates/part.import.php11
-rw-r--r--apps/calendar/templates/settings.php65
-rw-r--r--apps/media/css/music.css2
-rw-r--r--apps/remoteStorage/appinfo/app.php5
-rw-r--r--apps/remoteStorage/appinfo/database.xml (renamed from apps/unhosted/appinfo/database.xml)2
-rw-r--r--apps/remoteStorage/appinfo/info.xml10
-rw-r--r--apps/remoteStorage/compat.php (renamed from apps/unhosted/compat.php)24
-rw-r--r--apps/remoteStorage/lib_remoteStorage.php (renamed from apps/unhosted/lib_unhosted.php)4
-rw-r--r--apps/remoteStorage/oauth_ro_auth.php (renamed from apps/unhosted/oauth_ro_auth.php)0
-rw-r--r--apps/unhosted/appinfo/app.php5
-rw-r--r--apps/unhosted/appinfo/info.xml10
-rw-r--r--apps/user_webfinger/activate.php7
-rw-r--r--apps/user_webfinger/appinfo/info.xml2
-rw-r--r--apps/user_webfinger/webfinger.php2
-rw-r--r--core/css/styles.css11
-rw-r--r--core/js/js.js29
-rw-r--r--core/templates/login.php1
-rw-r--r--index.php5
-rw-r--r--lib/helper.php2
-rw-r--r--lib/util.php6
-rw-r--r--settings/css/settings.css10
21 files changed, 129 insertions, 84 deletions
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php
index c1beb49a7f7..37493674371 100644
--- a/apps/calendar/templates/part.import.php
+++ b/apps/calendar/templates/part.import.php
@@ -58,13 +58,18 @@ function importcal(importtype){
var file = $("#filename").val();
if(importtype == "existing"){
var calid = $("input:radio[name='calendar']:checked").val();
- $.getJSON(OC.filePath('calendar', '', 'import.php') + "?import=existing&calid=" + calid + "&path=" + path + "&file=" + file);
+ $.getJSON(OC.filePath('calendar', '', 'import.php') + "?import=existing&calid=" + calid + "&path=" + path + "&file=" + file, function(){
+ $("#importdialog").dialog('destroy').remove();
+ $("#importdialogholder").remove();
+ });
}
if(importtype == "new"){
var calname = $("#displayname").val();
var description = $("#description").val();
- $.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'description':description, 'path':path, 'file':file});
+ $.post(OC.filePath('calendar', '', 'import.php'), {'import':'new', 'calname':calname, 'description':description, 'path':path, 'file':file}, function(){
+ $("#importdialog").dialog('destroy').remove();
+ $("#importdialogholder").remove();
+ });
}
- window.location = oc_webroot + "/apps/calendar/";
}
</script> \ No newline at end of file
diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php
index 44fbb230a43..3bfda702e9b 100644
--- a/apps/calendar/templates/settings.php
+++ b/apps/calendar/templates/settings.php
@@ -11,8 +11,8 @@ OC_UTIL::addStyle('', 'jquery.multiselect');
?>
<form id="calendar">
<fieldset class="personalblock">
- <label for="timezone"><strong><?php echo $l->t('Timezone');?></strong></label>
- <select style="display: none;" id="timezone" name="timezone">
+ <table class="nostyle">
+ <tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone">
<?php
$continent = '';
foreach($_['timezones'] as $timezone):
@@ -27,33 +27,40 @@ OC_UTIL::addStyle('', 'jquery.multiselect');
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
endif;
endforeach;?>
- </select>&nbsp;&nbsp;
- <label for="timeformat"><strong><?php echo $l->t('Timeformat');?></strong></label>
- <select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
- <option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
- <option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
- </select><br />
- <label for="firstdayofweek"><strong><?php echo $l->t('First day of the week');?></strong></label>
- <select style="display: none;" id="firstdayofweek" name="firstdayofweek">
- <?php
- $weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
- for($i = 0;$i <= 6;$i++){
- echo '<option value="'.$i.'" id="select_'.$i.'">' . $l->t($weekdays[$i]) . '</option>';
- }
- ?>
- </select><br />
- <label for="weekend"><strong><?php echo $l->t('Days of weekend');?></strong></label>
- <select id="weekend" name="weekend[]" style="width: 50%;" multiple="multiple" title="<?php echo $l->t("Weekend"); ?>">
- <?php
- $weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
- for($i = 0;$i <= 6;$i++){
- echo '<option value="'.$weekdays[$i].'" id="selectweekend_' . $weekdays[$i] . '">' . $l->t($weekdays[$i]) . '</option>';
- }
- ?>
- </select><br />
- <label for="duration"><strong><?php echo $l->t('Event duration');?></strong></label>
- <input type="text" maxlength="3" size="3" style="width: 2em;" id="duration" name="duration" /> <?php echo $l->t("Minutes");?>
- <br />
+ </select></td></tr>
+
+ <tr><td><label for="timeformat" class="bold"><?php echo $l->t('Timeformat');?></label></td><td>
+ <select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
+ <option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
+ <option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
+ </select>
+ </td></tr>
+
+ <tr><td><label for="firstdayofweek" class="bold"><?php echo $l->t('First day of the week');?></label></td><td>
+ <select style="display: none;" id="firstdayofweek" name="firstdayofweek">
+ <?php
+ $weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
+ for($i = 0;$i <= 6;$i++){
+ echo '<option value="'.$i.'" id="select_'.$i.'">' . $l->t($weekdays[$i]) . '</option>';
+ }
+ ?>
+ </select>
+ </td></tr>
+
+ <tr><td><label for="weekend" class="bold"><?php echo $l->t('Days of weekend');?></label></td><td>
+ <select id="weekend" name="weekend[]" style="width: 30em;" multiple="multiple" title="<?php echo $l->t("Weekend"); ?>">
+ <?php
+ $weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
+ for($i = 0;$i <= 6;$i++){
+ echo '<option value="'.$weekdays[$i].'" id="selectweekend_' . $weekdays[$i] . '">' . $l->t($weekdays[$i]) . '</option>';
+ }
+ ?>
+ </select>
+ </td></tr>
+
+ <tr><td><label for="duration" class="bold"><?php echo $l->t('Event duration');?></label></td><td><input type="text" maxlength="3" size="3" style="width: 2em;" id="duration" name="duration" /> <?php echo $l->t("Minutes");?></td></tr>
+ </table>
+
<?php echo $l->t('Calendar CalDAV syncing address:');?>
<?php echo OC_Helper::linkTo('apps/calendar', 'caldav.php', null, true); ?><br />
</fieldset>
diff --git a/apps/media/css/music.css b/apps/media/css/music.css
index c4db4e05855..8575e6334a5 100644
--- a/apps/media/css/music.css
+++ b/apps/media/css/music.css
@@ -18,7 +18,7 @@ a.jp-mute,a.jp-unmute { left:24em; }
div.jp-volume-bar { position:absolute; overflow:hidden; background:#eee; width:4em; height:0.4em; cursor:pointer; top:1.3em; left:27em; }
div.jp-volume-bar-value { background:#ccc; width:0; height:0.4em; }
-#collection { padding-top:1em; position:relative; width:70em; float:left; }
+#collection { padding-top:1em; position:relative; width:100%; float:left; }
#collection li.album,#collection li.song { margin-left:3em; }
#leftcontent img.remove { display:none; float:right; cursor:pointer; }
#leftcontent li:hover img.remove { display:inline; }
diff --git a/apps/remoteStorage/appinfo/app.php b/apps/remoteStorage/appinfo/app.php
new file mode 100644
index 00000000000..ac1ecde5082
--- /dev/null
+++ b/apps/remoteStorage/appinfo/app.php
@@ -0,0 +1,5 @@
+<?php
+OC_App::register( array(
+ 'order' => 10,
+ 'id' => 'remoteStorage',
+ 'name' => 'remoteStorage compatibility' ));
diff --git a/apps/unhosted/appinfo/database.xml b/apps/remoteStorage/appinfo/database.xml
index db25657085b..b4e1ac7d8af 100644
--- a/apps/unhosted/appinfo/database.xml
+++ b/apps/remoteStorage/appinfo/database.xml
@@ -43,7 +43,7 @@
<length>64</length>
</field>
<index>
- <name>a_app_unhostedweb_user</name>
+ <name>a_app_remotestorage_user</name>
<unique>true</unique>
<field>
<name>user</name>
diff --git a/apps/remoteStorage/appinfo/info.xml b/apps/remoteStorage/appinfo/info.xml
new file mode 100644
index 00000000000..a20c6ff4cd4
--- /dev/null
+++ b/apps/remoteStorage/appinfo/info.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<info>
+ <id>remoteStorage</id>
+ <name>remoteStorage compatibility</name>
+ <description>Enables your users to use ownCloud as their remote storage for unhosted applications.</description>
+ <version>0.1</version>
+ <licence>AGPL</licence>
+ <author>Michiel de Jong</author>
+ <require>2</require>
+</info>
diff --git a/apps/unhosted/compat.php b/apps/remoteStorage/compat.php
index a514018f71a..d383e879510 100644
--- a/apps/unhosted/compat.php
+++ b/apps/remoteStorage/compat.php
@@ -30,16 +30,16 @@
$RUNTIME_NOSETUPFS = true;
require_once('../../lib/base.php');
-OC_Util::checkAppEnabled('unhosted');
+OC_Util::checkAppEnabled('remoteStorage');
require_once('Sabre/autoload.php');
-require_once('lib_unhosted.php');
+require_once('lib_remoteStorage.php');
require_once('oauth_ro_auth.php');
ini_set('default_charset', 'UTF-8');
#ini_set('error_reporting', '');
@ob_clean();
-//allow use as unhosted storage for other websites
+//allow use as remote storage for other websites
if(isset($_SERVER['HTTP_ORIGIN'])) {
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Max-Age: 3600');
@@ -53,12 +53,12 @@ $path = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["SCRIPT_NAME"]));
$pathParts = explode('/', $path);
// for webdav:
// 0/ 1 / 2 / 3 / 4 / 5 / 6 / 7
-// /$ownCloudUser/unhosted/webdav/$userHost/$userName/$dataScope/$key
+// /$ownCloudUser/remoteStorage/webdav/$userHost/$userName/$dataScope/$key
// for oauth:
// 0/ 1 / 2 / 3 / 4
-// /$ownCloudUser/unhosted/oauth/auth
+// /$ownCloudUser/remoteStorage/oauth/auth
-if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted' && $pathParts[3] == 'webdav') {
+if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'remoteStorage' && $pathParts[3] == 'webdav') {
list($dummy0, $ownCloudUser, $dummy2, $dummy3, $userHost, $userName, $dataScope) = $pathParts;
OC_Util::setupFS($ownCloudUser);
@@ -68,10 +68,10 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted'
$server = new Sabre_DAV_Server($publicDir);
// Path to our script
- $server->setBaseUri(OC::$WEBROOT."/apps/unhosted/compat.php/$ownCloudUser");
+ $server->setBaseUri(OC::$WEBROOT."/apps/remoteStorage/compat.php/$ownCloudUser");
// Auth backend
- $authBackend = new OC_Connector_Sabre_Auth_ro_oauth(OC_UnhostedWeb::getValidTokens($ownCloudUser, $userName.'@'.$userHost, $dataScope));
+ $authBackend = new OC_Connector_Sabre_Auth_ro_oauth(OC_remoteStorage::getValidTokens($ownCloudUser, $userName.'@'.$userHost, $dataScope));
$authPlugin = new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud');//should use $validTokens here
$server->addPlugin($authPlugin);
@@ -83,7 +83,7 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted'
// And off we go!
$server->exec();
-} else if(count($pathParts) >= 4 && $pathParts[0] == '' && $pathParts[2] == 'unhosted' && $pathParts[3] == 'oauth2' && $pathParts[4] = 'auth') {
+} else if(count($pathParts) >= 4 && $pathParts[0] == '' && $pathParts[2] == 'remoteStorage' && $pathParts[3] == 'oauth2' && $pathParts[4] = 'auth') {
if(isset($_POST['allow'])) {
//TODO: input checking. these explodes may fail to produces the desired arrays:
$ownCloudUser = $pathParts[1];
@@ -98,8 +98,8 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted'
}
if(OC_User::getUser() == $ownCloudUser) {
//TODO: check if this can be faked by editing the cookie in firebug!
- $token=OC_UnhostedWeb::createDataScope($appUrl, $userAddress, $dataScope);
- header('Location: '.$_GET['redirect_uri'].'#access_token='.$token.'&token_type=unhosted');
+ $token=OC_remoteStorage::createDataScope($appUrl, $userAddress, $dataScope);
+ header('Location: '.$_GET['redirect_uri'].'#access_token='.$token.'&token_type=remoteStorage');
} else {
if($_SERVER['HTTPS']){
$url = "https://";
@@ -107,7 +107,7 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted'
$url = "http://";
}
$url .= $_SERVER['SERVER_NAME'];
- $url .= substr($_SERVER['SCRIPT_NAME'], 0, -strlen('apps/unhosted/compat.php'));
+ $url .= substr($_SERVER['SCRIPT_NAME'], 0, -strlen('apps/remoteStorage/compat.php'));
die('Please '
.'<input type="submit" onclick="'
."window.open('$url','Close me!','height=600,width=300');"
diff --git a/apps/unhosted/lib_unhosted.php b/apps/remoteStorage/lib_remoteStorage.php
index 484f469f0ed..259efb0da69 100644
--- a/apps/unhosted/lib_unhosted.php
+++ b/apps/remoteStorage/lib_remoteStorage.php
@@ -1,6 +1,6 @@
<?php
-class OC_UnhostedWeb {
+class OC_remoteStorage {
public static function getValidTokens($ownCloudUser, $userAddress, $dataScope) {
$query=OC_DB::prepare("SELECT token,appUrl FROM *PREFIX*authtoken WHERE user=? AND userAddress=? AND dataScope=? LIMIT 100");
$result=$query->execute(array($user,$userAddress,$dataScope));
@@ -66,7 +66,7 @@ class OC_UnhostedWeb {
//TODO: input checking on $userAddress and $dataScope
list($userName, $userHost) = explode('@', $userAddress);
OC_Util::setupFS(OC_User::getUser());
- $scopePathParts = array('unhosted', 'webdav', $userHost, $userName, $dataScope);
+ $scopePathParts = array('remoteStorage', 'webdav', $userHost, $userName, $dataScope);
for($i=0;$i<=count($scopePathParts);$i++){
$thisPath = '/'.implode('/', array_slice($scopePathParts, 0, $i));
if(!OC_Filesystem::file_exists($thisPath)) {
diff --git a/apps/unhosted/oauth_ro_auth.php b/apps/remoteStorage/oauth_ro_auth.php
index b785d85fead..b785d85fead 100644
--- a/apps/unhosted/oauth_ro_auth.php
+++ b/apps/remoteStorage/oauth_ro_auth.php
diff --git a/apps/unhosted/appinfo/app.php b/apps/unhosted/appinfo/app.php
deleted file mode 100644
index 84e07304534..00000000000
--- a/apps/unhosted/appinfo/app.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-OC_App::register( array(
- 'order' => 10,
- 'id' => 'unhosted',
- 'name' => 'Unhosted Web' ));
diff --git a/apps/unhosted/appinfo/info.xml b/apps/unhosted/appinfo/info.xml
deleted file mode 100644
index 359620f4578..00000000000
--- a/apps/unhosted/appinfo/info.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<info>
- <id>unhosted</id>
- <name>Unhosted Web</name>
- <description>On websites that allow unhosted accounts, use your owncloud as the storage for your user data</description>
- <version>0.1</version>
- <licence>AGPL</licence>
- <author>Michiel de Jong</author>
- <require>2</require>
-</info>
diff --git a/apps/user_webfinger/activate.php b/apps/user_webfinger/activate.php
index 547c8e54d32..50257232ae4 100644
--- a/apps/user_webfinger/activate.php
+++ b/apps/user_webfinger/activate.php
@@ -1,11 +1,4 @@
<?php
-
-// comment out this line:
- die("This feature is still experimental. Please comment out this line in the code, then try again\n");
-//
-
-
-
$ownCloudBaseUri = substr($_SERVER['REQUEST_URI'],0, -(strlen('/apps/user_webfinger/activate.php')));
$thisAppDir = __DIR__;
$appsDir = dirname($thisAppDir);
diff --git a/apps/user_webfinger/appinfo/info.xml b/apps/user_webfinger/appinfo/info.xml
index b5e79bd6762..a4071dae172 100644
--- a/apps/user_webfinger/appinfo/info.xml
+++ b/apps/user_webfinger/appinfo/info.xml
@@ -2,7 +2,7 @@
<info>
<id>user_webfinger</id>
<name>Webfinger</name>
- <description>Provide webfinger for all users, so that they can use their ownCloud account as their remote storage on the web. If you don't run owncloud in the root of your domain, for instance if you run it on http://example.com/owncloud/, then makes sure you link http://example.com/.well-known/ to http://example.com/owncloud/apps/user_webfinger/ - for instance by running something like "ln -s /var/www/owncloud/apps/user_webfinger /var/www/.well-known". Only enable this app if you run this owncloud installation on a public web address, not if you run it on an intranet or on localhost.</description>
+ <description>Provide WebFinger for all users so they get a user address like user@owncloudinstance which can be used for unhosted applications. If you don't run ownCloud in the root of your domain, for instance if you run it on example.com/owncloud/, then make sure you link example.com/.well-known/ to example.com/owncloud/apps/user_webfinger/ - by running something like "ln -s /var/www/owncloud/apps/user_webfinger /var/www/.well-known". Only enable this app if you run this ownCloud installation on a public web address, not if you run it on an intranet or on localhost.</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Michiel de Jong</author>
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php
index 269bb4758ed..afb53689682 100644
--- a/apps/user_webfinger/webfinger.php
+++ b/apps/user_webfinger/webfinger.php
@@ -20,5 +20,5 @@ echo "<";
?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">
<hm:Host xmlns="http://host-meta.net/xrd/1.0"><?php echo $_SERVER['SERVER_NAME'] ?></hm:Host>
- <Link rel="http://unhosted.org/spec/dav/0.1" href="http<?php echo ($_SERVER['HTTPS']?'s':''); ?>://<?php echo $_SERVER['SERVER_NAME'] ?>/apps/unhosted/compat.php/<?php echo $userName ?>/unhosted/" />
+ <Link rel="http://unhosted.org/spec/dav/0.1" href="http<?php echo ($_SERVER['HTTPS']?'s':''); ?>://<?php echo $_SERVER['SERVER_NAME'] ?>/apps/remoteStorage/compat.php/<?php echo $userName ?>/remoteStorage/" />
</XRD>
diff --git a/core/css/styles.css b/core/css/styles.css
index 8f309333318..84a024f95b9 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -15,9 +15,9 @@ body { background:#fefefe; font:normal .8em/1.6em "Lucida Grande", Arial, Verdan
/* HEADERS */
-#body-user #header, #body-settings #header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px #000, inset 0 -2px 10px #222; box-shadow:0 0 10px #000, inset 0 -2px 10px #222; }
+#body-user #header, #body-settings #header { position:fixed; top:0; z-index:100; width:100%; height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; }
#body-login #header { margin: -2em auto 0; text-align:center; height:10em;
- -moz-box-shadow:0 0 1em #000; -webkit-box-shadow:0 0 1em #000; box-shadow:0 0 1em #000;
+ -moz-box-shadow:0 0 1em rgba(0, 0, 0, .5); -webkit-box-shadow:0 0 1em rgba(0, 0, 0, .5); box-shadow:0 0 1em rgba(0, 0, 0, .5);
background: #1d2d44; /* Old browsers */
background: -moz-linear-gradient(top, #35537a 0%, #1d2d42 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#35537a), color-stop(100%,#1d2d42)); /* Chrome,Safari4+ */
@@ -53,7 +53,7 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
#controls { width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
#controls .button { display:inline-block; }
#content { margin:3.5em 0 0 12.5em; }
-#leftcontent, .leftcontent { position:absolute; top:6.4em; width:20em; background:#f8f8f8; height:100%; border-right:1px solid #ddd; }
+#leftcontent, .leftcontent { position:fixed; overflow: auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; }
#leftcontent li, .leftcontent li { padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
#leftcontent li:hover, #leftcontent li:active, #leftcontent li.active, .leftcontent li:hover, .leftcontent li:active, .leftcontent li.active { background:#eee; }
#rightcontent, .rightcontent { position:absolute; top:6.4em; left:33em; }
@@ -69,7 +69,7 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
#login form { width:22em; margin:2em auto 2em; padding:0; }
#login form fieldset { background:0; border:0; margin-bottom:2em; padding:0; }
#login form fieldset legend { font-weight:bold; }
-#login form label { margin:.8em .8em; color:#666; }
+#login form label { margin:.9em .8em .7em;; color:#666; }
/* NEEDED FOR INFIELD LABELS */
p.infield { position: relative; }
label.infield { cursor: text !important; }
@@ -98,13 +98,14 @@ label.infield { cursor: text !important; }
/* VARIOUS REUSABLE SELECTORS */
.hidden { display:none; }
+.bold { font-weight: bold; }
#notification { z-index:101; cursor:pointer; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position:fixed; left:50%; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
.action, .selectedActions a, #logout { opacity:.3; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
.action:hover, .selectedActions a:hover, #logout:hover { opacity:1; }
-table tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
+table:not(.nostyle) tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
tbody tr:hover, tr:active { background-color:#f8f8f8; }
#body-settings .personalblock, #body-settings .helpblock { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
diff --git a/core/js/js.js b/core/js/js.js
index 61a60c52485..9e814ca0729 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -244,7 +244,36 @@ function object(o) {
return new F();
}
+
+/**
+ * Fills height of window. (more precise than height: 100%;)
+ */
+function fillHeight(selector) {
+ var height = parseFloat($(window).height())-parseFloat(selector.css('top'));
+ selector.css('height', height + 'px');
+ if(selector.outerHeight() > selector.height())
+ selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px');
+}
+
+/**
+ * Fills height and width of window. (more precise than height: 100%; or width: 100%;)
+ */
+function fillWindow(selector) {
+ fillHeight(selector);
+ var width = parseFloat($(window).width())-parseFloat(selector.css('left'));
+ selector.css('width', width + 'px');
+ if(selector.outerWidth() > selector.width())
+ selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px');
+}
+
$(document).ready(function(){
+
+ $(window).resize(function () {
+ fillHeight($('#leftcontent'));
+ fillWindow($('#rightcontent'));
+ });
+ $(window).trigger('resize');
+
if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
replaceSVG();
}else{
diff --git a/core/templates/login.php b/core/templates/login.php
index aff0afac203..6c0a7a12227 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -1,5 +1,6 @@
<form action="index.php" method="post">
<fieldset>
+ <?php if(!empty($_['redirect'])) { echo '<input type="hidden" name="redirect_url" value="'.$_['redirect'].'" />'; } ?>
<?php if($_['error']): ?>
<a href="./core/lostpassword/"><?php echo $l->t('Lost your password?'); ?></a>
<?php endif; ?>
diff --git a/index.php b/index.php
index fb8d1922dd4..2e55827a62a 100644
--- a/index.php
+++ b/index.php
@@ -68,6 +68,9 @@ else {
OC_User::setUserId($_COOKIE['oc_username']);
OC_Util::redirectToDefaultPage();
}
+ else {
+ OC_User::unsetMagicInCookie();
+ }
}
// Someone wants to log in :
@@ -90,5 +93,5 @@ else {
}
}
- OC_Template::printGuestPage('', 'login', array('error' => $error ));
+ OC_Template::printGuestPage('', 'login', array('error' => $error, 'redirect' => isset($_REQUEST['redirect_url'])?$_REQUEST['redirect_url']:'' ));
}
diff --git a/lib/helper.php b/lib/helper.php
index b6332b54aea..9c2b5fc33ce 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -61,7 +61,7 @@ class OC_Helper {
}
if($redirect_url)
- return $urlLinkTo.'?redirect_url='.$redirect_url;
+ return $urlLinkTo.'?redirect_url='.urlencode($_SERVER["REQUEST_URI"]);
else
return $urlLinkTo;
diff --git a/lib/util.php b/lib/util.php
index 5d03c56f18e..f8748e868c1 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -321,7 +321,11 @@ class OC_Util {
* Redirect to the user default page
*/
public static function redirectToDefaultPage(){
- header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', 'files/index.php'));
+ if(isset($_REQUEST['redirect_url'])) {
+ header( 'Location: '.$_REQUEST['redirect_url']);
+ } else {
+ header( 'Location: '.OC::$WEBROOT.'/'.OC_Appconfig::getValue('core', 'defaultpage', 'files/index.php'));
+ }
exit();
}
}
diff --git a/settings/css/settings.css b/settings/css/settings.css
index 4b5bc06b218..8d89cee6ec0 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -9,11 +9,13 @@ input#identity { width:20em; }
.msg.success{ color:#fff; background-color:#0f0; padding:3px; text-shadow:1px 1px #000; }
.msg.error{ color:#fff; background-color:#f00; padding:3px; text-shadow:1px 1px #000; }
+table.nostyle label { margin-right: 2em; }
+table.nostyle td { padding: 0.2em 0; }
/* USERS */
form { display:inline; }
-table th { height:2em; color:#999; }
-table th, table td { border-bottom:1px solid #ddd; padding:0 .5em; padding-left:.8em; text-align:left; font-weight:normal; }
+table:not(.nostyle) th { height:2em; color:#999; }
+table:not(.nostyle) th, table:not(.nostyle) td { border-bottom:1px solid #ddd; padding:0 .5em; padding-left:.8em; text-align:left; font-weight:normal; }
td.name, td.password { padding-left:.8em; }
td.password>img, td.remove>img, td.quota>img { visibility:hidden; }
td.password, td.quota { width:12em; cursor:pointer; }
@@ -24,8 +26,8 @@ tr:hover>td.password>span { margin:0; cursor:pointer; }
tr:hover>td.remove>img, tr:hover>td.password>img, tr:hover>td.quota>img { visibility:visible; cursor:pointer; }
tr:hover>td.remove>img { float:right; }
li.selected { background-color:#ddd; }
-#content>table { margin-top:6.5em; }
-table { width:100%; }
+#content>table:not(.nostyle) { margin-top:6.5em; }
+table:not(.nostyle) { width:100%; }
/* APPS */