diff options
121 files changed, 6686 insertions, 4147 deletions
diff --git a/3rdparty b/3rdparty -Subproject 9232ccdf02be87d72b4827a2cfa33a2d75b0ee7 +Subproject ae67e91bac6e959fb9666b997c02fb45e63aadf diff --git a/apps/dav/l10n/de_DE.js b/apps/dav/l10n/de_DE.js index 03da3d51f7c..07758a7b122 100644 --- a/apps/dav/l10n/de_DE.js +++ b/apps/dav/l10n/de_DE.js @@ -26,19 +26,19 @@ OC.L10N.register( "You deleted event {event} from calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} gelöscht", "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", "You updated event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} aktualisiert", - "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", - "You created todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erstellt", - "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", - "You deleted todo {todo} from list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} gelöscht", - "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", - "You updated todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} aktualisiert", - "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", - "You solved todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erledigt", - "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", - "You reopened todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} wiedereröffnet", + "You reopened todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} wiedereröffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", - "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", - "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", + "A calendar <strong>event</strong> was modified" : "Ein Kalender-<strong>Ereignis</strong> wurde bearbeitet", + "A calendar <strong>todo</strong> was modified" : "Eine Kalender-<strong>Aufgabe</strong> wurde bearbeitet", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/l10n/de_DE.json b/apps/dav/l10n/de_DE.json index b7751ee32a4..8440fb0ca50 100644 --- a/apps/dav/l10n/de_DE.json +++ b/apps/dav/l10n/de_DE.json @@ -24,19 +24,19 @@ "You deleted event {event} from calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} gelöscht", "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", "You updated event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} aktualisiert", - "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", - "You created todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erstellt", - "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", - "You deleted todo {todo} from list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} gelöscht", - "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", - "You updated todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} aktualisiert", - "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", - "You solved todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erledigt", - "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", - "You reopened todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat die Aufgabe {todo} in der Liste {calendar} wiedereröffnet", + "You reopened todo {todo} in list {calendar}" : "Sie haben die Aufgabe {todo} in der Liste {calendar} wiedereröffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", - "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", - "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", + "A calendar <strong>event</strong> was modified" : "Ein Kalender-<strong>Ereignis</strong> wurde bearbeitet", + "A calendar <strong>todo</strong> was modified" : "Eine Kalender-<strong>Aufgabe</strong> wurde bearbeitet", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/l10n/sv.js b/apps/dav/l10n/sv.js index fc67e02ebfb..444511ee027 100644 --- a/apps/dav/l10n/sv.js +++ b/apps/dav/l10n/sv.js @@ -43,7 +43,7 @@ OC.L10N.register( "Personal" : "Personligt", "Contacts" : "Kontakter", "Technical details" : "Tekniska detaljer", - "Remote Address: %s" : "Fjärradress: %s", + "Remote Address: %s" : "Extern adress: %s", "Request ID: %s" : "Begär ID: %s" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/dav/l10n/sv.json b/apps/dav/l10n/sv.json index bc7a87fe986..b58e3fb0706 100644 --- a/apps/dav/l10n/sv.json +++ b/apps/dav/l10n/sv.json @@ -41,7 +41,7 @@ "Personal" : "Personligt", "Contacts" : "Kontakter", "Technical details" : "Tekniska detaljer", - "Remote Address: %s" : "Fjärradress: %s", + "Remote Address: %s" : "Extern adress: %s", "Request ID: %s" : "Begär ID: %s" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index 104eec6b496..702b74bf1b3 100644 --- a/apps/dav/lib/CalDAV/BirthdayService.php +++ b/apps/dav/lib/CalDAV/BirthdayService.php @@ -30,6 +30,11 @@ use Exception; use OCA\DAV\CardDAV\CardDavBackend; use OCA\DAV\DAV\GroupPrincipalBackend; use Sabre\VObject\Component\VCalendar; +use Sabre\VObject\Component\VCard; +use Sabre\VObject\DateTimeParser; +use Sabre\VObject\Document; +use Sabre\VObject\InvalidDataException; +use Sabre\VObject\Property\VCard\DateAndOrTime; use Sabre\VObject\Reader; class BirthdayService { @@ -129,6 +134,12 @@ class BirthdayService { } try { $doc = Reader::read($cardData); + // We're always converting to vCard 4.0 so we can rely on the + // VCardConverter handling the X-APPLE-OMIT-YEAR property for us. + if (!$doc instanceof VCard) { + return null; + } + $doc = $doc->convert(Document::VCARD40); } catch (Exception $e) { return null; } @@ -136,21 +147,43 @@ class BirthdayService { if (!isset($doc->{$dateField})) { return null; } + if (!isset($doc->FN)) { + return null; + } $birthday = $doc->{$dateField}; if (!(string)$birthday) { return null; } - $title = str_replace('{name}', - strtr((string)$doc->FN, array('\,' => ',', '\;' => ';')), - '{name}' - ); + // Skip if the BDAY property is not of the right type. + if (!$birthday instanceof DateAndOrTime) { + return null; + } + + // Skip if we can't parse the BDAY value. + try { + $dateParts = DateTimeParser::parseVCardDateTime($birthday->getValue()); + } catch (InvalidDataException $e) { + return null; + } + + $unknownYear = false; + if (!$dateParts['year']) { + $birthday = '1900-' . $dateParts['month'] . '-' . $dateParts['date']; + + $unknownYear = true; + } + try { $date = new \DateTime($birthday); } catch (Exception $e) { return null; } - - $summary = $title . ' (' . $summarySymbol . $date->format('Y') . ')'; + if ($unknownYear) { + $summary = $doc->FN->getValue() . ' ' . $summarySymbol; + } else { + $year = (int)$date->format('Y'); + $summary = $doc->FN->getValue() . " ($summarySymbol$year)"; + } $vCal = new VCalendar(); $vCal->VERSION = '2.0'; $vEvent = $vCal->createComponent('VEVENT'); diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index 5eeb6772a60..cecf07ef1d8 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -55,18 +55,18 @@ class BirthdayServiceTest extends TestCase { /** * @dataProvider providesVCards - * @param boolean $nullExpected + * @param boolean $expectedSummary * @param string | null $data */ - public function testBuildBirthdayFromContact($nullExpected, $data) { + public function testBuildBirthdayFromContact($expectedSummary, $data) { $cal = $this->service->buildDateFromContact($data, 'BDAY', '*'); - if ($nullExpected) { + if ($expectedSummary === null) { $this->assertNull($cal); } else { $this->assertInstanceOf('Sabre\VObject\Component\VCalendar', $cal); $this->assertTrue(isset($cal->VEVENT)); $this->assertEquals('FREQ=YEARLY', $cal->VEVENT->RRULE->getValue()); - $this->assertEquals('12345 (*1900)', $cal->VEVENT->SUMMARY->getValue()); + $this->assertEquals($expectedSummary, $cal->VEVENT->SUMMARY->getValue()); $this->assertEquals('TRANSPARENT', $cal->VEVENT->TRANSP->getValue()); } } @@ -233,14 +233,19 @@ class BirthdayServiceTest extends TestCase { public function providesVCards() { return [ - [true, null], - [true, ''], - [true, 'yasfewf'], - [true, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nEND:VCARD\r\n", "Dr. Foo Bar"], - [true, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:\r\nEND:VCARD\r\n", "Dr. Foo Bar"], - [true, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:someday\r\nEND:VCARD\r\n", "Dr. Foo Bar"], - [false, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:1900-01-01\r\nEND:VCARD\r\n", "Dr. Foo Bar"], - [false, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:1900-12-31\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + [null, null], + [null, ''], + [null, 'yasfewf'], + [null, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + [null, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + [null, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:someday\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + ['12345 (*1900)', "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:19000101\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + ['12345 (*1900)', "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:19001231\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + ['12345 *', "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:--1231\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + ['12345 *', "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY;X-APPLE-OMIT-YEAR=1604:16041231\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + [null, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:;VALUE=text:circa 1800\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + [null, "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nN:12345;;;;\r\nBDAY:20031231\r\nEND:VCARD\r\n", "Dr. Foo Bar"], + ['12345 (*900)', "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nUID:12345\r\nFN:12345\r\nN:12345;;;;\r\nBDAY:09001231\r\nEND:VCARD\r\n", "Dr. Foo Bar"], ]; } } diff --git a/apps/encryption/l10n/sv.js b/apps/encryption/l10n/sv.js index fe409091d0f..7b1bd0cf627 100644 --- a/apps/encryption/l10n/sv.js +++ b/apps/encryption/l10n/sv.js @@ -22,14 +22,18 @@ OC.L10N.register( "The current log-in password was not correct, please try again." : "Det nuvarande inloggningslösenordet var inte korrekt. Vänligen försök igen.", "Private key password successfully updated." : "Den privata nyckelns lösenord uppdaterades.", "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Du behöver migrera dina krypteringsnycklar från den gamla krypteringen (ownCloud <= 8.0) till den nya. Kör 'occ encryption:migrate' eller kontakta din administratör", + "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ogiltig privat nyckel för krypteringsappen. Uppdatera din privata nyckels lösenord i dina personliga inställningar för att återställa tillgång till dina krypterade filer.", + "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsappen är aktiverad men dina krypteringsnycklar har inte aktiverats, logga ut och logga in igen.", "Encryption app is enabled and ready" : "Krypteringsfunktionen är aktiverad och redo", "Bad Signature" : "Dålig signatur", "Missing Signature" : "Saknar signatur", "one-time password for server-side-encryption" : "engångslösenord för kryptering på serversidan", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.", "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Filen kan inte läsas, troligtvis är det en delad fil. Be ägaren av filen att dela den med dig igen.", + "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Hallå där, \n\nAdministratören aktiverade serverkryptering. Alla dina filer har blivit krypterade med lösenordet: %s\n\nGå till i din profil för att ändra krypteringslösenordet till ditt egna lösenord. Ange lösenordet ovan som \"Gammalt lösenord\" och ange sedan ditt egna lösenord.\n\n", "The share will expire on %s." : "Utdelningen kommer att upphöra %s.", "Cheers!" : "Ha de fint!", + "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hallå där, <br> Administratören aktiverade serverkryptering. Alla dina filer har blivit krypterade med lösenordet: <strong>%s</ strong>. <br> Gå till i din profil för att ändra krypteringslösenordet till ditt egna lösenord. Ange lösenordet ovan som \"Gammalt lösenord\" och ange sedan ditt egna lösenord.<br>", "Default encryption module" : "Standard krypteringsfunktion", "Encrypt the home storage" : "Kryptera hemmalagringen", "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Aktivering av det här alternativet krypterar alla filer som är lagrade på huvudlagringsplatsen, annars kommer bara filer på extern lagringsplats att krypteras", diff --git a/apps/encryption/l10n/sv.json b/apps/encryption/l10n/sv.json index 7169143ea71..3bf093c19ef 100644 --- a/apps/encryption/l10n/sv.json +++ b/apps/encryption/l10n/sv.json @@ -20,14 +20,18 @@ "The current log-in password was not correct, please try again." : "Det nuvarande inloggningslösenordet var inte korrekt. Vänligen försök igen.", "Private key password successfully updated." : "Den privata nyckelns lösenord uppdaterades.", "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Du behöver migrera dina krypteringsnycklar från den gamla krypteringen (ownCloud <= 8.0) till den nya. Kör 'occ encryption:migrate' eller kontakta din administratör", + "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ogiltig privat nyckel för krypteringsappen. Uppdatera din privata nyckels lösenord i dina personliga inställningar för att återställa tillgång till dina krypterade filer.", + "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Krypteringsappen är aktiverad men dina krypteringsnycklar har inte aktiverats, logga ut och logga in igen.", "Encryption app is enabled and ready" : "Krypteringsfunktionen är aktiverad och redo", "Bad Signature" : "Dålig signatur", "Missing Signature" : "Saknar signatur", "one-time password for server-side-encryption" : "engångslösenord för kryptering på serversidan", "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.", "Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you." : "Filen kan inte läsas, troligtvis är det en delad fil. Be ägaren av filen att dela den med dig igen.", + "Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n" : "Hallå där, \n\nAdministratören aktiverade serverkryptering. Alla dina filer har blivit krypterade med lösenordet: %s\n\nGå till i din profil för att ändra krypteringslösenordet till ditt egna lösenord. Ange lösenordet ovan som \"Gammalt lösenord\" och ange sedan ditt egna lösenord.\n\n", "The share will expire on %s." : "Utdelningen kommer att upphöra %s.", "Cheers!" : "Ha de fint!", + "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hallå där, <br> Administratören aktiverade serverkryptering. Alla dina filer har blivit krypterade med lösenordet: <strong>%s</ strong>. <br> Gå till i din profil för att ändra krypteringslösenordet till ditt egna lösenord. Ange lösenordet ovan som \"Gammalt lösenord\" och ange sedan ditt egna lösenord.<br>", "Default encryption module" : "Standard krypteringsfunktion", "Encrypt the home storage" : "Kryptera hemmalagringen", "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Aktivering av det här alternativet krypterar alla filer som är lagrade på huvudlagringsplatsen, annars kommer bara filer på extern lagringsplats att krypteras", diff --git a/apps/federatedfilesharing/l10n/sv.js b/apps/federatedfilesharing/l10n/sv.js index 712ffb73e27..c2eb4ef999a 100644 --- a/apps/federatedfilesharing/l10n/sv.js +++ b/apps/federatedfilesharing/l10n/sv.js @@ -3,10 +3,10 @@ OC.L10N.register( { "Federated sharing" : "Federated Delning", "Do you want to add the remote share {name} from {owner}@{remote}?" : "Vill du lägga till fjärrdelning {name} från {owner}@{remote}?", - "Remote share" : "Fjärrdelning", - "Remote share password" : "Lösenord för fjärrdelning", + "Remote share" : "Extern delning", + "Remote share password" : "Lösenord för extern delning", "Cancel" : "Avbryt", - "Add remote share" : "Lägg till fjärrdelning", + "Add remote share" : "Lägg till extern delning", "Copy" : "Kopiera", "Copied!" : "Kopierad!", "Not supported!" : "Stöds ej!", @@ -20,19 +20,19 @@ OC.L10N.register( "The mountpoint name contains invalid characters." : "Monteringspunktens namn innehåller ogiltiga tecken.", "Not allowed to create a federated share with the owner." : "Ej tillåtet att skapa en federerad delning med ägaren", "Invalid or untrusted SSL certificate" : "Ogiltigt eller ej betrott SSL-certifikat", - "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera fjärrdelningen, lösenordet kan vara fel", + "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera mot externa servern, lösenordet kan vara fel", "Storage not valid" : "Lagring ogiltig", "Federated Share successfully added" : "Federerad delning lyckades", - "Couldn't add remote share" : "Kunde inte lägga till fjärrutdelning", + "Couldn't add remote share" : "Kunde inte lägga till extern delning", "Sharing %s failed, because this item is already shared with %s" : "Delning %s misslyckades därför att objektet redan är delat med %s", "Not allowed to create a federated share with the same user" : "Ej tillåtet att skapa en federerad delning med samma användare", "File is already shared with %s" : "Filen är redan delad med %s", "Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate." : "Misslyckades att dela ut %s kunde inte hitta %s, kanske är servern inte tillgänglig för närvarande eller så används ett självsignerat certifikat", "Could not find share" : "Kunde inte hitta delning", - "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"%3$s\" som en fjärrutdelning från %1$s (på uppdrag av %2$s)", - "You received {share} as a remote share from {user} (on behalf of {behalf})" : "Du tog emot {share} som en fjärrutedlning {user} (på uppdrag av {behalf})", - "You received \"%3$s\" as a remote share from %1$s" : "Du tog emot \"%3$s\" som en fjärrutdelning från %1$s", - "You received {share} as a remote share from {user}" : "Du tog emot {share} som en fjärrutdelning från {user}", + "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"%3$s\" som en extern delning från %1$s (på uppdrag av %2$s)", + "You received {share} as a remote share from {user} (on behalf of {behalf})" : "Du tog emot {share} som en extern delning {user} (på uppdrag av {behalf})", + "You received \"%3$s\" as a remote share from %1$s" : "Du tog emot \"%3$s\" som en extern delning från %1$s", + "You received {share} as a remote share from {user}" : "Du tog emot {share} som en extern delning från {user}", "Accept" : "Acceptera", "Decline" : "Neka", "Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Dela med mig genom mitt #Nextcloud Federated Cloud ID, se %s", @@ -49,7 +49,7 @@ OC.L10N.register( "Share with me via Nextcloud" : "Dela med mig via Nextcloud", "HTML Code:" : "HTML Kod:", "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Misslyckades dela ut %s, kan inte hitta %s, kanske är servern inte åtkomlig för närvarande.", - "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"/%3$s\" som en fjärrdelning från %1$s (via %2$s)", - "You received \"/%3$s\" as a remote share from %1$s" : "Du tog emot \"/%3$s\" som en fjärrdelning från %1$s" + "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"/%3$s\" som en extern delning från %1$s (via %2$s)", + "You received \"/%3$s\" as a remote share from %1$s" : "Du tog emot \"/%3$s\" som en extern delning från %1$s" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/federatedfilesharing/l10n/sv.json b/apps/federatedfilesharing/l10n/sv.json index e5827ffcab2..902e7794689 100644 --- a/apps/federatedfilesharing/l10n/sv.json +++ b/apps/federatedfilesharing/l10n/sv.json @@ -1,10 +1,10 @@ { "translations": { "Federated sharing" : "Federated Delning", "Do you want to add the remote share {name} from {owner}@{remote}?" : "Vill du lägga till fjärrdelning {name} från {owner}@{remote}?", - "Remote share" : "Fjärrdelning", - "Remote share password" : "Lösenord för fjärrdelning", + "Remote share" : "Extern delning", + "Remote share password" : "Lösenord för extern delning", "Cancel" : "Avbryt", - "Add remote share" : "Lägg till fjärrdelning", + "Add remote share" : "Lägg till extern delning", "Copy" : "Kopiera", "Copied!" : "Kopierad!", "Not supported!" : "Stöds ej!", @@ -18,19 +18,19 @@ "The mountpoint name contains invalid characters." : "Monteringspunktens namn innehåller ogiltiga tecken.", "Not allowed to create a federated share with the owner." : "Ej tillåtet att skapa en federerad delning med ägaren", "Invalid or untrusted SSL certificate" : "Ogiltigt eller ej betrott SSL-certifikat", - "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera fjärrdelningen, lösenordet kan vara fel", + "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera mot externa servern, lösenordet kan vara fel", "Storage not valid" : "Lagring ogiltig", "Federated Share successfully added" : "Federerad delning lyckades", - "Couldn't add remote share" : "Kunde inte lägga till fjärrutdelning", + "Couldn't add remote share" : "Kunde inte lägga till extern delning", "Sharing %s failed, because this item is already shared with %s" : "Delning %s misslyckades därför att objektet redan är delat med %s", "Not allowed to create a federated share with the same user" : "Ej tillåtet att skapa en federerad delning med samma användare", "File is already shared with %s" : "Filen är redan delad med %s", "Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate." : "Misslyckades att dela ut %s kunde inte hitta %s, kanske är servern inte tillgänglig för närvarande eller så används ett självsignerat certifikat", "Could not find share" : "Kunde inte hitta delning", - "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"%3$s\" som en fjärrutdelning från %1$s (på uppdrag av %2$s)", - "You received {share} as a remote share from {user} (on behalf of {behalf})" : "Du tog emot {share} som en fjärrutedlning {user} (på uppdrag av {behalf})", - "You received \"%3$s\" as a remote share from %1$s" : "Du tog emot \"%3$s\" som en fjärrutdelning från %1$s", - "You received {share} as a remote share from {user}" : "Du tog emot {share} som en fjärrutdelning från {user}", + "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"%3$s\" som en extern delning från %1$s (på uppdrag av %2$s)", + "You received {share} as a remote share from {user} (on behalf of {behalf})" : "Du tog emot {share} som en extern delning {user} (på uppdrag av {behalf})", + "You received \"%3$s\" as a remote share from %1$s" : "Du tog emot \"%3$s\" som en extern delning från %1$s", + "You received {share} as a remote share from {user}" : "Du tog emot {share} som en extern delning från {user}", "Accept" : "Acceptera", "Decline" : "Neka", "Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Dela med mig genom mitt #Nextcloud Federated Cloud ID, se %s", @@ -47,7 +47,7 @@ "Share with me via Nextcloud" : "Dela med mig via Nextcloud", "HTML Code:" : "HTML Kod:", "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Misslyckades dela ut %s, kan inte hitta %s, kanske är servern inte åtkomlig för närvarande.", - "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"/%3$s\" som en fjärrdelning från %1$s (via %2$s)", - "You received \"/%3$s\" as a remote share from %1$s" : "Du tog emot \"/%3$s\" som en fjärrdelning från %1$s" + "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Du tog emot \"/%3$s\" som en extern delning från %1$s (via %2$s)", + "You received \"/%3$s\" as a remote share from %1$s" : "Du tog emot \"/%3$s\" som en extern delning från %1$s" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files/l10n/de_DE.js b/apps/files/l10n/de_DE.js index 148531d81ea..9ef2aed2802 100644 --- a/apps/files/l10n/de_DE.js +++ b/apps/files/l10n/de_DE.js @@ -52,7 +52,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", - "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], + "_including %n hidden_::_including %n hidden_" : ["%n versteckte eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hoch geladen"], "New" : "Neu", @@ -86,7 +86,7 @@ OC.L10N.register( "Moved by {user}" : "Verschoben durch {user}", "You created {file}" : "Sie haben {file} erstellt", "{user} created {file}" : "{user} hat {file} erstellt", - "{file} was created in a public folder" : "{file} wurde in einem öffentlichen Verzeichnis erstellt", + "{file} was created in a public folder" : "{file} wurde in einem öffentlichen Ordner erstellt", "You changed {file}" : "Sie haben {file} geändert", "{user} changed {file}" : "{user} hat {file} geändert", "You deleted {file}" : "Sie haben {file} gelöscht", @@ -98,11 +98,11 @@ OC.L10N.register( "You moved {oldfile} to {newfile}" : "Sie haben {oldfile} nach {newfile} verschoben", "{user} moved {oldfile} to {newfile}" : "{user} hat {oldfile} nach {newfile} verschoben", "A file has been added to or removed from your <strong>favorites</strong>" : "Eine Datei wurde Ihren <strong>Favoriten</strong> hinzugefügt oder daraus entfernt", - "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Eine Datei oder Ordner wurden <strong>geändert</strong> oder <strong>umbenannt</strong>", + "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Eine Datei oder Ordner wurde <strong>geändert</strong> oder <strong>umbenannt</strong>", "A new file or folder has been <strong>created</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>erstellt</strong>", - "A new file or folder has been <strong>deleted</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>gelöscht</strong>", + "A new file or folder has been <strong>deleted</strong>" : "Eine neue Datei oder Ordner wurde <strong>gelöscht</strong>", "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Benachrichtigungen über Neues und Änderungen zu Ihren <strong>favorisierten Dateien</strong> beschränken <em>(nur im Stream)</em>", - "A new file or folder has been <strong>restored</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>wiederhergestellt</strong>", + "A new file or folder has been <strong>restored</strong>" : "Eine neue Datei oder Ordner wurde <strong>wiederhergestellt</strong>", "Upload (max. %s)" : "Hochladen (max. %s)", "File handling" : "Dateibehandlung", "Maximum upload size" : "Maximale Upload-Größe", diff --git a/apps/files/l10n/de_DE.json b/apps/files/l10n/de_DE.json index f9e9f545641..3466d7ebd9a 100644 --- a/apps/files/l10n/de_DE.json +++ b/apps/files/l10n/de_DE.json @@ -50,7 +50,7 @@ "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", - "_including %n hidden_::_including %n hidden_" : ["%n versteckten eingeschlossen","%n versteckten eingeschlossen"], + "_including %n hidden_::_including %n hidden_" : ["%n versteckte eingeschlossen","%n versteckten eingeschlossen"], "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hoch geladen"], "New" : "Neu", @@ -84,7 +84,7 @@ "Moved by {user}" : "Verschoben durch {user}", "You created {file}" : "Sie haben {file} erstellt", "{user} created {file}" : "{user} hat {file} erstellt", - "{file} was created in a public folder" : "{file} wurde in einem öffentlichen Verzeichnis erstellt", + "{file} was created in a public folder" : "{file} wurde in einem öffentlichen Ordner erstellt", "You changed {file}" : "Sie haben {file} geändert", "{user} changed {file}" : "{user} hat {file} geändert", "You deleted {file}" : "Sie haben {file} gelöscht", @@ -96,11 +96,11 @@ "You moved {oldfile} to {newfile}" : "Sie haben {oldfile} nach {newfile} verschoben", "{user} moved {oldfile} to {newfile}" : "{user} hat {oldfile} nach {newfile} verschoben", "A file has been added to or removed from your <strong>favorites</strong>" : "Eine Datei wurde Ihren <strong>Favoriten</strong> hinzugefügt oder daraus entfernt", - "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Eine Datei oder Ordner wurden <strong>geändert</strong> oder <strong>umbenannt</strong>", + "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Eine Datei oder Ordner wurde <strong>geändert</strong> oder <strong>umbenannt</strong>", "A new file or folder has been <strong>created</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>erstellt</strong>", - "A new file or folder has been <strong>deleted</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>gelöscht</strong>", + "A new file or folder has been <strong>deleted</strong>" : "Eine neue Datei oder Ordner wurde <strong>gelöscht</strong>", "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Benachrichtigungen über Neues und Änderungen zu Ihren <strong>favorisierten Dateien</strong> beschränken <em>(nur im Stream)</em>", - "A new file or folder has been <strong>restored</strong>" : "Eine neue Datei oder ein neuer Ordner wurde <strong>wiederhergestellt</strong>", + "A new file or folder has been <strong>restored</strong>" : "Eine neue Datei oder Ordner wurde <strong>wiederhergestellt</strong>", "Upload (max. %s)" : "Hochladen (max. %s)", "File handling" : "Dateibehandlung", "Maximum upload size" : "Maximale Upload-Größe", diff --git a/apps/files/l10n/sv.js b/apps/files/l10n/sv.js index ae25c1e5321..2dfce2830c1 100644 --- a/apps/files/l10n/sv.js +++ b/apps/files/l10n/sv.js @@ -21,7 +21,7 @@ OC.L10N.register( "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} av {totalSize} ({bitrate})", "Actions" : "Åtgärder", - "Download" : "Ladda ner", + "Download" : "Ladda ned", "Rename" : "Byt namn", "Move" : "Flytta", "Target folder" : "Målmapp", diff --git a/apps/files/l10n/sv.json b/apps/files/l10n/sv.json index 3c8a43bbf79..f644881594b 100644 --- a/apps/files/l10n/sv.json +++ b/apps/files/l10n/sv.json @@ -19,7 +19,7 @@ "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} av {totalSize} ({bitrate})", "Actions" : "Åtgärder", - "Download" : "Ladda ner", + "Download" : "Ladda ned", "Rename" : "Byt namn", "Move" : "Flytta", "Target folder" : "Målmapp", diff --git a/apps/files_external/3rdparty/autoload.php b/apps/files_external/3rdparty/autoload.php index 78e3de4ca0c..5875a3b996a 100644 --- a/apps/files_external/3rdparty/autoload.php +++ b/apps/files_external/3rdparty/autoload.php @@ -2,6 +2,6 @@ // autoload.php @generated by Composer -require_once __DIR__ . '/composer' . '/autoload_real.php'; +require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3::getLoader(); diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json index 158478741ec..84f1e192018 100644 --- a/apps/files_external/3rdparty/composer.json +++ b/apps/files_external/3rdparty/composer.json @@ -8,7 +8,7 @@ "classmap-authoritative": true }, "require": { - "icewind/smb": "1.1.0", + "icewind/smb": "2.0.0", "icewind/streams": "0.4.1" } } diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock index 8f324299ff3..305cc8dc4ba 100644 --- a/apps/files_external/3rdparty/composer.lock +++ b/apps/files_external/3rdparty/composer.lock @@ -4,30 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8ed3150b0b3e916ad66558242b4cf2a0", - "content-hash": "70722dcee13b3ac1c1951479b7431c97", + "hash": "a8b4080027a432533f6d0597ad527fe7", + "content-hash": "8165981792437b03b39c11d28b061eda", "packages": [ { "name": "icewind/smb", - "version": "v1.1.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/icewind1991/SMB.git", - "reference": "822f924967c68228555cea84ea44765f8e85c601" + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601", - "reference": "822f924967c68228555cea84ea44765f8e85c601", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", "shasum": "" }, "require": { "icewind/streams": ">=0.2.0", - "php": ">=5.3" + "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "v1.0.0" + "phpunit/phpunit": "^4.8" }, "type": "library", "autoload": { @@ -47,7 +46,7 @@ } ], "description": "php wrapper for smbclient and libsmbclient-php", - "time": "2016-04-26 13:26:39" + "time": "2016-12-13 13:56:55" }, { "name": "icewind/streams", diff --git a/apps/files_external/3rdparty/composer/ClassLoader.php b/apps/files_external/3rdparty/composer/ClassLoader.php index ff6ecfb822f..ac67d302a18 100644 --- a/apps/files_external/3rdparty/composer/ClassLoader.php +++ b/apps/files_external/3rdparty/composer/ClassLoader.php @@ -53,8 +53,8 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); public function getPrefixes() { @@ -322,20 +322,20 @@ class ClassLoader if (isset($this->classMap[$class])) { return $this->classMap[$class]; } - if ($this->classMapAuthoritative) { + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { + if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } - if ($file === null) { + if (false === $file) { // Remember that this class does not exist. - return $this->classMap[$class] = false; + $this->missingClasses[$class] = true; } return $file; @@ -399,6 +399,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php index 0f9a43c6cd7..ba5d06f7011 100644 --- a/apps/files_external/3rdparty/composer/autoload_classmap.php +++ b/apps/files_external/3rdparty/composer/autoload_classmap.php @@ -7,6 +7,7 @@ $baseDir = $vendorDir; return array( 'Icewind\\SMB\\AbstractShare' => $vendorDir . '/icewind/smb/src/AbstractShare.php', + 'Icewind\\SMB\\Change' => $vendorDir . '/icewind/smb/src/Change.php', 'Icewind\\SMB\\Connection' => $vendorDir . '/icewind/smb/src/Connection.php', 'Icewind\\SMB\\ErrorCodes' => $vendorDir . '/icewind/smb/src/ErrorCodes.php', 'Icewind\\SMB\\Exception\\AccessDeniedException' => $vendorDir . '/icewind/smb/src/Exception/AccessDeniedException.php', @@ -15,6 +16,7 @@ return array( 'Icewind\\SMB\\Exception\\ConnectException' => $vendorDir . '/icewind/smb/src/Exception/ConnectException.php', 'Icewind\\SMB\\Exception\\ConnectionException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionException.php', 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\DependencyException' => $vendorDir . '/icewind/smb/src/Exception/DependencyException.php', 'Icewind\\SMB\\Exception\\Exception' => $vendorDir . '/icewind/smb/src/Exception/Exception.php', 'Icewind\\SMB\\Exception\\FileInUseException' => $vendorDir . '/icewind/smb/src/Exception/FileInUseException.php', 'Icewind\\SMB\\Exception\\ForbiddenException' => $vendorDir . '/icewind/smb/src/Exception/ForbiddenException.php', @@ -31,17 +33,27 @@ return array( 'Icewind\\SMB\\Exception\\TimedOutException' => $vendorDir . '/icewind/smb/src/Exception/TimedOutException.php', 'Icewind\\SMB\\FileInfo' => $vendorDir . '/icewind/smb/src/FileInfo.php', 'Icewind\\SMB\\IFileInfo' => $vendorDir . '/icewind/smb/src/IFileInfo.php', + 'Icewind\\SMB\\INotifyHandler' => $vendorDir . '/icewind/smb/src/INotifyHandler.php', 'Icewind\\SMB\\IShare' => $vendorDir . '/icewind/smb/src/IShare.php', 'Icewind\\SMB\\NativeFileInfo' => $vendorDir . '/icewind/smb/src/NativeFileInfo.php', 'Icewind\\SMB\\NativeServer' => $vendorDir . '/icewind/smb/src/NativeServer.php', 'Icewind\\SMB\\NativeShare' => $vendorDir . '/icewind/smb/src/NativeShare.php', 'Icewind\\SMB\\NativeState' => $vendorDir . '/icewind/smb/src/NativeState.php', 'Icewind\\SMB\\NativeStream' => $vendorDir . '/icewind/smb/src/NativeStream.php', + 'Icewind\\SMB\\NotifyHandler' => $vendorDir . '/icewind/smb/src/NotifyHandler.php', 'Icewind\\SMB\\Parser' => $vendorDir . '/icewind/smb/src/Parser.php', 'Icewind\\SMB\\RawConnection' => $vendorDir . '/icewind/smb/src/RawConnection.php', 'Icewind\\SMB\\Server' => $vendorDir . '/icewind/smb/src/Server.php', 'Icewind\\SMB\\Share' => $vendorDir . '/icewind/smb/src/Share.php', 'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php', + 'Icewind\\SMB\\Test\\AbstractShare' => $vendorDir . '/icewind/smb/tests/AbstractShare.php', + 'Icewind\\SMB\\Test\\NativeShare' => $vendorDir . '/icewind/smb/tests/NativeShare.php', + 'Icewind\\SMB\\Test\\NativeStream' => $vendorDir . '/icewind/smb/tests/NativeStream.php', + 'Icewind\\SMB\\Test\\NotifyHandlerTest' => $vendorDir . '/icewind/smb/tests/NotifyHandlerTest.php', + 'Icewind\\SMB\\Test\\Parser' => $vendorDir . '/icewind/smb/tests/Parser.php', + 'Icewind\\SMB\\Test\\Server' => $vendorDir . '/icewind/smb/tests/Server.php', + 'Icewind\\SMB\\Test\\Share' => $vendorDir . '/icewind/smb/tests/Share.php', + 'Icewind\\SMB\\Test\\TestCase' => $vendorDir . '/icewind/smb/tests/TestCase.php', 'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php', 'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php', 'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php', diff --git a/apps/files_external/3rdparty/composer/autoload_real.php b/apps/files_external/3rdparty/composer/autoload_real.php index 6f27fffb9da..4ac68127fea 100644 --- a/apps/files_external/3rdparty/composer/autoload_real.php +++ b/apps/files_external/3rdparty/composer/autoload_real.php @@ -23,9 +23,16 @@ class ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3', 'loadClassLoader')); - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::getInitializer($loader)); + } else { + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } } $loader->setClassMapAuthoritative(true); diff --git a/apps/files_external/3rdparty/composer/autoload_static.php b/apps/files_external/3rdparty/composer/autoload_static.php new file mode 100644 index 00000000000..10c09bfc409 --- /dev/null +++ b/apps/files_external/3rdparty/composer/autoload_static.php @@ -0,0 +1,112 @@ +<?php + +// autoload_static.php @generated by Composer + +namespace Composer\Autoload; + +class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 +{ + public static $prefixLengthsPsr4 = array ( + 'I' => + array ( + 'Icewind\\Streams\\Tests\\' => 22, + 'Icewind\\Streams\\' => 16, + 'Icewind\\SMB\\Test\\' => 17, + 'Icewind\\SMB\\' => 12, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Icewind\\Streams\\Tests\\' => + array ( + 0 => __DIR__ . '/..' . '/icewind/streams/tests', + ), + 'Icewind\\Streams\\' => + array ( + 0 => __DIR__ . '/..' . '/icewind/streams/src', + ), + 'Icewind\\SMB\\Test\\' => + array ( + 0 => __DIR__ . '/..' . '/icewind/smb/tests', + ), + 'Icewind\\SMB\\' => + array ( + 0 => __DIR__ . '/..' . '/icewind/smb/src', + ), + ); + + public static $classMap = array ( + 'Icewind\\SMB\\AbstractShare' => __DIR__ . '/..' . '/icewind/smb/src/AbstractShare.php', + 'Icewind\\SMB\\Change' => __DIR__ . '/..' . '/icewind/smb/src/Change.php', + 'Icewind\\SMB\\Connection' => __DIR__ . '/..' . '/icewind/smb/src/Connection.php', + 'Icewind\\SMB\\ErrorCodes' => __DIR__ . '/..' . '/icewind/smb/src/ErrorCodes.php', + 'Icewind\\SMB\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AccessDeniedException.php', + 'Icewind\\SMB\\Exception\\AlreadyExistsException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AlreadyExistsException.php', + 'Icewind\\SMB\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AuthenticationException.php', + 'Icewind\\SMB\\Exception\\ConnectException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectException.php', + 'Icewind\\SMB\\Exception\\ConnectionException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionException.php', + 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionRefusedException.php', + 'Icewind\\SMB\\Exception\\DependencyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/DependencyException.php', + 'Icewind\\SMB\\Exception\\Exception' => __DIR__ . '/..' . '/icewind/smb/src/Exception/Exception.php', + 'Icewind\\SMB\\Exception\\FileInUseException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/FileInUseException.php', + 'Icewind\\SMB\\Exception\\ForbiddenException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ForbiddenException.php', + 'Icewind\\SMB\\Exception\\HostDownException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/HostDownException.php', + 'Icewind\\SMB\\Exception\\InvalidHostException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidHostException.php', + 'Icewind\\SMB\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidPathException.php', + 'Icewind\\SMB\\Exception\\InvalidRequestException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidRequestException.php', + 'Icewind\\SMB\\Exception\\InvalidResourceException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidResourceException.php', + 'Icewind\\SMB\\Exception\\InvalidTypeException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidTypeException.php', + 'Icewind\\SMB\\Exception\\NoLoginServerException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NoLoginServerException.php', + 'Icewind\\SMB\\Exception\\NoRouteToHostException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NoRouteToHostException.php', + 'Icewind\\SMB\\Exception\\NotEmptyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NotEmptyException.php', + 'Icewind\\SMB\\Exception\\NotFoundException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NotFoundException.php', + 'Icewind\\SMB\\Exception\\TimedOutException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/TimedOutException.php', + 'Icewind\\SMB\\FileInfo' => __DIR__ . '/..' . '/icewind/smb/src/FileInfo.php', + 'Icewind\\SMB\\IFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/IFileInfo.php', + 'Icewind\\SMB\\INotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/INotifyHandler.php', + 'Icewind\\SMB\\IShare' => __DIR__ . '/..' . '/icewind/smb/src/IShare.php', + 'Icewind\\SMB\\NativeFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/NativeFileInfo.php', + 'Icewind\\SMB\\NativeServer' => __DIR__ . '/..' . '/icewind/smb/src/NativeServer.php', + 'Icewind\\SMB\\NativeShare' => __DIR__ . '/..' . '/icewind/smb/src/NativeShare.php', + 'Icewind\\SMB\\NativeState' => __DIR__ . '/..' . '/icewind/smb/src/NativeState.php', + 'Icewind\\SMB\\NativeStream' => __DIR__ . '/..' . '/icewind/smb/src/NativeStream.php', + 'Icewind\\SMB\\NotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/NotifyHandler.php', + 'Icewind\\SMB\\Parser' => __DIR__ . '/..' . '/icewind/smb/src/Parser.php', + 'Icewind\\SMB\\RawConnection' => __DIR__ . '/..' . '/icewind/smb/src/RawConnection.php', + 'Icewind\\SMB\\Server' => __DIR__ . '/..' . '/icewind/smb/src/Server.php', + 'Icewind\\SMB\\Share' => __DIR__ . '/..' . '/icewind/smb/src/Share.php', + 'Icewind\\SMB\\System' => __DIR__ . '/..' . '/icewind/smb/src/System.php', + 'Icewind\\SMB\\Test\\AbstractShare' => __DIR__ . '/..' . '/icewind/smb/tests/AbstractShare.php', + 'Icewind\\SMB\\Test\\NativeShare' => __DIR__ . '/..' . '/icewind/smb/tests/NativeShare.php', + 'Icewind\\SMB\\Test\\NativeStream' => __DIR__ . '/..' . '/icewind/smb/tests/NativeStream.php', + 'Icewind\\SMB\\Test\\NotifyHandlerTest' => __DIR__ . '/..' . '/icewind/smb/tests/NotifyHandlerTest.php', + 'Icewind\\SMB\\Test\\Parser' => __DIR__ . '/..' . '/icewind/smb/tests/Parser.php', + 'Icewind\\SMB\\Test\\Server' => __DIR__ . '/..' . '/icewind/smb/tests/Server.php', + 'Icewind\\SMB\\Test\\Share' => __DIR__ . '/..' . '/icewind/smb/tests/Share.php', + 'Icewind\\SMB\\Test\\TestCase' => __DIR__ . '/..' . '/icewind/smb/tests/TestCase.php', + 'Icewind\\SMB\\TimeZoneProvider' => __DIR__ . '/..' . '/icewind/smb/src/TimeZoneProvider.php', + 'Icewind\\Streams\\CallbackWrapper' => __DIR__ . '/..' . '/icewind/streams/src/CallbackWrapper.php', + 'Icewind\\Streams\\Directory' => __DIR__ . '/..' . '/icewind/streams/src/Directory.php', + 'Icewind\\Streams\\DirectoryFilter' => __DIR__ . '/..' . '/icewind/streams/src/DirectoryFilter.php', + 'Icewind\\Streams\\DirectoryWrapper' => __DIR__ . '/..' . '/icewind/streams/src/DirectoryWrapper.php', + 'Icewind\\Streams\\File' => __DIR__ . '/..' . '/icewind/streams/src/File.php', + 'Icewind\\Streams\\IteratorDirectory' => __DIR__ . '/..' . '/icewind/streams/src/IteratorDirectory.php', + 'Icewind\\Streams\\NullWrapper' => __DIR__ . '/..' . '/icewind/streams/src/NullWrapper.php', + 'Icewind\\Streams\\Path' => __DIR__ . '/..' . '/icewind/streams/src/Path.php', + 'Icewind\\Streams\\RetryWrapper' => __DIR__ . '/..' . '/icewind/streams/src/RetryWrapper.php', + 'Icewind\\Streams\\SeekableWrapper' => __DIR__ . '/..' . '/icewind/streams/src/SeekableWrapper.php', + 'Icewind\\Streams\\Url' => __DIR__ . '/..' . '/icewind/streams/src/Url.php', + 'Icewind\\Streams\\UrlCallback' => __DIR__ . '/..' . '/icewind/streams/src/UrlCallBack.php', + 'Icewind\\Streams\\Wrapper' => __DIR__ . '/..' . '/icewind/streams/src/Wrapper.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json index 127d2bd3a19..bc71c6d0458 100644 --- a/apps/files_external/3rdparty/composer/installed.json +++ b/apps/files_external/3rdparty/composer/installed.json @@ -1,34 +1,33 @@ [ { - "name": "icewind/smb", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", + "name": "icewind/streams", + "version": "0.4.1", + "version_normalized": "0.4.1.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/SMB.git", - "reference": "822f924967c68228555cea84ea44765f8e85c601" + "url": "https://github.com/icewind1991/Streams.git", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601", - "reference": "822f924967c68228555cea84ea44765f8e85c601", + "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", "shasum": "" }, "require": { - "icewind/streams": ">=0.2.0", "php": ">=5.3" }, "require-dev": { "phpunit/phpunit": "^4.8", "satooshi/php-coveralls": "v1.0.0" }, - "time": "2016-04-26 13:26:39", + "time": "2016-06-02 14:37:52", "type": "library", - "installation-source": "source", + "installation-source": "dist", "autoload": { "psr-4": { - "Icewind\\SMB\\": "src/", - "Icewind\\SMB\\Test\\": "tests/" + "Icewind\\Streams\\Tests\\": "tests/", + "Icewind\\Streams\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -41,37 +40,37 @@ "email": "icewind@owncloud.com" } ], - "description": "php wrapper for smbclient and libsmbclient-php" + "description": "A set of generic stream wrappers" }, { - "name": "icewind/streams", - "version": "0.4.1", - "version_normalized": "0.4.1.0", + "name": "icewind/smb", + "version": "v2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/Streams.git", - "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" + "url": "https://github.com/icewind1991/SMB.git", + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", - "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", + "reference": "95a5ecbaf92617f9800ad7d6070ef31d8ff28c3a", "shasum": "" }, "require": { - "php": ">=5.3" + "icewind/streams": ">=0.2.0", + "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "v1.0.0" + "phpunit/phpunit": "^4.8" }, - "time": "2016-06-02 14:37:52", + "time": "2016-12-13 13:56:55", "type": "library", - "installation-source": "dist", + "installation-source": "source", "autoload": { "psr-4": { - "Icewind\\Streams\\Tests\\": "tests/", - "Icewind\\Streams\\": "src/" + "Icewind\\SMB\\": "src/", + "Icewind\\SMB\\Test\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -84,6 +83,6 @@ "email": "icewind@owncloud.com" } ], - "description": "A set of generic stream wrappers" + "description": "php wrapper for smbclient and libsmbclient-php" } ] diff --git a/apps/files_external/3rdparty/icewind/smb/README.md b/apps/files_external/3rdparty/icewind/smb/README.md index 32f3c650f87..c8f31193c83 100644 --- a/apps/files_external/3rdparty/icewind/smb/README.md +++ b/apps/files_external/3rdparty/icewind/smb/README.md @@ -1,7 +1,7 @@ SMB === -[![Coverage Status](https://img.shields.io/coveralls/icewind1991/SMB.svg)](https://coveralls.io/r/icewind1991/SMB?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/icewind1991/SMB/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/icewind1991/SMB/?branch=master) [![Build Status](https://travis-ci.org/icewind1991/SMB.svg?branch=master)](https://travis-ci.org/icewind1991/SMB) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/icewind1991/SMB/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/icewind1991/SMB/?branch=master) @@ -134,3 +134,19 @@ if (Server::NativeAvailable()) { $share = $server->getShare('test'); $share->put($fileToUpload, 'example.txt'); ``` + +### Using notify + +```php +<?php +use Icewind\SMB\Server; + +require('vendor/autoload.php'); + +$server = new Server('localhost', 'test', 'test'); +$share = $server->getShare('test'); + +$share->notify('')->listen(function (\Icewind\SMB\Change $change) { + echo $change->getCode() . ': ' . $change->getPath() . "\n"; +}); +``` diff --git a/apps/files_external/3rdparty/icewind/smb/composer.json b/apps/files_external/3rdparty/icewind/smb/composer.json index 4ac8b27e725..8374f564bf1 100644 --- a/apps/files_external/3rdparty/icewind/smb/composer.json +++ b/apps/files_external/3rdparty/icewind/smb/composer.json @@ -9,11 +9,10 @@ } ], "require" : { - "php": ">=5.3", + "php": ">=5.4", "icewind/streams": ">=0.2.0" }, "require-dev": { - "satooshi/php-coveralls" : "v1.0.0", "phpunit/phpunit": "^4.8" }, "autoload" : { diff --git a/apps/files_external/3rdparty/icewind/smb/src/Connection.php b/apps/files_external/3rdparty/icewind/smb/src/Connection.php index d24cdc1f6d0..c1ebb861711 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Connection.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Connection.php @@ -17,6 +17,14 @@ class Connection extends RawConnection { const DELIMITER = 'smb:'; const DELIMITER_LENGTH = 4; + /** @var Parser */ + private $parser; + + public function __construct($command, Parser $parser, $env = array()) { + parent::__construct($command, $env); + $this->parser = $parser; + } + /** * send input to smbclient * @@ -30,7 +38,7 @@ class Connection extends RawConnection { * get all unprocessed output from smbclient until the next prompt * * @param callable $callback (optional) callback to call for every line read - * @return string + * @return string[] * @throws AuthenticationException * @throws ConnectException * @throws ConnectionException @@ -42,7 +50,7 @@ class Connection extends RawConnection { throw new ConnectionException('Connection not valid'); } $promptLine = $this->readLine(); //first line is prompt - $this->checkConnectionError($promptLine); + $this->parser->checkConnectionError($promptLine); $output = array(); $line = $this->readLine(); @@ -54,6 +62,7 @@ class Connection extends RawConnection { $result = $callback($line); if ($result === false) { // allow the callback to close the connection for infinite running commands $this->close(true); + break; } } else { $output[] .= $line; @@ -90,33 +99,6 @@ class Connection extends RawConnection { } } - /** - * check if the first line holds a connection failure - * - * @param $line - * @throws AuthenticationException - * @throws InvalidHostException - * @throws NoLoginServerException - */ - private function checkConnectionError($line) { - $line = rtrim($line, ')'); - if (substr($line, -23) === ErrorCodes::LogonFailure) { - throw new AuthenticationException('Invalid login'); - } - if (substr($line, -26) === ErrorCodes::BadHostName) { - throw new InvalidHostException('Invalid hostname'); - } - if (substr($line, -22) === ErrorCodes::Unsuccessful) { - throw new InvalidHostException('Connection unsuccessful'); - } - if (substr($line, -28) === ErrorCodes::ConnectionRefused) { - throw new InvalidHostException('Connection refused'); - } - if (substr($line, -26) === ErrorCodes::NoLogonServers) { - throw new NoLoginServerException('No login server'); - } - } - public function close($terminate = true) { if (is_resource($this->getInputStream())) { $this->write('close' . PHP_EOL); diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php index 3307ad57a24..7ac528198a9 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php @@ -7,4 +7,32 @@ namespace Icewind\SMB\Exception; -class Exception extends \Exception {} +class Exception extends \Exception { + static public function unknown($path, $error) { + $message = 'Unknown error (' . $error . ')'; + if ($path) { + $message .= ' for ' . $path; + } + + return new Exception($message, $error); + } + + /** + * @param array $exceptionMap + * @param mixed $error + * @param string $path + * @return Exception + */ + static public function fromMap(array $exceptionMap, $error, $path) { + if (isset($exceptionMap[$error])) { + $exceptionClass = $exceptionMap[$error]; + if (is_numeric($error)) { + return new $exceptionClass($path, $error); + } else { + return new $exceptionClass($path); + } + } else { + return Exception::unknown($path, $error); + } + } +} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IShare.php b/apps/files_external/3rdparty/icewind/smb/src/IShare.php index 40423151332..8f6d5058b81 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/IShare.php +++ b/apps/files_external/3rdparty/icewind/smb/src/IShare.php @@ -8,17 +8,6 @@ namespace Icewind\SMB; interface IShare { - // https://msdn.microsoft.com/en-us/library/dn392331.aspx - const NOTIFY_ADDED = 1; - const NOTIFY_REMOVED = 2; - const NOTIFY_MODIFIED = 3; - const NOTIFY_RENAMED_OLD = 4; - const NOTIFY_RENAMED_NEW = 5; - const NOTIFY_ADDED_STREAM = 6; - const NOTIFY_REMOVED_STREAM = 7; - const NOTIFY_MODIFIED_STREAM = 8; - const NOTIFY_REMOVED_BY_DELETE = 9; - /** * Get the name of the share * @@ -145,8 +134,7 @@ interface IShare { /** * @param string $path - * @param callable $callback callable which will be called for each received change - * @return mixed + * @return INotifyHandler */ - public function notify($path, callable $callback); + public function notify($path); } diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeFileInfo.php b/apps/files_external/3rdparty/icewind/smb/src/NativeFileInfo.php index 6ef5cf0c5b9..6cb070196a6 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/NativeFileInfo.php +++ b/apps/files_external/3rdparty/icewind/smb/src/NativeFileInfo.php @@ -26,7 +26,7 @@ class NativeFileInfo implements IFileInfo { protected $share; /** - * @var array | null + * @var array|null */ protected $statCache; @@ -66,7 +66,7 @@ class NativeFileInfo implements IFileInfo { * @return array */ protected function stat() { - if (!$this->statCache) { + if (is_null($this->statCache)) { $this->statCache = $this->share->getStat($this->getPath()); } return $this->statCache; diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php index 51e16d1841f..7efa34df370 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php +++ b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php @@ -60,6 +60,7 @@ class NativeShare extends AbstractShare { } private function buildUrl($path) { + $this->connect(); $this->verifyPath($path); $url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name); if ($path) { @@ -80,7 +81,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function dir($path) { - $this->connect(); $files = array(); $dh = $this->state->opendir($this->buildUrl($path)); @@ -97,14 +97,13 @@ class NativeShare extends AbstractShare { /** * @param string $path - * @return \Icewind\SMB\IFileInfo[] + * @return \Icewind\SMB\IFileInfo */ public function stat($path) { return new NativeFileInfo($this, $path, basename($path), $this->getStat($path)); } public function getStat($path) { - $this->connect(); return $this->state->stat($this->buildUrl($path)); } @@ -118,7 +117,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\AlreadyExistsException */ public function mkdir($path) { - $this->connect(); return $this->state->mkdir($this->buildUrl($path)); } @@ -132,7 +130,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function rmdir($path) { - $this->connect(); return $this->state->rmdir($this->buildUrl($path)); } @@ -146,7 +143,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function del($path) { - $this->connect(); return $this->state->unlink($this->buildUrl($path)); } @@ -161,7 +157,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\AlreadyExistsException */ public function rename($from, $to) { - $this->connect(); return $this->state->rename($this->buildUrl($from), $this->buildUrl($to)); } @@ -176,7 +171,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function put($source, $target) { - $this->connect(); $sourceHandle = fopen($source, 'rb'); $targetHandle = $this->state->create($this->buildUrl($target)); @@ -214,7 +208,6 @@ class NativeShare extends AbstractShare { throw new InvalidResourceException('Failed opening local file "' . $target . '" for writing: ' . $reason); } - $this->connect(); $sourceHandle = $this->state->open($this->buildUrl($source), 'r'); if (!$sourceHandle) { fclose($targetHandle); @@ -238,7 +231,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function read($source) { - $this->connect(); $url = $this->buildUrl($source); $handle = $this->state->open($url, 'r'); return NativeStream::wrap($this->state, $handle, 'r', $url); @@ -254,7 +246,6 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function write($source) { - $this->connect(); $url = $this->buildUrl($source); $handle = $this->state->create($url); return NativeStream::wrap($this->state, $handle, 'w', $url); @@ -268,10 +259,7 @@ class NativeShare extends AbstractShare { * @return string the attribute value */ public function getAttribute($path, $attribute) { - $this->connect(); - - $result = $this->state->getxattr($this->buildUrl($path), $attribute); - return $result; + return $this->state->getxattr($this->buildUrl($path), $attribute); } /** @@ -283,7 +271,6 @@ class NativeShare extends AbstractShare { * @return string the attribute value */ public function setAttribute($path, $attribute, $value) { - $this->connect(); if ($attribute === 'system.dos_attr.mode' and is_int($value)) { $value = '0x' . dechex($value); @@ -303,14 +290,13 @@ class NativeShare extends AbstractShare { /** * @param string $path - * @param callable $callback callable which will be called for each received change - * @return mixed + * @return INotifyHandler */ - public function notify($path, callable $callback) { + public function notify($path) { // php-smbclient does support notify (https://github.com/eduardok/libsmbclient-php/issues/29) // so we use the smbclient based backend for this $share = new Share($this->server, $this->getName()); - $share->notify($path, $callback); + return $share->notify($path); } public function __destruct() { diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeState.php b/apps/files_external/3rdparty/icewind/smb/src/NativeState.php index e3e344d9e01..7ddce831853 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/NativeState.php +++ b/apps/files_external/3rdparty/icewind/smb/src/NativeState.php @@ -7,16 +7,7 @@ namespace Icewind\SMB; -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\ConnectionRefusedException; use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\ForbiddenException; -use Icewind\SMB\Exception\HostDownException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\NoRouteToHostException; -use Icewind\SMB\Exception\NotEmptyException; -use Icewind\SMB\Exception\NotFoundException; -use Icewind\SMB\Exception\TimedOutException; /** * Low level wrapper for libsmbclient-php for error handling @@ -31,44 +22,39 @@ class NativeState { protected $connected = false; + // todo replace with static once <5.6 support is dropped + // see error.h + private static $exceptionMap = [ + 1 => '\Icewind\SMB\Exception\ForbiddenException', + 2 => '\Icewind\SMB\Exception\NotFoundException', + 13 => '\Icewind\SMB\Exception\ForbiddenException', + 17 => '\Icewind\SMB\Exception\AlreadyExistsException', + 20 => '\Icewind\SMB\Exception\InvalidTypeException', + 21 => '\Icewind\SMB\Exception\InvalidTypeException', + 39 => '\Icewind\SMB\Exception\NotEmptyException', + 110 => '\Icewind\SMB\Exception\TimedOutException', + 111 => '\Icewind\SMB\Exception\ConnectionRefusedException', + 112 => '\Icewind\SMB\Exception\HostDownException', + 113 => '\Icewind\SMB\Exception\NoRouteToHostException' + ]; + protected function handleError($path) { $error = smbclient_state_errno($this->state); - switch ($error) { - // see error.h - case 0; - return; - case 1: - case 13: - throw new ForbiddenException($path, $error); - case 2: - throw new NotFoundException($path, $error); - case 17: - throw new AlreadyExistsException($path, $error); - case 20: - throw new InvalidTypeException($path, $error); - case 21: - throw new InvalidTypeException($path, $error); - case 39: - throw new NotEmptyException($path, $error); - case 110: - throw new TimedOutException($path, $error); - case 111: - throw new ConnectionRefusedException($path, $error); - case 112: - throw new HostDownException($path, $error); - case 113: - throw new NoRouteToHostException($path, $error); - default: - $message = 'Unknown error (' . $error . ')'; - if ($path) { - $message .= ' for ' . $path; - } - throw new Exception($message, $error); + if ($error === 0) { + return; } + throw Exception::fromMap(self::$exceptionMap, $error, $path); } - protected function testResult($result, $path) { + protected function testResult($result, $uri) { if ($result === false or $result === null) { + // smb://host/share/path + if (is_string($uri)) { + list(, , , , $path) = explode('/', $uri, 5); + $path = '/' . $path; + } else { + $path = null; + } $this->handleError($path); } } @@ -246,7 +232,7 @@ class NativeState { * @param resource $file * @param int $offset * @param int $whence SEEK_SET | SEEK_CUR | SEEK_END - * @return int | bool new file offset as measured from the start of the file on success, false on failure. + * @return int|bool new file offset as measured from the start of the file on success, false on failure. */ public function lseek($file, $offset, $whence = SEEK_SET) { $result = @smbclient_lseek($this->state, $file, $offset, $whence); diff --git a/apps/files_external/3rdparty/icewind/smb/src/Parser.php b/apps/files_external/3rdparty/icewind/smb/src/Parser.php index fc1d7f283a8..5cc5acbdf56 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Parser.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Parser.php @@ -9,19 +9,38 @@ namespace Icewind\SMB; use Icewind\SMB\Exception\AccessDeniedException; use Icewind\SMB\Exception\AlreadyExistsException; +use Icewind\SMB\Exception\AuthenticationException; use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\FileInUseException; +use Icewind\SMB\Exception\InvalidHostException; use Icewind\SMB\Exception\InvalidResourceException; use Icewind\SMB\Exception\InvalidTypeException; +use Icewind\SMB\Exception\NoLoginServerException; use Icewind\SMB\Exception\NotEmptyException; use Icewind\SMB\Exception\NotFoundException; class Parser { + const MSG_NOT_FOUND = 'Error opening local file '; + /** * @var \Icewind\SMB\TimeZoneProvider */ protected $timeZoneProvider; + // todo replace with static once <5.6 support is dropped + // see error.h + private static $exceptionMap = [ + ErrorCodes::PathNotFound => '\Icewind\SMB\Exception\NotFoundException', + ErrorCodes::ObjectNotFound => '\Icewind\SMB\Exception\NotFoundException', + ErrorCodes::NoSuchFile => '\Icewind\SMB\Exception\NotFoundException', + ErrorCodes::NameCollision => '\Icewind\SMB\Exception\AlreadyExistsException', + ErrorCodes::AccessDenied => '\Icewind\SMB\Exception\AccessDeniedException', + ErrorCodes::DirectoryNotEmpty => '\Icewind\SMB\Exception\NotEmptyException', + ErrorCodes::FileIsADirectory => '\Icewind\SMB\Exception\InvalidTypeException', + ErrorCodes::NotADirectory => '\Icewind\SMB\Exception\InvalidTypeException', + ErrorCodes::SharingViolation => '\Icewind\SMB\Exception\FileInUseException' + ]; + /** * @param \Icewind\SMB\TimeZoneProvider $timeZoneProvider */ @@ -29,50 +48,54 @@ class Parser { $this->timeZoneProvider = $timeZoneProvider; } - public function checkForError($output, $path) { - if (count($output) === 0) { - return true; - } else { - if (strpos($output[0], 'does not exist')) { - throw new NotFoundException($path); - } - $parts = explode(' ', $output[0]); - $error = false; - foreach ($parts as $part) { - if (substr($part, 0, 9) === 'NT_STATUS') { - $error = $part; - } + private function getErrorCode($line) { + $parts = explode(' ', $line); + foreach ($parts as $part) { + if (substr($part, 0, 9) === 'NT_STATUS') { + return $part; } + } + return false; + } - $notFoundMsg = 'Error opening local file '; - if (substr($output[0], 0, strlen($notFoundMsg)) === $notFoundMsg) { - $localPath = substr($output[0], strlen($notFoundMsg)); - throw new InvalidResourceException('Failed opening local file "' . $localPath . '" for writing'); - } + public function checkForError($output, $path) { + if (strpos($output[0], 'does not exist')) { + throw new NotFoundException($path); + } + $error = $this->getErrorCode($output[0]); - switch ($error) { - case ErrorCodes::PathNotFound: - case ErrorCodes::ObjectNotFound: - case ErrorCodes::NoSuchFile: - throw new NotFoundException($path); - case ErrorCodes::NameCollision: - throw new AlreadyExistsException($path); - case ErrorCodes::AccessDenied: - throw new AccessDeniedException($path); - case ErrorCodes::DirectoryNotEmpty: - throw new NotEmptyException($path); - case ErrorCodes::FileIsADirectory: - case ErrorCodes::NotADirectory: - throw new InvalidTypeException($path); - case ErrorCodes::SharingViolation: - throw new FileInUseException($path); - default: - $message = 'Unknown error (' . $error . ')'; - if ($path) { - $message .= ' for ' . $path; - } - throw new Exception($message); - } + if (substr($output[0], 0, strlen(self::MSG_NOT_FOUND)) === self::MSG_NOT_FOUND) { + $localPath = substr($output[0], strlen(self::MSG_NOT_FOUND)); + throw new InvalidResourceException('Failed opening local file "' . $localPath . '" for writing'); + } + + throw Exception::fromMap(self::$exceptionMap, $error, $path); + } + + /** + * check if the first line holds a connection failure + * + * @param $line + * @throws AuthenticationException + * @throws InvalidHostException + * @throws NoLoginServerException + */ + public function checkConnectionError($line) { + $line = rtrim($line, ')'); + if (substr($line, -23) === ErrorCodes::LogonFailure) { + throw new AuthenticationException('Invalid login'); + } + if (substr($line, -26) === ErrorCodes::BadHostName) { + throw new InvalidHostException('Invalid hostname'); + } + if (substr($line, -22) === ErrorCodes::Unsuccessful) { + throw new InvalidHostException('Connection unsuccessful'); + } + if (substr($line, -28) === ErrorCodes::ConnectionRefused) { + throw new InvalidHostException('Connection refused'); + } + if (substr($line, -26) === ErrorCodes::NoLogonServers) { + throw new NoLoginServerException('No login server'); } } @@ -95,9 +118,7 @@ class Parser { } public function parseStat($output) { - $mtime = 0; - $mode = 0; - $size = 0; + $data = []; foreach ($output as $line) { // A line = explode statement may not fill all array elements // properly. May happen when accessing non Windows Fileservers @@ -105,20 +126,13 @@ class Parser { $name = isset($words[0]) ? $words[0] : ''; $value = isset($words[1]) ? $words[1] : ''; $value = trim($value); - if ($name === 'write_time') { - $mtime = strtotime($value); - } else if ($name === 'attributes') { - $mode = hexdec(substr($value, 1, -1)); - } else if ($name === 'stream') { - list(, $size,) = explode(' ', $value); - $size = intval($size); - } + $data[$name] = $value; } - return array( - 'mtime' => $mtime, - 'mode' => $mode, - 'size' => $size - ); + return [ + 'mtime' => strtotime($data['write_time']), + 'mode' => hexdec(substr($data['attributes'], strpos($data['attributes'], '('), -1)), + 'size' => isset($data['stream']) ? intval(explode(' ', $data['stream'])[1]) : 0 + ]; } public function parseDir($output, $basePath) { @@ -139,4 +153,17 @@ class Parser { } return $content; } + + public function parseListShares($output) { + $shareNames = array(); + foreach ($output as $line) { + if (strpos($line, '|')) { + list($type, $name, $description) = explode('|', $line); + if (strtolower($type) === 'disk') { + $shareNames[$name] = $description; + } + } + } + return $shareNames; + } } diff --git a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php index 88ab046ef38..e9349716430 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php +++ b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php @@ -88,7 +88,7 @@ class RawConnection { /** * read a line of output * - * @return string + * @return string|false */ public function readLine() { return stream_get_line($this->getOutputStream(), 4086, "\n"); diff --git a/apps/files_external/3rdparty/icewind/smb/src/Server.php b/apps/files_external/3rdparty/icewind/smb/src/Server.php index 25f17201397..12692eb4c6e 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Server.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Server.php @@ -135,32 +135,11 @@ class Server { $connection = new RawConnection($command); $connection->writeAuthentication($this->getUser(), $this->getPassword()); $output = $connection->readAll(); + $parser = new Parser($this->timezoneProvider); - $line = $output[0]; + $parser->checkConnectionError($output[0]); - $line = rtrim($line, ')'); - if (substr($line, -23) === ErrorCodes::LogonFailure) { - throw new AuthenticationException(); - } - if (substr($line, -26) === ErrorCodes::BadHostName) { - throw new InvalidHostException(); - } - if (substr($line, -22) === ErrorCodes::Unsuccessful) { - throw new InvalidHostException(); - } - if (substr($line, -28) === ErrorCodes::ConnectionRefused) { - throw new InvalidHostException(); - } - - $shareNames = array(); - foreach ($output as $line) { - if (strpos($line, '|')) { - list($type, $name, $description) = explode('|', $line); - if (strtolower($type) === 'disk') { - $shareNames[$name] = $description; - } - } - } + $shareNames = $parser->parseListShares($output); $shares = array(); foreach ($shareNames as $name => $description) { @@ -174,7 +153,7 @@ class Server { * @return \Icewind\SMB\IShare */ public function getShare($name) { - return new Share($this, $name); + return new Share($this, $name, $this->system); } /** diff --git a/apps/files_external/3rdparty/icewind/smb/src/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Share.php index 21f8fe5b139..ba8bbbbb8ca 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Share.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Share.php @@ -8,6 +8,7 @@ namespace Icewind\SMB; use Icewind\SMB\Exception\ConnectionException; +use Icewind\SMB\Exception\DependencyException; use Icewind\SMB\Exception\FileInUseException; use Icewind\SMB\Exception\InvalidTypeException; use Icewind\SMB\Exception\NotFoundException; @@ -42,24 +43,30 @@ class Share extends AbstractShare { /** * @param Server $server * @param string $name + * @param System $system */ - public function __construct($server, $name) { + public function __construct($server, $name, System $system = null) { parent::__construct(); $this->server = $server; $this->name = $name; - $this->system = new System(); + $this->system = (!is_null($system)) ? $system : new System(); $this->parser = new Parser(new TimeZoneProvider($this->server->getHost(), $this->system)); } protected function getConnection() { $workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : ''; - $command = sprintf('stdbuf -o0 %s %s --authentication-file=%s %s', + $smbClientPath = $this->system->getSmbclientPath(); + if (!$smbClientPath) { + throw new DependencyException('Can\'t find smbclient binary in path'); + } + $command = sprintf('%s%s %s --authentication-file=%s %s', + $this->system->hasStdBuf() ? 'stdbuf -o0 ' : '', $this->system->getSmbclientPath(), $workgroupArgument, System::getFD(3), escapeshellarg('//' . $this->server->getHost() . '/' . $this->name) ); - $connection = new Connection($command); + $connection = new Connection($command, $this->parser); $connection->writeAuthentication($this->server->getUser(), $this->server->getPassword()); if (!$connection->isValid()) { throw new ConnectionException(); @@ -97,8 +104,8 @@ class Share extends AbstractShare { } protected function simpleCommand($command, $path) { - $path = $this->escapePath($path); - $cmd = $command . ' ' . $path; + $escapedPath = $this->escapePath($path); + $cmd = $command . ' ' . $escapedPath; $output = $this->execute($cmd); return $this->parseOutput($output, $path); } @@ -125,7 +132,7 @@ class Share extends AbstractShare { /** * @param string $path - * @return \Icewind\SMB\IFileInfo[] + * @return \Icewind\SMB\IFileInfo */ public function stat($path) { $escapedPath = $this->escapePath($path); @@ -216,8 +223,7 @@ class Share extends AbstractShare { public function rename($from, $to) { $path1 = $this->escapePath($from); $path2 = $this->escapePath($to); - $cmd = 'rename ' . $path1 . ' ' . $path2; - $output = $this->execute($cmd); + $output = $this->execute('rename ' . $path1 . ' ' . $path2); return $this->parseOutput($output, $to); } @@ -268,15 +274,8 @@ class Share extends AbstractShare { $source = $this->escapePath($source); // since returned stream is closed by the caller we need to create a new instance // since we can't re-use the same file descriptor over multiple calls - $workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : ''; - $command = sprintf('%s %s --authentication-file=%s %s', - $this->system->getSmbclientPath(), - $workgroupArgument, - System::getFD(3), - escapeshellarg('//' . $this->server->getHost() . '/' . $this->name) - ); - $connection = new Connection($command); - $connection->writeAuthentication($this->server->getUser(), $this->server->getPassword()); + $connection = $this->getConnection(); + $connection->write('get ' . $source . ' ' . System::getFD(5)); $connection->write('exit'); $fh = $connection->getFileOutputStream(); @@ -297,17 +296,9 @@ class Share extends AbstractShare { $target = $this->escapePath($target); // since returned stream is closed by the caller we need to create a new instance // since we can't re-use the same file descriptor over multiple calls - $workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : ''; - $command = sprintf('%s %s --authentication-file=%s %s', - $this->system->getSmbclientPath(), - $workgroupArgument, - System::getFD(3), - escapeshellarg('//' . $this->server->getHost() . '/' . $this->name) - ); - $connection = new Connection($command); - $connection->writeAuthentication($this->server->getUser(), $this->server->getPassword()); - $fh = $connection->getFileInputStream(); + $connection = $this->getConnection(); + $fh = $connection->getFileInputStream(); $connection->write('put ' . System::getFD(4) . ' ' . $target); $connection->write('exit'); @@ -343,30 +334,30 @@ class Share extends AbstractShare { $output = $this->execute($cmd); $this->parseOutput($output, $path); - // then set the modes we want - $cmd = 'setmode ' . $path . ' ' . $modeString; - $output = $this->execute($cmd); - return $this->parseOutput($output, $path); + if ($mode !== FileInfo::MODE_NORMAL) { + // then set the modes we want + $cmd = 'setmode ' . $path . ' ' . $modeString; + $output = $this->execute($cmd); + return $this->parseOutput($output, $path); + } else { + return true; + } } /** * @param string $path - * @param callable $callback callable which will be called for each received change - * @return mixed + * @return INotifyHandler + * @throws ConnectionException + * @throws DependencyException */ - public function notify($path, callable $callback) { + public function notify($path) { + if (!$this->system->hasStdBuf()) { //stdbuf is required to disable smbclient's output buffering + throw new DependencyException('stdbuf is required for usage of the notify command'); + } $connection = $this->getConnection(); // use a fresh connection since the notify command blocks the process $command = 'notify ' . $this->escapePath($path); $connection->write($command . PHP_EOL); - $connection->read(function ($line) use ($callback, $path) { - $code = (int)substr($line, 0, 4); - $subPath = substr($line, 5); - if ($path === '') { - return $callback($code, $subPath); - } else { - return $callback($code, $path . '/' . $subPath); - } - }); + return new NotifyHandler($connection, $path); } /** @@ -395,7 +386,12 @@ class Share extends AbstractShare { * @return bool */ protected function parseOutput($lines, $path = '') { - return $this->parser->checkForError($lines, $path); + if (count($lines) === 0) { + return true; + } else { + $this->parser->checkForError($lines, $path); + return false; + } } /** diff --git a/apps/files_external/3rdparty/icewind/smb/src/System.php b/apps/files_external/3rdparty/icewind/smb/src/System.php index 192a0b3877d..7c519988aa5 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/System.php +++ b/apps/files_external/3rdparty/icewind/smb/src/System.php @@ -14,6 +14,8 @@ class System { private $net; + private $stdbuf; + public static function getFD($num) { $folders = array( '/proc/self/fd', @@ -40,4 +42,14 @@ class System { } return $this->net; } + + public function hasStdBuf() { + if (!$this->stdbuf) { + $result = null; + $output = array(); + exec('which stdbuf 2>&1', $output, $result); + $this->stdbuf = $result === 0; + } + return $this->stdbuf; + } } diff --git a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php index 86d7859a6f7..fcdf7e3e879 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php +++ b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php @@ -27,7 +27,7 @@ class TimeZoneProvider { * @param string $host * @param System $system */ - function __construct($host, System $system) { + public function __construct($host, System $system) { $this->host = $host; $this->system = $system; } diff --git a/apps/files_external/l10n/sv.js b/apps/files_external/l10n/sv.js index d2a83012c74..49cd29a60f6 100644 --- a/apps/files_external/l10n/sv.js +++ b/apps/files_external/l10n/sv.js @@ -2,6 +2,7 @@ OC.L10N.register( "files_external", { "Fetching request tokens failed. Verify that your app key and secret are correct." : "Fel vid hämtning av åtkomst-token. Verifiera att din app-nyckel och hemlighet stämmer.", + "Fetching access tokens failed. Verify that your app key and secret are correct." : "Kontroll av behörigheter misslyckades. Verifiera att ditt app-lösenord och hemlighet är korrekt.", "Please provide a valid app key and secret." : "Vänligen ange en giltig applikationsnyckel och hemlig fras.", "Step 1 failed. Exception: %s" : "Steg 1 flaerade. Undantag: %s", "Step 2 failed. Exception: %s" : "Steg 2 falerade. Undantag: %s", @@ -11,10 +12,13 @@ OC.L10N.register( "Personal" : "Privat", "System" : "System", "Grant access" : "Bevilja åtkomst", + "Error configuring OAuth1" : "Misslyckades konfigurera OAuth1", + "Error configuring OAuth2" : "Misslyckades konfigurera OAuth2", "Generate keys" : "Generera nycklar", "Error generating key pair" : "Fel vid generering av nyckelpar", "All users. Type to select user or group." : "Alla användare. Skriv för att välja användare eller grupp.", "(group)" : "(grupp)", + "Compatibility with Mac NFD encoding (slow)" : "Kompatibilitet med Mac NFD kodning (slö)", "Admin defined" : "Admin definerad", "Saved" : "Sparad", "Saving..." : "Sparar...", @@ -26,6 +30,8 @@ OC.L10N.register( "There was an error with message: " : "Det fanns ett fel med meddelande:", "External mount error" : "Fel vid extern montering", "external-storage" : "extern-lagring", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Kunde inte hitta listan med Windows nätverksdiskar: tomt svar från servern", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Några av de konfigurerade externa monteringspunkter är inte anslutna. Klicka på den röda rad(er) för mer information.", "Please enter the credentials for the {mount} mount" : "Vänligen ange uppgifterna för {mount} montering", "Username" : "Användarnamn", "Password" : "Lösenord", @@ -33,7 +39,14 @@ OC.L10N.register( "Credentials saving failed" : "Misslyckades med att spara uppgifterna", "Credentials required" : "Uppgifter krävs", "Storage with id \"%i\" not found" : "Lagring med id \"%i\" kan ej hittas", + "Invalid backend or authentication mechanism class" : "Ogiltig backend eller autentiseringsmekanism-klass", "Invalid mount point" : "Ogiltig monteringspunkt", + "Objectstore forbidden" : "Objekt förbjudet", + "Invalid storage backend \"%s\"" : "Ogiltig lagrings backend \"%s\"", + "Not permitted to use backend \"%s\"" : "Inte tillåtet att använda backend \"%s\"", + "Not permitted to use authentication mechanism \"%s\"" : "Inte tillåtet att använda autentiseringsmekanism \"%s\"", + "Unsatisfied backend parameters" : "Otillfredsställda backend parametrar", + "Unsatisfied authentication mechanism parameters" : "Otillfredsställda autentiseringsmekanism parametrar", "Insufficient data: %s" : "Otillräcklig data: %s", "%s" : "%s", "Storage with id \"%i\" is not user editable" : "Lagring med id \"%i\" är inte redigerbar av användare", @@ -49,11 +62,14 @@ OC.L10N.register( "Client secret" : "Klienthemlighet", "OpenStack" : "OpenStack", "Tenant name" : "Namn på arrendator", + "Identity endpoint URL" : "Identitet endpoint URL", + "Rackspace" : "Rackutrymme", "API key" : "API-nyckel", "Global credentials" : "Globala uppgifter", "Log-in credentials, save in database" : "Inloggningsuppgifter sparade i databasen", "Username and password" : "Användarnamn och lösenord", "Log-in credentials, save in session" : "Inloggninguppgifter, spara i sessionen", + "User entered, store in database" : "Användare lades till, lagras i databasen", "RSA public key" : "RSA publik nyckel", "Public key" : "Publik nyckel", "Amazon S3" : "Amazon S3", @@ -65,7 +81,7 @@ OC.L10N.register( "Enable Path Style" : "Aktivera Path Style", "WebDAV" : "WebDAV", "URL" : "URL", - "Remote subfolder" : "Fjärrmapp", + "Remote subfolder" : "Extern mapp", "Secure https://" : "Säker https://", "Dropbox" : "Dropbox", "FTP" : "FTP", @@ -87,6 +103,9 @@ OC.L10N.register( "Service name" : "Namn på tjänst", "Request timeout (seconds)" : "Sekunder för anslutningsförsök", "External storages" : "Extern Lagring", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-stöd i PHP är inte aktiverat eller har inte installerats. Montering av %s är inte möjlig. Be din systemadministratör om installation.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-stöd i PHP är inte aktiverat eller har inte installerats. Montering av %s är inte möjlig. Be din systemadministratör om installation.", + "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" är inte installerad. Montering av %s är inte möjlig. Be din systemadministratör om installation.", "No external storage configured" : "Ingen extern lagring konfigurerad", "You can add external storages in the personal settings" : "Du kan lägga till externa lagringar i de personliga inställningarna", "Name" : "Namn", diff --git a/apps/files_external/l10n/sv.json b/apps/files_external/l10n/sv.json index 910458460c8..ce4ed5309c7 100644 --- a/apps/files_external/l10n/sv.json +++ b/apps/files_external/l10n/sv.json @@ -1,5 +1,6 @@ { "translations": { "Fetching request tokens failed. Verify that your app key and secret are correct." : "Fel vid hämtning av åtkomst-token. Verifiera att din app-nyckel och hemlighet stämmer.", + "Fetching access tokens failed. Verify that your app key and secret are correct." : "Kontroll av behörigheter misslyckades. Verifiera att ditt app-lösenord och hemlighet är korrekt.", "Please provide a valid app key and secret." : "Vänligen ange en giltig applikationsnyckel och hemlig fras.", "Step 1 failed. Exception: %s" : "Steg 1 flaerade. Undantag: %s", "Step 2 failed. Exception: %s" : "Steg 2 falerade. Undantag: %s", @@ -9,10 +10,13 @@ "Personal" : "Privat", "System" : "System", "Grant access" : "Bevilja åtkomst", + "Error configuring OAuth1" : "Misslyckades konfigurera OAuth1", + "Error configuring OAuth2" : "Misslyckades konfigurera OAuth2", "Generate keys" : "Generera nycklar", "Error generating key pair" : "Fel vid generering av nyckelpar", "All users. Type to select user or group." : "Alla användare. Skriv för att välja användare eller grupp.", "(group)" : "(grupp)", + "Compatibility with Mac NFD encoding (slow)" : "Kompatibilitet med Mac NFD kodning (slö)", "Admin defined" : "Admin definerad", "Saved" : "Sparad", "Saving..." : "Sparar...", @@ -24,6 +28,8 @@ "There was an error with message: " : "Det fanns ett fel med meddelande:", "External mount error" : "Fel vid extern montering", "external-storage" : "extern-lagring", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Kunde inte hitta listan med Windows nätverksdiskar: tomt svar från servern", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Några av de konfigurerade externa monteringspunkter är inte anslutna. Klicka på den röda rad(er) för mer information.", "Please enter the credentials for the {mount} mount" : "Vänligen ange uppgifterna för {mount} montering", "Username" : "Användarnamn", "Password" : "Lösenord", @@ -31,7 +37,14 @@ "Credentials saving failed" : "Misslyckades med att spara uppgifterna", "Credentials required" : "Uppgifter krävs", "Storage with id \"%i\" not found" : "Lagring med id \"%i\" kan ej hittas", + "Invalid backend or authentication mechanism class" : "Ogiltig backend eller autentiseringsmekanism-klass", "Invalid mount point" : "Ogiltig monteringspunkt", + "Objectstore forbidden" : "Objekt förbjudet", + "Invalid storage backend \"%s\"" : "Ogiltig lagrings backend \"%s\"", + "Not permitted to use backend \"%s\"" : "Inte tillåtet att använda backend \"%s\"", + "Not permitted to use authentication mechanism \"%s\"" : "Inte tillåtet att använda autentiseringsmekanism \"%s\"", + "Unsatisfied backend parameters" : "Otillfredsställda backend parametrar", + "Unsatisfied authentication mechanism parameters" : "Otillfredsställda autentiseringsmekanism parametrar", "Insufficient data: %s" : "Otillräcklig data: %s", "%s" : "%s", "Storage with id \"%i\" is not user editable" : "Lagring med id \"%i\" är inte redigerbar av användare", @@ -47,11 +60,14 @@ "Client secret" : "Klienthemlighet", "OpenStack" : "OpenStack", "Tenant name" : "Namn på arrendator", + "Identity endpoint URL" : "Identitet endpoint URL", + "Rackspace" : "Rackutrymme", "API key" : "API-nyckel", "Global credentials" : "Globala uppgifter", "Log-in credentials, save in database" : "Inloggningsuppgifter sparade i databasen", "Username and password" : "Användarnamn och lösenord", "Log-in credentials, save in session" : "Inloggninguppgifter, spara i sessionen", + "User entered, store in database" : "Användare lades till, lagras i databasen", "RSA public key" : "RSA publik nyckel", "Public key" : "Publik nyckel", "Amazon S3" : "Amazon S3", @@ -63,7 +79,7 @@ "Enable Path Style" : "Aktivera Path Style", "WebDAV" : "WebDAV", "URL" : "URL", - "Remote subfolder" : "Fjärrmapp", + "Remote subfolder" : "Extern mapp", "Secure https://" : "Säker https://", "Dropbox" : "Dropbox", "FTP" : "FTP", @@ -85,6 +101,9 @@ "Service name" : "Namn på tjänst", "Request timeout (seconds)" : "Sekunder för anslutningsförsök", "External storages" : "Extern Lagring", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-stöd i PHP är inte aktiverat eller har inte installerats. Montering av %s är inte möjlig. Be din systemadministratör om installation.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-stöd i PHP är inte aktiverat eller har inte installerats. Montering av %s är inte möjlig. Be din systemadministratör om installation.", + "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" är inte installerad. Montering av %s är inte möjlig. Be din systemadministratör om installation.", "No external storage configured" : "Ingen extern lagring konfigurerad", "You can add external storages in the personal settings" : "Du kan lägga till externa lagringar i de personliga inställningarna", "Name" : "Namn", diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 4773afcb75f..7ffc078df6f 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -31,10 +31,12 @@ namespace OCA\Files_External\Lib\Storage; +use Icewind\SMB\Change; use Icewind\SMB\Exception\ConnectException; use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\ForbiddenException; use Icewind\SMB\Exception\NotFoundException; +use Icewind\SMB\INotifyHandler; use Icewind\SMB\IFileInfo; use Icewind\SMB\IShare; use Icewind\SMB\NativeServer; @@ -486,16 +488,16 @@ class SMB extends Common implements INotifyStorage { public function listen($path, callable $callback) { $fullPath = $this->buildPath($path); $oldRenamePath = null; - $this->share->notify($fullPath, function ($smbType, $fullPath) use (&$oldRenamePath, $callback) { - $path = $this->relativePath($fullPath); + $this->share->notify($fullPath)->listen(function (Change $change) use (&$oldRenamePath, $callback) { + $path = $this->relativePath($change->getPath()); if (is_null($path)) { return true; } - if ($smbType === IShare::NOTIFY_RENAMED_OLD) { + if ($change->getCode() === INotifyHandler::NOTIFY_RENAMED_OLD) { $oldRenamePath = $path; return true; } - $type = $this->mapNotifyType($smbType); + $type = $this->mapNotifyType($change->getCode()); if (is_null($type)) { return true; } @@ -513,16 +515,16 @@ class SMB extends Common implements INotifyStorage { private function mapNotifyType($smbType) { switch ($smbType) { - case IShare::NOTIFY_ADDED: + case INotifyHandler::NOTIFY_ADDED: return INotifyStorage::NOTIFY_ADDED; - case IShare::NOTIFY_REMOVED: + case INotifyHandler::NOTIFY_REMOVED: return INotifyStorage::NOTIFY_REMOVED; - case IShare::NOTIFY_MODIFIED: - case IShare::NOTIFY_ADDED_STREAM: - case IShare::NOTIFY_MODIFIED_STREAM: - case IShare::NOTIFY_REMOVED_STREAM: + case INotifyHandler::NOTIFY_MODIFIED: + case INotifyHandler::NOTIFY_ADDED_STREAM: + case INotifyHandler::NOTIFY_MODIFIED_STREAM: + case INotifyHandler::NOTIFY_REMOVED_STREAM: return INotifyStorage::NOTIFY_MODIFIED; - case IShare::NOTIFY_RENAMED_NEW: + case INotifyHandler::NOTIFY_RENAMED_NEW: return INotifyStorage::NOTIFY_RENAMED; default: return null; diff --git a/apps/files_sharing/l10n/sv.js b/apps/files_sharing/l10n/sv.js index 79b85b90711..b8be4304124 100644 --- a/apps/files_sharing/l10n/sv.js +++ b/apps/files_sharing/l10n/sv.js @@ -1,45 +1,154 @@ OC.L10N.register( "files_sharing", { - "Server to server sharing is not enabled on this server" : "Server-till-server-delning är inte aktiverat på denna server", - "The mountpoint name contains invalid characters." : "Monteringspunktens namn innehåller ogiltiga tecken.", - "Not allowed to create a federated share with the same user server" : "Ej tillåten att skapa en federerad delning med samma användarserver.", - "Invalid or untrusted SSL certificate" : "Ogiltigt eller ej betrott SSL-certifikat", - "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera fjärrdelningen, lösenordet kan vara fel", - "Storage not valid" : "Lagring ej giltig", - "Couldn't add remote share" : "Kunde inte lägga till fjärrutdelning", "Shared with you" : "Delat med dig", "Shared with others" : "Delat med andra", - "Shared by link" : "Delad som länk", + "Shared by link" : "Delat som länk", "Nothing shared with you yet" : "Inget delat med dig ännu", "Files and folders others share with you will show up here" : "Filer och mappar andra delar med dig kommer visas här", "Nothing shared yet" : "Inget delat ännu", "Files and folders you share will show up here" : "Filer och mappar du delar kommer visas här", "No shared links" : "Inga delade länkar", "Files and folders you share by link will show up here" : "Filer och mappar du delar som länkar kommer visas här", - "Do you want to add the remote share {name} from {owner}@{remote}?" : "Vill du lägga till fjärrdelning {name} från {owner}@{remote}?", - "Remote share" : "Fjärrdelning", - "Remote share password" : "Lösenord för fjärrdelning", - "Cancel" : "Avbryt", - "Add remote share" : "Lägg till fjärrdelning", "You can upload into this folder" : "Du kan ladda upp i denna map", + "No compatible server found at {remote}" : "Ingen kompatibel server hittad på {remote}", + "Invalid server URL" : "Ogiltig server URL", + "Failed to add the public link to your Nextcloud" : "Misslyckades skapa den publika delningslänken till ditt moln", + "Share" : "Dela", + "No expiration date set" : "Inget utgångsdatum satt", "Shared by" : "Delad av", "Sharing" : "Dela", - "A file or folder has been <strong>shared</strong>" : "En fil eller mapp har <strong>delats</strong>", + "File shares" : "Fildelningar", + "Downloaded via public link" : "Nedladdad via publik länk", + "Downloaded by %1$s" : "Nedladdad av %1$s", + "Downloaded by {email}" : "Nedladdad av {email}", + "%1$s downloaded via public link" : "%1$s nedladdad via publik länk", + "{file} downloaded via public link" : "{file} nedladdad via publik länk", + "%1$s downloaded %2$s" : "%1$s laddade ned %2$s", + "{email} downloaded {file}" : "{email} laddade ned {file}", + "Shared with group %1$s" : "Delad med grupp %1$s", + "Shared with group {group}" : "Delad med grupp {group}", + "Removed share for group %1$s" : "Tog bort delning för grupp %1$s", + "Removed share for group {group}" : "Tog bort delning för grupp {group}", + "%2$s shared with group %1$s" : "%2$s delad med grupp %1$s", + "{actor} shared with group {group}" : "{actor} delade med gruppen {group}", + "%2$s removed share for group %1$s" : "%2$s tog bort delningen för gruppen %1$s", + "{actor} removed share for group {group}" : "{actor} tog bort delningen för gruppen {group}", + "You shared %1$s with group %2$s" : "Du delade %1$s med grupp %2$s", + "You shared {file} with group {group}" : "Du delade {file} med gruppen {group}", + "You removed group %2$s from %1$s" : "Du tog bort gruppen %2$s från %1$s", + "You removed group {group} from {file}" : "Du tog bort gruppen {group} från {file}", + "%3$s shared %1$s with group %2$s" : "%3$s delade %1$s med gruppen %2$s", + "{actor} shared {file} with group {group}" : "{actor} delade {file} med gruppen {group}", + "%3$s removed group %2$s from %1$s" : "%3$s tog bort gruppen %2$s från %1$s", + "{actor} removed group {group} from {file}" : "{actor} tog bort gruppen {group} från {file}", + "Shared as public link" : "Delad offentligt", + "Removed public link" : "Tog bort publik länk", + "%1$s shared as public link" : "%1$s delade offentligt", + "{actor} shared as public link" : "{actor} delade offentligt", + "%1$s removed public link" : "%1$s tog bort offentlig länk", + "{actor} removed public link" : "{actor} tog bort offentlig länk", + "You shared %1$s as public link" : "Du delade %1$s offentligt", + "You shared {file} as public link" : "Du delade {file} offentligt", + "You removed public link for %1$s" : "Du tog bort den offentliga länken för %1$s", + "You removed public link for {file}" : "Du tog bort den offentliga länken för {file}", + "%2$s shared %1$s as public link" : "%2$s delade %1$s offentligt", + "{actor} shared {file} as public link" : "{actor} delade {file} offentligt", + "%2$s removed public link for %1$s" : "%2$s tog bort den offentliga länken för %1$s", + "{actor} removed public link for {file}" : "{actor} tog bort den offentliga länken för {file}", + "%1$s accepted the remote share" : "%1$s accepterade extern delning", + "{user} accepted the remote share" : "{user} accepterade extern delning", + "%1$s declined the remote share" : "%1$s nekade extern delning", + "{user} declined the remote share" : "{user} nekade extern delning", + "You received a new remote share %1$s from %2$s" : "Du har fått en ny extern delning %1$s från %2$s", + "You received a new remote share {file} from {user}" : "Du har fått en ny extern delning {file} från {user}", + "%2$s accepted the remote share of %1$s" : "%2$s accepterade extern delning av %1$s", + "{user} accepted the remote share of {file}" : "{user} accepterade extern delning av {file}", + "%2$s declined the remote share of %1$s" : "%2$s nekade extern delning av %1$s", + "{user} declined the remote share of {file}" : "{user} nekade extern delning av {file}", + "%2$s unshared %1$s from you" : "%2$s slutade dela %1$s med dig", + "{user} unshared {file} from you" : "{user} slutade dela {file} med dig", + "Shared with %1$s" : "Delade med %1$s", + "Shared with {user}" : "Delade med {user}", + "Removed share for %1$s" : "Tog bort delningen för %1$s", + "Removed share for {user}" : "Tog bort delningen för {user}", + "%2$s shared with %1$s" : "%2$s delade med %1$s", + "{actor} shared with {user}" : "{actor} delade med {user}", + "%2$s removed share for %1$s" : "%2$s tog bort delningen för %1$s", + "{actor} removed share for {user}" : "{actor} tog bort delningen för {user}", + "Shared by %1$s" : "Delad av %1$s", + "Shared by {actor}" : "Delad av {actor}", + "%1$s removed share" : "%1$s tog bort delning", + "{actor} removed share" : "{actor} tog bort delning", + "You shared %1$s with %2$s" : "Du delade %1$s med %2$s", + "You shared {file} with {user}" : "Du delade {file} med {user}", + "You removed %2$s from %1$s" : "Du tog bort %2$s från %1$s", + "You removed {user} from {file}" : "Du tog bort {user} från {file}", + "%3$s shared %1$s with %2$s" : "%3$s delade %1$s med %2$s", + "{actor} removed {user} from {file}" : "{actor} tog bort {user} från {file}", + "%3$s removed %2$s from %1$s" : "%3$s tog bort %2$s från %1$s", + "%2$s shared %1$s with you" : "%2$s delade %1$s med dig", + "{actor} shared {file} with you" : "{actor} delade {file} med dig", + "%2$s removed you from %1$s" : "%2$s tog bort dig från %1$s", + "{actor} removed you from {file}" : "{actor} tog bort dig från {file}", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "En fil eller mapp som delats via mejl eller offentlig länk har blivit <strong>nedladdad</strong>", "A file or folder was shared from <strong>another server</strong>" : "En fil eller mapp delades från <strong>en annan server</strong>", - "A public shared file or folder was <strong>downloaded</strong>" : "En publikt delad fil eller mapp blev <strong>nerladdad</strong>", - "You received a new remote share %2$s from %1$s" : "Du har mottagit en fjärrdelning %2$s från %1$s", - "You received a new remote share from %s" : "Du mottog en ny fjärrdelning från %s", - "%1$s accepted remote share %2$s" : "%1$s accepterade fjärrdelning %2$s", - "%1$s declined remote share %2$s" : "%1$s nekade fjärrdelning %2$s", + "A file or folder has been <strong>shared</strong>" : "En fil eller mapp har <strong>delats</strong>", + "Wrong share ID, share doesn't exist" : "Fel delnings-ID, delningen finns inte", + "could not delete share" : "kunde inte ta bort delningen", + "Could not delete share" : "Kunde inte ta bort delningen", + "Please specify a file or folder path" : "Ange sökväg till filen eller mappen", + "Wrong path, file/folder doesn't exist" : "Fel sökväg, fil/mapp finns inte", + "Could not create share" : "Kunde inte skapa delning", + "invalid permissions" : "ogiltiga behörigheter", + "Please specify a valid user" : "Ange en giltig användare", + "Group sharing is disabled by the administrator" : "Gruppdelning är avstängt", + "Please specify a valid group" : "Ange en giltig grupp", + "Public link sharing is disabled by the administrator" : "Offentlig delningslänk är avstängt", + "Public upload disabled by the administrator" : "Offentlig uppladdning är avstängt", + "Public upload is only possible for publicly shared folders" : "Offentlig uppladdning fungerar endast i offentligt delade mappar", + "Invalid date, date format must be YYYY-MM-DD" : "Ogiltigt datum, måste anges: ÅÅÅÅ-MM-DD", + "Sharing %s failed because the back end does not allow shares from type %s" : "Delningen av %s misslyckades. Ej tillåtet med delning av %s", + "Unknown share type" : "Ogiltig delningstyp", + "Not a directory" : "Inte en mapp", + "Could not lock path" : "Kunde inte låsa sökvägen", + "Wrong or no update parameter given" : "Fel eller ingen uppdateringsparameter angiven", + "Can't change permissions for public share links" : "Det går inte att ändra behörigheterna för offentliga länkar", + "Cannot increase permissions" : "Kan inte utöka behörigheter", + "%s is publicly shared" : "%s är offentligt delad", + "Share API is disabled" : "Delning av API är inaktiverad", + "This share is password-protected" : "Den här delningen är lösenordsskyddad", + "The password is wrong. Try again." : "Lösenordet är fel. Försök igen.", + "Password" : "Lösenord", + "No entries found in this folder" : "Inga filer hittades i denna mapp", + "Name" : "Namn", + "Share time" : "Delningstid", + "Expiration date" : "Utgångsdatum", + "Sorry, this link doesn’t seem to work anymore." : "Tyvärr, denna länk verkar inte fungera längre.", + "Reasons might be:" : "Orsaker kan vara:", + "the item was removed" : "objektet togs bort", + "the link expired" : "giltighet för länken har gått ut", + "sharing is disabled" : "delning är inaktiverat", + "For more info, please ask the person who sent this link." : "För mer information, kontakta den person som skickade den här länken.", + "Add to your Nextcloud" : "Lägg till i molnet", + "Download" : "Ladda ned", + "Download %s" : "Ladda ned %s", + "Direct link" : "Direktlänk", + "Upload files to %s" : "Ladda upp filer till %s", + "Select or drop files" : "Välj eller dra filer hit", + "Uploading files…" : "Laddar upp filer...", + "Uploaded files:" : "Uppladdade filer:", + "A public shared file or folder was <strong>downloaded</strong>" : "En publikt delad fil eller mapp blev <strong>nedladdad</strong>", + "You received a new remote share %2$s from %1$s" : "Du har mottagit en ny extern delning %2$s från %1$s", + "You received a new remote share from %s" : "Du har mottagit en ny extern delning från %s", + "%1$s accepted remote share %2$s" : "%1$s accepterade extern delning %2$s", + "%1$s declined remote share %2$s" : "%1$s nekade extern delning av %2$s", "%1$s unshared %2$s from you" : "%1$s tog bort delningen %2$s från dig", - "Public shared folder %1$s was downloaded" : "Publikt delad mapp %1$s blev nerladdad", - "Public shared file %1$s was downloaded" : "Publikt delad fil %1$s blev nerladdad", - "You shared %1$s with %2$s" : "Du delade %1$s med %2$s", + "Public shared folder %1$s was downloaded" : "Publikt delad mapp %1$s blev nedladdad", + "Public shared file %1$s was downloaded" : "Publikt delad fil %1$s blev nedladdad", "%2$s shared %1$s with %3$s" : "%2$s delade %1$s med %3$s", "You removed the share of %2$s for %1$s" : "Du tog bort delning av %2$s för %1$s", "%2$s removed the share of %3$s for %1$s" : "%2$s tog bort delningen av %3$s för %1$s", - "You shared %1$s with group %2$s" : "Du delade %1$s med grupp %2$s", "%2$s shared %1$s with group %3$s" : "%2$s delade %1$s med gruppen %3$s", "You removed the share of group %2$s for %1$s" : "Du tog bort delningen av gruppen %2$s för %1$s", "%2$s removed the share of group %3$s for %1$s" : "%2$s tog bort delningen av grupp %3$s för %1$s", @@ -49,9 +158,7 @@ OC.L10N.register( "%2$s removed the public link for %1$s" : "%2$s tog bort den publika länken för %1$s", "Your public link for %1$s expired" : "Din publika länk för %1$s har löpt ut", "The public link of %2$s for %1$s expired" : "Den publika länken för %2$s av %1$s har löpt ut", - "%2$s shared %1$s with you" : "%2$s delade %1$s med dig", "%2$s removed the share for %1$s" : "%2$s tog bort delningen av %1$s", - "Downloaded via public link" : "Nerladdad via publik länk", "Shared with %2$s" : "Delad med %2$s", "Shared with %3$s by %2$s" : "Delad med %3$s av %2$s", "Removed share for %2$s" : "Tog bort delningen för %2$s", @@ -62,27 +169,10 @@ OC.L10N.register( "%2$s removed share of group %3$s" : "%2$s tog bort delningen av grupp %3$s", "Shared via link by %2$s" : "Delad via länk av %2$s", "Shared via public link" : "Delad via publik länk", - "Removed public link" : "Tog bort publik länk", "%2$s removed public link" : "%2$s tog bort publik länk", "Public link expired" : "Tidsgräns för publik länk har löpt ut", "Public link of %2$s expired" : "Tidsgräns för publik länk för %2$s har löpt ut", "Shared by %2$s" : "Delad av %2$s", - "Shares" : "Delningar", - "This share is password-protected" : "Den här delningen är lösenordsskyddad", - "The password is wrong. Try again." : "Lösenordet är fel. Försök igen.", - "Password" : "Lösenord", - "No entries found in this folder" : "nga Filer hittades i denna mapp", - "Name" : "Namn", - "Share time" : "Delningstid", - "Sorry, this link doesn’t seem to work anymore." : "Tyvärr, denna länk verkar inte fungera längre.", - "Reasons might be:" : "Orsaker kan vara:", - "the item was removed" : "objektet togs bort", - "the link expired" : "giltighet för länken har gått ut", - "sharing is disabled" : "delning är inaktiverat", - "For more info, please ask the person who sent this link." : "För mer information, kontakta den person som skickade den här länken.", - "Add to your ownCloud" : "Lägg till i din ownCloud", - "Download" : "Ladda ner", - "Download %s" : "Ladda ner %s", - "Direct link" : "Direkt länk" + "Shares" : "Delningar" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_sharing/l10n/sv.json b/apps/files_sharing/l10n/sv.json index 870d7c1c3a4..79ac385d795 100644 --- a/apps/files_sharing/l10n/sv.json +++ b/apps/files_sharing/l10n/sv.json @@ -1,43 +1,152 @@ { "translations": { - "Server to server sharing is not enabled on this server" : "Server-till-server-delning är inte aktiverat på denna server", - "The mountpoint name contains invalid characters." : "Monteringspunktens namn innehåller ogiltiga tecken.", - "Not allowed to create a federated share with the same user server" : "Ej tillåten att skapa en federerad delning med samma användarserver.", - "Invalid or untrusted SSL certificate" : "Ogiltigt eller ej betrott SSL-certifikat", - "Could not authenticate to remote share, password might be wrong" : "Kunde ej autensiera fjärrdelningen, lösenordet kan vara fel", - "Storage not valid" : "Lagring ej giltig", - "Couldn't add remote share" : "Kunde inte lägga till fjärrutdelning", "Shared with you" : "Delat med dig", "Shared with others" : "Delat med andra", - "Shared by link" : "Delad som länk", + "Shared by link" : "Delat som länk", "Nothing shared with you yet" : "Inget delat med dig ännu", "Files and folders others share with you will show up here" : "Filer och mappar andra delar med dig kommer visas här", "Nothing shared yet" : "Inget delat ännu", "Files and folders you share will show up here" : "Filer och mappar du delar kommer visas här", "No shared links" : "Inga delade länkar", "Files and folders you share by link will show up here" : "Filer och mappar du delar som länkar kommer visas här", - "Do you want to add the remote share {name} from {owner}@{remote}?" : "Vill du lägga till fjärrdelning {name} från {owner}@{remote}?", - "Remote share" : "Fjärrdelning", - "Remote share password" : "Lösenord för fjärrdelning", - "Cancel" : "Avbryt", - "Add remote share" : "Lägg till fjärrdelning", "You can upload into this folder" : "Du kan ladda upp i denna map", + "No compatible server found at {remote}" : "Ingen kompatibel server hittad på {remote}", + "Invalid server URL" : "Ogiltig server URL", + "Failed to add the public link to your Nextcloud" : "Misslyckades skapa den publika delningslänken till ditt moln", + "Share" : "Dela", + "No expiration date set" : "Inget utgångsdatum satt", "Shared by" : "Delad av", "Sharing" : "Dela", - "A file or folder has been <strong>shared</strong>" : "En fil eller mapp har <strong>delats</strong>", + "File shares" : "Fildelningar", + "Downloaded via public link" : "Nedladdad via publik länk", + "Downloaded by %1$s" : "Nedladdad av %1$s", + "Downloaded by {email}" : "Nedladdad av {email}", + "%1$s downloaded via public link" : "%1$s nedladdad via publik länk", + "{file} downloaded via public link" : "{file} nedladdad via publik länk", + "%1$s downloaded %2$s" : "%1$s laddade ned %2$s", + "{email} downloaded {file}" : "{email} laddade ned {file}", + "Shared with group %1$s" : "Delad med grupp %1$s", + "Shared with group {group}" : "Delad med grupp {group}", + "Removed share for group %1$s" : "Tog bort delning för grupp %1$s", + "Removed share for group {group}" : "Tog bort delning för grupp {group}", + "%2$s shared with group %1$s" : "%2$s delad med grupp %1$s", + "{actor} shared with group {group}" : "{actor} delade med gruppen {group}", + "%2$s removed share for group %1$s" : "%2$s tog bort delningen för gruppen %1$s", + "{actor} removed share for group {group}" : "{actor} tog bort delningen för gruppen {group}", + "You shared %1$s with group %2$s" : "Du delade %1$s med grupp %2$s", + "You shared {file} with group {group}" : "Du delade {file} med gruppen {group}", + "You removed group %2$s from %1$s" : "Du tog bort gruppen %2$s från %1$s", + "You removed group {group} from {file}" : "Du tog bort gruppen {group} från {file}", + "%3$s shared %1$s with group %2$s" : "%3$s delade %1$s med gruppen %2$s", + "{actor} shared {file} with group {group}" : "{actor} delade {file} med gruppen {group}", + "%3$s removed group %2$s from %1$s" : "%3$s tog bort gruppen %2$s från %1$s", + "{actor} removed group {group} from {file}" : "{actor} tog bort gruppen {group} från {file}", + "Shared as public link" : "Delad offentligt", + "Removed public link" : "Tog bort publik länk", + "%1$s shared as public link" : "%1$s delade offentligt", + "{actor} shared as public link" : "{actor} delade offentligt", + "%1$s removed public link" : "%1$s tog bort offentlig länk", + "{actor} removed public link" : "{actor} tog bort offentlig länk", + "You shared %1$s as public link" : "Du delade %1$s offentligt", + "You shared {file} as public link" : "Du delade {file} offentligt", + "You removed public link for %1$s" : "Du tog bort den offentliga länken för %1$s", + "You removed public link for {file}" : "Du tog bort den offentliga länken för {file}", + "%2$s shared %1$s as public link" : "%2$s delade %1$s offentligt", + "{actor} shared {file} as public link" : "{actor} delade {file} offentligt", + "%2$s removed public link for %1$s" : "%2$s tog bort den offentliga länken för %1$s", + "{actor} removed public link for {file}" : "{actor} tog bort den offentliga länken för {file}", + "%1$s accepted the remote share" : "%1$s accepterade extern delning", + "{user} accepted the remote share" : "{user} accepterade extern delning", + "%1$s declined the remote share" : "%1$s nekade extern delning", + "{user} declined the remote share" : "{user} nekade extern delning", + "You received a new remote share %1$s from %2$s" : "Du har fått en ny extern delning %1$s från %2$s", + "You received a new remote share {file} from {user}" : "Du har fått en ny extern delning {file} från {user}", + "%2$s accepted the remote share of %1$s" : "%2$s accepterade extern delning av %1$s", + "{user} accepted the remote share of {file}" : "{user} accepterade extern delning av {file}", + "%2$s declined the remote share of %1$s" : "%2$s nekade extern delning av %1$s", + "{user} declined the remote share of {file}" : "{user} nekade extern delning av {file}", + "%2$s unshared %1$s from you" : "%2$s slutade dela %1$s med dig", + "{user} unshared {file} from you" : "{user} slutade dela {file} med dig", + "Shared with %1$s" : "Delade med %1$s", + "Shared with {user}" : "Delade med {user}", + "Removed share for %1$s" : "Tog bort delningen för %1$s", + "Removed share for {user}" : "Tog bort delningen för {user}", + "%2$s shared with %1$s" : "%2$s delade med %1$s", + "{actor} shared with {user}" : "{actor} delade med {user}", + "%2$s removed share for %1$s" : "%2$s tog bort delningen för %1$s", + "{actor} removed share for {user}" : "{actor} tog bort delningen för {user}", + "Shared by %1$s" : "Delad av %1$s", + "Shared by {actor}" : "Delad av {actor}", + "%1$s removed share" : "%1$s tog bort delning", + "{actor} removed share" : "{actor} tog bort delning", + "You shared %1$s with %2$s" : "Du delade %1$s med %2$s", + "You shared {file} with {user}" : "Du delade {file} med {user}", + "You removed %2$s from %1$s" : "Du tog bort %2$s från %1$s", + "You removed {user} from {file}" : "Du tog bort {user} från {file}", + "%3$s shared %1$s with %2$s" : "%3$s delade %1$s med %2$s", + "{actor} removed {user} from {file}" : "{actor} tog bort {user} från {file}", + "%3$s removed %2$s from %1$s" : "%3$s tog bort %2$s från %1$s", + "%2$s shared %1$s with you" : "%2$s delade %1$s med dig", + "{actor} shared {file} with you" : "{actor} delade {file} med dig", + "%2$s removed you from %1$s" : "%2$s tog bort dig från %1$s", + "{actor} removed you from {file}" : "{actor} tog bort dig från {file}", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "En fil eller mapp som delats via mejl eller offentlig länk har blivit <strong>nedladdad</strong>", "A file or folder was shared from <strong>another server</strong>" : "En fil eller mapp delades från <strong>en annan server</strong>", - "A public shared file or folder was <strong>downloaded</strong>" : "En publikt delad fil eller mapp blev <strong>nerladdad</strong>", - "You received a new remote share %2$s from %1$s" : "Du har mottagit en fjärrdelning %2$s från %1$s", - "You received a new remote share from %s" : "Du mottog en ny fjärrdelning från %s", - "%1$s accepted remote share %2$s" : "%1$s accepterade fjärrdelning %2$s", - "%1$s declined remote share %2$s" : "%1$s nekade fjärrdelning %2$s", + "A file or folder has been <strong>shared</strong>" : "En fil eller mapp har <strong>delats</strong>", + "Wrong share ID, share doesn't exist" : "Fel delnings-ID, delningen finns inte", + "could not delete share" : "kunde inte ta bort delningen", + "Could not delete share" : "Kunde inte ta bort delningen", + "Please specify a file or folder path" : "Ange sökväg till filen eller mappen", + "Wrong path, file/folder doesn't exist" : "Fel sökväg, fil/mapp finns inte", + "Could not create share" : "Kunde inte skapa delning", + "invalid permissions" : "ogiltiga behörigheter", + "Please specify a valid user" : "Ange en giltig användare", + "Group sharing is disabled by the administrator" : "Gruppdelning är avstängt", + "Please specify a valid group" : "Ange en giltig grupp", + "Public link sharing is disabled by the administrator" : "Offentlig delningslänk är avstängt", + "Public upload disabled by the administrator" : "Offentlig uppladdning är avstängt", + "Public upload is only possible for publicly shared folders" : "Offentlig uppladdning fungerar endast i offentligt delade mappar", + "Invalid date, date format must be YYYY-MM-DD" : "Ogiltigt datum, måste anges: ÅÅÅÅ-MM-DD", + "Sharing %s failed because the back end does not allow shares from type %s" : "Delningen av %s misslyckades. Ej tillåtet med delning av %s", + "Unknown share type" : "Ogiltig delningstyp", + "Not a directory" : "Inte en mapp", + "Could not lock path" : "Kunde inte låsa sökvägen", + "Wrong or no update parameter given" : "Fel eller ingen uppdateringsparameter angiven", + "Can't change permissions for public share links" : "Det går inte att ändra behörigheterna för offentliga länkar", + "Cannot increase permissions" : "Kan inte utöka behörigheter", + "%s is publicly shared" : "%s är offentligt delad", + "Share API is disabled" : "Delning av API är inaktiverad", + "This share is password-protected" : "Den här delningen är lösenordsskyddad", + "The password is wrong. Try again." : "Lösenordet är fel. Försök igen.", + "Password" : "Lösenord", + "No entries found in this folder" : "Inga filer hittades i denna mapp", + "Name" : "Namn", + "Share time" : "Delningstid", + "Expiration date" : "Utgångsdatum", + "Sorry, this link doesn’t seem to work anymore." : "Tyvärr, denna länk verkar inte fungera längre.", + "Reasons might be:" : "Orsaker kan vara:", + "the item was removed" : "objektet togs bort", + "the link expired" : "giltighet för länken har gått ut", + "sharing is disabled" : "delning är inaktiverat", + "For more info, please ask the person who sent this link." : "För mer information, kontakta den person som skickade den här länken.", + "Add to your Nextcloud" : "Lägg till i molnet", + "Download" : "Ladda ned", + "Download %s" : "Ladda ned %s", + "Direct link" : "Direktlänk", + "Upload files to %s" : "Ladda upp filer till %s", + "Select or drop files" : "Välj eller dra filer hit", + "Uploading files…" : "Laddar upp filer...", + "Uploaded files:" : "Uppladdade filer:", + "A public shared file or folder was <strong>downloaded</strong>" : "En publikt delad fil eller mapp blev <strong>nedladdad</strong>", + "You received a new remote share %2$s from %1$s" : "Du har mottagit en ny extern delning %2$s från %1$s", + "You received a new remote share from %s" : "Du har mottagit en ny extern delning från %s", + "%1$s accepted remote share %2$s" : "%1$s accepterade extern delning %2$s", + "%1$s declined remote share %2$s" : "%1$s nekade extern delning av %2$s", "%1$s unshared %2$s from you" : "%1$s tog bort delningen %2$s från dig", - "Public shared folder %1$s was downloaded" : "Publikt delad mapp %1$s blev nerladdad", - "Public shared file %1$s was downloaded" : "Publikt delad fil %1$s blev nerladdad", - "You shared %1$s with %2$s" : "Du delade %1$s med %2$s", + "Public shared folder %1$s was downloaded" : "Publikt delad mapp %1$s blev nedladdad", + "Public shared file %1$s was downloaded" : "Publikt delad fil %1$s blev nedladdad", "%2$s shared %1$s with %3$s" : "%2$s delade %1$s med %3$s", "You removed the share of %2$s for %1$s" : "Du tog bort delning av %2$s för %1$s", "%2$s removed the share of %3$s for %1$s" : "%2$s tog bort delningen av %3$s för %1$s", - "You shared %1$s with group %2$s" : "Du delade %1$s med grupp %2$s", "%2$s shared %1$s with group %3$s" : "%2$s delade %1$s med gruppen %3$s", "You removed the share of group %2$s for %1$s" : "Du tog bort delningen av gruppen %2$s för %1$s", "%2$s removed the share of group %3$s for %1$s" : "%2$s tog bort delningen av grupp %3$s för %1$s", @@ -47,9 +156,7 @@ "%2$s removed the public link for %1$s" : "%2$s tog bort den publika länken för %1$s", "Your public link for %1$s expired" : "Din publika länk för %1$s har löpt ut", "The public link of %2$s for %1$s expired" : "Den publika länken för %2$s av %1$s har löpt ut", - "%2$s shared %1$s with you" : "%2$s delade %1$s med dig", "%2$s removed the share for %1$s" : "%2$s tog bort delningen av %1$s", - "Downloaded via public link" : "Nerladdad via publik länk", "Shared with %2$s" : "Delad med %2$s", "Shared with %3$s by %2$s" : "Delad med %3$s av %2$s", "Removed share for %2$s" : "Tog bort delningen för %2$s", @@ -60,27 +167,10 @@ "%2$s removed share of group %3$s" : "%2$s tog bort delningen av grupp %3$s", "Shared via link by %2$s" : "Delad via länk av %2$s", "Shared via public link" : "Delad via publik länk", - "Removed public link" : "Tog bort publik länk", "%2$s removed public link" : "%2$s tog bort publik länk", "Public link expired" : "Tidsgräns för publik länk har löpt ut", "Public link of %2$s expired" : "Tidsgräns för publik länk för %2$s har löpt ut", "Shared by %2$s" : "Delad av %2$s", - "Shares" : "Delningar", - "This share is password-protected" : "Den här delningen är lösenordsskyddad", - "The password is wrong. Try again." : "Lösenordet är fel. Försök igen.", - "Password" : "Lösenord", - "No entries found in this folder" : "nga Filer hittades i denna mapp", - "Name" : "Namn", - "Share time" : "Delningstid", - "Sorry, this link doesn’t seem to work anymore." : "Tyvärr, denna länk verkar inte fungera längre.", - "Reasons might be:" : "Orsaker kan vara:", - "the item was removed" : "objektet togs bort", - "the link expired" : "giltighet för länken har gått ut", - "sharing is disabled" : "delning är inaktiverat", - "For more info, please ask the person who sent this link." : "För mer information, kontakta den person som skickade den här länken.", - "Add to your ownCloud" : "Lägg till i din ownCloud", - "Download" : "Ladda ner", - "Download %s" : "Ladda ner %s", - "Direct link" : "Direkt länk" + "Shares" : "Delningar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/eo.js b/apps/files_trashbin/l10n/eo.js index 9fd798d8df9..7a4dd0a5e65 100644 --- a/apps/files_trashbin/l10n/eo.js +++ b/apps/files_trashbin/l10n/eo.js @@ -12,6 +12,7 @@ OC.L10N.register( "This directory is unavailable, please check the logs or contact the administrator" : "Ĉi tiu dosierujo maldisponeblas, bonvolu kontroli la protokolojn aŭ kontakti la administranton", "restored" : "restaŭrita", "No deleted files" : "Neniu dosiero foriĝis", + "You will be able to recover deleted files from here" : "Vi eblos restaŭrigi forigitaj dosieroj el tie", "No entries found in this folder" : "Neniu enigo troviĝis en ĉi tiu dosierujo", "Select all" : "Elekti ĉion", "Name" : "Nomo", diff --git a/apps/files_trashbin/l10n/eo.json b/apps/files_trashbin/l10n/eo.json index 92577367e08..2b491222622 100644 --- a/apps/files_trashbin/l10n/eo.json +++ b/apps/files_trashbin/l10n/eo.json @@ -10,6 +10,7 @@ "This directory is unavailable, please check the logs or contact the administrator" : "Ĉi tiu dosierujo maldisponeblas, bonvolu kontroli la protokolojn aŭ kontakti la administranton", "restored" : "restaŭrita", "No deleted files" : "Neniu dosiero foriĝis", + "You will be able to recover deleted files from here" : "Vi eblos restaŭrigi forigitaj dosieroj el tie", "No entries found in this folder" : "Neniu enigo troviĝis en ĉi tiu dosierujo", "Select all" : "Elekti ĉion", "Name" : "Nomo", diff --git a/apps/files_trashbin/l10n/sv.js b/apps/files_trashbin/l10n/sv.js index a022dde5dcb..34e2b2a2f04 100644 --- a/apps/files_trashbin/l10n/sv.js +++ b/apps/files_trashbin/l10n/sv.js @@ -11,7 +11,7 @@ OC.L10N.register( "This operation is forbidden" : "Denna åtgärd är förbjuden", "This directory is unavailable, please check the logs or contact the administrator" : "Denna katalog är inte tillgänglig, kontrollera loggarna eller kontakta administratören", "restored" : "återställd", - "No deleted files" : "Inga borttagna filer", + "No deleted files" : "Inga raderade filer", "You will be able to recover deleted files from here" : "Du kommer kunna återskapa raderade filer härifrån", "No entries found in this folder" : "Inga filer hittades i denna mapp", "Select all" : "Välj allt", diff --git a/apps/files_trashbin/l10n/sv.json b/apps/files_trashbin/l10n/sv.json index 31898a41f5a..1abc0bfba34 100644 --- a/apps/files_trashbin/l10n/sv.json +++ b/apps/files_trashbin/l10n/sv.json @@ -9,7 +9,7 @@ "This operation is forbidden" : "Denna åtgärd är förbjuden", "This directory is unavailable, please check the logs or contact the administrator" : "Denna katalog är inte tillgänglig, kontrollera loggarna eller kontakta administratören", "restored" : "återställd", - "No deleted files" : "Inga borttagna filer", + "No deleted files" : "Inga raderade filer", "You will be able to recover deleted files from here" : "Du kommer kunna återskapa raderade filer härifrån", "No entries found in this folder" : "Inga filer hittades i denna mapp", "Select all" : "Välj allt", diff --git a/apps/files_versions/l10n/eo.js b/apps/files_versions/l10n/eo.js index 831e984a885..3ef246ace2a 100644 --- a/apps/files_versions/l10n/eo.js +++ b/apps/files_versions/l10n/eo.js @@ -5,6 +5,7 @@ OC.L10N.register( "Versions" : "Versioj", "Failed to revert {file} to revision {timestamp}." : "Malsukcesis returnigo de {file} al la revizio {timestamp}.", "Restore" : "Restaŭri", + "No versions available" : "Neniu versio disponebla", "More versions..." : "Pli da versioj...", "No other versions available" : "Ne disponeblas aliaj versioj" }, diff --git a/apps/files_versions/l10n/eo.json b/apps/files_versions/l10n/eo.json index 751a6e02bf5..f91aafe4d84 100644 --- a/apps/files_versions/l10n/eo.json +++ b/apps/files_versions/l10n/eo.json @@ -3,6 +3,7 @@ "Versions" : "Versioj", "Failed to revert {file} to revision {timestamp}." : "Malsukcesis returnigo de {file} al la revizio {timestamp}.", "Restore" : "Restaŭri", + "No versions available" : "Neniu versio disponebla", "More versions..." : "Pli da versioj...", "No other versions available" : "Ne disponeblas aliaj versioj" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/systemtags/l10n/sv.js b/apps/systemtags/l10n/sv.js index 3da131bbbd3..64d47d4164b 100644 --- a/apps/systemtags/l10n/sv.js +++ b/apps/systemtags/l10n/sv.js @@ -57,7 +57,7 @@ OC.L10N.register( "You unassigned system tag %3$s" : "Du tog bort tilldelning av systemtag %3$s", "%1$s unassigned system tag %3$s" : "%1$s tog bort tilldelad systemtagg %3$s", "You created system tag %2$s" : "Du skapade systemtagg %2$s", - "You deleted system tag %2$s" : "Du tog bort systemtagg %2$s", + "You deleted system tag %2$s" : "Du raderade systemtagg %2$s", "You updated system tag %3$s to %2$s" : "Du uppdaterade systemtagg %3$s till %2$s", "You assigned system tag %3$s to %2$s" : "Du tilldelade systemtagg %3$s till %2$s", "%1$s assigned system tag %3$s to %2$s" : "%1$s tilldelade systemtagg %3$s till %2$s", diff --git a/apps/systemtags/l10n/sv.json b/apps/systemtags/l10n/sv.json index bcf27fa8730..b8bfa3d77f6 100644 --- a/apps/systemtags/l10n/sv.json +++ b/apps/systemtags/l10n/sv.json @@ -55,7 +55,7 @@ "You unassigned system tag %3$s" : "Du tog bort tilldelning av systemtag %3$s", "%1$s unassigned system tag %3$s" : "%1$s tog bort tilldelad systemtagg %3$s", "You created system tag %2$s" : "Du skapade systemtagg %2$s", - "You deleted system tag %2$s" : "Du tog bort systemtagg %2$s", + "You deleted system tag %2$s" : "Du raderade systemtagg %2$s", "You updated system tag %3$s to %2$s" : "Du uppdaterade systemtagg %3$s till %2$s", "You assigned system tag %3$s to %2$s" : "Du tilldelade systemtagg %3$s till %2$s", "%1$s assigned system tag %3$s to %2$s" : "%1$s tilldelade systemtagg %3$s till %2$s", diff --git a/apps/updatenotification/l10n/sv.js b/apps/updatenotification/l10n/sv.js index 801ca639892..de59d19d1eb 100644 --- a/apps/updatenotification/l10n/sv.js +++ b/apps/updatenotification/l10n/sv.js @@ -10,7 +10,7 @@ OC.L10N.register( "Update for {app} to version %s is available." : "Uppdatering för {app} till version %s är tillgänglig.", "A new version is available: %s" : "En ny version är tillgänglig: %s", "Open updater" : "Öppna uppdateraren", - "Download now" : "Ladda ner nu", + "Download now" : "Ladda ned nu", "Your version is up to date." : "Din version är uppdaterad.", "Checked on %s" : "Senast kontrollerad %s", "Update channel:" : "Uppdateringskanal:", diff --git a/apps/updatenotification/l10n/sv.json b/apps/updatenotification/l10n/sv.json index afdcecd1212..06b26e565d4 100644 --- a/apps/updatenotification/l10n/sv.json +++ b/apps/updatenotification/l10n/sv.json @@ -8,7 +8,7 @@ "Update for {app} to version %s is available." : "Uppdatering för {app} till version %s är tillgänglig.", "A new version is available: %s" : "En ny version är tillgänglig: %s", "Open updater" : "Öppna uppdateraren", - "Download now" : "Ladda ner nu", + "Download now" : "Ladda ned nu", "Your version is up to date." : "Din version är uppdaterad.", "Checked on %s" : "Senast kontrollerad %s", "Update channel:" : "Uppdateringskanal:", diff --git a/apps/user_ldap/l10n/de_DE.js b/apps/user_ldap/l10n/de_DE.js index 138cc30bbef..3c0de5ea9a5 100644 --- a/apps/user_ldap/l10n/de_DE.js +++ b/apps/user_ldap/l10n/de_DE.js @@ -48,7 +48,7 @@ OC.L10N.register( "Please provide a login name to test against" : "Bitte geben Sie einen Benutzernamen an, um gegen diesen zu testen", "The group box was disabled, because the LDAP / AD server does not support memberOf." : "Das Gruppenfeld wurde deaktiviert, da der LDAP / AD-Server memberOf nicht unterstützt.", "Password change rejected. Hint: " : "Passwortändertung verweigert. Hinweis:", - "LDAP / AD integration" : "LDAP / AD Integration", + "LDAP / AD integration" : "LDAP/AD-Integration", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Anzeigename-Attribut des Benutzers konnte nicht gefunden werden. Bitte geben Sie es in den erweiterten LDAP-Einstellungen selber an.", diff --git a/apps/user_ldap/l10n/de_DE.json b/apps/user_ldap/l10n/de_DE.json index 2b4f5a6803d..2bee5da66de 100644 --- a/apps/user_ldap/l10n/de_DE.json +++ b/apps/user_ldap/l10n/de_DE.json @@ -46,7 +46,7 @@ "Please provide a login name to test against" : "Bitte geben Sie einen Benutzernamen an, um gegen diesen zu testen", "The group box was disabled, because the LDAP / AD server does not support memberOf." : "Das Gruppenfeld wurde deaktiviert, da der LDAP / AD-Server memberOf nicht unterstützt.", "Password change rejected. Hint: " : "Passwortändertung verweigert. Hinweis:", - "LDAP / AD integration" : "LDAP / AD Integration", + "LDAP / AD integration" : "LDAP/AD-Integration", "_%s group found_::_%s groups found_" : ["%s Gruppe gefunden","%s Gruppen gefunden"], "_%s user found_::_%s users found_" : ["%s Benutzer gefunden","%s Benutzer gefunden"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Das Anzeigename-Attribut des Benutzers konnte nicht gefunden werden. Bitte geben Sie es in den erweiterten LDAP-Einstellungen selber an.", diff --git a/apps/workflowengine/l10n/sv.js b/apps/workflowengine/l10n/sv.js index 02835814d8d..9e6178c895d 100644 --- a/apps/workflowengine/l10n/sv.js +++ b/apps/workflowengine/l10n/sv.js @@ -51,6 +51,13 @@ OC.L10N.register( "The given start time is invalid" : "Den valda starttiden är felaktig", "The given end time is invalid" : "Den valda sluttiden är felaktig", "The given group does not exist" : "Den valda gruppen finns inte", + "Check %s is invalid or does not exist" : "Kontroll av %s är ogiltig eller existerar inte", + "Operation #%s does not exist" : "Operationen #%s existerar inte", + "Operation %s does not exist" : "Operationen %s existerar inte", + "Operation %s is invalid" : "Operationen %s är ogiltig", + "Check %s does not exist" : "Kontroll av %s existerar inte", + "Check %s is invalid" : "Kontroll av %s är ogiltig", + "Check #%s does not exist" : "Kontroll av #%s existerar inte", "Workflow" : "Arbetsflöde", "Open documentation" : "Öppna dokumentation", "Add rule group" : "Lägg till regelgrupp", diff --git a/apps/workflowengine/l10n/sv.json b/apps/workflowengine/l10n/sv.json index f1acd41bf9f..114eb6a77be 100644 --- a/apps/workflowengine/l10n/sv.json +++ b/apps/workflowengine/l10n/sv.json @@ -49,6 +49,13 @@ "The given start time is invalid" : "Den valda starttiden är felaktig", "The given end time is invalid" : "Den valda sluttiden är felaktig", "The given group does not exist" : "Den valda gruppen finns inte", + "Check %s is invalid or does not exist" : "Kontroll av %s är ogiltig eller existerar inte", + "Operation #%s does not exist" : "Operationen #%s existerar inte", + "Operation %s does not exist" : "Operationen %s existerar inte", + "Operation %s is invalid" : "Operationen %s är ogiltig", + "Check %s does not exist" : "Kontroll av %s existerar inte", + "Check %s is invalid" : "Kontroll av %s är ogiltig", + "Check #%s does not exist" : "Kontroll av #%s existerar inte", "Workflow" : "Arbetsflöde", "Open documentation" : "Öppna dokumentation", "Add rule group" : "Lägg till regelgrupp", diff --git a/autotest-js.sh b/autotest-js.sh index 475a61df59e..bd7310c4e43 100755 --- a/autotest-js.sh +++ b/autotest-js.sh @@ -22,6 +22,10 @@ fi # update/install test packages mkdir -p "$PREFIX" && $NPM install --link --prefix "$PREFIX" || exit 3 +# create scss test +mkdir -p tests/css +./build/bin/node-sass --output tests/css core/css + KARMA="$PREFIX/node_modules/karma/bin/karma" NODE_PATH='build/node_modules' KARMA_TESTSUITE="$1" $KARMA start tests/karma.config.js --single-run diff --git a/build/package.json b/build/package.json index 6058d6785e0..67e999aaf31 100644 --- a/build/package.json +++ b/build/package.json @@ -17,7 +17,8 @@ "karma-coverage": "*", "karma-phantomjs-launcher": "*", "phantomjs-prebuilt": "*", - "jasmine-core": "~2.5.2" + "jasmine-core": "~2.5.2", + "node-sass": "~4.1.1" }, "engine": "node >= 0.8" } diff --git a/config/config.sample.php b/config/config.sample.php index 8b714a1763c..a9bb0067e5b 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -909,7 +909,6 @@ $CONFIG = array( * * Available cache backends: * - * * ``\OC\Memcache\APC`` Alternative PHP Cache backend * * ``\OC\Memcache\APCu`` APC user backend * * ``\OC\Memcache\ArrayCache`` In-memory array-based backend (not recommended) * * ``\OC\Memcache\Memcached`` Memcached backend diff --git a/core/Application.php b/core/Application.php index 545b5fe420b..dad7546dcb8 100644 --- a/core/Application.php +++ b/core/Application.php @@ -30,10 +30,11 @@ namespace OC\Core; -use OC\AppFramework\Utility\SimpleContainer; use OC\Security\IdentityProof\Manager; use OCP\AppFramework\App; -use OCP\Files\IAppData; +use OC\Core\Controller\CssController; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\IRequest; use OCP\Util; /** @@ -57,5 +58,13 @@ class Application extends App { \OC::$server->getCrypto() ); }); + $container->registerService(CssController::class, function () use ($container) { + return new CssController( + $container->query('appName'), + $container->query(IRequest::class), + \OC::$server->getAppDataDir('css'), + $container->query(ITimeFactory::class) + ); + }); } } diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php new file mode 100644 index 00000000000..1206c95a5b8 --- /dev/null +++ b/core/Controller/CssController.php @@ -0,0 +1,79 @@ +<?php +/** + * @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com) + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program 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 program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\Core\Controller; + +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\NotFoundResponse; +use OCP\AppFramework\Http\FileDisplayResponse; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\Files\IAppData; +use OCP\Files\NotFoundException; +use OCP\IRequest; + +class CssController extends Controller { + + /** @var IAppData */ + protected $appData; + + /** @var ITimeFactory */ + protected $timeFactory; + + /** + * @param string $appName + * @param IRequest $request + * @param IAppData $appData + * @param ITimeFactory $timeFactory + */ + public function __construct($appName, IRequest $request, IAppData $appData, ITimeFactory $timeFactory) { + parent::__construct($appName, $request); + + $this->appData = $appData; + $this->timeFactory = $timeFactory; + } + + /** + * @PublicPage + * @NoCSRFRequired + * + * @param string $fileName css filename with extension + * @param string $appName css folder name + * @return FileDisplayResponse|NotFoundResponse + */ + public function getCss($fileName, $appName) { + try { + $folder = $this->appData->getFolder($appName); + $cssFile = $folder->getFile($fileName); + } catch(NotFoundException $e) { + return new NotFoundResponse(); + } + + $response = new FileDisplayResponse($cssFile, Http::STATUS_OK, ['Content-Type' => 'text/css']); + $response->cacheFor(86400); + $expires = new \DateTime(); + $expires->setTimestamp($this->timeFactory->getTime()); + $expires->add(new \DateInterval('PT24H')); + $response->addHeader('Expires', $expires->format(\DateTime::RFC1123)); + $response->addHeader('Pragma', 'cache'); + return $response; + } +} diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index b6add48ef61..3c81ed5242a 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -298,14 +298,10 @@ class LoginController extends Controller { $currentDelay = $this->throttler->getDelay($this->request->getRemoteAddress()); $this->throttler->sleepDelay($this->request->getRemoteAddress()); - $user = $this->userSession->getUser(); - if (!$user instanceof IUser) { - return new DataResponse([], Http::STATUS_UNAUTHORIZED); - } - - $loginResult = $this->userManager->checkPassword($user->getUID(), $password); + $loginName = $this->userSession->getLoginName(); + $loginResult = $this->userManager->checkPassword($loginName, $password); if ($loginResult === false) { - $this->throttler->registerAttempt('sudo', $this->request->getRemoteAddress(), ['user' => $user->getUID()]); + $this->throttler->registerAttempt('sudo', $this->request->getRemoteAddress(), ['user' => $loginName]); if ($currentDelay === 0) { $this->throttler->sleepDelay($this->request->getRemoteAddress()); } diff --git a/core/css/apps.css b/core/css/apps.css deleted file mode 100644 index e709f9d901f..00000000000 --- a/core/css/apps.css +++ /dev/null @@ -1,700 +0,0 @@ -/* APP STYLING -------------------------------------------------------------- */ - - -#app { - height: 100%; - width: 100%; -} -#app * { - box-sizing: border-box; -} - - - - - -/* APP-NAVIGATION ------------------------------------------------------------*/ - - -/* Navigation: folder like structure */ -#app-navigation { - width: 250px; - height: 100%; - float: left; - box-sizing: border-box; - background-color: #fff; - padding-bottom: 44px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - border-right: 1px solid #eee; -} -#app-navigation > ul { - position: relative; - height: 100%; - width: inherit; - overflow: auto; - box-sizing: border-box; -} -#app-navigation li { - position: relative; - width: 100%; - box-sizing: border-box; -} - -#app-navigation.without-app-settings { - padding-bottom: 0; -} - -#app-navigation .active.with-menu > a, -#app-navigation .with-counter > a { - padding-right: 50px; -} - -#app-navigation .active.with-menu.with-counter > a { - padding-right: 90px; -} - -#app-navigation .with-icon a, -#app-navigation .app-navigation-entry-loading a { - padding-left: 44px; - background-size: 16px 16px; - background-position: 14px center; - background-repeat: no-repeat; -} - -#app-navigation li > a { - display: block; - width: 100%; - line-height: 44px; - min-height: 44px; - padding: 0 12px; - overflow: hidden; - box-sizing: border-box; - white-space: nowrap; - text-overflow: ellipsis; - color: #000; - opacity: .57; -} -#app-navigation .active, -#app-navigation .active a, -#app-navigation li:hover > a, -#app-navigation li:focus > a, -#app-navigation a:focus, -#app-navigation .selected, -#app-navigation .selected a { - opacity: 1; -} - -#app-navigation .collapse { - display: none; /* hide collapse button initially */ -} -#app-navigation .collapsible > .collapse { - position: absolute; - height: 44px; - width: 44px; - margin: 0; - padding: 0; - background: none; background-image: url('../img/actions/triangle-s.svg?v=1'); - background-size: 16px; background-repeat: no-repeat; background-position: center; - border: none; - border-radius: 0; - outline: none !important; - box-shadow: none; -} -#app-navigation .collapsible:hover > a, -#app-navigation .collapsible:focus > a { - background-image: none; -} -#app-navigation .collapsible:hover > .collapse, -#app-navigation .collapsible:focus > .collapse { - display: block; -} - -#app-navigation .collapsible .collapse { - -webkit-transform: rotate(-90deg); - -ms-transform:rotate(-90deg); - transform: rotate(-90deg); -} -#app-navigation .collapsible.open .collapse { - -webkit-transform: rotate(0); - -ms-transform:rotate(0); - transform: rotate(0); -} - -/* Second level nesting for lists */ -#app-navigation > ul ul { - display: none; -} -#app-navigation > ul ul li > a { - padding-left: 32px; -} -#app-navigation > .with-icon ul li > a, -#app-navigation > .with-icon ul li.app-navigation-entry-loading > a { - padding-left: 68px; - background-position: 44px center; -} - -#app-navigation .collapsible.open { - background-image: linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); - background-image: -webkit-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); - background-image: -ms-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); -} - -#app-navigation > ul .collapsible.open:hover, -#app-navigation > ul .collapsible.open:focus { - box-shadow: inset 0 0 3px #ddd; -} - -#app-navigation > ul .collapsible.open ul { - display: block; -} - - -/* Deleted entries with undo button */ -#app-navigation .app-navigation-entry-deleted { - display: inline-block; - height: 44px; - width: 100%; -} - - #app-navigation .app-navigation-entry-deleted-description { - padding-left: 12px; - position: relative; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - display: inline-block; - width: calc(100% - 49px); - line-height: 44px; - float: left; - } - - #app-navigation .app-navigation-entry-deleted-button { - margin: 0; - height: 44px; - width: 44px; - line-height: 44px; - border: 0; - display: inline-block; - background-color: transparent; - opacity: .5; - } - - #app-navigation .app-navigation-entry-deleted-button:hover, - #app-navigation .app-navigation-entry-deleted-button:focus { - opacity: 1; - } - -/* counter and actions, legacy code */ -#app-navigation .utils { - position: absolute; - padding: 7px 7px 0 0; - right: 0; - top: 0; - bottom: 0; - font-size: 12px; -} - #app-navigation .utils button, - #app-navigation .utils .counter { - width: 44px; - height: 44px; - padding-top: 12px; - } - - -/* drag and drop */ -#app-navigation .drag-and-drop { - -webkit-transition: padding-bottom 500ms ease 0s; - transition: padding-bottom 500ms ease 0s; - padding-bottom: 40px; -} -#app-navigation .error { - color: #dd1144; -} - -#app-navigation .app-navigation-separator { - border-bottom: 1px solid #ddd; -} - -/** - * App navigation utils, buttons and counters for drop down menu - */ -#app-navigation .app-navigation-entry-utils { - position: absolute; - top: 0; - right: 0; - z-index: 105; -} - - #app-navigation .app-navigation-entry-utils ul { - display: block !important; - } - - - #app-navigation .app-navigation-entry-utils li { - float: left; - width: 44px !important; - height: 44px; - line-height: 44px; - } - - #app-navigation .active > .app-navigation-entry-utils li { - display: inline-block; - } - - #app-navigation .app-navigation-entry-utils button { - height: 38px; - width: 38px; - line-height: 38px; - float: left; - } - - #app-navigation .app-navigation-entry-utils-menu-button { - display: none; - } - #app-navigation .app-navigation-entry-utils-menu-button button { - border: 0; - opacity: .5; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; - background-image: url('../img/actions/more.svg?v=1'); - } - - #app-navigation .app-navigation-entry-utils-menu-button:hover button, - #app-navigation .app-navigation-entry-utils-menu-button:focus button { - background-color: transparent; - opacity: 1; - } - - #app-navigation .app-navigation-entry-utils-counter { - overflow: hidden; - text-overflow: hidden; - text-align: right; - font-size: 9pt; - width: 38px; - line-height: 44px; - padding: 0 10px; - } - - #app-navigation .app-navigation-entry-utils ul, - #app-navigation .app-navigation-entry-menu ul { - list-style-type: none; - } - -/* menu bubble / popover */ -.bubble, -#app-navigation .app-navigation-entry-menu { - position: absolute; - background-color: #fff; - color: #333; - border-radius: 3px; - border-top-right-radius: 0; - z-index: 110; - margin: 5px; - margin-top: -5px; - right: 0; - -webkit-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); - -moz-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); - -ms-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); - -o-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); - filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); -} - -.ie .bubble, -.ie #app-navigation .app-navigation-entry-menu, -.ie .bubble:after, -.ie #app-navigation .app-navigation-entry-menu:after, -.edge .bubble, -.edge #app-navigation .app-navigation-entry-menu, -.edge .bubble:after, -.edge #app-navigation .app-navigation-entry-menu:after { - border: 1px solid #eee; -} -/* miraculous border arrow stuff */ -.bubble:after, -#app-navigation .app-navigation-entry-menu:after { - bottom: 100%; - right: 6px; /* change this to adjust the arrow position */ - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} -.bubble:after, -#app-navigation .app-navigation-entry-menu:after { - border-color: rgba(238, 238, 238, 0); - border-bottom-color: #fff; - border-width: 10px; -} -.bubble .action { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)" !important; - filter: alpha(opacity=50) !important; - opacity: .5 !important; -} -.bubble .action:hover, -.bubble .action:focus, -.bubble .action.active { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important; - filter: alpha(opacity=100) !important; - opacity: 1 !important; -} - -#app-navigation .app-navigation-entry-menu { - display: none; -} - -#app-navigation .app-navigation-entry-menu.open { - display: block; -} - - /* list of options for an entry */ - #app-navigation .app-navigation-entry-menu ul { - display: block !important; - } - - #app-navigation .app-navigation-entry-menu li { - float: left; - width: 38px !important; - } - - #app-navigation .app-navigation-entry-menu li button { - float: right; - width: 36px !important; - height: 36px; - line-height: 36px; - border: 0; - opacity: .5; - background-color: transparent; - } - - #app-navigation .app-navigation-entry-menu li button:hover, - #app-navigation .app-navigation-entry-menu li button:focus { - opacity: 1; - background-color: transparent; - } - -/* editing an entry */ -#app-navigation .app-navigation-entry-edit { - padding-left: 5px; - padding-right: 5px; - display: inline-block; - height: 39px; - width: 100%; -} - - #app-navigation .app-navigation-entry-edit input { - border-bottom-right-radius: 0; - border-top-right-radius: 0; - width: calc(100% - 36px); - padding: 5px; - margin-right: 0; - height: 38px; - float: left; - border: 1px solid rgba(190,190,190,.9); - } - - #app-navigation .app-navigation-entry-edit button, - #app-navigation .app-navigation-entry-edit input[type="submit"] { - width: 36px; - height: 38px; - float: left; - } - - #app-navigation .app-navigation-entry-edit .icon-checkmark { - border-bottom-left-radius: 0; - border-top-left-radius: 0; - border-left: 0; - margin-right: 0; - } - - -/* APP-CONTENT ---------------------------------------------------------------*/ - - -/* Part where the content will be loaded into */ -#app-content { - position: relative; - height: 100%; - overflow-y: auto; -} - -#app-content-wrapper { - min-width: 100%; - min-height: 100%; -} - -/* APP-SIDEBAR ----------------------------------------------------------------*/ - -/* - Sidebar: a sidebar to be used within #app-content - have it as first element within app-content in order to shrink other - sibling containers properly. Compare Files app for example. -*/ -#app-sidebar { - position: fixed; - top: 45px; - right: 0; - left: auto; - bottom: 0; - width: 27%; - min-width: 300px; - display: block; - background: #fff; - border-left: 1px solid #eee; - -webkit-transition: margin-right 300ms; - transition: margin-right 300ms; - overflow-x: hidden; - overflow-y: auto; - visibility: visible; - z-index: 500; -} - -#app-content.with-app-sidebar { - margin-right: 27%; -} - -#app-sidebar.disappear { - visibility: hidden; -} - -/* APP-SETTINGS ---------------------------------------------------------------*/ - -/* settings area */ -#app-settings { - position: fixed; - width: 250px; /* change to 100% when layout positions are absolute */ - bottom: 0; - z-index: 140; -} -#app-settings.open #app-settings-content, -#app-settings.opened #app-settings-content { - display: block; -} -#app-settings-content { - display: none; - padding: 10px; - background-color: #fff; - /* restrict height of settings and make scrollable */ - max-height: 300px; - overflow-y: auto; -} -#app-settings-content, -#app-settings-header { - border-right: 1px solid #eee; - width: 250px; - box-sizing: border-box; -} - -/* display input fields at full width */ -#app-settings-content input[type='text'] { - width: 93%; -} - -.settings-button { - display: block; - height: 44px; - width: 100%; - padding: 0; - margin: 0; - background-color: #fff; - background-image: url('../img/actions/settings.svg?v=1'); - background-position: 14px center; - background-repeat: no-repeat; - box-shadow: none; - border: 0; - border-radius: 0; - text-align: left; - padding-left: 42px; - font-weight: normal; -} -.settings-button:hover, -.settings-button:focus { - background-color: #fff; -} -.settings-button.opened:hover, -.settings-button.opened:focus { - background-color: #fff; -} - -/* buttons */ -button.loading { - background-image: url('../img/loading.gif'); - background-position: right 10px center; background-repeat: no-repeat; - background-size: 16px; - padding-right: 30px; -} - -/* general styles for the content area */ -.section { - display: block; - padding: 30px; - color: #555; - margin-bottom: 24px; -} -.section.hidden { - display: none !important; -} -.sub-section { - position: relative; - margin-top: 10px; - margin-left: 27px; - margin-bottom: 10px; -} -/* no top border for first settings item */ -#app-content > .section:first-child { - border-top: none; -} - -/* heading styles */ -h2 { - font-size: 20px; - font-weight: 300; - margin-bottom: 12px; - line-height: 140%; -} -h3 { - font-size: 15px; - font-weight: 300; - margin: 12px 0; -} - -/* slight position correction of checkboxes and radio buttons */ -.section input[type="checkbox"], -.section input[type="radio"] { - vertical-align: -2px; - margin-right: 4px; -} -.appear { - opacity: 1; - -webkit-transition: opacity 500ms ease 0s; - -moz-transition: opacity 500ms ease 0s; - -ms-transition: opacity 500ms ease 0s; - -o-transition: opacity 500ms ease 0s; - transition: opacity 500ms ease 0s; -} -.appear.transparent { - opacity: 0; -} - - -/* do not use italic typeface style, instead lighter color */ -em { - font-style: normal; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - opacity: .5; -} - -/* generic dropdown style */ -.dropdown { - background:#eee; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - box-shadow:0 1px 1px #777; - display:block; - margin-right: 0; - position:absolute; - right:0; - width:420px; - z-index:500; - padding:16px; -} - -/* generic tab styles */ -.tabHeaders { - display: inline-block; - margin: 15px; -} -.tabHeaders .tabHeader { - float: left; - padding: 5px; - cursor: pointer; -} -.tabHeaders .tabHeader, .tabHeaders .tabHeader a { - color: #888; - margin-bottom: 1px; -} -.tabHeaders .tabHeader.selected { - font-weight: 600; -} -.tabHeaders .tabHeader.selected, -.tabHeaders .tabHeader:hover { - border-bottom: 1px solid #333; -} -.tabHeaders .tabHeader.selected, -.tabHeaders .tabHeader.selected a, -.tabHeaders .tabHeader:hover, -.tabHeaders .tabHeader:hover a { - margin-bottom: 0px; - color: #000; -} -.tabsContainer { - clear: left; -} -.tabsContainer .tab { - padding: 0 15px 15px; -} - -/* popover menu styles (use together with "bubble" class) */ -.popovermenu .menuitem, -.popovermenu .menuitem>span { - cursor: pointer; - vertical-align: middle; -} - -.popovermenu .menuitem { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - filter: alpha(opacity=50); - opacity: .5; -} - -.popovermenu .menuitem:hover, -.popovermenu .menuitem:focus, -.popovermenu .menuitem.active { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - filter: alpha(opacity=100); - opacity: 1; -} - -.popovermenu .menuitem img { - padding: initial; -} - -.popovermenu a.menuitem, -.popovermenu label.menuitem, -.popovermenu .menuitem { - padding: 10px !important; - width: auto; -} - -.popovermenu.hidden { - display: none; -} - -.popovermenu .menuitem { - display: flex !important; - line-height: 30px; - color: #000; - align-items: center; -} - -.popovermenu .menuitem .icon, -.popovermenu .menuitem .no-icon { - display: inline-block; - width: 16px; - height: 16px; - margin-right: 10px; - vertical-align: middle; -} - -.popovermenu .menuitem { - opacity: 0.5; -} - -.popovermenu li:hover .menuitem { - opacity: 1; -} diff --git a/core/css/apps.scss b/core/css/apps.scss new file mode 100644 index 00000000000..8bb380ad0ae --- /dev/null +++ b/core/css/apps.scss @@ -0,0 +1,689 @@ +/* APP STYLING -------------------------------------------------------------- */ + +#app { + height: 100%; + width: 100%; + * { + box-sizing: border-box; + } +} + +/* APP-NAVIGATION ------------------------------------------------------------*/ + +/* Navigation: folder like structure */ + +#app-navigation { + width: 250px; + height: 100%; + float: left; + box-sizing: border-box; + background-color: #fff; + padding-bottom: 44px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border-right: 1px solid #eee; + > ul { + position: relative; + height: 100%; + width: inherit; + overflow: auto; + box-sizing: border-box; + } + li { + position: relative; + width: 100%; + box-sizing: border-box; + } + &.without-app-settings { + padding-bottom: 0; + } + .active.with-menu > a, .with-counter > a { + padding-right: 50px; + } + .active.with-menu.with-counter > a { + padding-right: 90px; + } + .with-icon a, .app-navigation-entry-loading a { + padding-left: 44px; + background-size: 16px 16px; + background-position: 14px center; + background-repeat: no-repeat; + } + li > a { + display: block; + width: 100%; + line-height: 44px; + min-height: 44px; + padding: 0 12px; + overflow: hidden; + box-sizing: border-box; + white-space: nowrap; + text-overflow: ellipsis; + color: #000; + opacity: .57; + } + .active { + opacity: 1; + a { + opacity: 1; + } + } + li { + &:hover > a, &:focus > a { + opacity: 1; + } + } + a:focus { + opacity: 1; + } + .selected { + opacity: 1; + a { + opacity: 1; + } + } + .collapse { + display: none; + /* hide collapse button initially */ + } + .collapsible { + > .collapse { + position: absolute; + height: 44px; + width: 44px; + margin: 0; + padding: 0; + background: none; + background-image: url('../img/actions/triangle-s.svg?v=1'); + background-size: 16px; + background-repeat: no-repeat; + background-position: center; + border: none; + border-radius: 0; + outline: none !important; + box-shadow: none; + } + &:hover > a, &:focus > a { + background-image: none; + } + &:hover > .collapse, &:focus > .collapse { + display: block; + } + .collapse { + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + &.open { + .collapse { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + background-image: linear-gradient(top, rgb(238, 238, 238) 0%, rgb(245, 245, 245) 100%); + background-image: -webkit-linear-gradient(top, rgb(238, 238, 238) 0%, rgb(245, 245, 245) 100%); + background-image: -ms-linear-gradient(top, rgb(238, 238, 238) 0%, rgb(245, 245, 245) 100%); + } + } + > { + ul ul { + display: none; + li > a { + padding-left: 32px; + } + } + .with-icon ul li { + > a, &.app-navigation-entry-loading > a { + padding-left: 68px; + background-position: 44px center; + } + } + } + > ul .collapsible.open { + &:hover, &:focus { + box-shadow: inset 0 0 3px #ddd; + } + ul { + display: block; + } + } + .app-navigation-entry-deleted { + display: inline-block; + height: 44px; + width: 100%; + } + .app-navigation-entry-deleted-description { + padding-left: 12px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + display: inline-block; + width: calc(100% - 49px); + line-height: 44px; + float: left; + } + .app-navigation-entry-deleted-button { + margin: 0; + height: 44px; + width: 44px; + line-height: 44px; + border: 0; + display: inline-block; + background-color: transparent; + opacity: .5; + &:hover, &:focus { + opacity: 1; + } + } + .utils { + position: absolute; + padding: 7px 7px 0 0; + right: 0; + top: 0; + bottom: 0; + font-size: 12px; + button, .counter { + width: 44px; + height: 44px; + padding-top: 12px; + } + } + .drag-and-drop { + -webkit-transition: padding-bottom 500ms ease 0s; + transition: padding-bottom 500ms ease 0s; + padding-bottom: 40px; + } + .error { + color: #dd1144; + } + .app-navigation-separator { + border-bottom: 1px solid #ddd; + } + .app-navigation-entry-utils { + position: absolute; + top: 0; + right: 0; + z-index: 105; + ul { + display: block !important; + } + li { + float: left; + width: 44px !important; + height: 44px; + line-height: 44px; + } + } + .active > .app-navigation-entry-utils li { + display: inline-block; + } + .app-navigation-entry-utils button { + height: 38px; + width: 38px; + line-height: 38px; + float: left; + } + .app-navigation-entry-utils-menu-button { + display: none; + button { + border: 0; + opacity: .5; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; + background-image: url('../img/actions/more.svg?v=1'); + } + &:hover button, &:focus button { + background-color: transparent; + opacity: 1; + } + } + .app-navigation-entry-utils-counter { + overflow: hidden; + text-overflow: hidden; + text-align: right; + font-size: 9pt; + width: 38px; + line-height: 44px; + padding: 0 10px; + } + .app-navigation-entry-utils ul, .app-navigation-entry-menu ul { + list-style-type: none; + } +} + +/* Second level nesting for lists */ + +/* Deleted entries with undo button */ + +/* counter and actions, legacy code */ + +/* drag and drop */ + +/** + * App navigation utils, buttons and counters for drop down menu + */ + +/* menu bubble / popover */ + +.bubble, #app-navigation .app-navigation-entry-menu { + position: absolute; + background-color: #fff; + color: #333; + border-radius: 3px; + border-top-right-radius: 0; + z-index: 110; + margin: 5px; + margin-top: -5px; + right: 0; + -webkit-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); + -moz-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); + -ms-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); + -o-filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); + filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.75)); +} + +.ie { + .bubble, #app-navigation .app-navigation-entry-menu, .bubble:after, #app-navigation .app-navigation-entry-menu:after { + border: 1px solid #eee; + } +} + +.edge { + .bubble, #app-navigation .app-navigation-entry-menu, .bubble:after, #app-navigation .app-navigation-entry-menu:after { + border: 1px solid #eee; + } +} + +/* miraculous border arrow stuff */ + +.bubble:after, #app-navigation .app-navigation-entry-menu:after { + bottom: 100%; + right: 6px; + /* change this to adjust the arrow position */ + border: solid transparent; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +.bubble:after, #app-navigation .app-navigation-entry-menu:after { + border-color: rgba(238, 238, 238, 0); + border-bottom-color: #fff; + border-width: 10px; +} + +.bubble .action { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)' !important; + filter: alpha(opacity = 50) !important; + opacity: .5 !important; + &:hover, &:focus, &.active { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)' !important; + filter: alpha(opacity = 100) !important; + opacity: 1 !important; + } +} + +#app-navigation { + .app-navigation-entry-menu { + display: none; + &.open { + display: block; + } + ul { + display: block !important; + } + li { + float: left; + width: 38px !important; + button { + float: right; + width: 36px !important; + height: 36px; + line-height: 36px; + border: 0; + opacity: .5; + background-color: transparent; + &:hover, &:focus { + opacity: 1; + background-color: transparent; + } + } + } + } + .app-navigation-entry-edit { + padding-left: 5px; + padding-right: 5px; + display: inline-block; + height: 39px; + width: 100%; + input { + border-bottom-right-radius: 0; + border-top-right-radius: 0; + width: calc(100% - 36px); + padding: 5px; + margin-right: 0; + height: 38px; + float: left; + border: 1px solid rgba(190, 190, 190, 0.9); + } + button, input[type='submit'] { + width: 36px; + height: 38px; + float: left; + } + .icon-checkmark { + border-bottom-left-radius: 0; + border-top-left-radius: 0; + border-left: 0; + margin-right: 0; + } + } +} + +/* list of options for an entry */ + +/* editing an entry */ + +/* APP-CONTENT ---------------------------------------------------------------*/ + +/* Part where the content will be loaded into */ + +#app-content { + position: relative; + height: 100%; + overflow-y: auto; +} + +#app-content-wrapper { + min-width: 100%; + min-height: 100%; +} + +/* APP-SIDEBAR ----------------------------------------------------------------*/ + +/* + Sidebar: a sidebar to be used within #app-content + have it as first element within app-content in order to shrink other + sibling containers properly. Compare Files app for example. +*/ + +#app-sidebar { + position: fixed; + top: 45px; + right: 0; + left: auto; + bottom: 0; + width: 27%; + min-width: 300px; + display: block; + background: #fff; + border-left: 1px solid #eee; + -webkit-transition: margin-right 300ms; + transition: margin-right 300ms; + overflow-x: hidden; + overflow-y: auto; + visibility: visible; + z-index: 500; +} + +#app-content.with-app-sidebar { + margin-right: 27%; +} + +#app-sidebar.disappear { + visibility: hidden; +} + +/* APP-SETTINGS ---------------------------------------------------------------*/ + +/* settings area */ + +#app-settings { + position: fixed; + width: 250px; + /* change to 100% when layout positions are absolute */ + bottom: 0; + z-index: 140; + &.open #app-settings-content, &.opened #app-settings-content { + display: block; + } +} + +#app-settings-content { + display: none; + padding: 10px; + background-color: #fff; + /* restrict height of settings and make scrollable */ + max-height: 300px; + overflow-y: auto; + border-right: 1px solid #eee; + width: 250px; + box-sizing: border-box; +} + +#app-settings-header { + border-right: 1px solid #eee; + width: 250px; + box-sizing: border-box; +} + +/* display input fields at full width */ + +#app-settings-content input[type='text'] { + width: 93%; +} + +.settings-button { + display: block; + height: 44px; + width: 100%; + padding: 0; + margin: 0; + background-color: #fff; + background-image: url('../img/actions/settings.svg?v=1'); + background-position: 14px center; + background-repeat: no-repeat; + box-shadow: none; + border: 0; + border-radius: 0; + text-align: left; + padding-left: 42px; + font-weight: normal; + &:hover, &:focus { + background-color: #fff; + } + &.opened { + &:hover, &:focus { + background-color: #fff; + } + } +} + +/* buttons */ + +button.loading { + background-image: url('../img/loading.gif'); + background-position: right 10px center; + background-repeat: no-repeat; + background-size: 16px; + padding-right: 30px; +} + +/* general styles for the content area */ + +.section { + display: block; + padding: 30px; + color: #555; + margin-bottom: 24px; + &.hidden { + display: none !important; + } +} + +.sub-section { + position: relative; + margin-top: 10px; + margin-left: 27px; + margin-bottom: 10px; +} + +/* no top border for first settings item */ + +#app-content > .section:first-child { + border-top: none; +} + +/* heading styles */ + +h2 { + font-size: 20px; + font-weight: 300; + margin-bottom: 12px; + line-height: 140%; +} + +h3 { + font-size: 15px; + font-weight: 300; + margin: 12px 0; +} + +/* slight position correction of checkboxes and radio buttons */ + +.section input { + &[type='checkbox'], &[type='radio'] { + vertical-align: -2px; + margin-right: 4px; + } +} + +.appear { + opacity: 1; + -webkit-transition: opacity 500ms ease 0s; + -moz-transition: opacity 500ms ease 0s; + -ms-transition: opacity 500ms ease 0s; + -o-transition: opacity 500ms ease 0s; + transition: opacity 500ms ease 0s; + &.transparent { + opacity: 0; + } +} + +/* do not use italic typeface style, instead lighter color */ + +em { + font-style: normal; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + opacity: .5; +} + +/* generic dropdown style */ + +.dropdown { + background: #eee; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + box-shadow: 0 1px 1px #777; + display: block; + margin-right: 0; + position: absolute; + right: 0; + width: 420px; + z-index: 500; + padding: 16px; +} + +/* generic tab styles */ + +.tabHeaders { + display: inline-block; + margin: 15px; + .tabHeader { + float: left; + padding: 5px; + cursor: pointer; + color: #888; + margin-bottom: 1px; + a { + color: #888; + margin-bottom: 1px; + } + &.selected { + font-weight: 600; + border-bottom: 1px solid #333; + } + &:hover { + border-bottom: 1px solid #333; + } + &.selected, &:hover { + margin-bottom: 0px; + color: #000; + a { + margin-bottom: 0px; + color: #000; + } + } + } +} + +.tabsContainer { + clear: left; + .tab { + padding: 0 15px 15px; + } +} + +/* popover menu styles (use together with 'bubble' class) */ + +.popovermenu { + .menuitem { + cursor: pointer; + vertical-align: middle; + > span { + cursor: pointer; + vertical-align: middle; + } + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + filter: alpha(opacity = 50); + opacity: .5; + &:hover, &:focus, &.active { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + filter: alpha(opacity = 100); + opacity: 1; + } + img { + padding: initial; + } + } + a.menuitem, label.menuitem, .menuitem { + padding: 10px !important; + width: auto; + } + &.hidden { + display: none; + } + .menuitem { + display: flex !important; + line-height: 30px; + color: #000; + align-items: center; + .icon, .no-icon { + display: inline-block; + width: 16px; + height: 16px; + margin-right: 10px; + vertical-align: middle; + } + opacity: 0.5; + } + li:hover .menuitem { + opacity: 1; + } +} diff --git a/core/css/header.css b/core/css/header.css deleted file mode 100644 index d18181d13a0..00000000000 --- a/core/css/header.css +++ /dev/null @@ -1,384 +0,0 @@ -/* prevent ugly selection effect on accidental selection */ -#header, -#navigation, -#expanddiv { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; -} - -/* removed until content-focusing issue is fixed */ -#skip-to-content a { - position: absolute; - left: -10000px; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; -} -#skip-to-content a:focus { - left: 76px; - top: -9px; - color: #fff; - width: auto; - height: auto; -} - - - -/* HEADERS ------------------------------------------------------------------ */ - -#body-user #header, -#body-settings #header, -#body-public #header { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 2000; - height: 45px; - line-height: 2.5em; - background-color: #0082c9; - box-sizing: border-box; -} - - - -/* LOGO and APP NAME -------------------------------------------------------- */ - -#nextcloud { - position: absolute; - top: 0; - left: 0; - padding: 5px; - padding-bottom: 0; - height: 45px; /* header height */ - box-sizing: border-box; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} -#nextcloud:focus { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; - opacity: .75; -} -#nextcloud:hover, -#nextcloud:active { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} - -#header .logo { - background-image: url('../img/logo-icon.svg?v=1'); - background-repeat: no-repeat; - background-size: 175px; - background-position: center; - width: 252px; - height: 120px; - margin: 0 auto; -} - -#header .logo-icon { - /* display logo so appname can be shown next to it */ - display: inline-block; - background-image: url('../img/logo-icon.svg?v=1'); - background-repeat: no-repeat; - background-position: center center; - width: 62px; - height: 34px; -} - -#header .header-appname-container { - display: inline-block; - position: absolute; - left: 70px; - height: 27px; - padding-top: 18px; - padding-right: 10px; -} - -/* hover effect for app switcher label */ -.header-appname-container .header-appname, -.menutoggle .icon-caret { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; - opacity: .75; -} -.menutoggle:hover .header-appname, -.menutoggle:hover .icon-caret, -.menutoggle:focus .header-appname, -.menutoggle:focus .icon-caret, -.menutoggle.active .header-appname, -.menutoggle.active .icon-caret { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} - -/* show appname next to logo */ -.header-appname { - display: inline-block; - position: relative; - color: #fff; - font-size: 16px; - font-weight: 300; - margin: 0; - margin-top: -24px; - padding: 7px 0 7px 5px; - vertical-align: middle; -} -/* show caret indicator next to logo to make clear it is tappable */ -#header .icon-caret { - display: inline-block; - width: 12px; - height: 12px; - margin: 0; - margin-top: -21px; - padding: 0; - vertical-align: middle; -} -/* do not show menu toggle on public share links as there is no menu */ -#body-public #header .icon-caret { - display: none; -} - - - -/* NAVIGATION --------------------------------------------------------------- */ - -#navigation { - position: fixed; - top: 45px; - left: 10px; - width: 265px; - max-height: 85%; - margin-top: 0; - padding-bottom: 10px; - background-color: rgba(255, 255, 255, .97); - box-shadow: 0 1px 10px rgba(150, 150, 150, .75); - border-radius: 3px; - border-top-left-radius: 0; - border-top-right-radius: 0; - display: none; - /*overflow-y: auto; - overflow-x: hidden;*/ - z-index: 2000; -} -/* arrow look */ -#navigation:after, #expanddiv:after { - bottom: 100%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - border-color: rgba(0, 0, 0, 0); - border-bottom-color: rgba(255, 255, 255, .97); - border-width: 10px; - margin-left: -10px; -} -/* position of dropdown arrow */ -#navigation:after { - left: 47%; -} -#expanddiv:after { - right: 15px; -} - -#navigation, #navigation * { - box-sizing:border-box; -} -#navigation li { - display: inline-block; -} -#navigation a { - position: relative; - width: 80px; - height: 80px; - display: inline-block; - text-align: center; - padding: 20px 0; -} -#navigation a span { - display: inline-block; - font-size: 13px; - padding-bottom: 0; - padding-left: 0; - width: 80px; - text-align: center; - color: #000; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; -} - /* icon opacity and hover effect */ - #navigation a svg, - #navigation a span { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - opacity: .5; - } - #navigation a:hover svg, - #navigation a:focus svg, - #navigation a:hover span, - #navigation a:focus span, - #navigation a.active svg, - #navigation a.active span, - #apps-management a:hover svg, - #apps-management a:focus svg, - #apps-management a.active svg, - #apps-management a:hover span, - #apps-management a:focus span, - #apps-management a.active span { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; - } - -#navigation .app-icon { - margin: 0 auto; - padding: 0; - max-height: 32px; - max-width: 32px; -} - -/* Apps management */ -#apps-management { - min-height: initial; - height: initial; - margin: 0; -} -#apps-management a svg, -#apps-management a span { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; - opacity: .3; -} - - -/* loading feedback for apps */ -#navigation .app-loading .icon-loading-dark { - display: inline !important; - position: absolute; - top: 20px; - left: 24px; - width: 32px; - height: 32px; -} -#navigation .app-loading .app-icon { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - opacity: 0; -} - -#apps { - max-height: calc(100vh - 100px); - overflow:auto; -} - - -/* USER MENU -----------------------------------------------------------------*/ - -/* info part on the right, used e.g. for info on who shared something */ -.header-right { - position: absolute; - right: 0; - padding: 7px 5px; - color: #fff; - height: 100%; - max-width: 80%; - white-space: nowrap; - box-sizing: border-box; -} - -/* Profile picture in header */ -#header .avatardiv { - float: left; - display: inline-block; - margin-right: 8px; - cursor: pointer; - height: 32px; - width: 32px; -} -#header .avatardiv img { - opacity: 1; - cursor: pointer; -} - -#settings { - float: right; - color: #ddd; - cursor: pointer; -} -#settings .icon-loading-small-dark { - display: inline-block; - margin-bottom: -3px; - margin-right: 6px; - background-size: 16px 16px; -} -#expand { - display: block; - padding: 7px 30px 6px 10px; - cursor: pointer; -} -#expand * { - cursor: pointer; -} -#expand:hover, -#expand:focus, -#expand:active { - color: #fff; -} -#expand img { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - opacity: .7; - margin-bottom: -2px; -} -#expand:hover img, -#expand:focus img, -#expand:active img { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} -#expand .icon-caret { - margin-top: 0; -} -#expanddiv { - position: absolute; - right: 13px; - top: 45px; - z-index: 2000; - display: none; - background: rgb(255, 255, 255); - box-shadow: 0 1px 10px rgba(150, 150, 150, .75); - border-radius: 3px; - border-top-left-radius: 0; - border-top-right-radius: 0; - box-sizing: border-box; -} -#expanddiv:after { - border-color: rgba(0, 0, 0, 0); - border-bottom-color: rgba(255, 255, 255, 1); -} - #expanddiv a { - display: block; - height: 40px; - color: #000; - padding: 4px 12px 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - opacity: .5; - box-sizing: border-box; - } - #expanddiv a img { - margin-bottom: -3px; - margin-right: 6px; - } - #expanddiv a:hover, - #expanddiv a:focus, - #expanddiv a:active, - #expanddiv a.active { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; - } - -/* do not show display name when profile picture is present */ -#header .avatardiv.avatardiv-shown + #expandDisplayName { - display: none; -} -#header #expand { - display: block; -} diff --git a/core/css/header.scss b/core/css/header.scss new file mode 100644 index 00000000000..8035f7e568a --- /dev/null +++ b/core/css/header.scss @@ -0,0 +1,423 @@ +/* prevent ugly selection effect on accidental selection */ + +#header, #navigation, #expanddiv { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +/* removed until content-focusing issue is fixed */ + +#skip-to-content a { + position: absolute; + left: -10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; + &:focus { + left: 76px; + top: -9px; + color: #fff; + width: auto; + height: auto; + } +} + +/* HEADERS ------------------------------------------------------------------ */ + +#body-user #header, #body-settings #header, #body-public #header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 2000; + height: 45px; + line-height: 2.5em; + background-color: #0082c9; + box-sizing: border-box; +} + +/* LOGO and APP NAME -------------------------------------------------------- */ + +#nextcloud { + position: absolute; + top: 0; + left: 0; + padding: 5px; + padding-bottom: 0; + height: 45px; + /* header height */ + box-sizing: border-box; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + &:focus { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)'; + opacity: .75; + } + &:hover, &:active { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +#header { + .logo { + background-image: url('../img/logo-icon.svg?v=1'); + background-repeat: no-repeat; + background-size: 175px; + background-position: center; + width: 252px; + height: 120px; + margin: 0 auto; + } + .logo-icon { + /* display logo so appname can be shown next to it */ + display: inline-block; + background-image: url('../img/logo-icon.svg?v=1'); + background-repeat: no-repeat; + background-position: center center; + width: 62px; + height: 34px; + } + .header-appname-container { + display: inline-block; + position: absolute; + left: 70px; + height: 27px; + padding-top: 18px; + padding-right: 10px; + } +} + +/* hover effect for app switcher label */ + +.header-appname-container .header-appname { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)'; + opacity: .75; +} + +.menutoggle { + .icon-caret { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=75)'; + opacity: .75; + } + &:hover { + .header-appname, .icon-caret { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &:focus { + .header-appname, .icon-caret { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &.active { + .header-appname, .icon-caret { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } +} + +/* show appname next to logo */ + +.header-appname { + display: inline-block; + position: relative; + color: #fff; + font-size: 16px; + font-weight: 300; + margin: 0; + margin-top: -24px; + padding: 7px 0 7px 5px; + vertical-align: middle; +} + +/* show caret indicator next to logo to make clear it is tappable */ + +#header .icon-caret { + display: inline-block; + width: 12px; + height: 12px; + margin: 0; + margin-top: -21px; + padding: 0; + vertical-align: middle; +} + +/* do not show menu toggle on public share links as there is no menu */ + +#body-public #header .icon-caret { + display: none; +} + +/* NAVIGATION --------------------------------------------------------------- */ + +#navigation { + position: fixed; + top: 45px; + left: 10px; + width: 265px; + max-height: 85%; + margin-top: 0; + padding-bottom: 10px; + background-color: rgba(255, 255, 255, 0.97); + box-shadow: 0 1px 10px rgba(150, 150, 150, 0.75); + border-radius: 3px; + border-top-left-radius: 0; + border-top-right-radius: 0; + display: none; + /*overflow-y: auto; + overflow-x: hidden;*/ + z-index: 2000; + &:after { + bottom: 100%; + border: solid transparent; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(0, 0, 0, 0); + border-bottom-color: rgba(255, 255, 255, 0.97); + border-width: 10px; + margin-left: -10px; + } +} + +/* arrow look */ + +#expanddiv:after { + bottom: 100%; + border: solid transparent; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(0, 0, 0, 0); + border-bottom-color: rgba(255, 255, 255, 0.97); + border-width: 10px; + margin-left: -10px; +} + +/* position of dropdown arrow */ + +#navigation:after { + left: 47%; +} + +#expanddiv:after { + right: 15px; +} + +#navigation { + box-sizing: border-box; + * { + box-sizing: border-box; + } + li { + display: inline-block; + } + a { + position: relative; + width: 80px; + height: 80px; + display: inline-block; + text-align: center; + padding: 20px 0; + span { + display: inline-block; + font-size: 13px; + padding-bottom: 0; + padding-left: 0; + width: 80px; + text-align: center; + color: #000; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + svg, span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + opacity: .5; + } + &:hover svg, &:focus svg, &:hover span, &:focus span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + &.active { + svg, span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + } +} + +/* icon opacity and hover effect */ + +#apps-management a { + &:hover svg, &:focus svg, &.active svg, &:hover span, &:focus span, &.active span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +#navigation .app-icon { + margin: 0 auto; + padding: 0; + max-height: 32px; + max-width: 32px; +} + +/* Apps management */ + +#apps-management { + min-height: initial; + height: initial; + margin: 0; + a { + svg, span { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; + opacity: .3; + } + } +} + +/* loading feedback for apps */ + +#navigation .app-loading { + .icon-loading-dark { + display: inline !important; + position: absolute; + top: 20px; + left: 24px; + width: 32px; + height: 32px; + } + .app-icon { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'; + opacity: 0; + } +} + +#apps { + max-height: calc(100vh - 100px); + overflow: auto; +} + +/* USER MENU -----------------------------------------------------------------*/ + +/* info part on the right, used e.g. for info on who shared something */ + +.header-right { + position: absolute; + right: 0; + padding: 7px 5px; + color: #fff; + height: 100%; + max-width: 80%; + white-space: nowrap; + box-sizing: border-box; +} + +/* Profile picture in header */ + +#header .avatardiv { + float: left; + display: inline-block; + margin-right: 8px; + cursor: pointer; + height: 32px; + width: 32px; + img { + opacity: 1; + cursor: pointer; + } +} + +#settings { + float: right; + color: #ddd; + cursor: pointer; + .icon-loading-small-dark { + display: inline-block; + margin-bottom: -3px; + margin-right: 6px; + background-size: 16px 16px; + } +} + +#expand { + display: block; + padding: 7px 30px 6px 10px; + cursor: pointer; + * { + cursor: pointer; + } + &:hover, &:focus, &:active { + color: #fff; + } + img { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)'; + opacity: .7; + margin-bottom: -2px; + } + &:hover img, &:focus img, &:active img { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + .icon-caret { + margin-top: 0; + } +} + +#expanddiv { + position: absolute; + right: 13px; + top: 45px; + z-index: 2000; + display: none; + background: rgb(255, 255, 255); + box-shadow: 0 1px 10px rgba(150, 150, 150, 0.75); + border-radius: 3px; + border-top-left-radius: 0; + border-top-right-radius: 0; + box-sizing: border-box; + &:after { + border-color: rgba(0, 0, 0, 0); + border-bottom-color: rgba(255, 255, 255, 1); + } + a { + display: block; + height: 40px; + color: #000; + padding: 4px 12px 0; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + opacity: .5; + box-sizing: border-box; + img { + margin-bottom: -3px; + margin-right: 6px; + } + &:hover, &:focus, &:active, &.active { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } +} + +/* do not show display name when profile picture is present */ + +#header { + .avatardiv.avatardiv-shown + #expandDisplayName { + display: none; + } + #expand { + display: block; + } +} diff --git a/core/css/icons.css b/core/css/icons.scss index a2869dfac1c..9afb5630181 100644 --- a/core/css/icons.css +++ b/core/css/icons.scss @@ -1,35 +1,23 @@ -[class^="icon-"], [class*=" icon-"] { +[class^='icon-'], [class*=' icon-'] { background-repeat: no-repeat; background-position: center; min-width: 16px; min-height: 16px; } - - - /* general assets */ .icon-breadcrumb { background-image: url('../img/breadcrumb.svg?v=1'); } -.loading, -.loading-small, -.icon-loading, -.icon-loading-dark, -.icon-loading-small, -.icon-loading-small-dark { +.loading, .loading-small, .icon-loading, .icon-loading-dark, .icon-loading-small, .icon-loading-small-dark { position: relative; } -.loading:after, -.loading-small:after, -.icon-loading:after, -.icon-loading-dark:after, -.icon-loading-small:after, -.icon-loading-small-dark:after { + +.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after { z-index: 2; - content: ""; + content: ''; height: 30px; width: 30px; margin: -16px 0 0 -16px; @@ -43,41 +31,39 @@ -ms-transform-origin: center; transform-origin: center; } -.loading:after, -.loading-small:after, -.icon-loading:after, -.icon-loading-dark:after, -.icon-loading-small:after, -.icon-loading-small-dark:after { - border: 2px solid rgba(150, 150, 150, .5); + +.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after { + border: 2px solid rgba(150, 150, 150, 0.5); border-top-color: rgb(100, 100, 100); } -.icon-loading-dark:after, -.icon-loading-small-dark:after { - border: 2px solid rgba(187, 187, 187, .5); +.icon-loading-dark:after, .icon-loading-small-dark:after { + border: 2px solid rgba(187, 187, 187, 0.5); border-top-color: #bbb; } -.icon-loading-small:after, -.icon-loading-small-dark:after { +.icon-loading-small:after, .icon-loading-small-dark:after { height: 14px; width: 14px; margin: -8px 0 0 -8px; } /* Css replaced elements don't have ::after nor ::before */ + img.icon-loading, object.icon-loading, video.icon-loading, button.icon-loading, textarea.icon-loading, input.icon-loading, select.icon-loading { - background-image: url("../img/loading.gif"); + background-image: url('../img/loading.gif'); } + img.icon-loading-dark, object.icon-loading-dark, video.icon-loading-dark, button.icon-loading-dark, textarea.icon-loading-dark, input.icon-loading-dark, select.icon-loading-dark { - background-image: url("../img/loading-dark.gif"); + background-image: url('../img/loading-dark.gif'); } + img.icon-loading-small, object.icon-loading-small, video.icon-loading-small, button.icon-loading-small, textarea.icon-loading-small, input.icon-loading-small, select.icon-loading-small { - background-image: url("../img/loading-small.gif"); + background-image: url('../img/loading-small.gif'); } + img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-small-dark, button.icon-loading-small-dark, textarea.icon-loading-small-dark, input.icon-loading-small-dark, select.icon-loading-small-dark { - background-image: url("../img/loading-small-dark.gif"); + background-image: url('../img/loading-small-dark.gif'); } @-webkit-keyframes rotate { @@ -85,29 +71,31 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- -webkit-transform: rotate(0deg); transform: rotate(0deg); } + to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } + + @keyframes rotate { from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } + .icon-32 { background-size: 32px !important; } - - - /* action icons */ .icon-add { @@ -117,12 +105,15 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-audio { background-image: url('../img/actions/audio.svg?v=1'); } + .icon-audio-white { background-image: url('../img/actions/audio-white.svg?v=2'); } + .icon-audio-off { background-image: url('../img/actions/audio-off.svg?v=1'); } + .icon-audio-off-white { background-image: url('../img/actions/audio-off-white.svg?v=1'); } @@ -130,6 +121,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-caret { background-image: url('../img/actions/caret.svg?v=1'); } + .icon-caret-dark { background-image: url('../img/actions/caret-dark.svg?v=1'); } @@ -137,9 +129,11 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-checkmark { background-image: url('../img/actions/checkmark.svg?v=1'); } + .icon-checkmark-white { background-image: url('../img/actions/checkmark-white.svg?v=1'); } + .icon-checkmark-color { background-image: url('../img/actions/checkmark-color.svg?v=1'); } @@ -159,19 +153,23 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-confirm { background-image: url('../img/actions/confirm.svg?v=2'); } + .icon-confirm-white { background-image: url('../img/actions/confirm-white.svg?v=2'); } -.icon-delete, -.icon-delete.no-permission:hover, -.icon-delete.no-permission:focus { +.icon-delete { background-image: url('../img/actions/delete.svg?v=1'); + &.no-permission { + &:hover, &:focus { + background-image: url('../img/actions/delete.svg?v=1'); + } + } + &:hover, &:focus { + background-image: url('../img/actions/delete-hover.svg?v=1'); + } } -.icon-delete:hover, -.icon-delete:focus { - background-image: url('../img/actions/delete-hover.svg?v=1'); -} + .icon-delete-white { background-image: url('../img/actions/delete-white.svg?v=1'); } @@ -183,6 +181,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-download { background-image: url('../img/actions/download.svg?v=1'); } + .icon-download-white { background-image: url('../img/actions/download-white.svg?v=1'); } @@ -194,9 +193,11 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-error { background-image: url('../img/actions/error.svg?v=1'); } + .icon-error-white { background-image: url('../img/actions/error-white.svg?v=1'); } + .icon-error-color { background-image: url('../img/actions/error-color.svg?v=1'); } @@ -208,6 +209,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-fullscreen { background-image: url('../img/actions/fullscreen.svg?v=1'); } + .icon-fullscreen-white { background-image: url('../img/actions/fullscreen-white.svg?v=2'); } @@ -219,6 +221,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-info { background-image: url('../img/actions/info.svg?v=1'); } + .icon-info-white { background-image: url('../img/actions/info-white.svg?v=1'); } @@ -238,6 +241,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-more { background-image: url('../img/actions/more.svg?v=1'); } + .icon-more-white { background-image: url('../img/actions/more-white.svg?v=1'); } @@ -249,6 +253,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-pause { background-image: url('../img/actions/pause.svg?v=1'); } + .icon-pause-big { background-image: url('../img/actions/pause-big.svg?v=1'); } @@ -256,15 +261,19 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-play { background-image: url('../img/actions/play.svg?v=1'); } + .icon-play-add { background-image: url('../img/actions/play-add.svg?v=1'); } + .icon-play-big { background-image: url('../img/actions/play-big.svg?v=1'); } + .icon-play-next { background-image: url('../img/actions/play-next.svg?v=1'); } + .icon-play-previous { background-image: url('../img/actions/play-previous.svg?v=1'); } @@ -280,6 +289,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-search { background-image: url('../img/actions/search.svg?v=1'); } + .icon-search-white { background-image: url('../img/actions/search-white.svg?v=1'); } @@ -291,6 +301,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-share { background-image: url('../img/actions/share.svg?v=1'); } + .icon-shared { background-image: url('../img/actions/shared.svg?v=1'); } @@ -298,26 +309,32 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-sound { background-image: url('../img/actions/sound.svg?v=1'); } + .icon-sound-off { background-image: url('../img/actions/sound-off.svg?v=1'); } -.icon-favorite { +.icon-favorite { background-image: url('../img/actions/star-dark.svg?v=1'); } -.icon-star, -.icon-starred:hover, -.icon-starred:focus { +.icon-star { background-image: url('../img/actions/star.svg?v=1'); } -.icon-starred, -.icon-star:hover, -.icon-star:focus { +.icon-starred { + &:hover, &:focus { + background-image: url('../img/actions/star.svg?v=1'); + } background-image: url('../img/actions/starred.svg?v=1'); } +.icon-star { + &:hover, &:focus { + background-image: url('../img/actions/starred.svg?v=1'); + } +} + .icon-tag { background-image: url('../img/actions/tag.svg?v=1'); } @@ -329,9 +346,11 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-triangle-e { background-image: url('../img/actions/triangle-e.svg?v=1'); } + .icon-triangle-n { background-image: url('../img/actions/triangle-n.svg?v=1'); } + .icon-triangle-s { background-image: url('../img/actions/triangle-s.svg?v=1'); } @@ -339,6 +358,7 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-upload { background-image: url('../img/actions/upload.svg?v=1'); } + .icon-upload-white { background-image: url('../img/actions/upload-white.svg?v=1'); } @@ -350,12 +370,15 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-video { background-image: url('../img/actions/video.svg?v=1'); } + .icon-video-white { background-image: url('../img/actions/video-white.svg?v=2'); } + .icon-video-off { background-image: url('../img/actions/video-off.svg?v=1'); } + .icon-video-off-white { background-image: url('../img/actions/video-off-white.svg?v=1'); } @@ -363,25 +386,27 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-view-close { background-image: url('../img/actions/view-close.svg?v=1'); } + .icon-view-download { background-image: url('../img/actions/view-download.svg?v=1'); } + .icon-view-next { background-image: url('../img/actions/view-next.svg?v=1'); } + .icon-view-pause { background-image: url('../img/actions/view-pause.svg?v=1'); } + .icon-view-play { background-image: url('../img/actions/view-play.svg?v=1'); } + .icon-view-previous { background-image: url('../img/actions/view-previous.svg?v=1'); } - - - /* places icons */ .icon-calendar-dark { @@ -395,20 +420,21 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- .icon-files { background-image: url('../img/places/files.svg?v=1'); } + .icon-files-dark { background-image: url('../img/places/files-dark.svg?v=1'); } -.icon-file, -.icon-filetype-text { + +.icon-file, .icon-filetype-text { background-image: url('../img/filetypes/text.svg?v=1'); } -.icon-folder, -.icon-filetype-folder { + +.icon-folder, .icon-filetype-folder { background-image: url('../img/filetypes/folder.svg?v=1'); } .icon-filetype-folder-drag-accept { - background-image: url('../img/filetypes/folder-drag-accept.svg?v=1')!important; + background-image: url('../img/filetypes/folder-drag-accept.svg?v=1') !important; } .icon-home { diff --git a/core/css/inputs.css b/core/css/inputs.css deleted file mode 100644 index 4ca6c823cc9..00000000000 --- a/core/css/inputs.css +++ /dev/null @@ -1,472 +0,0 @@ -/* INPUTS */ - -/* specifically override browser styles */ -input, textarea, select, button { - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; -} - -.select2-container-multi .select2-choices .select2-search-field input, -.select2-search input, -.ui-widget { - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif !important; -} - -input[type="text"], -input[type="password"], -input[type="search"], -input[type="number"], -input[type="email"], -input[type="tel"], -input[type="url"], -input[type="time"], -input[type="date"], -textarea, -select, -button, .button, -input[type="submit"], -input[type="button"], -#quota, -.pager li a { - width: 130px; - margin: 3px 3px 3px 0; - padding: 7px 6px 5px; - font-size: 13px; - background-color: #fff; - color: #333; - border: 1px solid #ddd; - outline: none; - border-radius: 3px; -} -input[type="hidden"] { - height: 0; - width: 0; -} -input[type="text"], -input[type="password"], -input[type="search"], -input[type="number"], -input[type="email"], -input[type="tel"], -input[type="url"], -input[type="time"], -textarea { - background: #fff; - color: #555; - cursor: text; - font-family: inherit; /* use default ownCloud font instead of default textarea monospace */ -} -input[type="text"], -input[type="password"], -input[type="search"], -input[type="number"], -input[type="email"], -input[type="tel"], -input[type="url"], -input[type="time"] { - -webkit-appearance:textfield; - -moz-appearance:textfield; - box-sizing:content-box; -} -input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active, -input[type="password"]:hover, input[type="password"]:focus, input[type="password"]:active, -input[type="number"]:hover, input[type="number"]:focus, input[type="number"]:active, -input[type="search"]:hover, input[type="search"]:focus, input[type="search"]:active, -input[type="email"]:hover, input[type="email"]:focus, input[type="email"]:active, -input[type="tel"]:hover, input[type="tel"]:focus, input[type="tel"]:active, -input[type="url"]:hover, input[type="url"]:focus, input[type="url"]:active, -input[type="time"]:hover, input[type="time"]:focus, input[type="time"]:active, -textarea:hover, textarea:focus, textarea:active { - color: #333; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} - -input[type="checkbox"].checkbox { - position: absolute; - left:-10000px; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; -} - -input[type="checkbox"].checkbox + label:before { - content: ""; - display: inline-block; - - height: 20px; - width: 20px; - vertical-align: middle; - - background: url('../img/actions/checkbox.svg') left top no-repeat; -} - -input[type="checkbox"].checkbox:disabled +label:before { opacity: .6; } - -input[type="checkbox"].checkbox.u-left +label:before { float: left; } -input[type="checkbox"].checkbox.u-hidden + label:before { display: none; } - -input[type="checkbox"].checkbox:checked + label:before { - background-image: url('../img/actions/checkbox-checked.svg'); -} - -input[type="checkbox"].checkbox:indeterminate + label:before { - background-image: url('../img/actions/checkbox-mixed.svg'); -} - -input[type="checkbox"].checkbox:disabled + label:before { - background-image: url('../img/actions/checkbox-disabled.svg'); -} - -input[type="checkbox"].checkbox:checked:disabled + label:before { - background-image: url('../img/actions/checkbox-checked-disabled.svg'); -} - -input[type="checkbox"].checkbox:indeterminate:disabled + label:before { - background-image: url('../img/actions/checkbox-mixed-disabled.svg'); -} - -input[type="checkbox"].checkbox--white + label:before { - background-image: url('../img/actions/checkbox-white.svg'); -} - -input[type="checkbox"].checkbox--white:checked + label:before { - background-image: url('../img/actions/checkbox-checked-white.svg'); -} - -input[type="checkbox"].checkbox--white:indeterminate + label:before { - background-image: url('../img/actions/checkbox-mixed-white.svg'); -} - -input[type="checkbox"].checkbox--white:disabled + label:before { - background-image: url('../img/actions/checkbox-disabled-white.svg'); -} - -input[type="checkbox"].checkbox--white:checked:disabled + label:before { - background-image: url('../img/actions/checkbox-checked-disabled.svg'); -} - -input[type="checkbox"].checkbox--white:indeterminate:disabled + label:before { - background-image: url('../img/actions/checkbox-mixed-disabled.svg'); -} - -input[type="checkbox"].checkbox:hover+label:before, input[type="checkbox"]:focus+label:before { - color:#111 !important; -} - -input[type="radio"].radio { - position: absolute; - left:-10000px; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; -} - -input[type="radio"].radio + label:before { - content: ""; - display: inline-block; - - height: 20px; - width: 20px; - vertical-align: middle; - - background: url('../img/actions/radio.svg') left top no-repeat; -} - -input[type="radio"].radio:checked + label:before { - background-image: url('../img/actions/radio-checked.svg'); -} - -input[type="radio"].radio:disabled + label:before { - background-image: url('../img/actions/radio-disabled.svg'); -} - -input[type="radio"].radio:checked:disabled + label:before { - background-image: url('../img/actions/radio-checked-disabled.svg'); -} - -input[type="radio"].radio--white + label:before { - background-image: url('../img/actions/radio-white.svg'); -} - -input[type="radio"].radio--white:checked + label:before { - background-image: url('../img/actions/radio-checked-white.svg'); -} - -input[type="radio"].radio--white:disabled + label:before { - background-image: url('../img/actions/radio-disabled.svg'); -} - -input[type="radio"].radio--white:checked:disabled + label:before { - background-image: url('../img/actions/radio-checked-disabled.svg'); -} - -input[type="time"] { - width: initial; - height: 31px; - box-sizing: border-box; -} - -select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background: url('../../core/img/actions/triangle-s.svg') no-repeat right 8px center rgba(240, 240, 240, 0.90); - outline: 0; - padding-right: 24px !important; -} - -select:hover { - background-color: #fefefe; -} - - -/* select2 adjustments */ -#select2-drop { - margin-top: -2px; -} -#select2-drop.select2-drop-active { - border-color: #ddd; -} -#select2-drop .avatar { - display: inline-block; - margin-right: 8px; - vertical-align: middle; -} -#select2-drop .avatar img, -.select2-chosen .avatar img, -#select2-drop .avatar, -.select2-chosen .avatar { - cursor: pointer; -} -#select2-drop .select2-search input { - width: calc(100% - 14px); - min-height: auto; - background: url('../img/actions/search.svg') no-repeat right center !important; - background-origin: content-box !important; -} -#select2-drop .select2-results { - max-height: 250px; - margin: 0; - padding: 0; -} -#select2-drop .select2-results .select2-result-label { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -#select2-drop .select2-results .select2-result-label span { - cursor: pointer; -} -#select2-drop .select2-results .select2-result, -#select2-drop .select2-results .select2-no-results, -#select2-drop .select2-results .select2-searching { - position: relative; - display: list-item; - padding: 12px; - background-color: #fff; - cursor: pointer; - color: #222; -} -#select2-drop .select2-results .select2-result.select2-selected { - background-color: #f8f8f8; -} -#select2-drop .select2-results .select2-result.select2-highlighted { - background-color: #f8f8f8; - color: #000; -} - -.select2-container-multi .select2-choices, -.select2-container-multi.select2-container-active .select2-choices, -.select2-container .select2-choice { - box-shadow: none; - white-space: nowrap; - text-overflow: ellipsis; - background: #fff; - color: #555; - box-sizing: content-box; - border-radius: 3px; - border: 1px solid #ddd; - margin: 0; - padding: 2px 0; - min-height: auto; -} -.select2-container-multi .select2-choices .select2-search-choice, -.select2-container-multi.select2-container-active .select2-choices .select2-search-choice, -.select2-container .select2-choice .select2-search-choice { - line-height: 20px; - padding-left: 5px; - background-image: none; - background-color: #f8f8f8; - border-color: #f8f8f8; -} -.select2-container-multi .select2-choices .select2-search-choice.select2-search-choice-focus, .select2-container-multi .select2-choices .select2-search-choice:hover, -.select2-container-multi.select2-container-active .select2-choices .select2-search-choice.select2-search-choice-focus, -.select2-container-multi.select2-container-active .select2-choices .select2-search-choice:hover, -.select2-container .select2-choice .select2-search-choice.select2-search-choice-focus, -.select2-container .select2-choice .select2-search-choice:hover { - background-color: #f0f0f0; - border-color: #f0f0f0; -} -.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close, -.select2-container-multi.select2-container-active .select2-choices .select2-search-choice .select2-search-choice-close, -.select2-container .select2-choice .select2-search-choice .select2-search-choice-close { - display: none; -} -.select2-container-multi .select2-choices .select2-search-field input, -.select2-container-multi.select2-container-active .select2-choices .select2-search-field input, -.select2-container .select2-choice .select2-search-field input { - line-height: 20px; -} - -.select2-container { - margin: 3px 3px 3px 0; -} -.select2-container.select2-container-multi .select2-choices { - display: flex; - flex-wrap: wrap; -} -.select2-container.select2-container-multi .select2-choices li { - float: none; -} -.select2-container .select2-choice { - padding-left: 38px; -} -.select2-container .select2-choice .select2-arrow { - background: none; - border-radius: 0; - border: none; -} -.select2-container .select2-choice .select2-arrow b { - background: url('../img/actions/triangle-s.svg') no-repeat center !important; - opacity: .5; -} -.select2-container .select2-choice:hover .select2-arrow b, -.select2-container .select2-choice:focus .select2-arrow b, -.select2-container .select2-choice:active .select2-arrow b { - opacity: .7; -} - - -/* jQuery UI fixes */ -.ui-menu { - padding: 0; -} -.ui-menu .ui-menu-item a.ui-state-focus, .ui-menu .ui-menu-item a.ui-state-active { - font-weight: inherit; - margin: 0; -} -.ui-widget-content { - background: #fff; - border-top: none; -} -.ui-corner-all { - border-radius: 0; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; -} -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { - border: none; - background: #f8f8f8; -} - - - -/* correctly align images inside of buttons */ -input img, button img, .button img { - vertical-align: text-bottom; -} - -input[type="submit"].enabled { - background-color: #66f866; - border: 1px solid #5e5; -} - -.input-button-inline { - position: absolute !important; - right: 0; - background-color: transparent !important; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; - opacity: .3; -} - - -/* BUTTONS */ -input[type="submit"], input[type="button"], -button, .button, -#quota, select, .pager li a { - width: auto; - min-width: 25px; - padding: 5px; - background-color: rgba(240,240,240,.9); - font-weight: 600; - color: #555; - border: 1px solid rgba(240,240,240,.9); - cursor: pointer; -} -select, .button.multiselect { - font-weight: 400; -} -input[type="submit"]:hover, input[type="submit"]:focus, -input[type="button"]:hover, input[type="button"]:focus, -button:hover, button:focus, -.button:hover, .button:focus, -.button a:focus, -select:hover, select:focus, select:active { - background-color: rgba(255, 255, 255, .95); - color: #111; -} -input[type="submit"] img, input[type="button"] img, button img, .button img { cursor:pointer; } -#header .button { - border: none; - box-shadow: none; -} - -/* disabled input fields and buttons */ -input:disabled, input:disabled:hover, input:disabled:focus, -button:disabled, button:disabled:hover, button:disabled:focus, -.button:disabled, .button:disabled:hover, .button:disabled:focus, -a.disabled, a.disabled:hover, a.disabled:focus, -textarea:disabled { - background-color: rgba(230,230,230,.9); - color: #999; - cursor: default; -} -input:disabled+label, input:disabled:hover+label, input:disabled:focus+label { - color: #999 !important; - cursor: default; -} - -/* Primary action button, use sparingly */ -.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary { - border: 1px solid #0082c9; - background-color: #00a2e9; - color: #fff; -} -.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 { - background-color: #0092d9; - color: #fff; -} -.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active, -.primary:disabled, input[type="submit"].primary:disabled, input[type="button"].primary:disabled, button.primary:disabled, .button.primary:disabled, -.primary:disabled:hover, input[type="submit"].primary:disabled:hover, input[type="button"].primary:disabled:hover, button.primary:disabled:hover, .button.primary:disabled:hover, -.primary:disabled:focus, input[type="submit"].primary:disabled:focus, input[type="button"].primary:disabled:focus, button.primary:disabled:focus, .button.primary:disabled:focus { - background-color: #00a2e9; - color: #bbb; -} - -@keyframes shake { - 0% { transform: translate(-5px, 0); } - 20% { transform: translate(5px, 0); } - 40% { transform: translate(-5px, 0); } - 60% { transform: translate(5px, 0); } - 80% { transform: translate(-5px, 0); } - 100% { transform: translate(5px, 0); } -} -.shake { - animation-name: shake; - animation-duration: .3s; - animation-timing-function: ease-out; -} diff --git a/core/css/inputs.scss b/core/css/inputs.scss new file mode 100644 index 00000000000..aa9c841f2b2 --- /dev/null +++ b/core/css/inputs.scss @@ -0,0 +1,782 @@ +/* INPUTS */ + +/* specifically override browser styles */ + +input, textarea, select, button { + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; +} + +.select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget { + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif !important; +} + +input { + &[type='text'], &[type='password'], &[type='search'], &[type='number'], &[type='email'], &[type='tel'], &[type='url'], &[type='time'], &[type='date'] { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; + } +} + +textarea, select, button, .button { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; +} + +input { + &[type='submit'], &[type='button'] { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; + } +} + +#quota, .pager li a { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; +} + +input { + &[type='hidden'] { + height: 0; + width: 0; + } + &[type='text'], &[type='password'], &[type='search'], &[type='number'], &[type='email'], &[type='tel'], &[type='url'], &[type='time'] { + background: #fff; + color: #555; + cursor: text; + font-family: inherit; + /* use default ownCloud font instead of default textarea monospace */ + } +} + +textarea { + background: #fff; + color: #555; + cursor: text; + font-family: inherit; + /* use default ownCloud font instead of default textarea monospace */ +} + +input { + &[type='text'], &[type='password'], &[type='search'], &[type='number'], &[type='email'], &[type='tel'], &[type='url'], &[type='time'] { + -webkit-appearance: textfield; + -moz-appearance: textfield; + box-sizing: content-box; + } + &[type='text'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='password'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='number'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='search'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='email'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='tel'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='url'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + &[type='time'] { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } +} + +textarea { + &:hover, &:focus, &:active { + color: #333; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +input { + &[type='checkbox'] { + &.checkbox { + position: absolute; + left: -10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; + + label:before { + content: ''; + display: inline-block; + height: 20px; + width: 20px; + vertical-align: middle; + background: url('../img/actions/checkbox.svg') left top no-repeat; + } + &:disabled + label:before { + opacity: .6; + } + &.u-left + label:before { + float: left; + } + &.u-hidden + label:before { + display: none; + } + &:checked + label:before { + background-image: url('../img/actions/checkbox-checked.svg'); + } + &:indeterminate + label:before { + background-image: url('../img/actions/checkbox-mixed.svg'); + } + &:disabled + label:before { + background-image: url('../img/actions/checkbox-disabled.svg'); + } + &:checked:disabled + label:before { + background-image: url('../img/actions/checkbox-checked-disabled.svg'); + } + &:indeterminate:disabled + label:before { + background-image: url('../img/actions/checkbox-mixed-disabled.svg'); + } + } + &.checkbox--white { + + label:before { + background-image: url('../img/actions/checkbox-white.svg'); + } + &:checked + label:before { + background-image: url('../img/actions/checkbox-checked-white.svg'); + } + &:indeterminate + label:before { + background-image: url('../img/actions/checkbox-mixed-white.svg'); + } + &:disabled + label:before { + background-image: url('../img/actions/checkbox-disabled-white.svg'); + } + &:checked:disabled + label:before { + background-image: url('../img/actions/checkbox-checked-disabled.svg'); + } + &:indeterminate:disabled + label:before { + background-image: url('../img/actions/checkbox-mixed-disabled.svg'); + } + } + &.checkbox:hover + label:before, &:focus + label:before { + color: #111 !important; + } + } + &[type='radio'] { + &.radio { + position: absolute; + left: -10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; + + label:before { + content: ''; + display: inline-block; + height: 20px; + width: 20px; + vertical-align: middle; + background: url('../img/actions/radio.svg') left top no-repeat; + } + &:checked + label:before { + background-image: url('../img/actions/radio-checked.svg'); + } + &:disabled + label:before { + background-image: url('../img/actions/radio-disabled.svg'); + } + &:checked:disabled + label:before { + background-image: url('../img/actions/radio-checked-disabled.svg'); + } + } + &.radio--white { + + label:before { + background-image: url('../img/actions/radio-white.svg'); + } + &:checked + label:before { + background-image: url('../img/actions/radio-checked-white.svg'); + } + &:disabled + label:before { + background-image: url('../img/actions/radio-disabled.svg'); + } + &:checked:disabled + label:before { + background-image: url('../img/actions/radio-checked-disabled.svg'); + } + } + } + &[type='time'] { + width: initial; + height: 31px; + box-sizing: border-box; + } +} + +select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: url('../../core/img/actions/triangle-s.svg') no-repeat right 8px center rgba(240, 240, 240, 0.9); + outline: 0; + padding-right: 24px !important; + &:hover { + background-color: #fefefe; + } +} + +/* select2 adjustments */ + +#select2-drop { + margin-top: -2px; + &.select2-drop-active { + border-color: #ddd; + } + .avatar { + display: inline-block; + margin-right: 8px; + vertical-align: middle; + img { + cursor: pointer; + } + } +} + +.select2-chosen .avatar img, #select2-drop .avatar, .select2-chosen .avatar { + cursor: pointer; +} + +#select2-drop { + .select2-search input { + width: calc(100% - 14px); + min-height: auto; + background: url('../img/actions/search.svg') no-repeat right center !important; + background-origin: content-box !important; + } + .select2-results { + max-height: 250px; + margin: 0; + padding: 0; + .select2-result-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + span { + cursor: pointer; + } + } + .select2-result, .select2-no-results, .select2-searching { + position: relative; + display: list-item; + padding: 12px; + background-color: #fff; + cursor: pointer; + color: #222; + } + .select2-result { + &.select2-selected { + background-color: #f8f8f8; + } + &.select2-highlighted { + background-color: #f8f8f8; + color: #000; + } + } + } +} + +.select2-container-multi { + .select2-choices, &.select2-container-active .select2-choices { + box-shadow: none; + white-space: nowrap; + text-overflow: ellipsis; + background: #fff; + color: #555; + box-sizing: content-box; + border-radius: 3px; + border: 1px solid #ddd; + margin: 0; + padding: 2px 0; + min-height: auto; + } +} + +.select2-container .select2-choice { + box-shadow: none; + white-space: nowrap; + text-overflow: ellipsis; + background: #fff; + color: #555; + box-sizing: content-box; + border-radius: 3px; + border: 1px solid #ddd; + margin: 0; + padding: 2px 0; + min-height: auto; +} + +.select2-container-multi { + .select2-choices .select2-search-choice, &.select2-container-active .select2-choices .select2-search-choice { + line-height: 20px; + padding-left: 5px; + background-image: none; + background-color: #f8f8f8; + border-color: #f8f8f8; + } +} + +.select2-container .select2-choice .select2-search-choice { + line-height: 20px; + padding-left: 5px; + background-image: none; + background-color: #f8f8f8; + border-color: #f8f8f8; +} + +.select2-container-multi { + .select2-choices .select2-search-choice { + &.select2-search-choice-focus, &:hover { + background-color: #f0f0f0; + border-color: #f0f0f0; + } + } + &.select2-container-active .select2-choices .select2-search-choice { + &.select2-search-choice-focus, &:hover { + background-color: #f0f0f0; + border-color: #f0f0f0; + } + } +} + +.select2-container .select2-choice .select2-search-choice { + &.select2-search-choice-focus, &:hover { + background-color: #f0f0f0; + border-color: #f0f0f0; + } +} + +.select2-container-multi { + .select2-choices .select2-search-choice .select2-search-choice-close, &.select2-container-active .select2-choices .select2-search-choice .select2-search-choice-close { + display: none; + } +} + +.select2-container .select2-choice .select2-search-choice .select2-search-choice-close { + display: none; +} + +.select2-container-multi { + .select2-choices .select2-search-field input, &.select2-container-active .select2-choices .select2-search-field input { + line-height: 20px; + } +} + +.select2-container { + .select2-choice .select2-search-field input { + line-height: 20px; + } + margin: 3px 3px 3px 0; + &.select2-container-multi .select2-choices { + display: flex; + flex-wrap: wrap; + li { + float: none; + } + } + .select2-choice { + padding-left: 38px; + .select2-arrow { + background: none; + border-radius: 0; + border: none; + b { + background: url('../img/actions/triangle-s.svg') no-repeat center !important; + opacity: .5; + } + } + &:hover .select2-arrow b, &:focus .select2-arrow b, &:active .select2-arrow b { + opacity: .7; + } + } +} + +/* jQuery UI fixes */ + +.ui-menu { + padding: 0; + .ui-menu-item a { + &.ui-state-focus, &.ui-state-active { + font-weight: inherit; + margin: 0; + } + } +} + +.ui-widget-content { + background: #fff; + border-top: none; +} + +.ui-corner-all { + border-radius: 0; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} + +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { + border: none; + background: #f8f8f8; +} + +/* correctly align images inside of buttons */ + +input img, button img, .button img { + vertical-align: text-bottom; +} + +input[type='submit'].enabled { + background-color: #66f866; + border: 1px solid #5e5; +} + +.input-button-inline { + position: absolute !important; + right: 0; + background-color: transparent !important; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; + opacity: .3; +} + +/* BUTTONS */ + +input { + &[type='submit'], &[type='button'] { + width: auto; + min-width: 25px; + padding: 5px; + background-color: rgba(240, 240, 240, 0.9); + font-weight: 600; + color: #555; + border: 1px solid rgba(240, 240, 240, 0.9); + cursor: pointer; + } +} + +button, .button, #quota, select, .pager li a { + width: auto; + min-width: 25px; + padding: 5px; + background-color: rgba(240, 240, 240, 0.9); + font-weight: 600; + color: #555; + border: 1px solid rgba(240, 240, 240, 0.9); + cursor: pointer; +} + +select, .button.multiselect { + font-weight: 400; +} + +input { + &[type='submit'] { + &:hover, &:focus { + background-color: rgba(255, 255, 255, 0.95); + color: #111; + } + } + &[type='button'] { + &:hover, &:focus { + background-color: rgba(255, 255, 255, 0.95); + color: #111; + } + } +} + +button { + &:hover, &:focus { + background-color: rgba(255, 255, 255, 0.95); + color: #111; + } +} + +.button { + &:hover, &:focus, a:focus { + background-color: rgba(255, 255, 255, 0.95); + color: #111; + } +} + +select { + &:hover, &:focus, &:active { + background-color: rgba(255, 255, 255, 0.95); + color: #111; + } +} + +input { + &[type='submit'] img, &[type='button'] img { + cursor: pointer; + } +} + +button img, .button img { + cursor: pointer; +} + +#header .button { + border: none; + box-shadow: none; +} + +/* disabled input fields and buttons */ + +input:disabled { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + &:hover, &:focus { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + } +} + +button:disabled { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + &:hover, &:focus { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + } +} + +.button:disabled { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + &:hover, &:focus { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + } +} + +a.disabled { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + &:hover, &:focus { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; + } +} + +textarea:disabled { + background-color: rgba(230, 230, 230, 0.9); + color: #999; + cursor: default; +} + +input:disabled { + + label, &:hover + label, &:focus + label { + color: #999 !important; + cursor: default; + } +} + +/* Primary action button, use sparingly */ + +.primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; +} + +input { + &[type='submit'].primary, &[type='button'].primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; + } +} + +button.primary, .button.primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; +} + +.primary:hover { + background-color: #0092d9; + color: #fff; +} + +input { + &[type='submit'].primary:hover, &[type='button'].primary:hover { + background-color: #0092d9; + color: #fff; + } +} + +button.primary:hover, .button.primary:hover, .primary:focus { + background-color: #0092d9; + color: #fff; +} + +input { + &[type='submit'].primary:focus, &[type='button'].primary:focus { + background-color: #0092d9; + color: #fff; + } +} + +button.primary:focus, .button.primary:focus { + background-color: #0092d9; + color: #fff; +} + +.primary:active { + background-color: #00a2e9; + color: #bbb; +} + +input { + &[type='submit'].primary:active, &[type='button'].primary:active { + background-color: #00a2e9; + color: #bbb; + } +} + +button.primary:active, .button.primary:active, .primary:disabled { + background-color: #00a2e9; + color: #bbb; +} + +input { + &[type='submit'].primary:disabled, &[type='button'].primary:disabled { + background-color: #00a2e9; + color: #bbb; + } +} + +button.primary:disabled, .button.primary:disabled, .primary:disabled:hover { + background-color: #00a2e9; + color: #bbb; +} + +input { + &[type='submit'].primary:disabled:hover, &[type='button'].primary:disabled:hover { + background-color: #00a2e9; + color: #bbb; + } +} + +button.primary:disabled:hover, .button.primary:disabled:hover, .primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; +} + +input { + &[type='submit'].primary:disabled:focus, &[type='button'].primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; + } +} + +button.primary:disabled:focus, .button.primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; +} + +@keyframes shake { + 0% { + transform: translate(-5px, 0); + } + + 20% { + transform: translate(5px, 0); + } + + 40% { + transform: translate(-5px, 0); + } + + 60% { + transform: translate(5px, 0); + } + + 80% { + transform: translate(-5px, 0); + } + + 100% { + transform: translate(5px, 0); + } +} + + +.shake { + animation-name: shake; + animation-duration: .3s; + animation-timing-function: ease-out; +} diff --git a/core/css/installation.css b/core/css/installation.css new file mode 100644 index 00000000000..69c98f1ea22 --- /dev/null +++ b/core/css/installation.css @@ -0,0 +1,802 @@ +/* +* Installation css file. +* This file is used on the install page only when the database +* isn't set, preventing scss files to be stored using the AppdataController. +* It should contain every style needed to correctly display the installation template. +* +*/ + +/* Reset */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; + cursor: default; +} + +html, body { + height: 100%; +} + +article, aside, dialog, figure, footer, header, hgroup, nav, section { + display: block; +} + +body { + line-height: 1.5; +} + +table { + border-collapse: separate; + border-spacing: 0; + white-space: nowrap; +} + +caption, th, td { + text-align: left; + font-weight: normal; +} + +table, td, th { + vertical-align: middle; +} + +a { + border: 0; + color: #000; + text-decoration: none; + cursor: pointer; +} +a * { + cursor: pointer; +} + +input { + cursor: pointer; +} +input * { + cursor: pointer; +} + +select, .button span, label { + cursor: pointer; +} + +ul { + list-style: none; +} + +body { + background-color: #ffffff; + font-weight: 400; + font-size: .8em; + line-height: 1.6em; + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + color: #000; + height: auto; +} + +/* Global */ +#body-login { + text-align: center; + background-color: #0082c9; + background-image: url("../img/background.jpg?v=1"); + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; + /* fix background gradient */ + height: 100%; + /* fix sticky footer */ +} + + +/* heading styles */ +h2 { + font-size: 20px; + font-weight: 300; + margin-bottom: 12px; + line-height: 140%; +} +h3 { + font-size: 15px; + font-weight: 300; + margin: 12px 0; +} + + +/* do not use italic typeface style, instead lighter color */ +em { + font-style: normal; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; +} + +#header { + padding-top: 100px; +} + +p.info, form fieldset legend, #datadirContent label { + text-align: center; + color: #fff; +} + +form fieldset .warning-info, form input[type='checkbox'] + label { + text-align: center; + color: #fff; +} +form .warning input[type='checkbox']:hover + label, form .warning input[type='checkbox']:focus + label, form .warning input[type='checkbox'] + label { + color: #fff !important; +} + +.infogroup { + margin-bottom: 15px; +} + +p#message img { + vertical-align: middle; + padding: 5px; +} + +div.buttons { + text-align: center; +} + +p.info { + width: 22em; + margin: 0 auto; + padding-top: 20px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +p.info a { + font-weight: 600; + padding: 13px; + margin: -13px; + color: #fff; +} + +#body-login .warning, #body-login .update, #body-login .error { + display: block; + padding: 10px; + background-color: rgba(0, 0, 0, 0.3); + color: #fff; + text-align: left; + border-radius: 3px; + cursor: default; +} + +#body-login .warning { + margin: 0 7px 5px 4px; +} + +form { + position: relative; + width: 280px; + margin: 16px auto; + padding: 0; +} +form fieldset { + margin-bottom: 20px; + text-align: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +form #sqliteInformation { + margin-top: -20px; + margin-bottom: 20px; +} +form #adminaccount { + margin-bottom: 15px; +} +form fieldset legend { + width: 100%; +} +form fieldset.warning legend, form fieldset.update legend { + top: 18px; + position: relative; +} +form fieldset.warning legend + p, form fieldset.update legend + p { + margin-top: 12px; +} +form input[type='checkbox'] + label { + position: relative; + margin: 0; + padding: 14px; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +form .errors { + background: #fed7d7; + border: 1px solid #f00; + list-style-indent: inside; + margin: 0 0 2em; + padding: 1em; +} +form .success { + background: #d7fed7; + border: 1px solid #0f0; + width: 35%; + margin: 30px auto; + padding: 1em; + text-align: center; +} +form #showAdvanced > img { + padding: 4px; + box-sizing: border-box; +} +form p.info a, form #showAdvanced { + color: #fff; +} +form #remember_login:hover + label, form #remember_login:focus + label { + opacity: .6; +} +form #forgot-password:hover, form #forgot-password:focus { + opacity: .6; +} +form p.info a:hover, form p.info a:focus { + opacity: .6; +} +form footer .info { + white-space: nowrap; +} + +#datadirContent label { + display: block; + width: 100%; + margin: 0; +} + +form #datadirField legend { + margin-bottom: 15px; +} + +#showAdvanced { + padding: 13px; + /* increase clickable area of Advanced dropdown */ +} +#showAdvanced img { + vertical-align: bottom; + /* adjust position of Advanced dropdown arrow */ + margin-left: -4px; +} + +.icon-info-white { + padding: 10px; +} + +.float-spinner { + height: 32px; + display: none; +} + +.strengthify-wrapper { + display: inline-block; + position: relative; + left: 15px; + top: -23px; + width: 250px; +} + +.tipsy-inner { + font-weight: bold; + color: #ccc; +} + + +/* LOGO */ +#header .logo { + background-image: url(../img/logo-icon.svg?v=1); + background-repeat: no-repeat; + background-size: 175px; + background-position: center; + width: 252px; + height: 120px; + margin: 0 auto; +} + +/* Show password toggle */ +#show, #dbpassword { + position: absolute; + right: 1em; + top: .8em; + float: right; +} + +#show, #dbpassword, #personal-show { + display: none; +} + +#show + label, #dbpassword + label { + right: 21px; + top: 15px !important; + margin: -14px !important; + padding: 14px !important; +} + +#show:checked + label, #dbpassword:checked + label, #personal-show:checked + label { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; + opacity: .8; +} + +#show + label, #dbpassword + label, #personal-show + label { + position: absolute !important; + height: 20px; + width: 24px; + background-image: url("../img/actions/toggle.svg?v=1"); + background-repeat: no-repeat; + background-position: center; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; + opacity: .3; +} + +#show + label:before, #dbpassword + label:before, #personal-show + label:before { + display: none; +} + +#pass2, input[name='personal-password-clone'] { + padding: .6em 2.5em .4em .4em; + width: 8em; +} + +#personal-show + label { + height: 14px; + margin-top: -25px; + left: 295px; + display: block; +} + +#passwordbutton { + margin-left: .5em; +} + +/* LOADER */ +#body-login .float-spinner { + margin-top: -32px; + padding-top: 32px; +} + +[class^='icon-'], [class*=' icon-'] { + background-repeat: no-repeat; + background-position: center; + min-width: 16px; + min-height: 16px; +} + +.loading, .loading-small, .icon-loading, .icon-loading-dark, .icon-loading-small, .icon-loading-small-dark { + position: relative; +} + +.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after { + z-index: 2; + content: ''; + height: 32px; + width: 32px; + margin: -17px 0 0 -17px; + position: absolute; + top: 50%; + left: 50%; + border-radius: 100%; + -webkit-animation: rotate .8s infinite linear; + animation: rotate .8s infinite linear; + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; +} + +.loading:after, .loading-small:after, .icon-loading:after, .icon-loading-dark:after, .icon-loading-small:after, .icon-loading-small-dark:after { + border: 2px solid rgba(150, 150, 150, 0.5); + border-top-color: #646464; +} + +.icon-loading-dark:after, .icon-loading-small-dark:after { + border: 2px solid rgba(187, 187, 187, 0.5); + border-top-color: #bbb; +} + +.icon-loading-small:after, .icon-loading-small-dark:after { + height: 16px; + width: 16px; + margin: -9px 0 0 -9px; +} + +.icon-info-white { + background-image: url(../img/actions/info-white.svg?v=1); +} + +@-webkit-keyframes rotate { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes rotate { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + line-break: auto; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + white-space: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + font-size: 12px; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.9; + filter: alpha(opacity=90); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} + +.tooltip-inner { + max-width: 350px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + background-color: #000000; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.top-left .tooltip-arrow { + bottom: 0; + right: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} + +/* SCROLLING */ +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-track-piece { + background-color: transparent; +} + +::-webkit-scrollbar-thumb { + background: #ddd; + border-radius: 3px; +} +.error-wide { + width: 700px; + margin-left: -200px !important; +} + +/* Config write issue */ +#body-login .v-align { + width: inherit; +} +#body-login .wrapper { + min-height: 100%; + margin: 0 auto -70px; + width: 300px; +} +.warning legend, .warning a, .error a { + color: #fff !important; + font-weight: 600 !important; +} +#body-login ul.error-wide { + margin-top: 35px; +} + +/* Update info */ +#body-login .update { + width: inherit; + text-align: center; +} +#body-login .update h2 { + margin: 0 0 20px; +} + +#body-login .update a { + color: #fff; + border-bottom: 1px solid #aaa; +} + +/* INPUTS */ +input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="tel"], input[type="url"], input[type="time"], input[type="date"], textarea, select, button, .button, input[type="submit"], input[type="button"], #quota, .pager li a { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; +} +#body-login input { + font-size: 20px; + margin: 5px; + padding: 11px 10px 9px; +} +input[type="submit"], input[type="button"], button, .button { + width: auto; + min-width: 25px; + padding: 5px; + background-color: rgba(240, 240, 240, 0.9); + font-weight: 600; + color: #555; + border: 1px solid rgba(240, 240, 240, 0.9); + cursor: pointer; +} + +input { + font-size: 20px; + margin: 5px; + padding: 11px 10px 9px; +} +input[type='text'], input[type='password'], input[type='email'] { + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + border: none; + font-weight: 300; + font-size: 20px; + margin: 5px; + padding: 11px 10px 9px; + -webkit-appearance: textfield; + -moz-appearance: textfield; + box-sizing: content-box; + background: #fff; + color: #555; + cursor: text; + font-family: inherit; + outline: none; + border-radius: 3px; + width: 249px; +} +input.login { + width: 269px; + background-position: right 16px center; +} +input[type='submit'] { + padding: 10px 20px; + /* larger log in and installation buttons */ +} + +/* Nicely grouping input field sets */ +.grouptop, .groupmiddle, .groupbottom { + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.grouptop input { + margin-bottom: 0 !important; + border-bottom: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +.groupmiddle input { + margin-top: 0 !important; + margin-bottom: 0 !important; + border-top: 0 !important; + border-bottom: 0 !important; + border-radius: 0 !important; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset !important; +} + +.groupbottom input { + margin-top: 0 !important; + border-top: 0 !important; + border-top-right-radius: 0 !important; + border-top-left-radius: 0 !important; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset !important; +} + +.groupbottom input[type=submit] { + box-shadow: none !important; +} + +label.infield { + display: none; +} + +/* Primary action button, use sparingly */ +.primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; +} + +input[type='submit'].primary, input[type='button'].primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; +} + +button.primary, .button.primary { + border: 1px solid #0082c9; + background-color: #00a2e9; + color: #fff; +} + +.primary:hover { + background-color: #0092d9; + color: #fff; +} + +input[type='submit'].primary:hover, input[type='button'].primary:hover { + background-color: #0092d9; + color: #fff; +} + +button.primary:hover, .button.primary:hover, .primary:focus { + background-color: #0092d9; + color: #fff; +} + +input[type='submit'].primary:focus, input[type='button'].primary:focus { + background-color: #0092d9; + color: #fff; +} + +button.primary:focus, .button.primary:focus { + background-color: #0092d9; + color: #fff; +} + +.primary:active { + background-color: #00a2e9; + color: #bbb; +} + +input[type='submit'].primary:active, input[type='button'].primary:active { + background-color: #00a2e9; + color: #bbb; +} + +button.primary:active, .button.primary:active, .primary:disabled { + background-color: #00a2e9; + color: #bbb; +} + +input[type='submit'].primary:disabled, input[type='button'].primary:disabled { + background-color: #00a2e9; + color: #bbb; +} + +button.primary:disabled, .button.primary:disabled, .primary:disabled:hover { + background-color: #00a2e9; + color: #bbb; +} + +input[type='submit'].primary:disabled:hover, input[type='button'].primary:disabled:hover { + background-color: #00a2e9; + color: #bbb; +} + +button.primary:disabled:hover, .button.primary:disabled:hover, .primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; +} + +input[type='submit'].primary:disabled:focus, input[type='button'].primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; +} + +button.primary:disabled:focus, .button.primary:disabled:focus { + background-color: #00a2e9; + color: #bbb; +} +input, textarea, select, button { + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; +} diff --git a/core/css/jquery-ui-fixes.css b/core/css/jquery-ui-fixes.scss index e8cf2b769b8..4cf4f4cdd4a 100644 --- a/core/css/jquery-ui-fixes.css +++ b/core/css/jquery-ui-fixes.scss @@ -1,134 +1,124 @@ /* Component containers ----------------------------------*/ + .ui-widget { - font-family: "Lucida Grande", Arial, Verdana, sans-serif; + font-family: 'Lucida Grande', Arial, Verdana, sans-serif; font-size: 1em; + button { + font-family: 'Lucida Grande', Arial, Verdana, sans-serif; + } } -.ui-widget button { - font-family: "Lucida Grande", Arial, Verdana, sans-serif; -} + .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url('images/ui-bg_highlight-soft_100_eeeeee_1x100.png') 50% top repeat-x; color: #333333; + a { + color: #333333; + } } -.ui-widget-content a { - color: #333333; -} + .ui-widget-header { border: 1px solid #0082c9; background: #0082c9; color: #ffffff; -} -.ui-widget-header a { - color: #ffffff; + a { + color: #ffffff; + } } /* Interaction states ----------------------------------*/ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { + +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #ddd; background: #f8f8f8 url('images/ui-bg_glass_100_f8f8f8_1x400.png') 50% 50% repeat-x; font-weight: bold; color: #555; } -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited { + +.ui-state-default a { color: #555; + &:link, &:visited { + color: #555; + } } -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { + +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #ddd; background: #ffffff url('images/ui-bg_flat_100_ffffff_40x100.png') 50% 50% repeat-x; font-weight: bold; color: #333; } -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited { + +.ui-state-hover a { color: #333; + &:hover, &:link, &:visited { + color: #333; + } } -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active { + +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #0082c9; background: #f8f8f8 url('images/ui-bg_glass_100_f8f8f8_1x400.png') 50% 50% repeat-x; font-weight: bold; color: #0082c9; } -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { + +.ui-state-active a { color: #0082c9; + &:link, &:visited { + color: #0082c9; + } } /* Interaction Cues ----------------------------------*/ -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { + +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #ddd; background: #f8f8f8 url('images/ui-bg_highlight-hard_100_f8f8f8_1x100.png') 50% top repeat-x; color: #555; } -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a { + +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: #555; } -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { + +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #cd0a0a; background: #b81900 url('images/ui-bg_diagonals-thick_18_b81900_40x40.png') 50% 50% repeat; color: #ffffff; } -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a { - color: #ffffff; -} -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { + +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a, .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } /* Icons ----------------------------------*/ -.ui-state-default .ui-icon { - background-image: url('images/ui-icons_1d2d44_256x240.png'); -} -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon { - background-image: url('images/ui-icons_1d2d44_256x240.png'); -} -.ui-state-active .ui-icon { + +.ui-state-default .ui-icon, .ui-state-hover .ui-icon, .ui-state-focus .ui-icon, .ui-state-active .ui-icon { background-image: url('images/ui-icons_1d2d44_256x240.png'); } + .ui-state-highlight .ui-icon { background-image: url('images/ui-icons_ffffff_256x240.png'); } -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { + +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background-image: url('images/ui-icons_ffd27a_256x240.png'); } /* Misc visuals ----------------------------------*/ /* Overlays */ + .ui-widget-overlay { background: #666666 url('images/ui-bg_diagonals-thick_20_666666_40x40.png') 50% 50% repeat; opacity: .5; } + .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; diff --git a/core/css/multiselect.css b/core/css/multiselect.css deleted file mode 100644 index 8bcbd0e563d..00000000000 --- a/core/css/multiselect.css +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2011, Jan-Christoph Borchardt, http: //jancborchardt.net -This file is licensed under the Affero General Public License version 3 or later. -See the COPYING-README file. */ - -ul.multiselectoptions { - background-color: #fff; - border: 1px solid #ddd; - border-top: none; - box-shadow: 0 1px 1px #ddd; - padding-top: 8px; - position: absolute; - max-height: 20em; - overflow-y: auto; - z-index: 49; -} - -ul.multiselectoptions.down { - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - width: 100%; /* do not cut off group names */ - -webkit-box-shadow: 0px 0px 20px rgba(29,45,68,.4); - -moz-box-shadow: 0px 0px 20px rgba(29,45,68,.4); - box-shadow: 0px 0px 20px rgba(29,45,68,.4); -} - -ul.multiselectoptions.up { - border-top-left-radius: 8px; - border-top-right-radius: 8px; -} - -ul.multiselectoptions>li { - overflow: hidden; - white-space: nowrap; - margin-left: 7px; -} -ul.multiselectoptions > li input[type='checkbox']+label { - font-weight: normal; - display: inline-block; - width: 100%; - padding: 5px 27px; - margin-left: -27px; /* to have area around checkbox clickable as well */ - text-overflow: ellipsis; - overflow: hidden; -} -ul.multiselectoptions > li input[type='checkbox']:checked+label { - font-weight: bold; -} - -div.multiselect, select.multiselect { - display: inline-block; - max-width: 200px; - min-width: 150px !important; - padding-right: 10px; - min-height: 20px; - position: relative; - vertical-align: bottom; -} - -/* To make a select look like a multiselect until it's initialized */ -select.multiselect { - height: 30px; - min-width: 113px; -} - -div.multiselect.active { - background-color: #fff; - position: relative; - z-index: 50; -} - -div.multiselect.up { - border-top: 0 none; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -div.multiselect.down { - border-bottom: none; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} - -div.multiselect>span:first-child { - float: left; - margin-right: 32px; - overflow: hidden; - text-overflow: ellipsis; - width: 90%; - white-space: nowrap; -} - -div.multiselect>span:last-child { - position: absolute; - right: 8px; - top: 8px; -} - -ul.multiselectoptions input.new { - padding-bottom: 3px; - padding-top: 3px; - margin: 0; -} - -ul.multiselectoptions > li.creator { - padding: 10px; - margin: 0; - font-weight: bold; -} -ul.multiselectoptions > li.creator > input { - width: 95% !important; /* do not constrain size of text input */ - padding: 5px; - margin: -5px; -} diff --git a/core/css/multiselect.scss b/core/css/multiselect.scss new file mode 100644 index 00000000000..ea7a481f360 --- /dev/null +++ b/core/css/multiselect.scss @@ -0,0 +1,124 @@ +/* Copyright (c) 2011, Jan-Christoph Borchardt, http: //jancborchardt.net +This file is licensed under the Affero General Public License version 3 or later. +See the COPYING-README file. */ + +ul.multiselectoptions { + background-color: #fff; + border: 1px solid #ddd; + border-top: none; + box-shadow: 0 1px 1px #ddd; + padding-top: 8px; + position: absolute; + max-height: 20em; + overflow-y: auto; + z-index: 49; + &.down { + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + width: 100%; + /* do not cut off group names */ + -webkit-box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4); + -moz-box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4); + box-shadow: 0px 0px 20px rgba(29, 45, 68, 0.4); + } + &.up { + border-top-left-radius: 8px; + border-top-right-radius: 8px; + } + > li { + overflow: hidden; + white-space: nowrap; + margin-left: 7px; + input[type='checkbox'] { + + label { + font-weight: normal; + display: inline-block; + width: 100%; + padding: 5px 27px; + margin-left: -27px; + /* to have area around checkbox clickable as well */ + text-overflow: ellipsis; + overflow: hidden; + } + &:checked + label { + font-weight: bold; + } + } + } +} + +div.multiselect { + display: inline-block; + max-width: 200px; + min-width: 150px !important; + padding-right: 10px; + min-height: 20px; + position: relative; + vertical-align: bottom; +} + +select.multiselect { + display: inline-block; + max-width: 200px; + min-width: 150px !important; + padding-right: 10px; + min-height: 20px; + position: relative; + vertical-align: bottom; + height: 30px; + min-width: 113px; +} + +/* To make a select look like a multiselect until it's initialized */ + +div.multiselect { + &.active { + background-color: #fff; + position: relative; + z-index: 50; + } + &.up { + border-top: 0 none; + border-top-left-radius: 0; + border-top-right-radius: 0; + } + &.down { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + > span { + &:first-child { + float: left; + margin-right: 32px; + overflow: hidden; + text-overflow: ellipsis; + width: 90%; + white-space: nowrap; + } + &:last-child { + position: absolute; + right: 8px; + top: 8px; + } + } +} + +ul.multiselectoptions { + input.new { + padding-bottom: 3px; + padding-top: 3px; + margin: 0; + } + > li.creator { + padding: 10px; + margin: 0; + font-weight: bold; + > input { + width: 95% !important; + /* do not constrain size of text input */ + padding: 5px; + margin: -5px; + } + } +} diff --git a/core/css/share.css b/core/css/share.css deleted file mode 100644 index eba22cf743e..00000000000 --- a/core/css/share.css +++ /dev/null @@ -1,199 +0,0 @@ -/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net - This file is licensed under the Affero General Public License version 3 or later. - See the COPYING-README file. */ - -#dropdown { - background: #eee; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - box-shadow: 0 2px 3px rgba(50, 50, 50, .4); - display: block; - margin-right: 0; - position: absolute; - right: 0; - width: 420px; - z-index: 500; - padding: 16px; -} - -@media only screen and (min-width: 768px) and (max-width: 990px) { - #dropdown { - /* this limits the dropdown to float below the sidebar for mid narrow screens */ - left: 20px; - } -} - -.shareTabView .unshare.icon-loading-small { - margin-top: 1px; -} - -.shareTabView .shareWithLoading, -.shareTabView .linkShare .icon-loading-small { - display: inline-block !important; - padding-left: 10px; -} -.shareTabView .shareWithLoading { - position: relative; - right: 70px; - top: 2px; -} -.shareTabView .icon-loading-small.hidden { - display: none !important; -} - -.shareTabView .avatar { - margin-right: 8px; - display: inline-block; - overflow: hidden; - vertical-align: middle; - width: 32px; - height: 32px; -} - -.share-autocomplete-item { - display: flex; -} -.share-autocomplete-item .autocomplete-item-text { - margin-left: 10px; - margin-right: 10px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - line-height: 32px; - vertical-align: middle; -} - -#shareWithList { - list-style-type:none; - padding:8px; -} - -#shareWithList li { - padding-top: 10px; - padding-bottom: 10px; - font-weight: bold; - line-height: 21px; - white-space: normal; - width: 100%; -} - -#shareWithList .sharingOptionsGroup { - flex-shrink: 0; - position: relative; -} - -#shareWithList .sharingOptionsGroup .popovermenu { - right: -6px; - top: 40px; - padding: 3px 6px; -} - -#shareWithList .shareOption { - white-space: nowrap; - display: inline-block; -} - -#shareWithList .unshare img, #shareWithList .showCruds img { - vertical-align:text-bottom; /* properly align icons */ -} - -#shareWithList label input[type=checkbox]{ - margin-left: 0; - position: relative; -} -#shareWithList .username{ - padding-right: 8px; - white-space: nowrap; - text-overflow: ellipsis; - display: inline-block; - overflow: hidden; - vertical-align: middle; - flex-grow: 5; -} -#shareWithList li label{ - margin-right: 8px; -} -.shareTabView label { - font-weight:400; - white-space: nowrap; -} - -.shareTabView input[type="checkbox"] { - margin:0 3px 0 8px; - vertical-align: middle; -} - -a.showCruds { - display:inline; - opacity:.5; -} - -a.unshare { - display:inline-block; - opacity:.5; - padding: 10px; -} - -#link { - border-top:1px solid #ddd; - padding-top:8px; -} - -.shareTabView input[type="submit"] { - margin-left: 7px; -} - -.shareTabView form { - font-size: 100%; - margin-left: 0; - margin-right: 0; -} - -.shareTabView .error { - color: #e9322d; - border-color: #e9322d; - box-shadow: 0 0 6px #f8b9b7; -} - -#link #showPassword img { - padding-left:5px; - width:12px; -} - -.reshare,#link label, -#expiration label { - display: inline-block; - padding: 6px 4px; -} - -a.showCruds:hover,a.unshare:hover { - opacity:1; -} - -#defaultExpireMessage, /* fix expire message going out of box */ -.reshare { /* fix shared by text going out of box */ - white-space:normal; -} - -#defaultExpireMessage { /* show message on new line */ - display: block; - padding-left: 4px; - /* TODO: style the dropdown in a proper way - border-box, etc. */ - width: 90%; -} - -.ui-autocomplete { /* limit dropdown height to 4 1/2 entries */ - max-height: 200px; - overflow-y: auto; - overflow-x: hidden; -} - -.notCreatable { - padding-left: 12px; - padding-top: 12px; - color: #999; -} - -.shareTabView .mailView .icon-mail { - opacity: 0.5; -} diff --git a/core/css/share.scss b/core/css/share.scss new file mode 100644 index 00000000000..a72437c4aeb --- /dev/null +++ b/core/css/share.scss @@ -0,0 +1,199 @@ +/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net + This file is licensed under the Affero General Public License version 3 or later. + See the COPYING-README file. */ + +#dropdown { + background: #eee; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + box-shadow: 0 2px 3px rgba(50, 50, 50, 0.4); + display: block; + margin-right: 0; + position: absolute; + right: 0; + width: 420px; + z-index: 500; + padding: 16px; +} + +@media only screen and (min-width: 768px) and (max-width: 990px) { + #dropdown { + /* this limits the dropdown to float below the sidebar for mid narrow screens */ + left: 20px; + } +} + +.shareTabView { + .unshare.icon-loading-small { + margin-top: 1px; + } + .shareWithLoading, .linkShare .icon-loading-small { + display: inline-block !important; + padding-left: 10px; + } + .shareWithLoading { + position: relative; + right: 70px; + top: 2px; + } + .icon-loading-small.hidden { + display: none !important; + } + .avatar { + margin-right: 8px; + display: inline-block; + overflow: hidden; + vertical-align: middle; + width: 32px; + height: 32px; + } +} + +.share-autocomplete-item { + display: flex; + .autocomplete-item-text { + margin-left: 10px; + margin-right: 10px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + line-height: 32px; + vertical-align: middle; + } +} + +#shareWithList { + list-style-type: none; + padding: 8px; + li { + padding-top: 10px; + padding-bottom: 10px; + font-weight: bold; + line-height: 21px; + white-space: normal; + width: 100%; + } + .sharingOptionsGroup { + flex-shrink: 0; + position: relative; + .popovermenu { + right: -6px; + top: 40px; + padding: 3px 6px; + } + } + .shareOption { + white-space: nowrap; + display: inline-block; + } + .unshare img, .showCruds img { + vertical-align: text-bottom; + /* properly align icons */ + } + label input[type=checkbox] { + margin-left: 0; + position: relative; + } + .username { + padding-right: 8px; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-block; + overflow: hidden; + vertical-align: middle; + flex-grow: 5; + } + li label { + margin-right: 8px; + } +} + +.shareTabView { + label { + font-weight: 400; + white-space: nowrap; + } + input[type='checkbox'] { + margin: 0 3px 0 8px; + vertical-align: middle; + } +} + +a { + &.showCruds { + display: inline; + opacity: .5; + } + &.unshare { + display: inline-block; + opacity: .5; + padding: 10px; + } +} + +#link { + border-top: 1px solid #ddd; + padding-top: 8px; +} + +.shareTabView { + input[type='submit'] { + margin-left: 7px; + } + form { + font-size: 100%; + margin-left: 0; + margin-right: 0; + } + .error { + color: #e9322d; + border-color: #e9322d; + box-shadow: 0 0 6px #f8b9b7; + } +} + +#link #showPassword img { + padding-left: 5px; + width: 12px; +} + +.reshare, #link label, #expiration label { + display: inline-block; + padding: 6px 4px; +} + +a { + &.showCruds:hover, &.unshare:hover { + opacity: 1; + } +} + +#defaultExpireMessage, .reshare { + /* fix shared by text going out of box */ + white-space: normal; +} + +#defaultExpireMessage { + /* show message on new line */ + display: block; + padding-left: 4px; + /* TODO: style the dropdown in a proper way - border-box, etc. */ + width: 90%; +} + +.ui-autocomplete { + /* limit dropdown height to 4 1/2 entries */ + max-height: 200px; + overflow-y: auto; + overflow-x: hidden; +} + +.notCreatable { + padding-left: 12px; + padding-top: 12px; + color: #999; +} + +.shareTabView .mailView .icon-mail { + opacity: 0.5; +} diff --git a/core/css/styles.css b/core/css/styles.css deleted file mode 100644 index 5ea4ca53707..00000000000 --- a/core/css/styles.css +++ /dev/null @@ -1,999 +0,0 @@ -/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net - This file is licensed under the Affero General Public License version 3 or later. - See the COPYING-README file. */ - -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; cursor:default; } -html, body { height:100%; } -article, aside, dialog, figure, footer, header, hgroup, nav, section { display:block; } -body { line-height:1.5; } -table { border-collapse:separate; border-spacing:0; white-space:nowrap; } -caption, th, td { text-align:left; font-weight:normal; } -table, td, th { vertical-align:middle; } -a { border:0; color:#000; text-decoration:none;} -a, a *, input, input *, select, .button span, label { cursor:pointer; } -ul { list-style:none; } - -body { - background-color: #ffffff; - font-weight: 400; - font-size: .8em; - line-height: 1.6em; - font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; - color: #000; - height: auto; -} - -#body-login { - text-align: center; - background-color: #0082c9; - background-image: url('../img/background.jpg?v=1'); - background-position: 50% 50%; - background-repeat: no-repeat; - background-size: cover; -} - -.two-factor-header { - text-align: center; -} - -.two-factor-provider { - text-align: center; - width: 258px !important; - display: inline-block; - margin-bottom: 0 !important; - background-color: rgba(0,0,0,0.3) !important; - border: none !important; -} - -.two-factor-link { - display: inline-block; - padding: 12px; - color: rgba(255, 255, 255, .75); -} - -.float-spinner { - height: 32px; - display: none; -} -#body-login .float-spinner { - margin-top: -32px; - padding-top: 32px; -} - -#nojavascript { - position: fixed; - top: 0; - bottom: 0; - height: 100%; - width: 100%; - z-index: 9000; - text-align: center; - background-color: rgba(0,0,0,0.5); - color: #fff; - line-height: 125%; - font-size: 24px; -} -#nojavascript div { - display: block; - position: relative; - width: 50%; - top: 35%; - margin: 0px auto; -} -#nojavascript a { - color: #fff; - border-bottom: 2px dotted #fff; -} -#nojavascript a:hover, -#nojavascript a:focus { - color: #ddd; -} - -/* SCROLLING */ -::-webkit-scrollbar { - width: 5px; -} -::-webkit-scrollbar-track-piece { - background-color: transparent; -} -::-webkit-scrollbar-thumb { - background: #ddd; - border-radius: 3px; -} - -/* Searchbox */ -.searchbox input[type="search"] { - position: relative; - font-size: 1.2em; - padding: 3px; - padding-left: 25px; - background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center; - color: #fff; - border: 0; - border-radius: 3px; - margin-top: 9px; - float: right; - width: 0; - cursor: pointer; - -webkit-transition: all 100ms; - transition: all 100ms; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - opacity: .7; -} -.searchbox input[type="search"]:focus, -.searchbox input[type="search"]:active, -.searchbox input[type="search"]:valid { - color: #fff; - width: 155px; - max-width: 50%; - cursor: text; - background-color: #0082c9; - border: 1px solid rgba(255, 255, 255, .5); -} - -/* CONTENT ------------------------------------------------------------------ */ -#controls { - box-sizing: border-box; - position: fixed; - top: 45px; - right: 0; - left: 0; - height: 44px; - width: 100%; - padding: 0; - margin: 0; - background-color: rgba(255, 255, 255, .95); - z-index: 50; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -/* position controls for apps with app-navigation */ -#app-navigation+#app-content #controls { - left: 250px; -} -.viewer-mode #app-navigation+#app-content #controls { - left: 0; -} - -#controls .button, -#controls button, -#controls input[type='submit'], -#controls input[type='text'], -#controls input[type='password'], -#controls select { - box-sizing: border-box; - display: inline-block; - height: 36px; - padding: 7px 10px -} - -#controls .button.hidden { - display: none; -} - -#content { - position: relative; - height: 100%; - width: 100%; -} -#content .hascontrols { - margin-top: 45px; -} -#content-wrapper { - position: absolute; - height: 100%; - width: 100%; - overflow-x: hidden; /* prevent horizontal scrollbar */ - padding-top: 45px; - box-sizing:border-box; -} -/* allow horizontal scrollbar for personal and admin settings */ -#body-settings:not(.snapjs-left) .app-settings { - overflow-x: auto; -} - -#emptycontent, -.emptycontent { - color: #888; - text-align: center; - margin-top: 30vh; - width: 100%; -} -#emptycontent.emptycontent-search, -.emptycontent.emptycontent-search { - position: static; -} -#emptycontent h2, -.emptycontent h2 { - margin-bottom: 10px; - line-height: 150%; -} -#emptycontent [class^="icon-"], -.emptycontent [class^="icon-"], -#emptycontent [class*=" icon-"], -.emptycontent [class*=" icon-"] { - background-size: 64px; - height: 64px; - width: 64px; - margin: 0 auto 15px; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - opacity: .4; -} - - -/* LOG IN & INSTALLATION ------------------------------------------------------------ */ - -/* Some whitespace to the top */ -#body-login #header { - padding-top: 100px; -} -#body-login { - background-attachment: fixed; /* fix background gradient */ - height: 100%; /* fix sticky footer */ -} - -/* Dark subtle label text */ -#body-login p.info, -#body-login form fieldset legend, -#body-login #datadirContent label, -#body-login form fieldset .warning-info, -#body-login form input[type="checkbox"]+label { - text-align: center; - color: #fff; -} -/* overrides another !important statement that sets this to unreadable black */ -#body-login form .warning input[type="checkbox"]:hover+label, -#body-login form .warning input[type="checkbox"]:focus+label, -#body-login form .warning input[type="checkbox"]+label { - color: #fff !important; -} - -#body-login .update h2 { - margin: 0 0 20px; -} - -#body-login .update a { - color: #fff; - border-bottom: 1px solid #aaa; -} - -#body-login .infogroup { - margin-bottom: 15px; -} - -#body-login p#message img { - vertical-align: middle; - padding: 5px; -} - -#body-login div.buttons { - text-align: center; -} -#body-login p.info { - margin: 0 auto; - padding-top: 20px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#body-login p.info a { - font-weight: 600; - padding: 13px; - margin: -13px; -} - -#body-login form { - position: relative; - width: 280px; - margin: 16px auto; - padding: 0; -} -#body-login form fieldset { - margin-bottom: 20px; - text-align: left; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#body-login form #sqliteInformation { - margin-top: -20px; - margin-bottom: 20px; -} -#body-login form #adminaccount { - margin-bottom: 15px; -} -#body-login form fieldset legend, #datadirContent label { - width: 100%; -} -#body-login #datadirContent label { - display: block; - margin: 0; -} -#body-login form #datadirField legend { - margin-bottom: 15px; -} -#body-login #showAdvanced { - padding: 13px; /* increase clickable area of Advanced dropdown */ -} -#body-login #showAdvanced img { - vertical-align: bottom; /* adjust position of Advanced dropdown arrow */ - margin-left: -4px; -} -#body-login .icon-info-white { - padding: 10px; -} - -/* strengthify wrapper */ -#body-login .strengthify-wrapper { - display: inline-block; - position: relative; - left: 15px; - top: -23px; - width: 250px; -} - -/* tipsy for the strengthify wrapper looks better with following font settings */ -#body-login .tipsy-inner { - font-weight: bold; - color: #ccc; -} - -/* General new input field look */ -#body-login input[type="text"], -#body-login input[type="password"], -#body-login input[type="email"] { - border: none; - font-weight: 300; -} - -/* Nicely grouping input field sets */ -.grouptop, -.groupmiddle, -.groupbottom { - position: relative; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#body-login .grouptop input, -.grouptop input { - margin-bottom: 0 !important; - border-bottom: 0 !important; - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} -#body-login .groupmiddle input, -.groupmiddle input { - margin-top: 0 !important; - margin-bottom: 0 !important; - border-top: 0 !important; - border-bottom: 0 !important; - border-radius: 0 !important; - box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; -} -#body-login .groupbottom input, -.groupbottom input { - margin-top: 0 !important; - border-top: 0 !important; - border-top-right-radius: 0 !important; - border-top-left-radius: 0 !important; - box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; -} -#body-login .groupbottom input[type=submit] { - box-shadow: none !important; -} - -/* keep the labels for screen readers but hide them since we use placeholders */ -label.infield { - display: none; -} - -#body-login form input[type="checkbox"]+label { - position: relative; - margin: 0; - padding: 14px; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -#body-login form .errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; } -#body-login .success { background:#d7fed7; border:1px solid #0f0; width: 35%; margin: 30px auto; padding:1em; text-align: center;} - -#body-login #showAdvanced > img { - padding: 4px; - box-sizing: border-box; -} - -#body-login p.info a, #body-login #showAdvanced { - color: #fff; -} - -#body-login #remember_login:hover+label, -#body-login #remember_login:focus+label, -#body-login #forgot-password:hover, -#body-login #forgot-password:focus, -#body-login p.info a:hover, -#body-login p.info a:focus { - opacity: .6; -} - -/* Show password toggle */ -#show, #dbpassword { - position: absolute; - right: 1em; - top: .8em; - float: right; -} -#show, #dbpassword, #personal-show { - display: none; -} -#show + label, #dbpassword + label { - right: 21px; - top: 15px !important; - margin: -14px !important; - padding: 14px !important; -} -#show:checked + label, #dbpassword:checked + label, #personal-show:checked + label { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - opacity: .8; -} -#show + label, #dbpassword + label, #personal-show + label { - position: absolute !important; - height: 20px; - width: 24px; - background-image: url('../img/actions/toggle.svg?v=1'); - background-repeat: no-repeat; - background-position: center; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; - opacity: .3; -} -#show + label:before, #dbpassword + label:before, #personal-show + label:before { - display: none; -} -#pass2, input[name="personal-password-clone"] { - padding: .6em 2.5em .4em .4em; - width: 8em; -} -#personal-show + label { - height: 14px; - margin-top: -25px; - left: 295px; - display: block; -} -#passwordbutton { - margin-left: .5em; -} - -/* Database selector */ -#body-login form #selectDbType { - text-align:center; - white-space: nowrap; - margin: 0; -} -#body-login form #selectDbType .info { - white-space: normal; -} -#body-login form #selectDbType label { - position: static; - margin: 0 -3px 5px; - font-size: 12px; - background:#f8f8f8; - color:#888; - cursor:pointer; - border: 1px solid #ddd; -} -#body-login form #selectDbType label span { - cursor: pointer; - padding: 10px 20px; -} -#body-login form #selectDbType label.ui-state-hover, -#body-login form #selectDbType label.ui-state-active { - color:#000; - background-color:#e8e8e8; } - - -/* Warnings and errors are the same */ -#body-login .warning, -#body-login .update, -#body-login .error { - display: block; - padding: 10px; - background-color: rgba(0,0,0,.3); - color: #fff; - text-align: left; - border-radius: 3px; - cursor: default; -} - -#body-login .update { - width: inherit; - text-align: center; -} - -#body-login .update .appList { - list-style: disc; - text-align: left; - margin-left: 25px; - margin-right: 25px; -} - -#body-login .v-align { - width: inherit; -} - -#body-login .update img.float-spinner { - float: left; -} - -#body-user .warning, #body-settings .warning { - margin-top: 8px; - padding: 5px; - background: #fdd; - border-radius: 3px; -} - -.warning legend, -.warning a, -.error a { - color: #fff !important; - font-weight: 600 !important; -} -.error a.button { - color: #555 !important; - display: inline-block; - text-align: center; -} -.error pre { - white-space: pre-wrap; - text-align: left; -} - -.error-wide { - width: 700px; - margin-left: -200px !important; -} - -.error-wide .button { - color: black !important; -} - -.warning-input { - border-color: #ce3702 !important; -} - -/* Fixes for log in page, TODO should be removed some time */ -#body-login ul.error-wide { - margin-top: 35px; -} -#body-login .warning { - margin: 0 7px 5px 4px; -} -#body-login .warning legend { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} -#body-login a.warning { - cursor: pointer; -} - -/* fixes for update page TODO should be fixed some time in a proper way */ -/* this is just for an error while updating the ownCloud instance */ -#body-login .updateProgress .error { - margin-top: 10px; - margin-bottom: 10px; -} - -/* Alternative Logins */ -#alternative-logins legend { margin-bottom:10px; } -#alternative-logins li { height:40px; display:inline-block; white-space:nowrap; } - -/* Log in and install button */ -#body-login input { - font-size: 20px; - margin: 5px; - padding: 11px 10px 9px; -} -#body-login input[type="text"], -#body-login input[type="password"] { - width: 249px; -} -#body-login input.login { - width: 269px; - background-position: right 16px center; -} -#body-login input[type="submit"] { - padding: 10px 20px; /* larger log in and installation buttons */ -} -#remember_login { - margin: 18px 5px 0 16px !important; -} -#body-login .remember-login-container { - display: inline-block; - margin: 10px 0; - text-align: center; - width: 100%; -} -#body-login #forgot-password { - padding: 11px; - float: right; - color: #fff; -} - -/* Sticky footer */ -#body-login .wrapper { - min-height: 100%; - margin: 0 auto -70px; - width: 300px; -} -#body-login footer, #body-login .push { - height: 70px; -} - -/* round profile photos */ -.avatar, -.avatar img, -.avatardiv, -.avatardiv img { - border-radius: 50%; - flex-shrink: 0; -} -td.avatar { - border-radius: 0; -} - - -#notification-container { - position: absolute; - top: 0; - width: 100%; - text-align: center; -} -#notification { - margin: 0 auto; - max-width: 60%; - z-index: 8000; - background-color: #fff; - border: 0; - padding: 1px 8px; - display: none; - position: relative; - top: 0; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; - opacity: .9; -} -#notification span { - cursor: pointer; - margin-left: 1em; -} -#notification { - overflow-x: hidden; - overflow-y: auto; - max-height: 100px; -} -#notification .row { - position: relative; -} -#notification .row .close { - display: inline-block; - vertical-align: middle; - position: absolute; - right: 0; - top: 0; - margin-top: 2px; -} -#notification .row.closeable { - padding-right: 20px; -} - -tr .action:not(.permanent), -.selectedActions a { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - opacity: 0; -} -tr:hover .action, -tr:focus .action, -tr .action.permanent, -.selectedActions a { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - opacity: .5; -} -tr .action { - width: 16px; - height: 16px; -} -.header-action { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - opacity: .8; -} -tr:hover .action:hover, -tr:focus .action:focus, -.selectedActions a:hover, -.selectedActions a:focus, -.header-action:hover, -.header-action:focus { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; -} -tbody tr:hover, -tbody tr:focus, -tbody tr:active { - background-color: #f8f8f8; -} - -code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; } - -#quota { - cursor: default; - margin: 30px !important; - position: relative; - padding: 0 !important; -} -#quota div { - padding: 0; - background-color: rgb(220,220,220); - font-weight: normal; - white-space: nowrap; - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; - min-width: 1%; - max-width: 100%; -} -#quotatext {padding:.6em 1em;} - -#quota div.quota-warning { - background-color: #fc4; -} - -.pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; } -.pager li { display:inline-block; } - -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { overflow:hidden; text-overflow:ellipsis; } -.separator { display:inline; border-left:1px solid #d3d3d3; border-right:1px solid #fff; height:10px; width:0px; margin:4px; } - -a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;padding-top:0px;padding-bottom:2px; text-decoration:none; margin-top:5px } - -.exception{color:#000;} -.exception textarea{width:95%;height:200px;background:#ffe;border:0;} - -.ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg?v=1'); } -.ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg?v=1'); } - -.ui-datepicker-prev,.ui-datepicker-next{ border:1px solid #ddd; background:#fff; } - -/* ---- DIALOGS ---- */ -#oc-dialog-filepicker-content .dirtree { - width:92%; - float: left; - margin-left: 15px; - overflow:hidden; -} -#oc-dialog-filepicker-content .dirtree div:first-child a { - background-image:url('../img/places/home.svg?v=1'); - background-repeat:no-repeat; - background-position: left center; -} -#oc-dialog-filepicker-content .dirtree span:not(:last-child) { cursor: pointer; } -#oc-dialog-filepicker-content .dirtree span:last-child { font-weight: bold; } -#oc-dialog-filepicker-content .dirtree span:not(:last-child)::after { content: '>'; padding: 3px;} -#oc-dialog-filepicker-content .filelist-container { - box-sizing: border-box; - display: inline-block; - overflow-y: auto; - height: 100%; /** overflow under the button row */ - width: 100%; -} - -#oc-dialog-filepicker-content .emptycontent { - color: #888; - text-align: center; - margin-top: 80px; - width: 100%; - display: none; -} -#oc-dialog-filepicker-content .filelist { - background-color:white; - width:100%; -} -#oc-dialog-filepicker-content #filestable.filelist { - /* prevent the filepicker to overflow */ - min-width: initial; - margin-bottom: 50px; -} - -#oc-dialog-filepicker-content .filelist td { - padding: 14px; - border-bottom: 1px solid #eee; -} -#oc-dialog-filepicker-content .filelist tr:last-child td { - border-bottom: none; -} -#oc-dialog-filepicker-content .filelist .filename { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - background-size: 32px; - background-repeat: no-repeat; - padding-left: 51px; - background-position: 7px 7px; - cursor: pointer; -} - -#oc-dialog-filepicker-content .filelist .filesize, -#oc-dialog-filepicker-content .filelist .date { - width: 80px; -} - -#oc-dialog-filepicker-content .filelist .filesize { - text-align: right; -} -#oc-dialog-filepicker-content .filepicker_element_selected { background-color:lightblue;} -.ui-dialog {position:fixed !important;} -span.ui-icon {float: left; margin: 3px 7px 30px 0;} - -.move2trash { /* decrease spinner size */ - width: 16px; - height: 16px; -} - -/* ---- TOOLTIPS ---- */ -.extra-data { - padding-right: 5px !important; -} -.tipsy-inner { - max-width: 400px !important; - overflow: hidden; - text-overflow: ellipsis; -} - -/* ---- TAGS ---- */ -#tagsdialog .content { - width: 100%; height: 280px; -} -#tagsdialog .scrollarea { - overflow:auto; border:1px solid #ddd; - width: 100%; height: 240px; -} -#tagsdialog .bottombuttons { - width: 100%; height: 30px; -} -#tagsdialog .bottombuttons * { float:left;} -#tagsdialog .taglist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; transition:background-color 500ms; } -#tagsdialog .taglist li:hover, #tagsdialog .taglist li:active { background:#eee; } -#tagsdialog .addinput { width: 90%; clear: both; } - -/* ---- APP SETTINGS - LEGACY, DO NOT USE THE POPUP! ---- */ -.popup { - background-color: #fff; - border-radius: 3px; - box-shadow: 0 0 10px #aaa; - color: #333; - padding: 10px; - position: fixed !important; - z-index: 100; -} -.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/close.svg?v=1') no-repeat center; } -.popup h2 { font-size:20px; } -.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; } -.arrow.left { left:-13px; bottom:1.2em; -webkit-transform:rotate(270deg); -ms-transform:rotate(270deg); transform:rotate(270deg); } -.arrow.up { top:-8px; right:6px; } -.arrow.down { -webkit-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); } - - -/* ---- BREADCRUMB ---- */ -div.crumb { - float: left; - display: block; - background-image: url('../img/breadcrumb.svg?v=1'); - background-repeat: no-repeat; - background-position: right center; - height: 44px; - background-size: auto 24px; -} -div.crumb.hidden { - display: none; -} -div.crumb a, -div.crumb > span { - position: relative; - top: 12px; - padding: 14px 24px 14px 17px; - color: #555; -} -div.crumb.last a { - padding-right: 0; -} -div.crumb:first-child a { - position: relative; - top: 13px; - padding-right: 14px; -} -div.crumb.last { - font-weight: 600; - margin-right: 10px; -} -div.crumb.ellipsized { - padding: 0 10px 0 5px; -} -div.crumb a.ellipsislink { - padding: 0 !important; - position: relative; - top: 8px !important; -} - -/* some feedback for hover/tap on breadcrumbs */ -div.crumb:hover, -div.crumb:focus, -div.crumb a:focus, -div.crumb:active { - -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - opacity:.7; -} - -.appear { - opacity: 1; - -webkit-transition: opacity 500ms ease 0s; - -moz-transition: opacity 500ms ease 0s; - -ms-transition: opacity 500ms ease 0s; - -o-transition: opacity 500ms ease 0s; - transition: opacity 500ms ease 0s; -} -.appear.transparent { - opacity: 0; -} - - -/* public footer */ -#body-public footer { - position: relative; - text-align: center; -} - -#body-public footer .info { - color: #777; - text-align: center; - margin: 0 auto; - padding: 20px 0; -} - -#body-public footer .info a { - color: #777; - font-weight: 600; - padding: 13px; - margin: -13px; -} - - -/* LEGACY FIX only - do not use fieldsets for settings */ -fieldset.warning legend, fieldset.update legend { - top: 18px; - position: relative; -} -fieldset.warning legend + p, fieldset.update legend + p { - margin-top: 12px; -} - - -/* for IE10 */ -@-ms-viewport { - width: device-width; -} - -/* hidden input type=file field */ -.hiddenuploadfield { - width: 0; - height: 0; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; -} diff --git a/core/css/styles.scss b/core/css/styles.scss new file mode 100644 index 00000000000..affaec14342 --- /dev/null +++ b/core/css/styles.scss @@ -0,0 +1,1274 @@ +/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net + This file is licensed under the Affero General Public License version 3 or later. + See the COPYING-README file. */ + +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-weight: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; + cursor: default; +} + +html, body { + height: 100%; +} + +article, aside, dialog, figure, footer, header, hgroup, nav, section { + display: block; +} + +body { + line-height: 1.5; +} + +table { + border-collapse: separate; + border-spacing: 0; + white-space: nowrap; +} + +caption, th, td { + text-align: left; + font-weight: normal; +} + +table, td, th { + vertical-align: middle; +} + +a { + border: 0; + color: #000; + text-decoration: none; + cursor: pointer; + * { + cursor: pointer; + } +} + +input { + cursor: pointer; + * { + cursor: pointer; + } +} + +select, .button span, label { + cursor: pointer; +} + +ul { + list-style: none; +} + +body { + background-color: #ffffff; + font-weight: 400; + font-size: .8em; + line-height: 1.6em; + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + color: #000; + height: auto; +} + +#body-login { + text-align: center; + background-color: #0082c9; + background-image: url('../img/background.jpg?v=1'); + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; +} + +.two-factor-header { + text-align: center; +} + +.two-factor-provider { + text-align: center; + width: 258px !important; + display: inline-block; + margin-bottom: 0 !important; + background-color: rgba(0, 0, 0, 0.3) !important; + border: none !important; +} + +.two-factor-link { + display: inline-block; + padding: 12px; + color: rgba(255, 255, 255, 0.75); +} + +.float-spinner { + height: 32px; + display: none; +} + +#body-login .float-spinner { + margin-top: -32px; + padding-top: 32px; +} + +#nojavascript { + position: fixed; + top: 0; + bottom: 0; + height: 100%; + width: 100%; + z-index: 9000; + text-align: center; + background-color: rgba(0, 0, 0, 0.5); + color: #fff; + line-height: 125%; + font-size: 24px; + div { + display: block; + position: relative; + width: 50%; + top: 35%; + margin: 0px auto; + } + a { + color: #fff; + border-bottom: 2px dotted #fff; + &:hover, &:focus { + color: #ddd; + } + } +} + +/* SCROLLING */ + +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-track-piece { + background-color: transparent; +} + +::-webkit-scrollbar-thumb { + background: #ddd; + border-radius: 3px; +} + +/* Searchbox */ + +.searchbox input[type='search'] { + position: relative; + font-size: 1.2em; + padding: 3px; + padding-left: 25px; + background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center; + color: #fff; + border: 0; + border-radius: 3px; + margin-top: 9px; + float: right; + width: 0; + cursor: pointer; + -webkit-transition: all 100ms; + transition: all 100ms; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)'; + opacity: .7; + &:focus, &:active, &:valid { + color: #fff; + width: 155px; + max-width: 50%; + cursor: text; + background-color: #0082c9; + border: 1px solid rgba(255, 255, 255, 0.5); + } +} + +/* CONTENT ------------------------------------------------------------------ */ + +#controls { + box-sizing: border-box; + position: fixed; + top: 45px; + right: 0; + left: 0; + height: 44px; + width: 100%; + padding: 0; + margin: 0; + background-color: rgba(255, 255, 255, 0.95); + z-index: 50; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* position controls for apps with app-navigation */ + +#app-navigation + #app-content #controls { + left: 250px; +} + +.viewer-mode #app-navigation + #app-content #controls { + left: 0; +} + +#controls { + .button, button { + box-sizing: border-box; + display: inline-block; + height: 36px; + padding: 7px 10px; + } + input { + &[type='submit'], &[type='text'], &[type='password'] { + box-sizing: border-box; + display: inline-block; + height: 36px; + padding: 7px 10px; + } + } + select { + box-sizing: border-box; + display: inline-block; + height: 36px; + padding: 7px 10px; + } + .button.hidden { + display: none; + } +} + +#content { + position: relative; + height: 100%; + width: 100%; + .hascontrols { + margin-top: 45px; + } +} + +#content-wrapper { + position: absolute; + height: 100%; + width: 100%; + overflow-x: hidden; + /* prevent horizontal scrollbar */ + padding-top: 45px; + box-sizing: border-box; +} + +/* allow horizontal scrollbar for personal and admin settings */ + +#body-settings:not(.snapjs-left) .app-settings { + overflow-x: auto; +} + +#emptycontent, .emptycontent { + color: #888; + text-align: center; + margin-top: 30vh; + width: 100%; +} + +#emptycontent.emptycontent-search, .emptycontent.emptycontent-search { + position: static; +} + +#emptycontent h2, .emptycontent h2 { + margin-bottom: 10px; + line-height: 150%; +} + +#emptycontent [class^='icon-'], .emptycontent [class^='icon-'], #emptycontent [class*=' icon-'], .emptycontent [class*=' icon-'] { + background-size: 64px; + height: 64px; + width: 64px; + margin: 0 auto 15px; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=40)'; + opacity: .4; +} + +/* LOG IN & INSTALLATION ------------------------------------------------------------ */ + +/* Some whitespace to the top */ + +#body-login { + #header { + padding-top: 100px; + } + background-attachment: fixed; + /* fix background gradient */ + height: 100%; + /* fix sticky footer */ + p.info, form fieldset legend, #datadirContent label { + text-align: center; + color: #fff; + } + form { + fieldset .warning-info, input[type='checkbox'] + label { + text-align: center; + color: #fff; + } + .warning input[type='checkbox'] { + &:hover + label, &:focus + label, + label { + color: #fff !important; + } + } + } + .update { + h2 { + margin: 0 0 20px; + } + a { + color: #fff; + border-bottom: 1px solid #aaa; + } + } + .infogroup { + margin-bottom: 15px; + } + p#message img { + vertical-align: middle; + padding: 5px; + } + div.buttons { + text-align: center; + } + p.info { + margin: 0 auto; + padding-top: 20px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + a { + font-weight: 600; + padding: 13px; + margin: -13px; + } + } + form { + position: relative; + width: 280px; + margin: 16px auto; + padding: 0; + fieldset { + margin-bottom: 20px; + text-align: left; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + #sqliteInformation { + margin-top: -20px; + margin-bottom: 20px; + } + #adminaccount { + margin-bottom: 15px; + } + fieldset legend { + width: 100%; + } + } +} + +/* Dark subtle label text */ + +/* overrides another !important statement that sets this to unreadable black */ + +#datadirContent label { + width: 100%; +} + +#body-login { + #datadirContent label { + display: block; + margin: 0; + } + form #datadirField legend { + margin-bottom: 15px; + } + #showAdvanced { + padding: 13px; + /* increase clickable area of Advanced dropdown */ + img { + vertical-align: bottom; + /* adjust position of Advanced dropdown arrow */ + margin-left: -4px; + } + } + .icon-info-white { + padding: 10px; + } + .strengthify-wrapper { + display: inline-block; + position: relative; + left: 15px; + top: -23px; + width: 250px; + } + .tipsy-inner { + font-weight: bold; + color: #ccc; + } + input { + &[type='text'], &[type='password'], &[type='email'] { + border: none; + font-weight: 300; + } + } +} + +/* strengthify wrapper */ + +/* tipsy for the strengthify wrapper looks better with following font settings */ + +/* General new input field look */ + +/* Nicely grouping input field sets */ + +.grouptop, .groupmiddle, .groupbottom { + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#body-login .grouptop input, .grouptop input { + margin-bottom: 0 !important; + border-bottom: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +#body-login .groupmiddle input, .groupmiddle input { + margin-top: 0 !important; + margin-bottom: 0 !important; + border-top: 0 !important; + border-bottom: 0 !important; + border-radius: 0 !important; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset !important; +} + +#body-login .groupbottom input, .groupbottom input { + margin-top: 0 !important; + border-top: 0 !important; + border-top-right-radius: 0 !important; + border-top-left-radius: 0 !important; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset !important; +} + +#body-login .groupbottom input[type=submit] { + box-shadow: none !important; +} + +/* keep the labels for screen readers but hide them since we use placeholders */ + +label.infield { + display: none; +} + +#body-login { + form { + input[type='checkbox'] + label { + position: relative; + margin: 0; + padding: 14px; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + .errors { + background: #fed7d7; + border: 1px solid #f00; + list-style-indent: inside; + margin: 0 0 2em; + padding: 1em; + } + } + .success { + background: #d7fed7; + border: 1px solid #0f0; + width: 35%; + margin: 30px auto; + padding: 1em; + text-align: center; + } + #showAdvanced > img { + padding: 4px; + box-sizing: border-box; + } + p.info a, #showAdvanced { + color: #fff; + } + #remember_login { + &:hover + label, &:focus + label { + opacity: .6; + } + } + #forgot-password { + &:hover, &:focus { + opacity: .6; + } + } + p.info a { + &:hover, &:focus { + opacity: .6; + } + } +} + +/* Show password toggle */ + +#show, #dbpassword { + position: absolute; + right: 1em; + top: .8em; + float: right; +} + +#show, #dbpassword, #personal-show { + display: none; +} + +#show + label, #dbpassword + label { + right: 21px; + top: 15px !important; + margin: -14px !important; + padding: 14px !important; +} + +#show:checked + label, #dbpassword:checked + label, #personal-show:checked + label { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; + opacity: .8; +} + +#show + label, #dbpassword + label, #personal-show + label { + position: absolute !important; + height: 20px; + width: 24px; + background-image: url('../img/actions/toggle.svg?v=1'); + background-repeat: no-repeat; + background-position: center; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=30)'; + opacity: .3; +} + +#show + label:before, #dbpassword + label:before, #personal-show + label:before { + display: none; +} + +#pass2, input[name='personal-password-clone'] { + padding: .6em 2.5em .4em .4em; + width: 8em; +} + +#personal-show + label { + height: 14px; + margin-top: -25px; + left: 295px; + display: block; +} + +#passwordbutton { + margin-left: .5em; +} + +/* Database selector */ + +#body-login { + form #selectDbType { + text-align: center; + white-space: nowrap; + margin: 0; + .info { + white-space: normal; + } + label { + position: static; + margin: 0 -3px 5px; + font-size: 12px; + background: #f8f8f8; + color: #888; + cursor: pointer; + border: 1px solid #ddd; + span { + cursor: pointer; + padding: 10px 20px; + } + &.ui-state-hover, &.ui-state-active { + color: #000; + background-color: #e8e8e8; + } + } + } + .warning, .update, .error { + display: block; + padding: 10px; + background-color: rgba(0, 0, 0, 0.3); + color: #fff; + text-align: left; + border-radius: 3px; + cursor: default; + } + .update { + width: inherit; + text-align: center; + .appList { + list-style: disc; + text-align: left; + margin-left: 25px; + margin-right: 25px; + } + } + .v-align { + width: inherit; + } + .update img.float-spinner { + float: left; + } +} + +/* Warnings and errors are the same */ + +#body-user .warning, #body-settings .warning { + margin-top: 8px; + padding: 5px; + background: #fdd; + border-radius: 3px; +} + +.warning { + legend, a { + color: #fff !important; + font-weight: 600 !important; + } +} + +.error { + a { + color: #fff !important; + font-weight: 600 !important; + &.button { + color: #555 !important; + display: inline-block; + text-align: center; + } + } + pre { + white-space: pre-wrap; + text-align: left; + } +} + +.error-wide { + width: 700px; + margin-left: -200px !important; + .button { + color: black !important; + } +} + +.warning-input { + border-color: #ce3702 !important; +} + +/* Fixes for log in page, TODO should be removed some time */ + +#body-login { + ul.error-wide { + margin-top: 35px; + } + .warning { + margin: 0 7px 5px 4px; + legend { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } + } + a.warning { + cursor: pointer; + } + .updateProgress .error { + margin-top: 10px; + margin-bottom: 10px; + } +} + +/* fixes for update page TODO should be fixed some time in a proper way */ +/* this is just for an error while updating the ownCloud instance */ + +/* Alternative Logins */ + +#alternative-logins { + legend { + margin-bottom: 10px; + } + li { + height: 40px; + display: inline-block; + white-space: nowrap; + } +} + +/* Log in and install button */ + +#body-login input { + font-size: 20px; + margin: 5px; + padding: 11px 10px 9px; + &[type='text'], &[type='password'] { + width: 249px; + } + &.login { + width: 269px; + background-position: right 16px center; + } + &[type='submit'] { + padding: 10px 20px; + /* larger log in and installation buttons */ + } +} + +#remember_login { + margin: 18px 5px 0 16px !important; +} + +#body-login { + .remember-login-container { + display: inline-block; + margin: 10px 0; + text-align: center; + width: 100%; + } + #forgot-password { + padding: 11px; + float: right; + color: #fff; + } + .wrapper { + min-height: 100%; + margin: 0 auto -70px; + width: 300px; + } + footer, .push { + height: 70px; + } +} + +/* Sticky footer */ + +/* round profile photos */ + +.avatar, .avatardiv { + border-radius: 50%; + flex-shrink: 0; + img { + border-radius: 50%; + flex-shrink: 0; + } +} + +td.avatar { + border-radius: 0; +} + +#notification-container { + position: absolute; + top: 0; + width: 100%; + text-align: center; +} + +#notification { + margin: 0 auto; + max-width: 60%; + z-index: 8000; + background-color: #fff; + border: 0; + padding: 1px 8px; + display: none; + position: relative; + top: 0; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=90)'; + opacity: .9; + span { + cursor: pointer; + margin-left: 1em; + } + overflow-x: hidden; + overflow-y: auto; + max-height: 100px; + .row { + position: relative; + .close { + display: inline-block; + vertical-align: middle; + position: absolute; + right: 0; + top: 0; + margin-top: 2px; + } + &.closeable { + padding-right: 20px; + } + } +} + +tr .action:not(.permanent), .selectedActions a { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'; + opacity: 0; +} + +tr { + &:hover .action, &:focus .action, .action.permanent { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + opacity: .5; + } +} + +.selectedActions a { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; + opacity: .5; +} + +tr .action { + width: 16px; + height: 16px; +} + +.header-action { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; + opacity: .8; +} + +tr { + &:hover .action:hover, &:focus .action:focus { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +.selectedActions a { + &:hover, &:focus { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +.header-action { + &:hover, &:focus { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; + opacity: 1; + } +} + +tbody tr { + &:hover, &:focus, &:active { + background-color: #f8f8f8; + } +} + +code { + font-family: 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', monospace; +} + +#quota { + cursor: default; + margin: 30px !important; + position: relative; + padding: 0 !important; + div { + padding: 0; + background-color: rgb(220, 220, 220); + font-weight: normal; + white-space: nowrap; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; + min-width: 1%; + max-width: 100%; + } +} + +#quotatext { + padding: .6em 1em; +} + +#quota div.quota-warning { + background-color: #fc4; +} + +.pager { + list-style: none; + float: right; + display: inline; + margin: .7em 13em 0 0; + li { + display: inline-block; + } +} + +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { + overflow: hidden; + text-overflow: ellipsis; +} + +.separator { + display: inline; + border-left: 1px solid #d3d3d3; + border-right: 1px solid #fff; + height: 10px; + width: 0px; + margin: 4px; +} + +a.bookmarklet { + background-color: #ddd; + border: 1px solid #ccc; + padding: 5px; + padding-top: 0px; + padding-bottom: 2px; + text-decoration: none; + margin-top: 5px; +} + +.exception { + color: #000; + textarea { + width: 95%; + height: 200px; + background: #ffe; + border: 0; + } +} + +.ui-icon-circle-triangle-e { + background-image: url('../img/actions/play-next.svg?v=1'); +} + +.ui-icon-circle-triangle-w { + background-image: url('../img/actions/play-previous.svg?v=1'); +} + +.ui-datepicker-prev, .ui-datepicker-next { + border: 1px solid #ddd; + background: #fff; +} + +/* ---- DIALOGS ---- */ + +#oc-dialog-filepicker-content { + .dirtree { + width: 92%; + float: left; + margin-left: 15px; + overflow: hidden; + div:first-child a { + background-image: url('../img/places/home.svg?v=1'); + background-repeat: no-repeat; + background-position: left center; + } + span { + &:not(:last-child) { + cursor: pointer; + } + &:last-child { + font-weight: bold; + } + &:not(:last-child)::after { + content: '>'; + padding: 3px; + } + } + } + .filelist-container { + box-sizing: border-box; + display: inline-block; + overflow-y: auto; + height: 100%; + /** overflow under the button row */ + width: 100%; + } + .emptycontent { + color: #888; + text-align: center; + margin-top: 80px; + width: 100%; + display: none; + } + .filelist { + background-color: white; + width: 100%; + } + #filestable.filelist { + /* prevent the filepicker to overflow */ + min-width: initial; + margin-bottom: 50px; + } + .filelist { + td { + padding: 14px; + border-bottom: 1px solid #eee; + } + tr:last-child td { + border-bottom: none; + } + .filename { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + background-size: 32px; + background-repeat: no-repeat; + padding-left: 51px; + background-position: 7px 7px; + cursor: pointer; + } + .filesize, .date { + width: 80px; + } + .filesize { + text-align: right; + } + } + .filepicker_element_selected { + background-color: lightblue; + } +} + +.ui-dialog { + position: fixed !important; +} + +span.ui-icon { + float: left; + margin: 3px 7px 30px 0; +} + +.move2trash { + /* decrease spinner size */ + width: 16px; + height: 16px; +} + +/* ---- TOOLTIPS ---- */ + +.extra-data { + padding-right: 5px !important; +} + +.tipsy-inner { + max-width: 400px !important; + overflow: hidden; + text-overflow: ellipsis; +} + +/* ---- TAGS ---- */ + +#tagsdialog { + .content { + width: 100%; + height: 280px; + } + .scrollarea { + overflow: auto; + border: 1px solid #ddd; + width: 100%; + height: 240px; + } + .bottombuttons { + width: 100%; + height: 30px; + * { + float: left; + } + } + .taglist li { + background: #f8f8f8; + padding: .3em .8em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -webkit-transition: background-color 500ms; + transition: background-color 500ms; + &:hover, &:active { + background: #eee; + } + } + .addinput { + width: 90%; + clear: both; + } +} + +/* ---- APP SETTINGS - LEGACY, DO NOT USE THE POPUP! ---- */ + +.popup { + background-color: #fff; + border-radius: 3px; + box-shadow: 0 0 10px #aaa; + color: #333; + padding: 10px; + position: fixed !important; + z-index: 100; + &.topright { + top: 7em; + right: 1em; + } + &.bottomleft { + bottom: 1em; + left: 33em; + } + .close { + position: absolute; + top: 0.2em; + right: 0.2em; + height: 20px; + width: 20px; + background: url('../img/actions/close.svg?v=1') no-repeat center; + } + h2 { + font-size: 20px; + } +} + +.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; + &.left { + left: -13px; + bottom: 1.2em; + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); + } + &.up { + top: -8px; + right: 6px; + } + &.down { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); + } +} + +/* ---- BREADCRUMB ---- */ + +div.crumb { + float: left; + display: block; + background-image: url('../img/breadcrumb.svg?v=1'); + background-repeat: no-repeat; + background-position: right center; + height: 44px; + background-size: auto 24px; + &.hidden { + display: none; + } + a, > span { + position: relative; + top: 12px; + padding: 14px 24px 14px 17px; + color: #555; + } + &.last a { + padding-right: 0; + } + &:first-child a { + position: relative; + top: 13px; + padding-right: 14px; + } + &.last { + font-weight: 600; + margin-right: 10px; + } + &.ellipsized { + padding: 0 10px 0 5px; + } + a.ellipsislink { + padding: 0 !important; + position: relative; + top: 8px !important; + } + &:hover, &:focus, a:focus, &:active { + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=70)'; + opacity: .7; + } +} + +/* some feedback for hover/tap on breadcrumbs */ + +.appear { + opacity: 1; + -webkit-transition: opacity 500ms ease 0s; + -moz-transition: opacity 500ms ease 0s; + -ms-transition: opacity 500ms ease 0s; + -o-transition: opacity 500ms ease 0s; + transition: opacity 500ms ease 0s; + &.transparent { + opacity: 0; + } +} + +/* public footer */ + +#body-public footer { + position: relative; + text-align: center; + .info { + color: #777; + text-align: center; + margin: 0 auto; + padding: 20px 0; + a { + color: #777; + font-weight: 600; + padding: 13px; + margin: -13px; + } + } +} + +/* LEGACY FIX only - do not use fieldsets for settings */ + +fieldset { + &.warning legend, &.update legend { + top: 18px; + position: relative; + } + &.warning legend + p, &.update legend + p { + margin-top: 12px; + } +} + +/* for IE10 */ +@-ms-viewport { + width: device-width; +} + + +/* hidden input type=file field */ + +.hiddenuploadfield { + width: 0; + height: 0; + opacity: 0; + -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'; +} diff --git a/core/css/systemtags.css b/core/css/systemtags.css deleted file mode 100644 index d11dc741065..00000000000 --- a/core/css/systemtags.css +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2016 - * - * This file is licensed under the Affero General Public License version 3 - * or later. - * - * See the COPYING-README file. - * - */ - -.systemtags-select2-dropdown .select2-result-label .checkmark { - visibility: hidden; - margin-left: -5px; - margin-right: 5px; - padding: 4px; -} - -.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions { - display: none; -} - -.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark { - visibility: visible; -} - -.systemtags-select2-dropdown .select2-result-label .icon { - display: inline-block; - opacity: .5; -} -.systemtags-select2-dropdown .select2-result-label .icon.rename { - padding: 4px; -} - -.systemtags-select2-dropdown .systemtags-actions { - position: absolute; - right: 5px; -} - -.systemtags-select2-dropdown .systemtags-rename-form { - display: inline-block; - width: calc(100% - 20px); - top: -6px; - position: relative; -} - -.systemtags-select2-dropdown .systemtags-rename-form input { - display: inline-block; - width: calc(100% - 40px); -} - -.systemtags-select2-container { - width: 100%; -} - -#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result { - padding: 5px; -} - -.systemtags-select2-dropdown span { - line-height: 25px; -} - -.systemtags-select2-dropdown .systemtags-item { - display: inline-block; - height: 25px; - width: 100%; -} - -.systemtags-select2-dropdown .select2-result-label { - height: 25px; -} - -.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label { - opacity: 0.5; -} - -.systemtags-select2-dropdown .label { - width:85%; - display:-moz-inline-box; - display:inline-block; - overflow:hidden; - text-overflow:ellipsis; -} -.systemtags-select2-dropdown .label.hidden { - display: none; -} diff --git a/core/css/systemtags.scss b/core/css/systemtags.scss new file mode 100644 index 00000000000..adbd36ebab1 --- /dev/null +++ b/core/css/systemtags.scss @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2016 + * + * This file is licensed under the Affero General Public License version 3 + * or later. + * + * See the COPYING-README file. + * + */ + +.systemtags-select2-dropdown { + .select2-result-label { + .checkmark { + visibility: hidden; + margin-left: -5px; + margin-right: 5px; + padding: 4px; + } + .new-item .systemtags-actions { + display: none; + } + } + .select2-selected .select2-result-label .checkmark { + visibility: visible; + } + .select2-result-label .icon { + display: inline-block; + opacity: .5; + &.rename { + padding: 4px; + } + } + .systemtags-actions { + position: absolute; + right: 5px; + } + .systemtags-rename-form { + display: inline-block; + width: calc(100% - 20px); + top: -6px; + position: relative; + input { + display: inline-block; + width: calc(100% - 40px); + } + } +} + +.systemtags-select2-container { + width: 100%; +} + +#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result { + padding: 5px; +} + +.systemtags-select2-dropdown { + span { + line-height: 25px; + } + .systemtags-item { + display: inline-block; + height: 25px; + width: 100%; + } + .select2-result-label { + height: 25px; + } +} + +.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label { + opacity: 0.5; +} + +.systemtags-select2-dropdown .label { + width: 85%; + display: -moz-inline-box; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + &.hidden { + display: none; + } +} diff --git a/core/css/tooltip.css b/core/css/tooltip.css deleted file mode 100644 index e5a2f7b2145..00000000000 --- a/core/css/tooltip.css +++ /dev/null @@ -1,119 +0,0 @@ -/*! - * Bootstrap v3.3.5 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -.tooltip { - position: absolute; - display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-style: normal; - font-weight: normal; - letter-spacing: normal; - line-break: auto; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - white-space: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - font-size: 12px; - opacity: 0; - z-index: 100000; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.9; - filter: alpha(opacity=90); -} -.tooltip.top { - margin-top: -3px; - padding: 5px 0; -} -.tooltip.right { - margin-left: 3px; - padding: 0 5px; -} -.tooltip.bottom { - margin-top: 3px; - padding: 5px 0; -} -.tooltip.left { - margin-left: -3px; - padding: 0 5px; -} -.tooltip-inner { - max-width: 350px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - background-color: #000000; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.top-left .tooltip-arrow { - bottom: 0; - right: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - left: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - right: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - left: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000000; -} diff --git a/core/css/tooltip.scss b/core/css/tooltip.scss new file mode 100644 index 00000000000..42289787e8d --- /dev/null +++ b/core/css/tooltip.scss @@ -0,0 +1,125 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.tooltip { + position: absolute; + display: block; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + line-break: auto; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + white-space: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + font-size: 12px; + opacity: 0; + z-index: 100000; + filter: alpha(opacity = 0); + &.in { + opacity: 0.9; + filter: alpha(opacity = 90); + } + &.top { + margin-top: -3px; + padding: 5px 0; + } + &.right { + margin-left: 3px; + padding: 0 5px; + } + &.bottom { + margin-top: 3px; + padding: 5px 0; + } + &.left { + margin-left: -3px; + padding: 0 5px; + } +} + +.tooltip-inner { + max-width: 350px; + padding: 3px 8px; + color: #ffffff; + text-align: center; + background-color: #000000; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip { + &.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; + } + &.top-left .tooltip-arrow { + bottom: 0; + right: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; + } + &.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; + } + &.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; + } + &.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; + } + &.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; + } + &.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; + } + &.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; + } +} diff --git a/core/css/update.css b/core/css/update.css index 12cda3d5bbd..0ae72fd04a0 100644 --- a/core/css/update.css +++ b/core/css/update.css @@ -31,3 +31,419 @@ #body-login .warning.hidden { display: none; } + +/** + * Below this is a copy of the original CSS because we moved to on-the-fly + * generated CSS from SCSS which doesn't work during update + */ + +/** HEADER **/ + +/* prevent ugly selection effect on accidental selection */ +#header { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +/* removed until content-focusing issue is fixed */ +#skip-to-content a { + position: absolute; + left: -10000px; + top: auto; + width: 1px; + height: 1px; + overflow: hidden; +} +#skip-to-content a:focus { + left: 76px; + top: -9px; + color: #fff; + width: auto; + height: auto; +} + +/* HEADERS ------------------------------------------------------------------ */ + +#header .logo { + background-image: url('../img/logo-icon.svg?v=1'); + background-repeat: no-repeat; + background-size: 175px; + background-position: center; + width: 252px; + height: 120px; + margin: 0 auto; +} + +/** STYLES **/ + +/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net + This file is licensed under the Affero General Public License version 3 or later. + See the COPYING-README file. */ + +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; cursor:default; } +html, body { height:100%; } +article, aside, dialog, figure, footer, header, hgroup, nav, section { display:block; } +body { line-height:1.5; } +table { border-collapse:separate; border-spacing:0; white-space:nowrap; } +caption, th, td { text-align:left; font-weight:normal; } +table, td, th { vertical-align:middle; } +a { border:0; color:#000; text-decoration:none;} +a, a *, input, input *, select, .button span, label { cursor:pointer; } +ul { list-style:none; } + +body { + background-color: #ffffff; + font-weight: 400; + font-size: .8em; + line-height: 1.6em; + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; + color: #000; + height: auto; +} + +#body-login { + text-align: center; + background-color: #0082c9; + background-image: url('../img/background.jpg?v=1'); + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; +} + +#nojavascript { + position: fixed; + top: 0; + bottom: 0; + height: 100%; + width: 100%; + z-index: 9000; + text-align: center; + background-color: rgba(0,0,0,0.5); + color: #fff; + line-height: 125%; + font-size: 24px; +} +#nojavascript div { + display: block; + position: relative; + width: 50%; + top: 35%; + margin: 0px auto; +} +#nojavascript a { + color: #fff; + border-bottom: 2px dotted #fff; +} +#nojavascript a:hover, +#nojavascript a:focus { + color: #ddd; +} + +/* SCROLLING */ +::-webkit-scrollbar { + width: 5px; +} +::-webkit-scrollbar-track-piece { + background-color: transparent; +} +::-webkit-scrollbar-thumb { + background: #ddd; + border-radius: 3px; +} + +/* LOG IN & INSTALLATION ------------------------------------------------------------ */ + +/* Some whitespace to the top */ +#body-login #header { + padding-top: 100px; +} +#body-login { + background-attachment: fixed; /* fix background gradient */ + height: 100%; /* fix sticky footer */ +} + +/* Dark subtle label text */ +#body-login p.info { + text-align: center; + color: #fff; +} + +#body-login .update h2 { + margin: 0 0 20px; +} + +#body-login .update a { + color: #fff; + border-bottom: 1px solid #aaa; +} + +#body-login .infogroup { + margin-bottom: 15px; +} + +#body-login p#message img { + vertical-align: middle; + padding: 5px; +} + +#body-login p.info { + margin: 0 auto; + padding-top: 20px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#body-login p.info a { + font-weight: 600; + padding: 13px; + margin: -13px; + color: #fff; +} + +#body-login .success { + background:#d7fed7; + border:1px solid #0f0; + width: 35%; + margin: 30px auto; + padding:1em; + text-align: center; +} + +#body-login p.info a:hover, +#body-login p.info a:focus { + opacity: .6; +} + +/* Warnings and errors are the same */ +#body-login .warning, +#body-login .update, +#body-login .error { + display: block; + padding: 10px; + background-color: rgba(0,0,0,.3); + color: #fff; + text-align: left; + border-radius: 3px; + cursor: default; +} + +#body-login .update { + width: inherit; + text-align: center; +} + +#body-login .update .appList { + list-style: disc; + text-align: left; + margin-left: 25px; + margin-right: 25px; +} + +#body-login .v-align { + width: inherit; +} + +.error a { + color: #fff !important; + font-weight: 600 !important; +} +.error a.button { + color: #555 !important; + display: inline-block; + text-align: center; +} +.error pre { + white-space: pre-wrap; + text-align: left; +} + +/* fixes for update page TODO should be fixed some time in a proper way */ +/* this is just for an error while updating the ownCloud instance */ +#body-login .updateProgress .error { + margin-top: 10px; + margin-bottom: 10px; +} + +/* Log in and install button */ +#body-login input { + font-size: 20px; + margin: 5px; + padding: 11px 10px 9px; +} +#body-login input.login { + width: 269px; + background-position: right 16px center; +} + +/* Sticky footer */ +#body-login .wrapper { + min-height: 100%; + margin: 0 auto -70px; + width: 300px; +} +#body-login footer, #body-login .push { + height: 70px; +} + +code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; } + +/* for IE10 */ +@-ms-viewport { + width: device-width; +} + +/** APPS **/ + +/* buttons */ +button.loading { + background-image: url('../img/loading.gif'); + background-position: right 10px center; background-repeat: no-repeat; + background-size: 16px; + padding-right: 30px; +} + +/* heading styles */ +h2 { + font-size: 20px; + font-weight: 300; + margin-bottom: 12px; + line-height: 140%; +} +h3 { + font-size: 15px; + font-weight: 300; + margin: 12px 0; +} + +/* do not use italic typeface style, instead lighter color */ +em { + font-style: normal; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; +} + +/** ICONS **/ + +[class^="icon-"], [class*=" icon-"] { + background-repeat: no-repeat; + background-position: center; + min-width: 16px; + min-height: 16px; +} + +/* general assets */ + +.icon-loading-dark { + position: relative; +} +.icon-loading-dark:after { + z-index: 2; + content: ""; + height: 30px; + width: 30px; + margin: -16px 0 0 -16px; + position: absolute; + top: 50%; + left: 50%; + border-radius: 100%; + -webkit-animation: rotate .8s infinite linear; + animation: rotate .8s infinite linear; + -webkit-transform-origin: center; + -ms-transform-origin: center; + transform-origin: center; +} +.icon-loading-dark:after { + border: 2px solid rgba(150, 150, 150, .5); + border-top-color: rgb(100, 100, 100); +} + +.icon-loading-dark:after, +.icon-loading-small-dark:after { + border: 2px solid rgba(187, 187, 187, .5); + border-top-color: #bbb; +} + +/* Css replaced elements don't have ::after nor ::before */ +img.icon-loading-dark, object.icon-loading-dark, video.icon-loading-dark, button.icon-loading-dark, textarea.icon-loading-dark, input.icon-loading-dark, select.icon-loading-dark { + background-image: url("../img/loading-dark.gif"); +} + +@-webkit-keyframes rotate { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes rotate { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +.icon-32 { + background-size: 32px !important; +} + +.icon-checkmark-white { + background-image: url('../img/actions/checkmark-white.svg?v=1'); +} + +.icon-error-white { + background-image: url('../img/actions/error-white.svg?v=1'); +} + +/* INPUTS */ + +/* specifically override browser styles */ +input { + font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; +} + +input[type="button"] { + width: 130px; + margin: 3px 3px 3px 0; + padding: 7px 6px 5px; + font-size: 13px; + background-color: #fff; + color: #333; + border: 1px solid #ddd; + outline: none; + border-radius: 3px; +} + +/* correctly align images inside of buttons */ +input img { + vertical-align: text-bottom; +} + +/* BUTTONS */ +input[type="button"] { + width: auto; + min-width: 25px; + padding: 5px; + background-color: rgba(240,240,240,.9); + font-weight: 600; + color: #555; + border: 1px solid rgba(240,240,240,.9); + cursor: pointer; +} + +input[type="button"]:hover, input[type="button"]:focus { + background-color: rgba(255, 255, 255, .95); + color: #111; +} +input[type="button"] img { + border: none; + box-shadow: none; +} diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index e1b9dba14af..89558e21086 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -86,6 +86,7 @@ OC.MimeTypeList={ "text/x-c": "text/code", "text/x-c++src": "text/code", "text/x-h": "text/code", + "text/x-ldif": "text/code", "text/x-java-source": "text/code", "text/x-python": "text/code", "text/x-shellscript": "text/code", diff --git a/core/l10n/ru.js b/core/l10n/ru.js index b0f9243447d..79f75a564d6 100644 --- a/core/l10n/ru.js +++ b/core/l10n/ru.js @@ -71,7 +71,7 @@ OC.L10N.register( "Ok" : "Ок", "Error loading message template: {error}" : "Ошибка загрузки шаблона сообщений: {error}", "read-only" : "только для чтения", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} конфликт в файлах","{count} конфликта в файлах","{count} конфликтов в файлах","{count} конфликтов в файлах"], + "_{count} file conflict_::_{count} file conflicts_" : ["{count} конфликт в файлах","{count} конфликта в файлах","{count} конфликтов в файлах","{count} конфликтов файлов"], "One file conflict" : "Один конфликт в файлах", "New Files" : "Новые файлы", "Already existing files" : "Существующие файлы", @@ -133,7 +133,7 @@ OC.L10N.register( "email" : "email", "Unshare" : "Закрыть доступ", "can reshare" : "можно опубликовать", - "can edit" : "может редактировать", + "can edit" : "можно редактировать", "can create" : "можно создавать", "can change" : "можно изменять", "can delete" : "можно удалять", diff --git a/core/l10n/ru.json b/core/l10n/ru.json index edcad18ba9a..5a353dc5e69 100644 --- a/core/l10n/ru.json +++ b/core/l10n/ru.json @@ -69,7 +69,7 @@ "Ok" : "Ок", "Error loading message template: {error}" : "Ошибка загрузки шаблона сообщений: {error}", "read-only" : "только для чтения", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} конфликт в файлах","{count} конфликта в файлах","{count} конфликтов в файлах","{count} конфликтов в файлах"], + "_{count} file conflict_::_{count} file conflicts_" : ["{count} конфликт в файлах","{count} конфликта в файлах","{count} конфликтов в файлах","{count} конфликтов файлов"], "One file conflict" : "Один конфликт в файлах", "New Files" : "Новые файлы", "Already existing files" : "Существующие файлы", @@ -131,7 +131,7 @@ "email" : "email", "Unshare" : "Закрыть доступ", "can reshare" : "можно опубликовать", - "can edit" : "может редактировать", + "can edit" : "можно редактировать", "can create" : "можно создавать", "can change" : "можно изменять", "can delete" : "можно удалять", diff --git a/core/l10n/sv.js b/core/l10n/sv.js index f92b2923ec7..078d7733103 100644 --- a/core/l10n/sv.js +++ b/core/l10n/sv.js @@ -129,7 +129,7 @@ OC.L10N.register( "Shared with you by {owner}" : "Delad med dig av {owner}", "{{shareInitiatorDisplayName}} shared via link" : "{{shareInitiatorDisplayName}} delad via länk", "group" : "Grupp", - "remote" : "fjärr", + "remote" : "extern", "email" : "epost", "Unshare" : "Sluta dela", "can reshare" : "kan dela vidare", @@ -149,12 +149,12 @@ OC.L10N.register( "Share" : "Dela", "Share with people on other servers using their Federated Cloud ID username@example.com/nextcloud" : "Dela med andra personer på andra servrar genom att använda deras Federerade Cloud ID användarnamn@example.com/nextcloud", "Share with users or by mail..." : "Dela med användare via epost...", - "Share with users or remote users..." : "Dela med användare eller fjärranvändare...", - "Share with users, remote users or by mail..." : "Dela med användare, fjärranvändare eller via epost...", + "Share with users or remote users..." : "Dela med användare eller externanvändare...", + "Share with users, remote users or by mail..." : "Dela med användare, externanvändare eller via e-post...", "Share with users or groups..." : "Dela med användare eller grupper...", "Share with users, groups or by mail..." : "Dela med användare, grupper eller via epost", - "Share with users, groups or remote users..." : "Dela med användare, grupper eller fjärranvändare...", - "Share with users, groups, remote users or by mail..." : "Dela med användare, grupper, fjärranvändare eller via epost...", + "Share with users, groups or remote users..." : "Dela med användare, grupper eller externanvändare...", + "Share with users, groups, remote users or by mail..." : "Dela med användare, grupper, externanvändare eller via e-post...", "Share with users..." : "Dela med användare...", "Error removing share" : "Fel uppstod när delning försökte tas bort", "Non-existing tag #{tag}" : "Icke-existerande tag #{tag}", @@ -177,7 +177,7 @@ OC.L10N.register( "Hello {name}, the weather is {weather}" : "Hej {name}, vädret är {weather}", "Hello {name}" : "Hej {name}", "new" : "ny", - "_download %n file_::_download %n files_" : ["Ladda ner %n fil","Ladda ner %n filer"], + "_download %n file_::_download %n files_" : ["Ladda ner %n fil","Ladda ned %n filer"], "The update is in progress, leaving this page might interrupt the process in some environments." : "Uppdateringen pågår, om sidan lämnas kan uppdateringen misslyckas. ", "Update to {version}" : "Uppdatera till {version}", "An error occurred." : "Ett fel inträffade.", @@ -206,7 +206,7 @@ OC.L10N.register( "Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report." : "Vänligen kontakta serveradministratören om detta fel återkommer flera gånger, vänligen inkludera nedanstående tekniska detaljeri din felrapport.", "More details can be found in the server log." : "Mer detaljer återfinns i serverns logg.", "Technical details" : "Tekniska detaljer", - "Remote Address: %s" : "Fjärradress: %s", + "Remote Address: %s" : "Extern adress: %s", "Request ID: %s" : "Begärd ID: %s", "Type: %s" : "Typ: %s", "Code: %s" : "Kod: %s", @@ -353,9 +353,9 @@ OC.L10N.register( "delete" : "radera", "{sharee} (at {server})" : "{sharee} (at {server})", "Share with users…" : "Dela med användare...", - "Share with users, groups or remote users…" : "Dela med användare, grupper och fjärranvändare...", + "Share with users, groups or remote users…" : "Dela med användare, grupper och externanvändare...", "Share with users or groups…" : "Dela med användare eller grupper...", - "Share with users or remote users…" : "Dela med användare eller fjärranvändare...", + "Share with users or remote users…" : "Dela med användare eller externanvändare...", "Warning" : "Varning", "Error while sending notification" : "Fel när notifikation skulle skickas", "The upgrade is in progress, leaving this page might interrupt the process in some environments." : "Uppgradering pågår, att lämna denna sidan kan störa processen i vissa miljöer", diff --git a/core/l10n/sv.json b/core/l10n/sv.json index 1b07ef13113..99c517cb3e0 100644 --- a/core/l10n/sv.json +++ b/core/l10n/sv.json @@ -127,7 +127,7 @@ "Shared with you by {owner}" : "Delad med dig av {owner}", "{{shareInitiatorDisplayName}} shared via link" : "{{shareInitiatorDisplayName}} delad via länk", "group" : "Grupp", - "remote" : "fjärr", + "remote" : "extern", "email" : "epost", "Unshare" : "Sluta dela", "can reshare" : "kan dela vidare", @@ -147,12 +147,12 @@ "Share" : "Dela", "Share with people on other servers using their Federated Cloud ID username@example.com/nextcloud" : "Dela med andra personer på andra servrar genom att använda deras Federerade Cloud ID användarnamn@example.com/nextcloud", "Share with users or by mail..." : "Dela med användare via epost...", - "Share with users or remote users..." : "Dela med användare eller fjärranvändare...", - "Share with users, remote users or by mail..." : "Dela med användare, fjärranvändare eller via epost...", + "Share with users or remote users..." : "Dela med användare eller externanvändare...", + "Share with users, remote users or by mail..." : "Dela med användare, externanvändare eller via e-post...", "Share with users or groups..." : "Dela med användare eller grupper...", "Share with users, groups or by mail..." : "Dela med användare, grupper eller via epost", - "Share with users, groups or remote users..." : "Dela med användare, grupper eller fjärranvändare...", - "Share with users, groups, remote users or by mail..." : "Dela med användare, grupper, fjärranvändare eller via epost...", + "Share with users, groups or remote users..." : "Dela med användare, grupper eller externanvändare...", + "Share with users, groups, remote users or by mail..." : "Dela med användare, grupper, externanvändare eller via e-post...", "Share with users..." : "Dela med användare...", "Error removing share" : "Fel uppstod när delning försökte tas bort", "Non-existing tag #{tag}" : "Icke-existerande tag #{tag}", @@ -175,7 +175,7 @@ "Hello {name}, the weather is {weather}" : "Hej {name}, vädret är {weather}", "Hello {name}" : "Hej {name}", "new" : "ny", - "_download %n file_::_download %n files_" : ["Ladda ner %n fil","Ladda ner %n filer"], + "_download %n file_::_download %n files_" : ["Ladda ner %n fil","Ladda ned %n filer"], "The update is in progress, leaving this page might interrupt the process in some environments." : "Uppdateringen pågår, om sidan lämnas kan uppdateringen misslyckas. ", "Update to {version}" : "Uppdatera till {version}", "An error occurred." : "Ett fel inträffade.", @@ -204,7 +204,7 @@ "Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report." : "Vänligen kontakta serveradministratören om detta fel återkommer flera gånger, vänligen inkludera nedanstående tekniska detaljeri din felrapport.", "More details can be found in the server log." : "Mer detaljer återfinns i serverns logg.", "Technical details" : "Tekniska detaljer", - "Remote Address: %s" : "Fjärradress: %s", + "Remote Address: %s" : "Extern adress: %s", "Request ID: %s" : "Begärd ID: %s", "Type: %s" : "Typ: %s", "Code: %s" : "Kod: %s", @@ -351,9 +351,9 @@ "delete" : "radera", "{sharee} (at {server})" : "{sharee} (at {server})", "Share with users…" : "Dela med användare...", - "Share with users, groups or remote users…" : "Dela med användare, grupper och fjärranvändare...", + "Share with users, groups or remote users…" : "Dela med användare, grupper och externanvändare...", "Share with users or groups…" : "Dela med användare eller grupper...", - "Share with users or remote users…" : "Dela med användare eller fjärranvändare...", + "Share with users or remote users…" : "Dela med användare eller externanvändare...", "Warning" : "Varning", "Error while sending notification" : "Fel när notifikation skulle skickas", "The upgrade is in progress, leaving this page might interrupt the process in some environments." : "Uppgradering pågår, att lämna denna sidan kan störa processen i vissa miljöer", diff --git a/core/routes.php b/core/routes.php index 2b8080a3b7b..6f1892d19ac 100644 --- a/core/routes.php +++ b/core/routes.php @@ -55,6 +55,7 @@ $application->registerRoutes($this, [ ['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'], ['name' => 'Preview#getPreview', 'url' => '/core/preview', 'verb' => 'GET'], ['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'], + ['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'], ], 'ocs' => [ ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'], diff --git a/lib/base.php b/lib/base.php index 38b07f1b308..4a9158eff64 100644 --- a/lib/base.php +++ b/lib/base.php @@ -281,6 +281,7 @@ class OC { // render error page $template = new OC_Template('', 'update.user', 'guest'); OC_Util::addScript('maintenance-check'); + OC_Util::addStyle('update'); $template->printPage(); die(); } @@ -354,6 +355,8 @@ class OC { header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 120'); + \OCP\Util::addStyle('update'); + // render error page $template = new OC_Template('', 'update.use-cli', 'guest'); $template->assign('productName', 'nextcloud'); // for now @@ -667,7 +670,6 @@ class OC { } // register the stream wrappers - stream_wrapper_register('static', 'OC\Files\Stream\StaticStream'); stream_wrapper_register('close', 'OC\Files\Stream\Close'); \OC::$server->getEventLogger()->start('init_session', 'Initialize session'); diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 52ace115f66..c32383521fd 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -420,6 +420,7 @@ return array( 'OC\\Core\\Command\\User\\ResetPassword' => $baseDir . '/core/Command/User/ResetPassword.php', 'OC\\Core\\Command\\User\\Setting' => $baseDir . '/core/Command/User/Setting.php', 'OC\\Core\\Controller\\AvatarController' => $baseDir . '/core/Controller/AvatarController.php', + 'OC\\Core\\Controller\\CssController' => $baseDir . '/core/Controller/CssController.php', 'OC\\Core\\Controller\\LoginController' => $baseDir . '/core/Controller/LoginController.php', 'OC\\Core\\Controller\\LostController' => $baseDir . '/core/Controller/LostController.php', 'OC\\Core\\Controller\\OCJSController' => $baseDir . '/core/Controller/OCJSController.php', @@ -556,7 +557,6 @@ return array( 'OC\\Files\\Stream\\Close' => $baseDir . '/lib/private/Files/Stream/Close.php', 'OC\\Files\\Stream\\Encryption' => $baseDir . '/lib/private/Files/Stream/Encryption.php', 'OC\\Files\\Stream\\Quota' => $baseDir . '/lib/private/Files/Stream/Quota.php', - 'OC\\Files\\Stream\\StaticStream' => $baseDir . '/lib/private/Files/Stream/StaticStream.php', 'OC\\Files\\Type\\Detection' => $baseDir . '/lib/private/Files/Type/Detection.php', 'OC\\Files\\Type\\Loader' => $baseDir . '/lib/private/Files/Type/Loader.php', 'OC\\Files\\Type\\TemplateManager' => $baseDir . '/lib/private/Files/Type/TemplateManager.php', @@ -606,7 +606,6 @@ return array( 'OC\\Log\\Syslog' => $baseDir . '/lib/private/Log/Syslog.php', 'OC\\Mail\\Mailer' => $baseDir . '/lib/private/Mail/Mailer.php', 'OC\\Mail\\Message' => $baseDir . '/lib/private/Mail/Message.php', - 'OC\\Memcache\\APC' => $baseDir . '/lib/private/Memcache/APC.php', 'OC\\Memcache\\APCu' => $baseDir . '/lib/private/Memcache/APCu.php', 'OC\\Memcache\\ArrayCache' => $baseDir . '/lib/private/Memcache/ArrayCache.php', 'OC\\Memcache\\CADTrait' => $baseDir . '/lib/private/Memcache/CADTrait.php', @@ -793,6 +792,7 @@ return array( 'OC\\Template\\JSResourceLocator' => $baseDir . '/lib/private/Template/JSResourceLocator.php', 'OC\\Template\\ResourceLocator' => $baseDir . '/lib/private/Template/ResourceLocator.php', 'OC\\Template\\ResourceNotFoundException' => $baseDir . '/lib/private/Template/ResourceNotFoundException.php', + 'OC\\Template\\SCSSCacher' => $baseDir . '/lib/private/Template/SCSSCacher.php', 'OC\\Template\\TemplateFileLocator' => $baseDir . '/lib/private/Template/TemplateFileLocator.php', 'OC\\URLGenerator' => $baseDir . '/lib/private/URLGenerator.php', 'OC\\Updater' => $baseDir . '/lib/private/Updater.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 4387165b0bf..ad5e39326ab 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -450,6 +450,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Command\\User\\ResetPassword' => __DIR__ . '/../../..' . '/core/Command/User/ResetPassword.php', 'OC\\Core\\Command\\User\\Setting' => __DIR__ . '/../../..' . '/core/Command/User/Setting.php', 'OC\\Core\\Controller\\AvatarController' => __DIR__ . '/../../..' . '/core/Controller/AvatarController.php', + 'OC\\Core\\Controller\\CssController' => __DIR__ . '/../../..' . '/core/Controller/CssController.php', 'OC\\Core\\Controller\\LoginController' => __DIR__ . '/../../..' . '/core/Controller/LoginController.php', 'OC\\Core\\Controller\\LostController' => __DIR__ . '/../../..' . '/core/Controller/LostController.php', 'OC\\Core\\Controller\\OCJSController' => __DIR__ . '/../../..' . '/core/Controller/OCJSController.php', @@ -586,7 +587,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Files\\Stream\\Close' => __DIR__ . '/../../..' . '/lib/private/Files/Stream/Close.php', 'OC\\Files\\Stream\\Encryption' => __DIR__ . '/../../..' . '/lib/private/Files/Stream/Encryption.php', 'OC\\Files\\Stream\\Quota' => __DIR__ . '/../../..' . '/lib/private/Files/Stream/Quota.php', - 'OC\\Files\\Stream\\StaticStream' => __DIR__ . '/../../..' . '/lib/private/Files/Stream/StaticStream.php', 'OC\\Files\\Type\\Detection' => __DIR__ . '/../../..' . '/lib/private/Files/Type/Detection.php', 'OC\\Files\\Type\\Loader' => __DIR__ . '/../../..' . '/lib/private/Files/Type/Loader.php', 'OC\\Files\\Type\\TemplateManager' => __DIR__ . '/../../..' . '/lib/private/Files/Type/TemplateManager.php', @@ -636,7 +636,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Log\\Syslog' => __DIR__ . '/../../..' . '/lib/private/Log/Syslog.php', 'OC\\Mail\\Mailer' => __DIR__ . '/../../..' . '/lib/private/Mail/Mailer.php', 'OC\\Mail\\Message' => __DIR__ . '/../../..' . '/lib/private/Mail/Message.php', - 'OC\\Memcache\\APC' => __DIR__ . '/../../..' . '/lib/private/Memcache/APC.php', 'OC\\Memcache\\APCu' => __DIR__ . '/../../..' . '/lib/private/Memcache/APCu.php', 'OC\\Memcache\\ArrayCache' => __DIR__ . '/../../..' . '/lib/private/Memcache/ArrayCache.php', 'OC\\Memcache\\CADTrait' => __DIR__ . '/../../..' . '/lib/private/Memcache/CADTrait.php', @@ -823,6 +822,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Template\\JSResourceLocator' => __DIR__ . '/../../..' . '/lib/private/Template/JSResourceLocator.php', 'OC\\Template\\ResourceLocator' => __DIR__ . '/../../..' . '/lib/private/Template/ResourceLocator.php', 'OC\\Template\\ResourceNotFoundException' => __DIR__ . '/../../..' . '/lib/private/Template/ResourceNotFoundException.php', + 'OC\\Template\\SCSSCacher' => __DIR__ . '/../../..' . '/lib/private/Template/SCSSCacher.php', 'OC\\Template\\TemplateFileLocator' => __DIR__ . '/../../..' . '/lib/private/Template/TemplateFileLocator.php', 'OC\\URLGenerator' => __DIR__ . '/../../..' . '/lib/private/URLGenerator.php', 'OC\\Updater' => __DIR__ . '/../../..' . '/lib/private/Updater.php', diff --git a/lib/l10n/sv.js b/lib/l10n/sv.js index b0b2be3be0a..50757c2443e 100644 --- a/lib/l10n/sv.js +++ b/lib/l10n/sv.js @@ -5,6 +5,7 @@ OC.L10N.register( "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge skrivrättigheter till config katalgogen", "See %s" : "Se %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till konfigurations-katalogen %s.", + "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %$1s ersattes inte korrekt. Se till att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har detekterats att exempel-konfigurationen har kopierats. Detta kan förstöra din installation och stöds ej. Vänligen läs dokumentationen innan ändringar på config.php utförs", "%1$s and %2$s" : "%1$s och %2$s", @@ -35,11 +36,14 @@ OC.L10N.register( "_%n hour ago_::_%n hours ago_" : ["%n timme sedan","%n timmar sedan"], "_%n minute ago_::_%n minutes ago_" : ["%n minut sedan","%n minuter sedan"], "seconds ago" : "sekunder sedan", + "Module with id: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modulen med id: %s finns inte. Vänligen aktivera det i dina app-inställningar eller kontakta din administratör.", "File name is a reserved word" : "Filnamnet är ett reserverat ord", "File name contains at least one invalid character" : "Filnamnet innehåller minst ett ogiltigt tecken", "File name is too long" : "Filnamnet är för långt", "Dot files are not allowed" : "Dot filer är inte tillåtna", "Empty filename is not allowed" : "Tomma filnamn är inte tillåtna", + "APCu" : "APCu", + "Redis" : "Redis", "Server settings" : "Serverinställningar", "Sharing" : "Delning", "Encryption" : "Kryptering", @@ -58,6 +62,8 @@ OC.L10N.register( "PostgreSQL username and/or password not valid" : "PostgreSQL-användarnamnet och/eller lösenordet är felaktigt", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X stöds inte och %s kommer inte att fungera korrekt på denna plattform. Använd på egen risk!", "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux server istället.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Det verkar som om denna %s instans körs på en 32-bitars PHP miljö och open_basedir har konfigurerats i php.ini. Detta kommer att leda till problem med filer över 4 GB och är verkligen inte rekommenderat!", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ta bort open_basedir i din php.ini eller byt till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", @@ -93,7 +99,7 @@ OC.L10N.register( "Sharing %s failed, because the sharing backend for %s could not find its source" : "Delning %s misslyckades därför att delningsgränsnittet för %s inte kunde hitta sin källa", "Sharing %s failed, because the file could not be found in the file cache" : "Delning %s misslyckades därför att filen inte kunde hittas i filcachen", "Cannot increase permissions of %s" : "Kan ej öka behörigheterna för %s", - "Files can't be shared with delete permissions" : "Filerna kan ej delas med \"ta-bort behörigheter\"", + "Files can't be shared with delete permissions" : "Filerna kan ej delas med \"radera behörigheter\"", "Files can't be shared with create permissions" : "Filerna kan ej delas med \"skapa behörigheter\"", "Expiration date is in the past" : "Utgångsdatum är i det förflutna", "Cannot set expiration date more than %s days in the future" : "Kan ej välja ett utgångsdatum längre fram än %s dagar", @@ -172,6 +178,7 @@ OC.L10N.register( "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till applikationskatalogen %s eller stänga av app-butik i konfigurationsfilen.", "Cannot create \"data\" directory (%s)" : "Kan inte skapa \"data\" katalog (%s)", + "This can usually be fixed by <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\"> ge webbserver skrivåtkomst till rotkatalogen </a>.", "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.", "Setting locale to %s failed" : "Sätta locale till %s misslyckades", "Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om dinn webbserver,", @@ -179,6 +186,11 @@ OC.L10N.register( "PHP module %s not installed." : "PHP modulen %s är inte installerad.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP inställning \"%s\" är inte inställd på \"%s\".", "Adjusting this setting in php.ini will make Nextcloud run again" : "Att ändra denna inställning i php.ini kommer göra så att Nextcloud fungerar igen", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload är satt till \"%s\" istället för det förväntade värdet \"0\"", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "För att åtgärda detta problem sätt värdet <code> mbstring.func_overload till </ code> <code> 0 </ code> i din php.ini", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 är det minsta som krävs. För närvarande är %s installerat.", + "To fix this issue update your libxml2 version and restart your web server." : "För att åtgärda detta problem uppdatera libxml2 versionen och starta om din webbserver.", + "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP är tydligen inställt för att tömma \"inline doc blocks\". Detta kommer att göra flera kärnprogram otillgängliga.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Detta orsakas troligtvis av en cache/accelerator som t ex Zend OPchache eller eAccelerator.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har installerats, men de listas fortfarande som saknade?", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webservern.", @@ -206,10 +218,16 @@ OC.L10N.register( "Archives of type %s are not supported" : "Arkiv av typen %s stöds ej", "Failed to open archive when installing app" : "Kunde inte öppna arkivet när appen skulle installeras", "App does not provide an info.xml file" : "Appen har ingen info.xml fil", + "App cannot be installed because appinfo file cannot be read." : "Appen kan inte installeras eftersom app-informationen inte kan läsas i filen.", + "Signature could not get checked. Please contact the app developer and check your admin screen." : "Signaturen kunde inte kontrolleras. Vänligen kontakta appens utvecklare och kontrollera administratörsinställningarna.", "App can't be installed because of not allowed code in the App" : "Appen kan inte installeras eftersom att den innehåller otillåten kod", + "App can't be installed because it is not compatible with this version of the server" : "Appen kan inte installeras eftersom den inte är förenlig med den här versionen av servern", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan inte installeras eftersom att den innehåller etiketten <shipped>true</shipped> vilket inte är tillåtet för icke inkluderade appar", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Appen kan inte installeras eftersom det är fel version på info.xml och stämmer inte överens med versionen från \"App Store\"", "Logging" : "Loggning", "Recommended" : "Rekomenderad", + "Microsoft Windows Platform is not supported" : "Microsoft Windows-plattformen stöds inte", + "Running Nextcloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself." : "Att köra en Nextcloud-Server på Microsoft Windows-plattformen stöds inte. Vi föreslår att du använder en Linux-server i en virtuell maskin om du inte har möjlighet att migrera själva servern.", "Storage not available" : "Lagringsutrymme ej tillgängligt" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/sv.json b/lib/l10n/sv.json index 86fe274a033..40feecff0fe 100644 --- a/lib/l10n/sv.json +++ b/lib/l10n/sv.json @@ -3,6 +3,7 @@ "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge skrivrättigheter till config katalgogen", "See %s" : "Se %s", "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till konfigurations-katalogen %s.", + "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %$1s ersattes inte korrekt. Se till att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har detekterats att exempel-konfigurationen har kopierats. Detta kan förstöra din installation och stöds ej. Vänligen läs dokumentationen innan ändringar på config.php utförs", "%1$s and %2$s" : "%1$s och %2$s", @@ -33,11 +34,14 @@ "_%n hour ago_::_%n hours ago_" : ["%n timme sedan","%n timmar sedan"], "_%n minute ago_::_%n minutes ago_" : ["%n minut sedan","%n minuter sedan"], "seconds ago" : "sekunder sedan", + "Module with id: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modulen med id: %s finns inte. Vänligen aktivera det i dina app-inställningar eller kontakta din administratör.", "File name is a reserved word" : "Filnamnet är ett reserverat ord", "File name contains at least one invalid character" : "Filnamnet innehåller minst ett ogiltigt tecken", "File name is too long" : "Filnamnet är för långt", "Dot files are not allowed" : "Dot filer är inte tillåtna", "Empty filename is not allowed" : "Tomma filnamn är inte tillåtna", + "APCu" : "APCu", + "Redis" : "Redis", "Server settings" : "Serverinställningar", "Sharing" : "Delning", "Encryption" : "Kryptering", @@ -56,6 +60,8 @@ "PostgreSQL username and/or password not valid" : "PostgreSQL-användarnamnet och/eller lösenordet är felaktigt", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X stöds inte och %s kommer inte att fungera korrekt på denna plattform. Använd på egen risk!", "For the best results, please consider using a GNU/Linux server instead." : "För bästa resultat, överväg att använda en GNU/Linux server istället.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Det verkar som om denna %s instans körs på en 32-bitars PHP miljö och open_basedir har konfigurerats i php.ini. Detta kommer att leda till problem med filer över 4 GB och är verkligen inte rekommenderat!", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ta bort open_basedir i din php.ini eller byt till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", @@ -91,7 +97,7 @@ "Sharing %s failed, because the sharing backend for %s could not find its source" : "Delning %s misslyckades därför att delningsgränsnittet för %s inte kunde hitta sin källa", "Sharing %s failed, because the file could not be found in the file cache" : "Delning %s misslyckades därför att filen inte kunde hittas i filcachen", "Cannot increase permissions of %s" : "Kan ej öka behörigheterna för %s", - "Files can't be shared with delete permissions" : "Filerna kan ej delas med \"ta-bort behörigheter\"", + "Files can't be shared with delete permissions" : "Filerna kan ej delas med \"radera behörigheter\"", "Files can't be shared with create permissions" : "Filerna kan ej delas med \"skapa behörigheter\"", "Expiration date is in the past" : "Utgångsdatum är i det förflutna", "Cannot set expiration date more than %s days in the future" : "Kan ej välja ett utgångsdatum längre fram än %s dagar", @@ -170,6 +176,7 @@ "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till applikationskatalogen %s eller stänga av app-butik i konfigurationsfilen.", "Cannot create \"data\" directory (%s)" : "Kan inte skapa \"data\" katalog (%s)", + "This can usually be fixed by <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\"> ge webbserver skrivåtkomst till rotkatalogen </a>.", "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.", "Setting locale to %s failed" : "Sätta locale till %s misslyckades", "Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om dinn webbserver,", @@ -177,6 +184,11 @@ "PHP module %s not installed." : "PHP modulen %s är inte installerad.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP inställning \"%s\" är inte inställd på \"%s\".", "Adjusting this setting in php.ini will make Nextcloud run again" : "Att ändra denna inställning i php.ini kommer göra så att Nextcloud fungerar igen", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload är satt till \"%s\" istället för det förväntade värdet \"0\"", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "För att åtgärda detta problem sätt värdet <code> mbstring.func_overload till </ code> <code> 0 </ code> i din php.ini", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 är det minsta som krävs. För närvarande är %s installerat.", + "To fix this issue update your libxml2 version and restart your web server." : "För att åtgärda detta problem uppdatera libxml2 versionen och starta om din webbserver.", + "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP är tydligen inställt för att tömma \"inline doc blocks\". Detta kommer att göra flera kärnprogram otillgängliga.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Detta orsakas troligtvis av en cache/accelerator som t ex Zend OPchache eller eAccelerator.", "PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har installerats, men de listas fortfarande som saknade?", "Please ask your server administrator to restart the web server." : "Vänligen be din serveradministratör att starta om webservern.", @@ -204,10 +216,16 @@ "Archives of type %s are not supported" : "Arkiv av typen %s stöds ej", "Failed to open archive when installing app" : "Kunde inte öppna arkivet när appen skulle installeras", "App does not provide an info.xml file" : "Appen har ingen info.xml fil", + "App cannot be installed because appinfo file cannot be read." : "Appen kan inte installeras eftersom app-informationen inte kan läsas i filen.", + "Signature could not get checked. Please contact the app developer and check your admin screen." : "Signaturen kunde inte kontrolleras. Vänligen kontakta appens utvecklare och kontrollera administratörsinställningarna.", "App can't be installed because of not allowed code in the App" : "Appen kan inte installeras eftersom att den innehåller otillåten kod", + "App can't be installed because it is not compatible with this version of the server" : "Appen kan inte installeras eftersom den inte är förenlig med den här versionen av servern", "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Appen kan inte installeras eftersom att den innehåller etiketten <shipped>true</shipped> vilket inte är tillåtet för icke inkluderade appar", + "App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "Appen kan inte installeras eftersom det är fel version på info.xml och stämmer inte överens med versionen från \"App Store\"", "Logging" : "Loggning", "Recommended" : "Rekomenderad", + "Microsoft Windows Platform is not supported" : "Microsoft Windows-plattformen stöds inte", + "Running Nextcloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself." : "Att köra en Nextcloud-Server på Microsoft Windows-plattformen stöds inte. Vi föreslår att du använder en Linux-server i en virtuell maskin om du inte har möjlighet att migrera själva servern.", "Storage not available" : "Lagringsutrymme ej tillgängligt" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php index f9170e97a02..f172260df79 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php @@ -30,6 +30,8 @@ use OC\DB\QueryBuilder\Literal; use OC\DB\QueryBuilder\QueryFunction; use OC\DB\QueryBuilder\QuoteHelper; use OCP\DB\QueryBuilder\IExpressionBuilder; +use OCP\DB\QueryBuilder\ILiteral; +use OCP\DB\QueryBuilder\IQueryFunction; use OCP\IDBConnection; class ExpressionBuilder implements IExpressionBuilder { @@ -39,12 +41,16 @@ class ExpressionBuilder implements IExpressionBuilder { /** @var QuoteHelper */ protected $helper; + /** @var IDBConnection */ + protected $connection; + /** * Initializes a new <tt>ExpressionBuilder</tt>. * * @param \OCP\IDBConnection $connection */ public function __construct(IDBConnection $connection) { + $this->connection = $connection; $this->helper = new QuoteHelper(); $this->expressionBuilder = new DoctrineExpressionBuilder($connection); } @@ -345,12 +351,42 @@ class ExpressionBuilder implements IExpressionBuilder { } /** + * Binary AND Operator copies a bit to the result if it exists in both operands. + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseAnd($x, $y) { + return new QueryFunction($this->connection->getDatabasePlatform()->getBitAndComparisonExpression( + $this->helper->quoteColumnName($x), + $y + )); + } + + /** + * Binary OR Operator copies a bit if it exists in either operand. + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseOr($x, $y) { + return new QueryFunction($this->connection->getDatabasePlatform()->getBitOrComparisonExpression( + $this->helper->quoteColumnName($x), + $y + )); + } + + /** * Quotes a given input parameter. * * @param mixed $input The parameter to be quoted. * @param mixed|null $type One of the IQueryBuilder::PARAM_* constants * - * @return Literal + * @return ILiteral */ public function literal($input, $type = null) { return new Literal($this->expressionBuilder->literal($input, $type)); diff --git a/lib/private/Files/Stream/StaticStream.php b/lib/private/Files/Stream/StaticStream.php deleted file mode 100644 index 3c91b23fd36..00000000000 --- a/lib/private/Files/Stream/StaticStream.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <robin@icewind.nl> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC\Files\Stream; - -class StaticStream { - const MODE_FILE = 0100000; - - public $context; - protected static $data = array(); - - protected $path = ''; - protected $pointer = 0; - protected $writable = false; - - public function stream_close() { - } - - public function stream_eof() { - return $this->pointer >= strlen(self::$data[$this->path]); - } - - public function stream_flush() { - } - - public static function clear() { - self::$data = array(); - } - - public function stream_open($path, $mode, $options, &$opened_path) { - switch ($mode[0]) { - case 'r': - if (!isset(self::$data[$path])) return false; - $this->path = $path; - $this->writable = isset($mode[1]) && $mode[1] == '+'; - break; - case 'w': - self::$data[$path] = ''; - $this->path = $path; - $this->writable = true; - break; - case 'a': - if (!isset(self::$data[$path])) self::$data[$path] = ''; - $this->path = $path; - $this->writable = true; - $this->pointer = strlen(self::$data[$path]); - break; - case 'x': - if (isset(self::$data[$path])) return false; - $this->path = $path; - $this->writable = true; - break; - case 'c': - if (!isset(self::$data[$path])) self::$data[$path] = ''; - $this->path = $path; - $this->writable = true; - break; - default: - return false; - } - $opened_path = $this->path; - return true; - } - - public function stream_read($count) { - $bytes = min(strlen(self::$data[$this->path]) - $this->pointer, $count); - $data = substr(self::$data[$this->path], $this->pointer, $bytes); - $this->pointer += $bytes; - return $data; - } - - public function stream_seek($offset, $whence = SEEK_SET) { - $len = strlen(self::$data[$this->path]); - switch ($whence) { - case SEEK_SET: - if ($offset <= $len) { - $this->pointer = $offset; - return true; - } - break; - case SEEK_CUR: - if ($this->pointer + $offset <= $len) { - $this->pointer += $offset; - return true; - } - break; - case SEEK_END: - if ($len + $offset <= $len) { - $this->pointer = $len + $offset; - return true; - } - break; - } - return false; - } - - public function stream_stat() { - return $this->url_stat($this->path); - } - - public function stream_tell() { - return $this->pointer; - } - - public function stream_write($data) { - if (!$this->writable) return 0; - $size = strlen($data); - if ($this->stream_eof()) { - self::$data[$this->path] .= $data; - } else { - self::$data[$this->path] = substr_replace( - self::$data[$this->path], - $data, - $this->pointer - ); - } - $this->pointer += $size; - return $size; - } - - public function unlink($path) { - if (isset(self::$data[$path])) { - unset(self::$data[$path]); - } - return true; - } - - public function url_stat($path) { - if (isset(self::$data[$path])) { - $size = strlen(self::$data[$path]); - $time = time(); - $data = array( - 'dev' => 0, - 'ino' => 0, - 'mode' => self::MODE_FILE | 0777, - 'nlink' => 1, - 'uid' => 0, - 'gid' => 0, - 'rdev' => '', - 'size' => $size, - 'atime' => $time, - 'mtime' => $time, - 'ctime' => $time, - 'blksize' => -1, - 'blocks' => -1, - ); - return array_values($data) + $data; - } - return false; - } -} diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 6facc7b9462..909c49197b8 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -931,39 +931,36 @@ class View { /** * @param string $path - * @param string $mode + * @param string $mode 'r' or 'w' * @return resource */ public function fopen($path, $mode) { + $mode = str_replace('b', '', $mode); // the binary flag is a windows only feature which we do not support $hooks = array(); switch ($mode) { case 'r': - case 'rb': $hooks[] = 'read'; break; case 'r+': - case 'rb+': case 'w+': - case 'wb+': case 'x+': - case 'xb+': case 'a+': - case 'ab+': $hooks[] = 'read'; $hooks[] = 'write'; break; case 'w': - case 'wb': case 'x': - case 'xb': case 'a': - case 'ab': $hooks[] = 'write'; break; default: \OCP\Util::writeLog('core', 'invalid mode (' . $mode . ') for ' . $path, \OCP\Util::ERROR); } + if ($mode !== 'r' && $mode !== 'w') { + \OC::$server->getLogger()->info('Trying to open a file with a mode other than "r" or "w" can cause severe performance issues with some backends'); + } + return $this->basicOperation('fopen', $path, $hooks, $mode); } @@ -1005,7 +1002,7 @@ class View { // Create the directories if any if (!$this->file_exists($filePath)) { $result = $this->createParentDirectories($filePath); - if($result === false) { + if ($result === false) { return false; } } @@ -1357,7 +1354,7 @@ class View { //add the sizes of other mount points to the folder $extOnly = ($includeMountPoints === 'ext'); $mounts = Filesystem::getMountManager()->findIn($path); - $info->setSubMounts(array_filter($mounts, function(IMountPoint $mount) use ($extOnly) { + $info->setSubMounts(array_filter($mounts, function (IMountPoint $mount) use ($extOnly) { $subStorage = $mount->getStorage(); return !($extOnly && $subStorage instanceof \OCA\Files_Sharing\SharedStorage); })); @@ -2106,13 +2103,13 @@ class View { private function createParentDirectories($filePath) { $directoryParts = explode('/', $filePath); $directoryParts = array_filter($directoryParts); - foreach($directoryParts as $key => $part) { + foreach ($directoryParts as $key => $part) { $currentPathElements = array_slice($directoryParts, 0, $key); $currentPath = '/' . implode('/', $currentPathElements); - if($this->is_file($currentPath)) { + if ($this->is_file($currentPath)) { return false; } - if(!$this->file_exists($currentPath)) { + if (!$this->file_exists($currentPath)) { $this->mkdir($currentPath); } } diff --git a/lib/private/Memcache/APC.php b/lib/private/Memcache/APC.php deleted file mode 100644 index 7db6d64b085..00000000000 --- a/lib/private/Memcache/APC.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Andreas Fischer <bantu@owncloud.com> - * @author Clark Tomlinson <fallen013@gmail.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Otto Sabart <ottosabart@seberm.com> - * @author Robin Appelman <robin@icewind.nl> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC\Memcache; - -use OCP\IMemcache; - -class APC extends Cache implements IMemcache { - use CASTrait { - cas as casEmulated; - } - - use CADTrait; - - public function get($key) { - $result = apc_fetch($this->getPrefix() . $key, $success); - if (!$success) { - return null; - } - return $result; - } - - public function set($key, $value, $ttl = 0) { - return apc_store($this->getPrefix() . $key, $value, $ttl); - } - - public function hasKey($key) { - return apc_exists($this->getPrefix() . $key); - } - - public function remove($key) { - return apc_delete($this->getPrefix() . $key); - } - - public function clear($prefix = '') { - $ns = $this->getPrefix() . $prefix; - $ns = preg_quote($ns, '/'); - $iter = new \APCIterator('user', '/^' . $ns . '/', APC_ITER_KEY); - return apc_delete($iter); - } - - /** - * Set a value in the cache if it's not already stored - * - * @param string $key - * @param mixed $value - * @param int $ttl Time To Live in seconds. Defaults to 60*60*24 - * @return bool - */ - public function add($key, $value, $ttl = 0) { - return apc_add($this->getPrefix() . $key, $value, $ttl); - } - - /** - * Increase a stored number - * - * @param string $key - * @param int $step - * @return int | bool - */ - public function inc($key, $step = 1) { - $this->add($key, 0); - return apc_inc($this->getPrefix() . $key, $step); - } - - /** - * Decrease a stored number - * - * @param string $key - * @param int $step - * @return int | bool - */ - public function dec($key, $step = 1) { - return apc_dec($this->getPrefix() . $key, $step); - } - - /** - * Compare and set - * - * @param string $key - * @param mixed $old - * @param mixed $new - * @return bool - */ - public function cas($key, $old, $new) { - // apc only does cas for ints - if (is_int($old) and is_int($new)) { - return apc_cas($this->getPrefix() . $key, $old, $new); - } else { - return $this->casEmulated($key, $old, $new); - } - } - - static public function isAvailable() { - if (!extension_loaded('apc')) { - return false; - } elseif (!\OC::$server->getIniWrapper()->getBool('apc.enabled')) { - return false; - } elseif (!\OC::$server->getIniWrapper()->getBool('apc.enable_cli') && \OC::$CLI) { - return false; - } else { - return true; - } - } -} - -if (!function_exists('apc_exists')) { - function apc_exists($keys) { - $result = false; - apc_fetch($keys, $result); - return $result; - } -} diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php index f3841d31679..8e62e020faa 100644 --- a/lib/private/Memcache/Factory.php +++ b/lib/private/Memcache/Factory.php @@ -83,7 +83,7 @@ class Factory implements ICacheFactory { $missingCacheMessage = 'Memcache {class} not available for {use} cache'; $missingCacheHint = 'Is the matching PHP module installed and enabled?'; - if (!$localCacheClass::isAvailable()) { + if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) { if (\OC::$CLI && !defined('PHPUNIT_RUN')) { // CLI should not hard-fail on broken memcache $this->logger->info($missingCacheMessage, [ @@ -98,7 +98,7 @@ class Factory implements ICacheFactory { ]), $missingCacheHint); } } - if (!$distributedCacheClass::isAvailable()) { + if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) { if (\OC::$CLI && !defined('PHPUNIT_RUN')) { // CLI should not hard-fail on broken memcache $this->logger->info($missingCacheMessage, [ @@ -113,7 +113,7 @@ class Factory implements ICacheFactory { ]), $missingCacheHint); } } - if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) { + if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) { // don't fallback since the fallback might not be suitable for storing lock $lockingCacheClass = self::NULL_CACHE; } diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php index 6cb690057bb..04624c910dd 100644 --- a/lib/private/Repair/RepairInvalidShares.php +++ b/lib/private/Repair/RepairInvalidShares.php @@ -27,6 +27,7 @@ namespace OC\Repair; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; +use Doctrine\DBAL\Platforms\OraclePlatform; /** * Repairs shares with invalid data @@ -92,6 +93,26 @@ class RepairInvalidShares implements IRepairStep { } /** + * Adjust file share permissions + */ + private function adjustFileSharePermissions(IOutput $out) { + $mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE; + $builder = $this->connection->getQueryBuilder(); + + $permsFunc = $builder->expr()->bitwiseAnd('permissions', $mask); + $builder + ->update('share') + ->set('permissions', $permsFunc) + ->where($builder->expr()->eq('item_type', $builder->expr()->literal('file'))) + ->andWhere($builder->expr()->neq('permissions', $permsFunc)); + + $updatedEntries = $builder->execute(); + if ($updatedEntries > 0) { + $out->info('Fixed file share permissions for ' . $updatedEntries . ' shares'); + } + } + + /** * Remove shares where the parent share does not exist anymore */ private function removeSharesNonExistingParent(IOutput $out) { @@ -137,6 +158,9 @@ class RepairInvalidShares implements IRepairStep { // this situation was only possible before 9.1 $this->addShareLinkDeletePermission($out); } + if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.11', '<')) { + $this->adjustFileSharePermissions($out); + } $this->removeSharesNonExistingParent($out); } diff --git a/lib/private/Server.php b/lib/private/Server.php index 5bc72e3614f..cc295dccd17 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -898,7 +898,6 @@ class Server extends ServerContainer implements IServerContainer { return $this->query('SystemTagObjectMapper'); } - /** * Returns the avatar manager, used for avatar functionality * diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 085e8609ab2..c01e5bc0332 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -150,14 +150,16 @@ class PostgreSQL extends AbstractDatabase { } private function createDBUser(IDBConnection $connection) { + $dbUser = $this->dbUser; try { - if ($this->userExists($connection)) { - // change the password - $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " WITH CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); - } else { - // create the user - $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); - } + $i = 1; + while ($this->userExists($connection)) { + $i++; + $this->dbUser = $dbUser . $i; + }; + + // create the user + $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); $query->execute(); } catch (DatabaseException $e) { $this->logger->error('Error while trying to create database user'); diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index ffeaf765ff5..351e6d1366f 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -25,13 +25,34 @@ namespace OC\Template; +use OCP\ILogger; + class CSSResourceLocator extends ResourceLocator { + + /** @var SCSSCacher */ + protected $scssCacher; + + /** + * @param ILogger $logger + * @param string $theme + * @param array $core_map + * @param array $party_map + * @param SCSSCacher $scssCacher + */ + public function __construct(ILogger $logger, $theme, $core_map, $party_map, SCSSCacher $scssCacher) { + $this->scssCacher = $scssCacher; + + parent::__construct($logger, $theme, $core_map, $party_map); + } + /** * @param string $style */ public function doFind($style) { if (strpos($style, '3rdparty') === 0 && $this->appendIfExist($this->thirdpartyroot, $style.'.css') + || $this->cacheAndAppendScssIfExist($this->serverroot, $style.'.scss') + || $this->cacheAndAppendScssIfExist($this->serverroot, 'core/'.$style.'.scss') || $this->appendIfExist($this->serverroot, $style.'.css') || $this->appendIfExist($this->serverroot, 'core/'.$style.'.css') ) { @@ -53,4 +74,25 @@ class CSSResourceLocator extends ResourceLocator { || $this->appendIfExist($this->serverroot, $theme_dir.$style.'.css') || $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$style.'.css'); } + + /** + * cache and append the scss $file if exist at $root + * + * @param string $root path to check + * @param string $file the filename + * @param string|null $webRoot base for path, default map $root to $webRoot + * @return bool True if the resource was found and cached, false otherwise + */ + protected function cacheAndAppendScssIfExist($root, $file, $webRoot = null) { + if (is_file($root.'/'.$file)) { + if($this->scssCacher->process($root, $file)) { + $this->append($root, $this->scssCacher->getCachedSCSS('core', $file), $webRoot, false); + return true; + } else { + $this->logger->error('Failed to compile and/or save '.$root.'/'.$file, ['app' => 'core']); + return false; + } + } + return false; + } } diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php index 420317d27ac..420317d27ac 100644..100755 --- a/lib/private/Template/ResourceLocator.php +++ b/lib/private/Template/ResourceLocator.php diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php new file mode 100644 index 00000000000..0c1711b9fb7 --- /dev/null +++ b/lib/private/Template/SCSSCacher.php @@ -0,0 +1,189 @@ +<?php +/** + * @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com) + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program 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 program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\Template; + +use Leafo\ScssPhp\Compiler; +use Leafo\ScssPhp\Exception\ParserException; +use Leafo\ScssPhp\Formatter\Crunched; +use Leafo\ScssPhp\Formatter\Expanded; +use OC\SystemConfig; +use OCP\Files\IAppData; +use OCP\Files\NotFoundException; +use OCP\Files\SimpleFS\ISimpleFolder; +use OCP\ILogger; +use OCP\IURLGenerator; + +class SCSSCacher { + + /** @var ILogger */ + protected $logger; + + /** @var IAppData */ + protected $appData; + + /** @var IURLGenerator */ + protected $urlGenerator; + + /** @var SystemConfig */ + protected $systemConfig; + + /** + * @param ILogger $logger + * @param IAppData $appData + * @param IURLGenerator $urlGenerator + * @param SystemConfig $systemConfig + */ + public function __construct(ILogger $logger, IAppData $appData, IURLGenerator $urlGenerator, SystemConfig $systemConfig) { + $this->logger = $logger; + $this->appData = $appData; + $this->urlGenerator = $urlGenerator; + $this->systemConfig = $systemConfig; + } + + /** + * Process the caching process if needed + * @param string $root Root path to the nextcloud installation + * @param string $file + * @return boolean + */ + public function process($root, $file) { + $path = explode('/', $root . '/' . $file); + + $fileNameSCSS = array_pop($path); + $fileNameCSS = str_replace('.scss', '.css', $fileNameSCSS); + + $path = implode('/', $path); + + $webDir = explode('/', $file); + array_pop($webDir); + $webDir = implode('/', $webDir); + + try { + $folder = $this->appData->getFolder('core'); + } catch(NotFoundException $e) { + // creating css appdata folder + $folder = $this->appData->newFolder('core'); + } + + if($this->isCached($fileNameCSS, $fileNameSCSS, $folder, $path)) { + return true; + } else { + return $this->cache($path, $fileNameCSS, $fileNameSCSS, $folder, $webDir); + } + } + + /** + * Check if the file is cached or not + * @param string $fileNameCSS + * @param string $fileNameSCSS + * @param ISimpleFolder $folder + * @param string $path + * @return boolean + */ + private function isCached($fileNameCSS, $fileNameSCSS, ISimpleFolder $folder, $path) { + try{ + $cachedFile = $folder->getFile($fileNameCSS); + if( $cachedFile->getMTime() > filemtime($path.'/'.$fileNameSCSS) + && $cachedFile->getSize() > 0 ) { + return true; + } + } catch(NotFoundException $e) { + return false; + } + return false; + } + + /** + * Cache the file with AppData + * @param string $path + * @param string $fileNameCSS + * @param string $fileNameSCSS + * @param ISimpleFolder $folder + * @param string $webDir + * @return boolean + */ + private function cache($path, $fileNameCSS, $fileNameSCSS, ISimpleFolder $folder, $webDir) { + $scss = new Compiler(); + $scss->setImportPaths($path); + if($this->systemConfig->getValue('debug')) { + // Debug mode + $scss->setFormatter(Expanded::class); + $scss->setLineNumberStyle(Compiler::LINE_COMMENTS); + } else { + // Compression + $scss->setFormatter(Crunched::class); + } + + try { + $cachedfile = $folder->getFile($fileNameCSS); + } catch(NotFoundException $e) { + $cachedfile = $folder->newFile($fileNameCSS); + } + + // Compile + try { + $compiledScss = $scss->compile('@import "'.$fileNameSCSS.'";'); + } catch(ParserException $e) { + $this->logger->error($e, ['app' => 'core']); + return false; + } + + try { + $cachedfile->putContent($this->rebaseUrls($compiledScss, $webDir)); + $this->logger->debug($webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']); + return true; + } catch(NotFoundException $e) { + return false; + } + } + + /** + * Add the correct uri prefix to make uri valid again + * @param string $css + * @param string $webDir + * @return string + */ + private function rebaseUrls($css, $webDir) { + $re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; + // OC\Route\Router:75 + if(($this->systemConfig->getValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { + $subst = 'url(\'../../'.$webDir.'/$1\')'; + } else { + $subst = 'url(\'../../../'.$webDir.'/$1\')'; + } + return preg_replace($re, $subst, $css); + } + + /** + * Return the cached css file uri + * @param string $appName the app name + * @param string $fileName + * @return string + */ + public function getCachedSCSS($appName, $fileName) { + $tmpfileLoc = explode('/', $fileName); + $fileName = array_pop($tmpfileLoc); + $fileName = str_replace('.scss', '.css', $fileName); + + return substr($this->urlGenerator->linkToRoute('core.Css.getCss', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1); + } +} diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index ad9f8bac0e4..67ba831dfaf 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -36,6 +36,7 @@ namespace OC; use OC\Template\JSConfigHelper; +use OC\Template\SCSSCacher; class TemplateLayout extends \OC_Template { @@ -159,8 +160,17 @@ class TemplateLayout extends \OC_Template { $this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash); } - // Add the css files - $cssFiles = self::findStylesheetFiles(\OC_Util::$styles); + // Add the css files and check if server is already installed to prevent + // appdata initialisation before database configuration + if(\OC::$server->getSystemConfig()->getValue('installed', false)) { + $cssFiles = self::findStylesheetFiles(\OC_Util::$styles); + } else { + $cssFiles = array( + [\OC::$SERVERROOT, '', 'core/css/global.css'], + [\OC::$SERVERROOT, '', 'core/css/fonts.css'], + [\OC::$SERVERROOT, '', 'core/css/installation.css'] + ); + } $this->assign('cssfiles', array()); $this->assign('printcssfiles', []); $this->assign('versionHash', self::$versionHash); @@ -184,11 +194,19 @@ class TemplateLayout extends \OC_Template { // Read the selected theme from the config file $theme = \OC_Util::getTheme(); + $SCSSCacher = new SCSSCacher( + \OC::$server->getLogger(), + \OC::$server->getAppDataDir('css'), + \OC::$server->getURLGenerator(), + \OC::$server->getSystemConfig() + ); + $locator = new \OC\Template\CSSResourceLocator( \OC::$server->getLogger(), $theme, array( \OC::$SERVERROOT => \OC::$WEBROOT ), - array( \OC::$SERVERROOT => \OC::$WEBROOT )); + array( \OC::$SERVERROOT => \OC::$WEBROOT ), + $SCSSCacher); $locator->find($styles); return $locator->getResources(); } diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index dcda825b9db..1834bd025d1 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -743,6 +743,7 @@ class Session implements IUserSession, Emitter { //login $this->setUser($user); + $this->setLoginName($this->tokenProvider->getToken($sessionId)->getLoginName()); $user->updateLastLoginTimestamp(); $this->manager->emit('\OC\User', 'postRememberedLogin', [$user]); return true; diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 8164c738ca5..c123875b803 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -305,6 +305,27 @@ interface IExpressionBuilder { */ public function notIn($x, $y, $type = null); + + /** + * Creates a bitwise AND comparison + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseAnd($x, $y); + + /** + * Creates a bitwise OR comparison + * + * @param string|ILiteral $x The field or value to check + * @param int $y Bitmap that must be set + * @return IQueryFunction + * @since 12.0.0 + */ + public function bitwiseOr($x, $y); + /** * Quotes a given input parameter. * diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index a49a04e43f2..99638b6c02d 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -78,6 +78,7 @@ "key": ["application/x-iwork-keynote-sffkey"], "keynote": ["application/x-iwork-keynote-sffkey"], "kra": ["application/x-krita"], + "ldif": ["text/x-ldif"], "lwp": ["application/vnd.lotus-wordpro"], "m2t": ["video/mp2t"], "m4a": ["audio/mp4"], @@ -142,6 +143,7 @@ "rss": ["application/rss+xml"], "rtf": ["text/rtf"], "rw2": ["image/x-dcraw"], + "schema": ["text/plain"], "sgf": ["application/sgf"], "sh-lib": ["text/x-shellscript"], "sh": ["text/x-shellscript"], diff --git a/settings/l10n/sv.js b/settings/l10n/sv.js index c0b76233ded..163111af04c 100644 --- a/settings/l10n/sv.js +++ b/settings/l10n/sv.js @@ -352,10 +352,10 @@ OC.L10N.register( "Fatal issues only" : "Endast allvarliga fel", "Log" : "Logg", "What to log" : "Vad som ska loggas", - "Download logfile" : "Ladda ner loggfil", + "Download logfile" : "Ladda ned loggfil", "More" : "Mer", "Less" : "Mindre", - "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Logfilen är större än 100 MB. Nerladdningen kan ta en stund!", + "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Logfilen är större än 100 MB. Nedladdningen kan ta en stund!", "Allow users to send mail notification for shared files" : "Tillåt användare att skicka mailnotifieringar för delade filer", "Allow users to send mail notification for shared files to other users" : "Tillåt användare att skicka mejlnotifiering för delade filer till andra användare", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "SQLite används som databas. För större installationer så rekommenderar vi ett byte till en annan databasmotor.", diff --git a/settings/l10n/sv.json b/settings/l10n/sv.json index daad2d3f605..dc0f26e26c1 100644 --- a/settings/l10n/sv.json +++ b/settings/l10n/sv.json @@ -350,10 +350,10 @@ "Fatal issues only" : "Endast allvarliga fel", "Log" : "Logg", "What to log" : "Vad som ska loggas", - "Download logfile" : "Ladda ner loggfil", + "Download logfile" : "Ladda ned loggfil", "More" : "Mer", "Less" : "Mindre", - "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Logfilen är större än 100 MB. Nerladdningen kan ta en stund!", + "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Logfilen är större än 100 MB. Nedladdningen kan ta en stund!", "Allow users to send mail notification for shared files" : "Tillåt användare att skicka mailnotifieringar för delade filer", "Allow users to send mail notification for shared files to other users" : "Tillåt användare att skicka mejlnotifiering för delade filer till andra användare", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "SQLite används som databas. För större installationer så rekommenderar vi ett byte till en annan databasmotor.", diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php new file mode 100644 index 00000000000..60fef9dddad --- /dev/null +++ b/tests/Core/Controller/CssControllerTest.php @@ -0,0 +1,111 @@ +<?php +/** + * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program 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 program. If not, see <http://www.gnu.org/licenses/>. + * + */ +namespace Tests\Core\Controller; + +use OC\Core\Controller\CssController; +use OC\HintException; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\FileDisplayResponse; +use OCP\AppFramework\Http\NotFoundResponse; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\Files\IAppData; +use OCP\Files\NotFoundException; +use OCP\Files\SimpleFS\ISimpleFile; +use OCP\Files\SimpleFS\ISimpleFolder; +use OCP\IRequest; +use Test\TestCase; + +class CssControllerTest extends TestCase { + + /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + private $appData; + + /** @var CssController */ + private $controller; + + public function setUp() { + parent::setUp(); + + $this->appData = $this->createMock(IAppData::class); + + $timeFactory = $this->createMock(ITimeFactory::class); + $timeFactory->method('getTime') + ->willReturn(1337); + + $this->controller = new CssController( + 'core', + $this->createMock(IRequest::class), + $this->appData, + $timeFactory + ); + } + + public function testNoCssFolderForApp() { + $this->appData->method('getFolder') + ->with('myapp') + ->willThrowException(new NotFoundException()); + + $result = $this->controller->getCss('file.css', 'myapp'); + + $this->assertInstanceOf(NotFoundResponse::class, $result); + } + + + public function testNoCssFile() { + $folder = $this->createMock(ISimpleFolder::class); + $this->appData->method('getFolder') + ->with('myapp') + ->willReturn($folder); + + $folder->method('getFile') + ->willThrowException(new NotFoundException()); + + $result = $this->controller->getCss('file.css', 'myapp'); + + $this->assertInstanceOf(NotFoundResponse::class, $result); + } + + public function testGetFile() { + $folder = $this->createMock(ISimpleFolder::class); + $file = $this->createMock(ISimpleFile::class); + $this->appData->method('getFolder') + ->with('myapp') + ->willReturn($folder); + + $folder->method('getFile') + ->with('file.css') + ->willReturn($file); + + $expected = new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => 'text/css']); + $expected->cacheFor(86400); + $expires = new \DateTime(); + $expires->setTimestamp(1337); + $expires->add(new \DateInterval('PT24H')); + $expected->addHeader('Expires', $expires->format(\DateTime::RFC1123)); + $expected->addHeader('Pragma', 'cache'); + + $result = $this->controller->getCss('file.css', 'myapp'); + $this->assertEquals($expected, $result); + } + +} diff --git a/tests/karma.config.js b/tests/karma.config.js index f20672f4a55..933d6c57410 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -223,6 +223,7 @@ module.exports = function(config) { // include core CSS files.push({pattern: 'core/css/*.css', watched: true, included: true, served: true}); + files.push({pattern: 'tests/css/*.css', watched: true, included: true, served: true}); config.set({ diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php index ba17546a34a..8eb7fcf81b4 100644 --- a/tests/lib/DB/DBSchemaTest.php +++ b/tests/lib/DB/DBSchemaTest.php @@ -10,6 +10,7 @@ namespace Test\DB; use Doctrine\DBAL\Platforms\SqlitePlatform; use OC_DB; +use OCP\ITempManager; use OCP\Security\ISecureRandom; use Test\TestCase; @@ -19,14 +20,20 @@ use Test\TestCase; * @group DB */ class DBSchemaTest extends TestCase { - protected $schema_file = 'static://test_db_scheme'; - protected $schema_file2 = 'static://test_db_scheme2'; + protected $schema_file; + protected $schema_file2; protected $table1; protected $table2; + /** @var ITempManager */ + protected $tempManager; protected function setUp() { parent::setUp(); + $this->tempManager = \OC::$server->getTempManager(); + $this->schema_file = $this->tempManager->getTemporaryFile(); + $this->schema_file2 = $this->tempManager->getTemporaryFile(); + $dbfile = \OC::$SERVERROOT.'/tests/data/db_structure.xml'; $dbfile2 = \OC::$SERVERROOT.'/tests/data/db_structure2.xml'; @@ -73,7 +80,7 @@ class DBSchemaTest extends TestCase { } public function doTestSchemaDumping() { - $outfile = 'static://db_out.xml'; + $outfile = $this->tempManager->getTemporaryFile(); OC_DB::getDbStructure($outfile); $content = file_get_contents($outfile); $this->assertContains($this->table1, $content); diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index f3de570c52d..3cf40228225 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -18,9 +18,14 @@ use OC_DB; class LegacyDBTest extends \Test\TestCase { protected $backupGlobals = FALSE; - protected static $schema_file = 'static://test_db_scheme'; + protected static $schema_file; protected $test_prefix; + public static function setUpBeforeClass() { + self::$schema_file = \OC::$server->getTempManager()->getTemporaryFile(); + } + + /** * @var string */ diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php index b7bb3c2a9cb..88c9abeb431 100644 --- a/tests/lib/DB/SchemaDiffTest.php +++ b/tests/lib/DB/SchemaDiffTest.php @@ -47,9 +47,13 @@ class SchemaDiffTest extends TestCase { /** @var string */ private $testPrefix; + private $schemaFile; + protected function setUp() { parent::setUp(); + $this->schemaFile = \OC::$server->getTempManager()->getTemporaryFile(); + $this->config = \OC::$server->getConfig(); $this->connection = \OC::$server->getDatabaseConnection(); $this->manager = new MDB2SchemaManager($this->connection); @@ -57,7 +61,7 @@ class SchemaDiffTest extends TestCase { } protected function tearDown() { - $this->manager->removeDBStructure('static://test_db_scheme'); + $this->manager->removeDBStructure($this->schemaFile); parent::tearDown(); } @@ -68,7 +72,7 @@ class SchemaDiffTest extends TestCase { public function testZeroChangeOnSchemaMigrations($xml) { $xml = str_replace( '*dbprefix*', $this->testPrefix, $xml ); - $schemaFile = 'static://test_db_scheme'; + $schemaFile = $this->schemaFile; file_put_contents($schemaFile, $xml); // apply schema diff --git a/tests/lib/Files/Stream/StaticStreamTest.php b/tests/lib/Files/Stream/StaticStreamTest.php deleted file mode 100644 index 309291a3a5b..00000000000 --- a/tests/lib/Files/Stream/StaticStreamTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** - * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -namespace Test\Files\Stream; - -class StaticStreamTest extends \Test\TestCase { - - private $sourceFile; - private $sourceText; - - protected function setUp() { - parent::setUp(); - $this->sourceFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; - $this->sourceText = file_get_contents($this->sourceFile); - } - - protected function tearDown() { - \OC\Files\Stream\StaticStream::clear(); - parent::tearDown(); - } - - public function testContent() { - file_put_contents('static://foo', $this->sourceText); - $this->assertEquals($this->sourceText, file_get_contents('static://foo')); - } - - public function testMultipleFiles() { - file_put_contents('static://foo', $this->sourceText); - file_put_contents('static://bar', strrev($this->sourceText)); - $this->assertEquals($this->sourceText, file_get_contents('static://foo')); - $this->assertEquals(strrev($this->sourceText), file_get_contents('static://bar')); - } - - public function testOverwrite() { - file_put_contents('static://foo', $this->sourceText); - file_put_contents('static://foo', 'qwerty'); - $this->assertEquals('qwerty', file_get_contents('static://foo')); - } - - public function testIsFile() { - $this->assertFalse(is_file('static://foo')); - file_put_contents('static://foo', $this->sourceText); - $this->assertTrue(is_file('static://foo')); - } - - public function testIsDir() { - $this->assertFalse(is_dir('static://foo')); - file_put_contents('static://foo', $this->sourceText); - $this->assertFalse(is_dir('static://foo')); - } - - public function testFileType() { - file_put_contents('static://foo', $this->sourceText); - $this->assertEquals('file', filetype('static://foo')); - } - - public function testUnlink() { - $this->assertFalse(file_exists('static://foo')); - file_put_contents('static://foo', $this->sourceText); - $this->assertTrue(file_exists('static://foo')); - unlink('static://foo'); - clearstatcache(); - $this->assertFalse(file_exists('static://foo')); - } -} diff --git a/tests/lib/Memcache/APCTest.php b/tests/lib/Memcache/APCTest.php deleted file mode 100644 index 4bd7e62b94a..00000000000 --- a/tests/lib/Memcache/APCTest.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/** - * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -namespace Test\Memcache; - -class APCTest extends Cache { - protected function setUp() { - parent::setUp(); - - if(!\OC\Memcache\APC::isAvailable()) { - $this->markTestSkipped('The apc extension is not available.'); - return; - } - if(\OC\Memcache\APCu::isAvailable()) { - $this->markTestSkipped('The apc extension is emulated by ACPu.'); - return; - } - $this->instance=new \OC\Memcache\APC($this->getUniqueID()); - } -} diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index 1ac42e53bf6..83dbed7d202 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -278,6 +278,73 @@ class RepairInvalidSharesTest extends TestCase { $result->closeCursor(); } + public function fileSharePermissionsProvider() { + return [ + // unchanged for folder + [ + 'folder', + 31, + 31, + ], + // unchanged for read-write + share + [ + 'file', + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE, + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE, + ], + // fixed for all perms + [ + 'file', + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_SHARE, + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE, + ], + ]; + } + + /** + * Test adjusting file share permissions + * + * @dataProvider fileSharePermissionsProvider + */ + public function testFileSharePermissions($itemType, $testPerms, $expectedPerms) { + $qb = $this->connection->getQueryBuilder(); + $qb->insert('share') + ->values([ + 'share_type' => $qb->expr()->literal(Constants::SHARE_TYPE_LINK), + 'uid_owner' => $qb->expr()->literal('user1'), + 'item_type' => $qb->expr()->literal($itemType), + 'item_source' => $qb->expr()->literal(123), + 'item_target' => $qb->expr()->literal('/123'), + 'file_source' => $qb->expr()->literal(123), + 'file_target' => $qb->expr()->literal('/test'), + 'permissions' => $qb->expr()->literal($testPerms), + 'stime' => $qb->expr()->literal(time()), + ]) + ->execute(); + + $shareId = $this->getLastShareId(); + + /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') + ->disableOriginalConstructor() + ->getMock(); + + $this->repair->run($outputMock); + + $results = $this->connection->getQueryBuilder() + ->select('*') + ->from('share') + ->orderBy('permissions', 'ASC') + ->execute() + ->fetchAll(); + + $this->assertCount(1, $results); + + $updatedShare = $results[0]; + + $this->assertEquals($expectedPerms, $updatedShare['permissions']); + } + /** * @return int */ diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index 27cb92d6732..51560d78a6a 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -528,7 +528,7 @@ class SessionTest extends \Test\TestCase { ->getMock(); $userSession = $this->getMockBuilder(Session::class) //override, otherwise tests will fail because of setcookie() - ->setMethods(['setMagicInCookie']) + ->setMethods(['setMagicInCookie', 'setLoginName']) ->setConstructorArgs([$manager, $session, $this->timeFactory, $this->tokenProvider, $this->config, $this->random]) ->getMock(); @@ -566,6 +566,15 @@ class SessionTest extends \Test\TestCase { ->with($oldSessionId, $sessionId) ->will($this->returnValue(true)); + $tokenObject = $this->createMock(IToken::class); + $tokenObject->expects($this->once()) + ->method('getLoginName') + ->willReturn('foobar'); + $this->tokenProvider->expects($this->once()) + ->method('getToken') + ->with($sessionId) + ->willReturn($tokenObject); + $user->expects($this->any()) ->method('getUID') ->will($this->returnValue('foo')); @@ -576,6 +585,9 @@ class SessionTest extends \Test\TestCase { $session->expects($this->once()) ->method('set') ->with('user_id', 'foo'); + $userSession->expects($this->once()) + ->method('setLoginName') + ->willReturn('foobar'); $granted = $userSession->loginWithCookie('foo', $token, $oldSessionId); diff --git a/tests/lib/UserTest.php b/tests/lib/UserTest.php index 7a033c2921e..2a477522dea 100644 --- a/tests/lib/UserTest.php +++ b/tests/lib/UserTest.php @@ -25,7 +25,7 @@ class UserTest extends TestCase { protected function setUp(){ parent::setUp(); - $this->backend = $this->getMock('\Test\Util\User\Dummy'); + $this->backend = $this->createMock(\Test\Util\User\Dummy::class); $manager = \OC::$server->getUserManager(); $manager->registerBackend($this->backend); } diff --git a/version.php b/version.php index 6db26c8c66c..90f4e65055a 100644 --- a/version.php +++ b/version.php @@ -26,7 +26,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = array(12, 0, 0, 11); +$OC_Version = array(12, 0, 0, 12); // The human readable string $OC_VersionString = '12.0 alpha'; |