diff --git a/system/Widget/WidgetCommon.php b/system/Widget/WidgetCommon.php index 705c73708..b7cee77b1 100644 --- a/system/Widget/WidgetCommon.php +++ b/system/Widget/WidgetCommon.php @@ -22,21 +22,6 @@ class WidgetCommon extends WidgetBase { '.$post->title.'
'; - - if($post->jid != $post->uri) - $recycle .= ' - - '.$post->uri.' - '; - - if($post->getPlace() != false) - $place .= ' - - '.$post->getPlace().' - '; if($this->user->getLogin() == $post->jid) { $class = 'me '; @@ -46,16 +31,50 @@ class WidgetCommon extends WidgetBase { $access .= 'protect orange'; } - if($post->commentplace) - $comments = $this->printComments($post, $comments); - else + if($post->public != 2) { + + if($post->jid != $post->uri) + $recycle .= ' + + '.$post->uri.' + '; + + if($post->getPlace() != false) + $place .= ' + + '.$post->getPlace().' + '; + + $content = + prepareString(html_entity_decode($post->content)); + + if($post->commentplace) + $comments = $this->printComments($post, $comments); + else + $comments = ''; + + $fold = t('Fold'); + } else { + $content = '…'; $comments = ''; + + $fold = t('Unfold'); + } $html = '
+ +
+ nodeid."'").'">'.$fold.' +
'.$title.' @@ -66,9 +85,7 @@ class WidgetCommon extends WidgetBase { '.prepareDate(strtotime($post->published)).'
- '.prepareString(html_entity_decode($post->content)).' -
- + '.$content.'
'.$comments.' '.$place.' @@ -179,7 +196,7 @@ class WidgetCommon extends WidgetBase { else return false; } - + /* protected function preparePost($message, $comments = false) { $tmp = ''; @@ -352,7 +369,7 @@ class WidgetCommon extends WidgetBase { } return $tmp; - } + }*/ protected function prepareComments($comments) { $tmp = false; @@ -490,6 +507,22 @@ class WidgetCommon extends WidgetBase { RPC::commit(); } + function ajaxPostFold($nodeid) { + $pd = new \modl\PostDAO(); + $p = $pd->get($nodeid); + + $public = $p->public; + + if($public == 0) { + $p->public = 2; + $pd->set($p); + } elseif($public != 0) { + $p->public = 0; + $pd->set($p); + } + + } + function onPostDelete($id) { RPC::call('movim_delete', $id); } diff --git a/system/Widget/widgets/Config/Config.php b/system/Widget/widgets/Config/Config.php index 494add27b..d9dc1b47e 100644 --- a/system/Widget/widgets/Config/Config.php +++ b/system/Widget/widgets/Config/Config.php @@ -59,7 +59,7 @@ class Config extends WidgetBase $submit = $this->genCallAjax('ajaxSubmit', "movim_parse_form('general')") . "this.className='button icon loading'; setTimeout(function() {location.reload(false)}, 2000);"; ?> -
+
@@ -118,6 +118,12 @@ class Config extends WidgetBase style="background-color: #6d695c;">
+ + + + + +

diff --git a/system/Widget/widgets/ConfigData/ConfigData.php b/system/Widget/widgets/ConfigData/ConfigData.php new file mode 100644 index 000000000..805274a38 --- /dev/null +++ b/system/Widget/widgets/ConfigData/ConfigData.php @@ -0,0 +1,104 @@ + + * + * @version 1.0 + * @date 28 October 2010 + * + * Copyright (C)2010 MOVIM project + * + * See COPYING for licensing information. + */ + +class ConfigData extends WidgetBase +{ + function WidgetLoad() + { + $this->addcss('configdata.css'); + } + + function ajaxClearRosterLink() { + $rd = new \modl\RosterLinkDAO(); + $rd->clearRosterLink(); + + $this->refresh(); + } + + function ajaxClearMessage() { + $md = new \modl\MessageDAO(); + $md->clearMessage(); + + $this->refresh(); + } + + function ajaxClearPost() { + $pd = new \modl\PostDAO(); + $pd->clearPost(); + + $this->refresh(); + } + + function refresh() { + $html = $this->prepareConfigData(); + RPC::call('movim_fill', 'configdata', RPC::cdata($html)); + RPC::commit(); + } + + function prepareConfigData() { + $cd = new \modl\ContactDAO(); + $stats = $cd->getStatistics(); + + $clearrosterlink = $this->genCallAjax('ajaxClearRosterLink'); + $clearmessage = $this->genCallAjax('ajaxClearMessage'); + $clearpost = $this->genCallAjax('ajaxClearPost'); + + $html = ' + +
+ '.t('Cache').' +
+
+
+ '.t('Clear').' +
+
+
+ '.t('Clear').' +
+
+
+ '.t('Clear').' +
+
+ '; + return $html; + } + + function build() + { + ?> +
+ prepareConfigData(); ?> +
+ registerEvent('comment', 'onComment'); $this->registerEvent('nocomment', 'onNoComment'); $this->registerEvent('nocommentstream', 'onNoCommentStream'); + $this->registerEvent('commentpublisherror', 'onCommentPublishError'); $this->registerEvent('stream', 'onStream'); $this->registerEvent('postpublished', 'onPostPublished'); @@ -57,6 +58,14 @@ class Feed extends WidgetCommon { RPC::call('movim_fill', 'feednotifs', RPC::cdata($html)); RPC::commit(); } + + function onCommentPublishError() { + $html = + '
'. + t("Comment publication error").' +
'; + RPC::call('movim_fill', 'feednotifs', RPC::cdata($html)); + } function onPostPublished($post) { $pd = new \modl\PostDAO(); @@ -200,7 +209,6 @@ class Feed extends WidgetCommon { t("Your feed cannot be loaded.").'
'; RPC::call('movim_fill', 'feedcontent', RPC::cdata($html)); - RPC::commit(); } function ajaxPublishItem($content) diff --git a/system/Widget/widgets/Login/Login.php b/system/Widget/widgets/Login/Login.php index b2ef03170..95b9c39fc 100644 --- a/system/Widget/widgets/Login/Login.php +++ b/system/Widget/widgets/Login/Login.php @@ -119,6 +119,11 @@ class Login extends WidgetBase {
'.t('Your XMPP server is unauthorized').'
'; + case 'mecerror': + $warning = ' +
+ '.t('The server takes too much time to repond').' +
'; break; } diff --git a/system/Widget/widgets/Logout/Logout.php b/system/Widget/widgets/Logout/Logout.php index 937db5692..f14fc02c6 100644 --- a/system/Widget/widgets/Logout/Logout.php +++ b/system/Widget/widgets/Logout/Logout.php @@ -32,6 +32,7 @@ class Logout extends WidgetBase { $html = $this->preparePresence(); RPC::call('movim_fill', 'logout', RPC::cdata($html)); + RPC::commit(); } function onPostDisconnect($data) diff --git a/system/Widget/widgets/Roster/Roster.php b/system/Widget/widgets/Roster/Roster.php index 41dc608e7..2196389a6 100644 --- a/system/Widget/widgets/Roster/Roster.php +++ b/system/Widget/widgets/Roster/Roster.php @@ -198,12 +198,12 @@ class Roster extends WidgetBase */ function prepareRoster() { - $contactdao = new modl\ContactDAO(); + $contactdao = new \modl\ContactDAO(); $contacts = $contactdao->getRoster(); $html = ''; - $rd = new modl\RosterLinkDAO(); + $rd = new \modl\RosterLinkDAO(); $capsdao = new modl\CapsDAO(); $caps = $capsdao->getAll(); diff --git a/themes/movim/config.tpl b/themes/movim/config.tpl index e0f73c3b6..f1fa239fe 100644 --- a/themes/movim/config.tpl +++ b/themes/movim/config.tpl @@ -14,13 +14,12 @@
-

- widget('Config');?> + widget('Tabs');?> + widget('Config');?> + widget('ConfigData');?>
- - diff --git a/themes/movim/css/forms.css b/themes/movim/css/forms.css index 9fd9ea651..6f4ae79da 100644 --- a/themes/movim/css/forms.css +++ b/themes/movim/css/forms.css @@ -32,6 +32,10 @@ legend { width: 100%; } +.element.thin { + width: 25%; +} + .element > label { display: block; } diff --git a/themes/movim/css/mobile.css b/themes/movim/css/mobile.css index 01d3b96e3..f777132b8 100644 --- a/themes/movim/css/mobile.css +++ b/themes/movim/css/mobile.css @@ -84,6 +84,10 @@ h1 { width: 100%; } +.element.thin { + width: 50%; +} + .posthead { padding: 0.3em; } diff --git a/themes/movim/css/posts.css b/themes/movim/css/posts.css index 2471fffb3..bcb137acd 100644 --- a/themes/movim/css/posts.css +++ b/themes/movim/css/posts.css @@ -24,6 +24,18 @@ clear: both; } +.post .postmenu { + display: block; + clear: left; + float: left; + + width: 50px; + margin-right: 15px; + margin-top: 7px; + margin-left: 0px; + text-align: center; +} + .post:first-child { padding-top: 1.5em; } @@ -115,7 +127,6 @@ border-top: 1px solid rgba(0, 0, 0, 0.1); width: 100%; background-color: rgba(0, 0, 0, 0.03); - clear: both; } .post .comments span { diff --git a/themes/movim/css/style2.css b/themes/movim/css/style2.css index 3e9c816e8..4a7340f08 100644 --- a/themes/movim/css/style2.css +++ b/themes/movim/css/style2.css @@ -134,6 +134,19 @@ body { background-position: 0 0, 40px 60px, 130px 270px, 70px 100px; } +.tartan { + background-image: + repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px); + +background-image: + -webkit-repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + -webkit-repeating-linear-gradient(-180deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + -webkit-repeating-linear-gradient(-35deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px); + +} + /* A simple clear element*/ .clear { clear: both;