Browse Source

- CSS fix

- Start fixing Account (new Routes)
pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
d884e305a2
  1. 23
      app/widgets/Account/Account.php
  2. 5
      app/widgets/Account/account.css
  3. 2
      app/widgets/Bookmark/Bookmark.php
  4. 4
      app/widgets/Notifs/Notifs.php
  5. 8
      app/widgets/Notifs/notifs.css
  6. 14
      app/widgets/Roster/roster.css
  7. 5
      app/widgets/Tabs/tabs.css
  8. 3
      index.php
  9. 2
      lib/XMPPtoForm.php
  10. 2
      system/Route.php
  11. 16
      themes/movim/css/mobile.css
  12. 10
      themes/movim/css/style2.css
  13. 4
      themes/movim/page.tpl

23
app/widgets/Account/Account.php

@ -28,7 +28,7 @@ class Account extends WidgetBase {
function ajaxDiscoverServer($ndd) {
if($ndd['ndd'] == '') {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=datamissing");
RPC::call('movim_reload', Route::urlize('account', 'datamissing'));
RPC::commit();
exit;
}
@ -43,7 +43,7 @@ class Account extends WidgetBase {
$f = fsockopen($domain, 5222, $errno, $errstr, 10);
if(!$f) {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=xmppconnect");
RPC::call('movim_reload', Route::urlize('account', 'xmppconnect'));
RPC::commit();
exit;
}
@ -57,7 +57,7 @@ class Account extends WidgetBase {
$response = stream_get_contents($f);
if(!$response) {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=xmppcomm");
RPC::call('movim_reload', Route::urlize('account', 'xmppcomm'));
RPC::commit();
exit;
}
@ -191,7 +191,7 @@ class Account extends WidgetBase {
$f = fsockopen(XMPP_CONN, XMPP_PORT, $errno, $errstr, 10);
if(!$f) {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=xmppconnect");
RPC::call('movim_reload', Route::urlize('account', 'xmppconnect'));
RPC::commit();
exit;
}
@ -206,14 +206,13 @@ class Account extends WidgetBase {
$xmpp = new FormtoXMPP();
$stream = $xmpp->getXMPP($stream->asXML(), $datas);
\movim_log($stream->asXML());
fwrite($f, $stream->asXML());
unset($stream);
$response = stream_get_contents($f);
if(!$response) {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=xmppcomm");
RPC::call('movim_reload', Route::urlize('account', 'xmppcomm'));
RPC::commit();
exit;
}
@ -221,7 +220,7 @@ class Account extends WidgetBase {
fclose($f); unset($f);
$response = simplexml_load_string($response);
\movim_log($response);
if(!$response) throw new Exception('The XMPP server sent an invalid response', 500);
if($stream_error = $response->xpath('/stream:stream/stream:error')) {
@ -236,11 +235,11 @@ class Account extends WidgetBase {
if($iq->error) {
list($cond) = $iq->error->children();
if($cond->getName() == 'conflict') {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=userconflict");
RPC::call('movim_reload', Route::urlize('account', 'userconflict'));
RPC::commit();
exit;
} else if($cond->getName() == 'not-acceptable') {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=notacceptable");
RPC::call('movim_reload', Route::urlize('account', 'notacceptable'));
RPC::commit();
exit;
}
@ -248,11 +247,11 @@ class Account extends WidgetBase {
}
if($iq = $response->iq and $iq->attributes()->type == 'result') {
RPC::call('movim_reload', BASE_URI."index.php?q=login&err=acccreated");
RPC::call('movim_reload', Route::urlize('login', 'acccreated'));
RPC::commit();
exit;
} else {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=unknown");
RPC::call('movim_reload', Route::urlize('account', 'unknown'));
RPC::commit();
exit;
}
@ -434,7 +433,7 @@ class Account extends WidgetBase {
</div>
<div id="center">
<h1><?php echo t('Create a new account'); ?></h1>
<div style="margin: 15px 20px;">
<div style="margin: 0em 1.5em;">
<p>
<?php echo t('Movim is a decentralized social network, before creating a new account you need to choose a server to register.'); ?>
<?php echo t('Keep in mind that this server will handle all your personnal data.'); ?>

5
app/widgets/Account/account.css

@ -1,8 +1,3 @@
#left {
padding-top: 0px !important;
margin-top: 1em !important;
}
#nav .menu li:last-child {
background-image: none;
padding-right: 0px;

2
app/widgets/Bookmark/Bookmark.php

@ -240,7 +240,7 @@ class Bookmark extends WidgetBase
>'.
t('Add').'
</a><a
class="button icon black merged right"
class="button icon no black merged right"
onclick="movim_toggle_display(\'#bookmarkadd\')"
>'.
t('Close').'

4
app/widgets/Notifs/Notifs.php

@ -262,7 +262,7 @@ class Notifs extends WidgetCommon
<li>
<form id="acceptcontact">
<p>'.$from.' '.t('wants to talk with you'). '</p>
<p>
<a
class="button color green icon add merged left "
id="notifsvalidate"
@ -273,7 +273,7 @@ class Notifs extends WidgetCommon
onclick="'.$this->genCallAjax("ajaxRefuse", "'".$from."'").'">'.
t("Decline").'
</a>
</p>
</form>
<div class="clear"></div>
</li>';

8
app/widgets/Notifs/notifs.css

@ -46,13 +46,14 @@
#notifslist li {
overflow: hidden;
line-height: 3em;
list-style-type: none;
}
#notifslist li:hover {
background-color: black;
}
#notifslist li a {
#notifslist li a:not(.button) {
display: block;
}
@ -69,6 +70,11 @@
height: 3em;
margin-right: 1em;
}
#notifslist #acceptcontact {
padding: 0.5em;
padding-bottom: 0em;
}
/*
#notifstab {
position: fixed;

14
app/widgets/Roster/roster.css

@ -21,11 +21,15 @@
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
#roster input[name=search] {
position: fixed;
top: 0em;
/*position: absolute;
top: 0em;
left: 0em;*/
}
#roster.hide input[name=search] {
display: none;
}
#rostermenu input[name=searchjid]:invalid {
@ -223,8 +227,8 @@
#rostermenu li.showhide:before {
content: "";
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* IE 9 */
-webkit-transform:rotate(45deg); /* Safari and Chrome */
-ms-transform:rotate(45deg);
-webkit-transform:rotate(45deg);
background-color: #0DB8B5;
display: block;
position: absolute;

5
app/widgets/Tabs/tabs.css

@ -9,10 +9,11 @@
}
#navtabs li {
display: inline;
display: inline-block;
cursor: pointer;
line-height: 3em;
padding: 1em 2em;
padding: 0em 2em;
white-space: nowrap;
}
.tabs {

3
index.php

@ -9,9 +9,6 @@
*
* @author Movim Project <movim@movim.eu>
*
* @version 0.4
* @date 30 September 2010
*
* Copyright (C)2010 Movim Project
*
* This program is free software: you can redistribute it and/or modify

2
lib/XMPPtoForm.php

@ -234,7 +234,7 @@ class FormtoXMPP{
}
foreach($this->inputs as $key => $value) {
if($value == '' && $this->stream->getName() == "stream") {
RPC::call('movim_reload', BASE_URI."index.php?q=account&err=datamissing");
RPC::call('movim_reload', Route::urlize('account','datamissing'));
RPC::commit();
exit;
} elseif(substr($key, 0, 8) == 'generic_') {

2
system/Route.php

@ -5,7 +5,7 @@ class Route extends ControllerBase {
public function __construct() {
$this->_routes = array(
'account' => false,
'account' => array('err'),
'chatpop' => false,
'main' => false,
'admin' => false,

16
themes/movim/css/mobile.css

@ -7,10 +7,6 @@ body {
width: 100%;
}
h1 {
padding: 0.3em;
}
#right {
width: 100%;
padding: 0px;
@ -124,7 +120,7 @@ nav .menu li a.disconnect {
}
#loginpage {
margin-top: 5% ! important;
margin-top: 20% ! important;
}
#rostermenu {
@ -144,10 +140,18 @@ ul.thumb li {
top: 3em !important;
}
#notifslist {
#notifslist, #logoutlist {
width: 100% !important;
}
#logoutlist a {
margin-left: 1em !important;
}
#roster input[name=search] {
top: 3em !important;
}
}
@media screen and (max-width: 640px) {

10
themes/movim/css/style2.css

@ -253,8 +253,9 @@ ul.clean li {
}
#main {
padding-right: 200px;
background-color: white;
margin-right: 200px;
width: 100%;
background-color: #383735;
}
#main:after {
@ -274,7 +275,7 @@ ul.clean li {
width: 200px;
color: white;
top: 0px;
background-color: #383735;
overflow: hidden;
}
#left a:link,
@ -291,7 +292,6 @@ ul.clean li {
background-color: white;
position: relative;
top: 0px;
width: 100%;
overflow: hidden;
}
@ -664,7 +664,7 @@ dl dd {
max-height: 80%;
overflow-y: auto;
display: none;
background-color: rgba(0, 0, 0, 0.9);
background-color: #242424;
padding: 1em;
box-sizing: border-box;

4
themes/movim/page.tpl

@ -25,10 +25,10 @@
$this->addCss('css/posts.css');
$this->addCss('css/style2.css');
$this->scripts();
$this->addCss('css/mobile.css');
$this->scripts();
$user = new User();

Loading…
Cancel
Save