Browse Source

- merge with trunk

- add snapshot from webcam for profile avatar in VCard widget
pull/16/head
Christine Ho 13 years ago
parent
commit
8bd1f3153b
  1. 2
      VERSION
  2. 30
      build.sh
  3. 11
      infos.php
  4. 7
      init.php
  5. 2
      jajax.php
  6. 7
      loader.php
  7. 12
      system/Controller/ControllerMain.php
  8. 3096
      system/Markdown.php
  9. 99
      system/RPC.php
  10. 16
      system/Utils.php
  11. 2
      system/UtilsPicture.php
  12. 433
      system/Widget/WidgetCommon.php
  13. 17
      system/Widget/WidgetWrapper.php
  14. 123
      system/Widget/widgets/About/About.php
  15. 4
      system/Widget/widgets/Account/Account.php
  16. 35
      system/Widget/widgets/Bookmark/Bookmark.php
  17. 1
      system/Widget/widgets/Bookmark/bookmark.css
  18. 179
      system/Widget/widgets/Chat/Chat.php
  19. 13
      system/Widget/widgets/Chat/chat.css
  20. 12
      system/Widget/widgets/Chat/chat.js
  21. 13
      system/Widget/widgets/ChatExt/ChatExt.php
  22. 6
      system/Widget/widgets/ChatPop/ChatPop.php
  23. 2
      system/Widget/widgets/ChatPop/chatpop.js
  24. 12
      system/Widget/widgets/Config/Config.php
  25. 48
      system/Widget/widgets/ContactInfo/ContactInfo.php
  26. 3
      system/Widget/widgets/ContactSummary/ContactSummary.php
  27. 35
      system/Widget/widgets/Explore/Explore.php
  28. 1
      system/Widget/widgets/Explore/explore.css
  29. 12
      system/Widget/widgets/Feed/Feed.php
  30. 2
      system/Widget/widgets/Help/Help.php
  31. 24
      system/Widget/widgets/Login/Login.php
  32. BIN
      system/Widget/widgets/Login/img/beaker.png
  33. BIN
      system/Widget/widgets/Login/img/envelope.png
  34. BIN
      system/Widget/widgets/Login/img/facebook.png
  35. BIN
      system/Widget/widgets/Login/img/jabber.png
  36. 47
      system/Widget/widgets/Login/login.css
  37. 9
      system/Widget/widgets/Login/login.js
  38. 2
      system/Widget/widgets/Logout/Logout.php
  39. 22
      system/Widget/widgets/Logout/logout.css
  40. 15
      system/Widget/widgets/Node/Node.php
  41. 8
      system/Widget/widgets/NodeAffiliations/NodeAffiliations.php
  42. 15
      system/Widget/widgets/NodeConfig/NodeConfig.php
  43. 5
      system/Widget/widgets/Notification/Notification.php
  44. 10
      system/Widget/widgets/Notification/notification.css
  45. 2
      system/Widget/widgets/Notifs/Notifs.php
  46. 60
      system/Widget/widgets/Notifs/notifs.css
  47. 5
      system/Widget/widgets/Poller/poller.js
  48. 2
      system/Widget/widgets/Profile/Profile.php
  49. 4
      system/Widget/widgets/ProfileData/ProfileData.php
  50. 23
      system/Widget/widgets/ProfileData/profiledata.js
  51. 57
      system/Widget/widgets/Roster/Roster.php
  52. 21
      system/Widget/widgets/Roster/roster.css
  53. 98
      system/Widget/widgets/ServerNodes/ServerNodes.php
  54. 10
      system/Widget/widgets/Syndication/Syndication.php
  55. 2
      system/Widget/widgets/Tabs/tabs.css
  56. 8
      system/Widget/widgets/Vcard/Vcard.php
  57. 4
      system/Widget/widgets/Vcard/vcard.css
  58. 39
      system/Widget/widgets/Vcard/vcard.js
  59. 2
      system/Widget/widgets/Wall/Wall.php
  60. 7
      system/XMPPtoForm.php
  61. BIN
      system/js/images/bold.png
  62. BIN
      system/js/images/center.png
  63. BIN
      system/js/images/h1.png
  64. BIN
      system/js/images/h2.png
  65. BIN
      system/js/images/h3.png
  66. BIN
      system/js/images/h4.png
  67. BIN
      system/js/images/help.gif
  68. BIN
      system/js/images/indent.png
  69. BIN
      system/js/images/italic.png
  70. BIN
      system/js/images/left.png
  71. BIN
      system/js/images/link.png
  72. BIN
      system/js/images/marker-icon.png
  73. BIN
      system/js/images/ol.png
  74. BIN
      system/js/images/outdent.png
  75. BIN
      system/js/images/paragraph.png
  76. BIN
      system/js/images/picture.png
  77. BIN
      system/js/images/right.png
  78. BIN
      system/js/images/ul.png
  79. BIN
      system/js/images/underline.png
  80. 455
      system/js/leaflet.css
  81. 8
      system/js/leaflet.js
  82. 39
      system/js/movim.js
  83. 94
      system/js/movimrpc.js
  84. 207
      system/js/steditor.js
  85. 13
      themes/movim/about.tpl
  86. 141
      themes/movim/css/forms.css
  87. 4
      themes/movim/css/mobile.css
  88. 57
      themes/movim/css/posts.css
  89. 208
      themes/movim/css/style2.css
  90. 35
      themes/movim/css/submitform.css
  91. 3
      themes/movim/help.tpl
  92. BIN
      themes/movim/img/icons/button/arrow-left.png
  93. BIN
      themes/movim/img/icons/button/arrow-right.png
  94. BIN
      themes/movim/img/icons/button/chat.png
  95. BIN
      themes/movim/img/icons/button/checkmark.png
  96. BIN
      themes/movim/img/icons/button/close.png
  97. BIN
      themes/movim/img/icons/button/comment.png
  98. BIN
      themes/movim/img/icons/button/envelope.png
  99. BIN
      themes/movim/img/icons/button/feed.png
  100. BIN
      themes/movim/img/icons/button/image.png

2
VERSION

@ -1 +1 @@
0.7alpha2
0.7alpha5

30
build.sh

@ -1,8 +1,8 @@
#!/bin/bash
SYSTEM_PATH=system
MOXL_REPO="lp:~edhelas/moxl/trunk"
DATAJAR_REPO="lp:~edhelas/datajar/datajar"
MOXL_REPO="lp:moxl"
MODL_REPO="lp:modl"
VERSION=`cat VERSION`
PACKAGENAME="movim-${VERSION}"
@ -16,8 +16,8 @@ package() {
cd $PACKAGENAME
moxl
rm -rf "$SYSTEM_PATH/Moxl/.bzr"
datajar
rm -rf "$SYSTEM_PATH/Datajar2/.bzr"
modl
rm -rf "$SYSTEM_PATH/Modl/.bzr"
# Compressing
cd ..
@ -39,28 +39,28 @@ moxl() {
rm -rf $moxl_temp
}
datajar() {
datajar_temp="datajar"
# Checking out Datajar.
bzr branch $DATAJAR_REPO $datajar_temp
rm -rf "$SYSTEM_PATH/Datajar2"
cp -r "$datajar_temp" "$SYSTEM_PATH/Datajar2"
rm -rf $datajar_temp
modl() {
modl_temp="Modl"
# Checking out Modl.
bzr branch $MODL_REPO $modl_temp
rm -rf "$SYSTEM_PATH/Modl"
cp -r "$modl_temp/" $SYSTEM_PATH
rm -rf $modl_temp
}
clean() {
rm -rf "${SYSTEM_PATH}/Moxl"
rm -rf "${SYSTEM_PATH}/Datajar2"
rm -rf datajar
rm -rf "${SYSTEM_PATH}/Modl"
rm -rf Modl
rm -rf Moxl
}
# Doing the job
case $1 in
"datajar") datajar;;
"modl") modl;;
"moxl") moxl;;
"package") package;;
"clean") clean;;
*) datajar
*) modl
moxl;;
esac

11
infos.php

@ -41,13 +41,10 @@ $doc->appendChild($infos);
$whitelist->appendChild($doc->createTextNode($conf["xmppWhiteList"]));
$infos->appendChild($whitelist);
$file = "VERSION";
if($f = fopen($file, 'r')){
$version = $doc->createElement("version");
$version->appendChild($doc->createTextNode(trim(fgets($f))));
$infos->appendChild($version);
fclose($f);
}
$version = $doc->createElement("version");
$version->appendChild($doc->createTextNode(APP_VERSION));
$infos->appendChild($version);
fclose($f);
$phpversion = $doc->createElement("phpversion");
$phpversion->appendChild($doc->createTextNode(phpversion()));

7
init.php

@ -2,10 +2,17 @@
ob_start();
mb_internal_encoding("UTF-8");
require('loader.php');
define('APP_TITLE', 'Movim');
$file = "VERSION";
if($f = fopen($file, 'r')) {
define('APP_VERSION', trim(fgets($f)));
}
{
$index_pos = strpos($_SERVER['PHP_SELF'], 'index.php');
$path = "";

2
jajax.php

@ -28,7 +28,7 @@ set_time_limit(200);
$polling = true;
$rpc = new RPC();
$rpc->handle();
$rpc->handle_json();
// Closing stuff
WidgetWrapper::destroyInstance();

7
loader.php

@ -8,13 +8,9 @@ define('PROPERTIES_PATH', BASE_PATH.'page/properties/');
define('THEMES_PATH', BASE_PATH . 'themes/');
define('USERS_PATH', BASE_PATH . 'users/');
//define('DB_DEBUG', true);
//define('DB_LOGFILE', BASE_PATH . 'log/queries.log');
// Loads up all system libraries.
require_once(LIB_PATH . "Lang/i18n.php");
require_once(LIB_PATH . "Session.php");
require_once(LIB_PATH . "Utils.php");
require_once(LIB_PATH . "UtilsString.php");
@ -28,6 +24,9 @@ require_once(LIB_PATH . "RPC.php");
require_once(LIB_PATH . "User.php");
require_once(LIB_PATH . "XMPPtoForm.php");
// Markdown lib
require_once(LIB_PATH . "Markdown.php");
// We load Movim Data Layer
require_once(LIB_PATH . 'Modl/loader.php');

12
system/Controller/ControllerMain.php

@ -232,6 +232,17 @@ class ControllerMain extends ControllerBase
$this->page->setContent($content->build('blog.tpl'));
echo $this->page->build('page.tpl');
}
function about()
{
$this->page->setTitle(t('%s - About', APP_TITLE));
$this->page->menuAddLink(t('Home'), 'main');
$this->page->menuAddLink(t('About'), 'about', true);
$content = new TplPageBuilder();
$this->page->setContent($content->build('about.tpl'));
echo $this->page->build('page.tpl');
}
function chatpop()
{
@ -273,6 +284,7 @@ class ControllerMain extends ControllerBase
{
$this->page->setTitle(t('%s - Login to Movim', APP_TITLE));
$this->page->menuAddLink(t('Home'), 'main', true);
$this->page->menuAddLink(t('About'), 'about');
$content = new TplPageBuilder($user);
$this->page->setContent($content->build('login.tpl'));

3096
system/Markdown.php
File diff suppressed because it is too large
View File

99
system/RPC.php

@ -31,13 +31,32 @@ class RPC
array_shift($args);
$args = array_map('trim', $args);
$args = array_map('cleanString', $args);
$funcall = array(
'func' => $funcname,
'params' => $args,
);
if(self::filter($funcname, $args)) {
$funcall = array(
'func' => $funcname,
'params' => $args,
);
self::$funcalls[] = $funcall;
self::$funcalls[] = $funcall;
}
}
/**
* Check if the event is not already called
*/
private static function filter($funcname, $args)
{
foreach(self::$funcalls as $f) {
if(isset($f['func']) &&
isset($f['params']) &&
$f['func'] == $funcname &&
$f['params'][0] == $args[0])
return false;
}
return true;
}
public static function cdata($text)
@ -57,73 +76,47 @@ class RPC
ob_clean();
ob_start();
// Starting XML output.
header('Content-Type: text/xml');
println('<?xml version="1.0" encoding="UTF-8" ?>');
println('<movimcontainer>');
// Just in case (warning)
if(!is_array(self::$funcalls)) {
self::$funcalls = array();
self::$funcalls = array('ping');
}
foreach(self::$funcalls as $funcall) {
println('<funcall name="%s">', $funcall['func']);
if(is_array($funcall['params'])) {
foreach($funcall['params'] as $param) {
println('<param><![CDATA[%s]]></param>', $param);
}
}
println('</funcall>');
}
println('</movimcontainer>');
header('Content-Type: application/json');
printf('%s', json_encode(self::$funcalls));
}
/**
* Handles incoming requests.
*/
public function handle()
public function handle_json()
{
if(isset($_GET['do']) && $_GET['do'] == 'poll') {
moxl\ping();
} else {
$xml = file_get_contents('php://input');
$request = simplexml_load_string($xml);
$json = file_get_contents('php://input');
$request = json_decode($json);
// Loading the widget.
$widget_name = (string)$request['widget'];
$widget_name = (string)$request->widget;
// Preparing the parameters and calling the function.
$params = array();
foreach($request->children() as $child) {
if($child->getName() == 'param') {
if($child->count() > 0) { // Probably contains an array.
$arr = array();
foreach($child->children() as $data) {
if($data->getName() == 'array') {
foreach($data->children() as $elt) {
if($elt->getName() == 'arrayelt') {
if(isset($elt['name'])) {
$arr[(string)$elt['name']] = (string)$elt;
} else {
$arr[] = (string)$elt;
}
}
}
}
}
$params[] = $arr;
} else {
$params[] = (string)$child;
}
}
$params = (array)$request->params;
$result = array();
foreach($params as $p) {
if(is_object($p))
array_push($result, (array)$p->container);
else
array_push($result, $p);
}
$widgets = WidgetWrapper::getInstance(false);
$widgets->run_widget($widget_name, (string)$request['name'], $params);
}
$widgets->run_widget($widget_name, (string)$request->func, $result);
}
}
}

16
system/Utils.php

@ -661,6 +661,13 @@ function checkJid($jid)
return filter_var($jid, FILTER_VALIDATE_EMAIL);
}
/**
* Remove the tabulations, carriage return and multiple whitespaces
*/
function cleanString($s) {
return preg_replace('/(\s\s+|\t|\n)/', ' ', $s);
}
/**
* Return a URIfied string
* @param string
@ -694,9 +701,14 @@ function movim_log($log) {
// var_dump($log);
print_r($log);
$dump = ob_get_clean();
$fh = fopen(BASE_PATH . 'log/movim.log', 'w');
/*$fh = fopen(BASE_PATH . 'log/movim.log', 'w');
fwrite($fh, $dump);
fclose($fh);
fclose($fh);*/
openlog('movim', LOG_NDELAY, LOG_USER);
$errlines = explode("\n",$dump);
foreach ($errlines as $txt) { syslog(LOG_DEBUG, $txt); }
closelog();
}
?>

2
system/UtilsPicture.php

@ -22,7 +22,7 @@ function createThumbnails($jid, $photobin) {
createThumbnailSize(base64_decode($photobin), 150, BASE_PATH.'cache/'.$jid.'_l.jpg');
createThumbnailSize(base64_decode($photobin), 120, BASE_PATH.'cache/'.$jid.'_m.jpg');
createThumbnailSize(base64_decode($photobin), 50, BASE_PATH.'cache/'.$jid.'_s.jpg');
createThumbnailSize(base64_decode($photobin), 30, BASE_PATH.'cache/'.$jid.'_xs.jpg');
createThumbnailSize(base64_decode($photobin), 28, BASE_PATH.'cache/'.$jid.'_xs.jpg');
createThumbnailSize(base64_decode($photobin), 24, BASE_PATH.'cache/'.$jid.'_xxs.jpg');
}

433
system/Widget/WidgetCommon.php

@ -61,6 +61,12 @@ class WidgetCommon extends WidgetBase {
>'.t('Place').'</a>
</span>';
if($post->jid != '')
$c = '
<span>
<a href="?q=friend&amp;f='.$post->jid.'">'.$post->getContact()->getTrueName().'</a>
</span>';
if($post->links)
$enc = $this->printEnclosures($post->links);
@ -76,23 +82,9 @@ class WidgetCommon extends WidgetBase {
$comments = $this->printComments($post, $comments, $public);
else
$comments = '';
//else
//$comments = '';
if($this->user->getLogin() == $post->jid)
$toolbox = $this->getToolbox($post);
/*
<span class="fold">
<a
href="#"
onclick="'.
$this->genCallAjax(
'ajaxPostFold',
"'".$post->nodeid."'").'
movim_toggle_class(\'#'.$post->nodeid.'\',\'folded\')">'.
$fold.'
</a>
</span>*/
$html = '
<div class="post '.$class.'" id="'.$post->nodeid.'">
@ -103,10 +95,7 @@ class WidgetCommon extends WidgetBase {
<div id="'.$post->nodeid.'bubble" class="postbubble '.$access.'">
<div class="header">
<span class="title">'.$title.'</span>
<span>
<a href="?q=friend&amp;f='.$post->jid.'">'.$post->getContact()->getTrueName().'</a>
</span>
'.$c.'
<span class="date">
'.prepareDate(strtotime($post->published)).'
</span>
@ -313,180 +302,6 @@ class WidgetCommon extends WidgetBase {
else
return false;
}
/*
protected function preparePost($message, $comments = false) {
$tmp = '<a name="'.$message[0]->getData('nodeid').'"></a>';
if(isset($message[1])) {
$tmp = '<div class="post ';
if($message[0]->getData('jid') == $this->user->getLogin())
$tmp .= 'me';
$tmp .= '" id="'.$message[0]->getData('nodeid').'" >
<a href="?q=friend&f='.$message[0]->getData('jid').'">
<img class="avatar" src="'.$message[1]->getPhoto('s').'">
</a>
<div id="'.$message[0]->getData('nodeid').'bubble" class="postbubble ';
if($this->user->getLogin() == $message[0]->getData('jid')) {
$tmp .= 'me ';
if($message[0]->getData('public') == 1)
$tmp .= 'protect black';
else
$tmp .= 'protect orange';
}
if($message[1]->getTrueName() == null)
$name = $message[0]->getData('jid');
else
$name = $message[1]->getTrueName();
$tmp .= '">
<span>
<a href="?q=friend&f='.$message[0]->getData('jid').'">'.$name.'</a>
</span>
<span class="date">
'.prepareDate(strtotime($message[0]->getData('updated'))).'
</span>';
$tmp .= '<div class="content">
'.prepareString(html_entity_decode($message[0]->getData('content'))). '</div>';
if($message[0]->getPlace() != false)
$tmp .= '<span class="place">
<a
target="_blank"
href="http://www.openstreetmap.org/?lat='.$message[0]->getData('lat').'&lon='.$message[0]->getData('lon').'&zoom=10"
>'.$message[0]->getPlace().'</a>
</span>';
if($message[0]->getData('jid') != $message[0]->getData('uri'))
$tmp .= '<span class="recycle">
<a href="?q=friend&f='.$message[0]->getData('uri').'">'.$message[0]->getData('name').'</a>
</span>';
$tmp .= '<div class="clear"></div>';
if($message[0]->getData('commentson') == 1) {
$tmp .= '<div class="comments" id="'.$message[0]->getData('nodeid').'comments">';
$commentshtml = $this->prepareComments($comments);
if($commentshtml != false)
$tmp .= $commentshtml;
$tmp .= '
<div class="comment">
<a
class="getcomments icon bubble"
style="margin-left: 0px;"
onclick="'.$this->genCallAjax('ajaxGetComments', "'".$message[0]->getData('commentplace')."'", "'".$message[0]->getData('nodeid')."'").'; this.innerHTML = \''.t('Loading comments ...').'\'">'.
t('Get the comments').'
</a>
</div></div>';
$tmp .= '<div class="comments">
<div
class="comment"
style="border-bottom: none;"
onclick="this.parentNode.querySelector(\'#commentsubmit\').style.display = \'table\'; this.style.display =\'none\'">
<a class="getcomments icon bubbleadd">'.t('Add a comment').'</a>
</div>
<table id="commentsubmit">
<tr>
<td>
<textarea id="'.$message[0]->getData('nodeid').'commentcontent" onkeyup="movim_textarea_autoheight(this);"></textarea>
</td>
</tr>
<tr class="commentsubmitrow">
<td style="width: 100%;"></td>
<td>
<a
onclick="
if(document.getElementById(\''.$message[0]->getData('nodeid').'commentcontent\').value != \'\') {
'.$this->genCallAjax(
'ajaxPublishComment',
"'".$message[0]->getData('commentplace')."'",
"'".$message[0]->getData('nodeid')."'",
"encodeURIComponent(document.getElementById('".$message[0]->getData('nodeid')."commentcontent').value)").
'document.getElementById(\''.$message[0]->getData('nodeid').'commentcontent\').value = \'\';
}"
class="button tiny icon submit"
style="padding-left: 28px;"
>'.
t("Submit").'
</a>
</td>
</tr>
</table>';
$tmp .= '</div>';
}
$tmp .= '
</div>';
if($this->user->getLogin() == $message[0]->getData('jid')) {
$tmp .= '
<div class="tools">
'.t("Change the privacy level").' :
<a
title="'.t("your post will appear in your Movim public feed").'"
onclick="'.
$this->genCallAjax(
'ajaxPrivacyPost',
"'".$this->user->getLogin()."'",
"'".$message[0]->getData('nodeid')."'",
"'black'").'" >
'.t("Everyone").'</a>,
<a
onclick="'.
$this->genCallAjax(
'ajaxPrivacyPost',
"'".$this->user->getLogin()."'",
"'".$message[0]->getData('nodeid')."'",
"'orange'").'" >
'.t("Your contacts").'</a>
<a
style="float: right; display: none;";
id="deleteno"
onclick="
this.parentNode.querySelector(\'#deleteyes\').style.display = \'none\';
this.style.display = \'none\';
"
onclick="">
'.t("No").'
</a>
<a
style="float: right; padding-right: 1em; display: none;";
id="deleteyes"
onclick="'.
$this->genCallAjax(
'ajaxDeletePost',
"'".$this->user->getLogin()."'",
"'".$message[0]->getData('nodeid')."'").'" >
'.t("Yes").'
</a>
<a
style="float: right; padding-right: 1em;";
onclick="
this.parentNode.querySelector(\'#deleteyes\').style.display = \'inline\';
this.parentNode.querySelector(\'#deleteno\').style.display = \'inline\';
"
title="'.t("Delete this post").'">
'.t("Delete this post").'
</a>
</div>';
}
$tmp .= '</div>';
}
return $tmp;
}*/
protected function prepareComments($comments) {
$tmp = false;
@ -541,54 +356,174 @@ class WidgetCommon extends WidgetBase {
protected function prepareSubmitForm($server = '', $node = '') {
$html = '
<script type="text/javascript">
function showPosition(poss) {
'.$this->genCallAjax('ajaxShowPosition', "poss").'
}
</script>
<div class="popup" id="markdownhelp">
<a
class="button tiny black"
style="float: right;"
onclick="
movim_toggle_display(\'#markdownhelp\');"
>'.t('Close').'</a>
<h2>Title level</h2>
<pre>
A First Level Header
====================
A Second Level Header
---------------------
Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.
The quick brown fox jumped over the lazy
dog\'s back.
### Header 3
> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote
</pre>
<h2>Phrase Emphasis</h2>
<pre>
Some of these words *are emphasized*.
Some of these words _are emphasized also_.
Use two asterisks for **strong emphasis**.
Or, if you prefer, __use two underscores instead__.
</pre>
<h2>Lists</h2>
<pre>
* Candy.
* Gum.
* Booze.
</pre>
<h2>Links</h2>
<pre>
This is an [example link](http://example.com/).
</pre>
<h2>Learn more</h2>
<p>
<a href="http://daringfireball.net/projects/markdown/basics" target="_blank">
The whole help is avaiable here : http://daringfireball.net/projects/markdown/basics
</a>
</p>
<p>
<br />
</p>
</div>
<table id="feedsubmitform">
<tbody>
<tr>
<td>
<textarea
placeholder="'.t("What's new ?").'"
id="feedmessagecontent"
class="steditor"
onkeyup="movim_textarea_autoheight(this);"></textarea>
</td>
</tr>
<script type="text/javascript">
var ste = new SimpleTextEditor("feedmessagecontent", "ste");
ste.init();
</script>
<tr id="feedsubmitrow">
<td>
<a
title="Plus"
href="#"
onclick="frameHeight(this);"
style="float: left;"
class="button tiny icon add merged left">'.t("Size").'
</a>
<a
title="Rich"
href="#"
onclick="richText(this);"
style="float: left;"
class="button tiny icon yes merged right">'.t("Rich Text").'
</a>
<a
title="'.t("Submit").'"
href="#"
id="feedmessagesubmit"
onclick="ste.submit();'.$this->genCallAjax('ajaxPublishItem', "'".$server."'", "'".$node."'",'getFeedMessage()').'; ste.clearContent();"
class="button tiny icon submit">'.t("Submit").'
</a>
</td>
</tr>
<form name="postpublish" id="postpublish">
<tr>
<td>
<textarea
name="content"
id="postpublishcontent"
onkeyup="movim_textarea_autoheight(this);"
placeholder="'.t("What's new ?").'" ></textarea>
</td>
</tr>
<tr id="feedsubmitrow">
<td>
<input type="hidden" id="latlonpos" name="latlonpos"/>
<a
title="'.t("Submit").'"
href="#"
id="feedmessagesubmit"
onclick="'.$this->genCallAjax('ajaxPublishItem', "'".$server."'", "'".$node."'","movim_parse_form('postpublish')").';
document.querySelector(\'#postpublish\').reset();
movim_textarea_autoheight(document.querySelector(\'#postpublishcontent\'));"
class="button tiny icon yes">'.
t("Submit").'
</a>
<a
title="Plus"
href="#"
id="postpublishsize"
onclick="frameHeight(this, document.querySelector(\'#postpublishcontent\'));"
style="float: left;"
class="button tiny icon alone add merged left"></a><a
class="button tiny icon alone help merged"
style="float: left;"
onclick="
movim_toggle_display(\'#markdownhelp\');"
></a><a title="'.t("Geolocalisation").'"
onclick="setPosition(document.querySelector(\'#latlonpos\'));"
style="float: left;"
class="button tiny icon alone geo merged right"></a>
<span id="postpublishlocation"></span>
</td>
</tr>
</form>
</tbody>
</table>';
return $html;
}
function ajaxShowPosition($pos)
{
list($lat,$lon) = explode(',', $pos);
$pos = json_decode(
file_get_contents('http://nominatim.openstreetmap.org/reverse?format=json&lat='.$lat.'&lon='.$lon.'&zoom=27&addressdetails=1')
);
RPC::call('movim_fill', 'postpublishlocation' , (string)$pos->display_name);
RPC::commit();
}
function ajaxPublishItem($server, $node, $form)
{
$content = $form['content'];
list($lat,$lon) = explode(',', $form['latlonpos']);
$pos = json_decode(
file_get_contents('http://nominatim.openstreetmap.org/reverse?format=json&lat='.$lat.'&lon='.$lon.'&zoom=27&addressdetails=1')
);
$geo = array(
'latitude' => (string)$pos->lat,
'longitude' => (string)$pos->lon,
'altitude' => (string)$pos->alt,
'country' => (string)$pos->address->country,
'countrycode' => (string)$pos->address->country_code,
'region' => (string)$pos->address->county,
'postalcode' => (string)$pos->address->postcode,
'locality' => (string)$pos->address->city,
'street' => (string)$pos->address->path,
'building' => (string)$pos->address->building,
'text' => (string)$pos->display_name,
'uri' => ''//'http://www.openstreetmap.org/'.urlencode('?lat='.(string)$pos->lat.'&lon='.(string)$pos->lon.'&zoom=10')
);
if($content != '') {
$content = Michelf\Markdown::defaultTransform($content);
$p = new moxl\PubsubPostPublish();
$p->setFrom($this->user->getLogin())
->setTo($server)
->setNode($node)
->setLocation($geo)
->setContentHtml(rawurldecode($content))
->enableComments()
->request();
}
}
function onComment($parent) {
$p = new \modl\ContactPostn();
@ -632,18 +567,6 @@ class WidgetCommon extends WidgetBase {
->request();
}
function ajaxPublishItem($server, $node, $content)
{
if($content != '') {
$p = new moxl\PubsubPostPublish();
$p->setFrom($this->user->getLogin())
->setTo($server)
->setNode($node)
->setContent(htmlspecialchars(rawurldecode($content)))
->request();
}
}
function ajaxPublishComment($to, $id, $content) {
if($content != '') {
$p = new moxl\MicroblogCommentPublish();
@ -677,25 +600,7 @@ class WidgetCommon extends WidgetBase {
RPC::commit();
}
/*function ajaxPostFold($nodeid) {
$pd = new \modl\PostDAO();
$p = $pd->get($nodeid);
$p->renew();
$public = $p->public;
if($public == 0) {
$p->public = 2;
$pd->set($p);
} elseif($public != 0) {
$p->public = 0;
$pd->set($p);
}
}*/
function onPostDelete($id) {
/*function onPostDelete($id) {
RPC::call('movim_delete', $id);
}
@ -703,5 +608,5 @@ class WidgetCommon extends WidgetBase {
$html .=
'<div class="message error">'.t('An error occured : ').$params[1].'</div>';
RPC::call('movim_fill', $params[0] , $html);
}
}*/
}

17
system/Widget/WidgetWrapper.php

@ -26,8 +26,6 @@ class WidgetWrapper
private $all_widgets = array();
private $loaded_widgets = array();
private $loaded_widgets_old;
//private $loaded_widgets_cached = array();
//private $cached_widgets;
private static $instance;
@ -201,21 +199,6 @@ class WidgetWrapper
return $isevent;
}
/*function iterateCached($method, array $params = NULL)
{
$buff = array();
$widgets = $this->cached_widgets;
if(!empty($widgets)) {
foreach($widgets as $widget => $val) {
$buff[] = $this->run_widget($widget, $method, $params);
}
}
return $buff;
}*/
/**
* Returns the list of loaded CSS.

123
system/Widget/widgets/About/About.php

@ -0,0 +1,123 @@
<?php
/**
* @package Widgets
*
* @file Vcard.php
* This file is part of MOVIM.
*
* @brief A widget which display some help
*
* @author Timothée Jaussoin <edhelas_at_gmail_dot_com>
*
* @version 1.0
* @date 3 may 2012
*
* Copyright (C)2010 MOVIM project
*
* See COPYING for licensing information.
*/
class About extends WidgetBase
{
function WidgetLoad() {
}
function build()
{
?>
<div class="tabelem padded" title="<?php echo t('About'); ?>" id="about">
<p>Movim is an XMPP-based communication platform. All the project, except the following software and resources, is under
<a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License v3</a>.
</p>
<h2><?php echo t('Thanks'); ?></h2>
<dl>
<dt>Developers</dt><dd><a href="http://edhelas.mov.im/">Jaussoin Timothée aka edhelas</a></dd>
<dt></dt><dd><a href="https://launchpad.net/~nodpounod">Ho Christine aka nodpounod</a></dd>
<dt></dt><dd><a href="https://etenil.net/">Pasquet Guillaume aka Etenil</a></dd>
<dt>Translators</dt><dd>Arabic - <a href="https://launchpad.net/~gharbeia">Ahmad Gharbeia أحمد غربية</a></dd>
<dt></dt><dd>Brazilian - <a href="https://launchpad.net/~dnieper650">millemiglia</a></dd>
<dt></dt><dd>Chinese - <a href="https://launchpad.net/~dudumomo">dudumomo</a></dd>
<dt></dt><dd>Danish - <a href="https://launchpad.net/~ole-carlsen-web">Ole Carlsen</a></dd>
<dt></dt><dd>Dutch - <a href="https://launchpad.net/~laurens-debackere">Laurens Debackere</a></dd>
<dt></dt><dd>English UK - <a href="https://launchpad.net/~kevinbeynon">Kevin Beynon</a>, <a href="https://launchpad.net/~influence-pc">Vincent</a></dd>
<dt></dt><dd>Esperanto - <a href="https://launchpad.net/~eliovir">Eliovir</a></dd>
<dt></dt><dd>Finish - <a href="https://launchpad.net/~e1484180">Timo</a></dd>
<dt></dt><dd>French -
<a href="https://launchpad.net/~hyogapag">Hyogapag</a>,
<a href="https://launchpad.net/~e1484180">Hélion du Mas des Bourboux</a>,
<a href="https://launchpad.net/~jonathanmm">JonathanMM</a>,
<a href="https://launchpad.net/~grossard-o">Ludovic Grossard</a>,
<a href="https://launchpad.net/~schoewilliam">Schoewilliam</a>,
<a href="https://launchpad.net/~influence-pc">Vincent</a>,
<a href="https://launchpad.net/~edhelas">edhelas</a>,
<a href="https://launchpad.net/~nodpounod">pou</a>
</dd>
<dt></dt><dd>German -
<a href="https://launchpad.net/~q-d">Daniel Winzen</a>,
<a href="https://launchpad.net/~jonas-ehrhard">Jonas Ehrhard</a>,
<a href="https://launchpad.net/~jonatan-zeidler-gmx">Jonatan Zeidler</a>,
<a href="https://launchpad.net/~kili4n">Kilian Holzinger</a>,
</dd>
<dt></dt><dd>Greek -
<a href="https://launchpad.net/~d-rotarou">Rotaru Dorin</a>,
<a href="https://launchpad.net/~yang-hellug">aitolos</a>
</dd>
<dt></dt><dd>Hebrew - <a href="https://launchpad.net/~genghiskhan">GenghisKhan</a></dd>
<dt></dt><dd>Hungarian - <a href="https://launchpad.net/~batisteo">Baptiste Darthenay</a></dd>
<dt></dt><dd>Italian -
<a href="https://launchpad.net/~andrea-caratti-phys">Andrea Caratti</a>,
<a href="https://launchpad.net/~giacomo-alzetta">Giacomo Alzetta</a>,
<a href="https://launchpad.net/~emailadhoc">kimj</a>
</dd>
<dt></dt><dd>Japanese - <a href="https://launchpad.net/~fdelbrayelle">Franky</a></dd>
<dt></dt><dd>Occitan (post 1500) -
<a href="https://launchpad.net/~cvalmary">Cédric VALMARY (Tot en òc)</a>,
<a href="https://launchpad.net/~caillonm">Maime</a>
</dd>
<dt></dt><dd>Portuguese -
<a href="https://launchpad.net/~jonathanmm">JonathanMM</a>,
<a href="https://launchpad.net/~dnieper650">millemiglia</a>
</dd>
<dt></dt><dd>Russian -
<a href="https://launchpad.net/~ak099">Aleksey Kabanov</a>,
<a href="https://launchpad.net/~vsharmanov">Vyacheslav Sharmanov</a>,
<a href="https://launchpad.net/~hailaga">hailaga</a>,
<a href="https://launchpad.net/~salnsg">Сергей Сальников</a>,
<a href="https://launchpad.net/~mr-filinkov">DeforaD</a>
</dd>
<dt></dt><dd>Spanish -
<a href="https://launchpad.net/~alejandrosg">Alejandro Serrano González</a>,
<a href="https://launchpad.net/~edu5800">Eduardo Alberto Calvo</a>,
<a href="https://launchpad.net/~estebanmainieri">Esteban Mainieri</a>,
<a href="https://launchpad.net/~victormezio">Oizem Mushroom</a>,
<a href="https://launchpad.net/~kaiser-715-deactivatedaccount">Ricardo Sánchez Baamonde</a>,
<a href="https://launchpad.net/~invrom">Ubuntu</a>,
<a href="https://launchpad.net/~orochiforja">orochiforja</a>
</dd>
<dt></dt><dd>Turkish -
<a href="https://launchpad.net/~basaran-caner">Caner Başaran</a>,
<a href="https://launchpad.net/~emreakca">emre akça</a>
</dd>
</dl>
<h2><?php echo t('Software'); ?></h2>
<dl>
<dt>Database Library</dt><dd>Modl - Movim DB Layer <a href="https://launchpad.net/modl">launchpad.net/modl</a> under AGPLv3</dd>
<dt>XMPP Library</dt><dd>Moxl - Movim XMPP Library <a href="https://launchpad.net/moxl">launchpad.net/moxl</a> under AGPLv3</dd>
</dl>
<br />
<dl>
<dt>Map Library</dt><dd>Leaflet <a href="http://leafletjs.com/">leafletjs.com</a> under BSD</dd>
<dt>Markdown</dt><dd>Michel Fortin <a href="http://michelf.ca/projects/php-markdown/">michelf.ca</a> ©Michel Fortin</dd>
<dt>HTML Fixer</dt><dd> Giulio Pons <a href="http://www.barattalo.it">barattalo.it</a></dd>
</dl>
<h2><?php echo t('Ressources'); ?></h2>
<dl>
<dt>Icons</dt><dd>Famfamfam <a href="http://www.famfamfam.com/">www.famfamfam.com</a> under CC BY 3.0</dd>
<dt></dt><dd>Icomoon <a href="http://keyamoon.com/">by Keyamoon</a> under CC BY 3.0</dd>
</dl>
</div>
<?php
}
}

4
system/Widget/widgets/Account/Account.php

@ -76,7 +76,7 @@ class Account extends WidgetBase {
<fieldset>
<legend>'.t('Step 2 - Fill in your informations').'</legend><br /><br />';
if($response->iq->query->instructions) {
if($response->iq->query->instructions && $response->iq->query->x) {
$html .= '
<div class="element simple large">
<label>'.(string)$response->iq->query->instructions.'</label>';
@ -333,7 +333,7 @@ class Account extends WidgetBase {
marker".$id.".bindPopup('";
foreach($arrayOfNames as $name){
$action = 'selectServer("'.$name.'");';
$javascript .= "<span onclick=\'".$action."\' >".$name."</span><br />";
$javascript .= "<span onclick=\'".$action."\' ><a href=\'#nddlink\'>".$name."</a></span><br />";
}
$javascript .= "');
";

35
system/Widget/widgets/Bookmark/Bookmark.php

@ -121,20 +121,21 @@ class Bookmark extends WidgetBase
$html = '<div class="message error">'.t('Empty name').'</div>' ;
RPC::call('movim_fill', 'bookmarkadderror', $html);
RPC::commit();
}
$bookmarks = Cache::c('bookmark');
if($bookmarks == null)
$bookmarks = array();
} else {
array_push($bookmarks,
array(
'type' => 'url',
'name' => $form['name'],
'url' => $form['url']));
$this->ajaxSetBookmark($bookmarks);
$bookmarks = Cache::c('bookmark');
if($bookmarks == null)
$bookmarks = array();
array_push($bookmarks,
array(
'type' => 'url',
'name' => $form['name'],
'url' => $form['url']));
$this->ajaxSetBookmark($bookmarks);
}
}
function ajaxBookmarkUrlRemove($url)
@ -269,10 +270,10 @@ class Bookmark extends WidgetBase
<?php echo $this->prepareBookmark(Cache::c('bookmark')); ?>
</div>
<br />
<a class="button icon yes tiny merged right" style="float: right;"
onclick="movim_toggle_display('#bookmarkadd')">Add</a>
<a class="button icon submit tiny merged left" style="float: right;"
onclick="<?php echo $getbookmark; ?>">Refresh</a>
<a class="button icon add tiny merged right" style="float: right;"
onclick="movim_toggle_display('#bookmarkadd')"><?php echo('Add'); ?></a>
<a class="button icon refresh alone tiny merged left" style="float: right;"
onclick="<?php echo $getbookmark; ?>"></a>
<br />
<?php
}

1
system/Widget/widgets/Bookmark/bookmark.css

@ -3,4 +3,5 @@
width: auto;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5em;
}

179
system/Widget/widgets/Chat/Chat.php

@ -36,27 +36,32 @@ class Chat extends WidgetBase
{
$arr = $presence->getPresence();
$txt = array(
1 => t('Online'),
2 => t('Away'),
3 => t('Do Not Disturb'),
4 => t('Extended Away'),
5 => t('Offline'),
);
$html = '
<div class="message presence">
<span class="date">'.date('G:i', time()).'</span>'.
prepareString(htmlentities($txt[$arr['presence']], ENT_COMPAT, "UTF-8")).'
</div>';
$rc = new \modl\ContactDAO();
$contact = $rc->getRosterItem(echapJid($jid));
RPC::call('movim_append',
'messages'.$arr['jid'],
$html);
RPC::call('scrollTalk',
'messages'.$arr['jid']);
if(isset($contact) && $contact->chaton == 1) {
$txt = array(
1 => t('Online'),
2 => t('Away'),
3 => t('Do Not Disturb'),
4 => t('Extended Away'),
5 => t('Offline'),
);
$html = '
<div class="message presence">
<span class="date">'.date('G:i', time()).'</span>'.
prepareString(htmlentities($txt[$arr['presence']], ENT_COMPAT, "UTF-8")).'
</div>';
RPC::call('movim_append',
'messages'.$arr['jid'],
$html);
RPC::call('scrollTalk',
'messages'.$arr['jid']);
}
}
function onMessage($message)
@ -69,10 +74,11 @@ class Chat extends WidgetBase
$jid = $message->from;
}
if($message->key != $message->from)
RPC::call('notify');
$rd = new \modl\RosterLinkDAO();
$chatpop = Cache::c('chatpop');
$rc = new \modl\ContactDAO();
$contact = $rc->getRosterItem(echapJid($jid));
@ -82,14 +88,12 @@ class Chat extends WidgetBase
$evt = new Event();
$evt->runEvent('openchat');
if($chatpop)
RPC::call('movim_prepend',
'chats',
$this->prepareChat($contact));
RPC::call('scrollAllTalks');
} else if(isset($contact) && $message->body != '') {
$html = $this->prepareMessage($message);
if($contact->chaton == 1) {
@ -109,13 +113,6 @@ class Chat extends WidgetBase
RPC::call('scrollTalk',
'messages'.$contact->jid);
//Sound and title notification, if the popup chat is closed
if($chatpop)
RPC::call('notify');
//Highlight the new chat message
RPC::call('setBackgroundColor', 'chatwindow'.$contact->jid, 'red');
}
}
@ -192,13 +189,10 @@ class Chat extends WidgetBase
$rd = new \modl\RosterLinkDAO();
$rd->setChat($jid, 2);
$chatpop = Cache::c('chatpop');
if($chatpop)
RPC::call('movim_prepend',
'chats',
$this->prepareChat($contact));
RPC::call('movim_prepend',
'chats',
$this->prepareChat($contact));
RPC::call('scrollAllTalks');
@ -206,7 +200,7 @@ class Chat extends WidgetBase
}
$evt = new Event();
$evt->runEvent('openchat');
$evt->runEvent('openchat');
}
/**
@ -243,6 +237,32 @@ class Chat extends WidgetBase
->setContent(htmlspecialchars(rawurldecode($message)))
->request();
}
/**
* Send a "composing" message
*
* @param string $to
* @return void
*/
function ajaxSendComposing($to)
{
$mc = new \moxl\MessageComposing();
$mc->setTo($to)
->request();
}
/**
* Send a "paused" message
*
* @param string $to
* @return void
*/
function ajaxSendPaused($to)
{
$mp = new \moxl\MessagePaused();
$mp->setTo($to)
->request();
}
/**
* Close a talk
@ -267,8 +287,11 @@ class Chat extends WidgetBase
}
}
RPC::call('movim_delete',
'chat'.$jid);
$evt = new Event();
$evt->runEvent('closechat');
$evt->runEvent('closechat');
}
function ajaxHideTalk($jid)
@ -287,19 +310,6 @@ class Chat extends WidgetBase
RPC::commit();
}
function ajaxToggleChat()
{
//$bool = !currentValue
$bool = (Cache::c('chatpop') == true) ? false : true;
//toggling value in cache
Cache::c('chatpop', $bool);
RPC::call('movim_fill',
'chats',
$this->prepareChats());
RPC::commit();
}
function prepareMessage($message) {
if($message->body != '') {
$html = '<div class="message ';
@ -325,30 +335,8 @@ class Chat extends WidgetBase
{
$rc = new \modl\ContactDAO();
$contacts = $rc->getRosterChat();
$chatpop = Cache::c('chatpop');
if($chatpop) {
$arrow = '⇑';
$ptoggle = 'openPopup();';
} else {
$arrow = '⇓';
$ptoggle = 'closePopup();';
}
$html = '';
$html .= '
<div class="chat">
<div
class="tab"
style="font-weight: bold; font-size: 1.4em; width: 30px; text-align: center;"
onclick="'.$this->genCallAjax("ajaxToggleChat").' '.$ptoggle.'">
'.$arrow.'
</div>
</div>
';
if(isset($contacts) && $chatpop) {
if(isset($contacts)) {
foreach($contacts as $contact) {
$html .= trim($this->prepareChat($contact));
}
@ -378,12 +366,14 @@ class Chat extends WidgetBase
$tabstyle = ' style="display: none;" ';
$panelstyle = ' style="display: block;" ';
}
$html = '
<div class="chat" onclick="this.querySelector(\'textarea\').focus()">
<div class="chat"
onclick="this.querySelector(\'textarea\').focus()"
id="chat'.$contact->jid.'">
<div class="panel" '.$panelstyle.'>
<div class="head" >
<span class="chatbutton cross" onclick="'.$this->genCallAjax("ajaxCloseTalk", "'".$contact->jid."'").' closeTalk(this)"></span>
<span class="chatbutton cross" onclick="'.$this->genCallAjax("ajaxCloseTalk", "'".$contact->jid."'").'"></span>
<span class="chatbutton arrow" onclick="'.$this->genCallAjax("ajaxHideTalk", "'".$contact->jid."'").' hideTalk(this)"></span>
<img class="avatar" src="'.$contact->getPhoto('xs').'" />
<a class="name" href="?q=friend&f='.$contact->jid.'">
@ -400,8 +390,30 @@ class Chat extends WidgetBase
<div class="text">
<textarea
rows="1"
onkeyup="movim_textarea_autoheight(this);"
onkeypress="if(event.keyCode == 13) {'.$this->genCallAjax('ajaxSendMessage', "'".$contact->jid."'", "sendMessage(this, '".$contact->jid."')").' return false; }"
id="textarea'.$contact->jid.'"
onkeypress="
if(event.keyCode == 13) {
'.$this->genCallAjax('ajaxSendMessage', "'".$contact->jid."'", "sendMessage(this, '".$contact->jid."')").'
lastkeypress = new Date().getTime()+1000;
return false;
}
if(lastkeypress < new Date().getTime())
'.$this->genCallAjax('ajaxSendComposing', "'".$contact->jid."'").'
lastkeypress = new Date().getTime()+1000;
"
onkeyup="
movim_textarea_autoheight(this);
var val = this.value;
setTimeout(function()
{
if(lastkeypress < new Date().getTime() && val != \'\') {
'.$this->genCallAjax('ajaxSendPaused', "'".$contact->jid."'").'
lastkeypress = new Date().getTime()+1000;
}
},1100); // Listen for 2 seconds of silence
"
></textarea>
</div>
</div>
@ -412,6 +424,7 @@ class Chat extends WidgetBase
</div>
</div>
</div>
';
return $html;
}

13
system/Widget/widgets/Chat/chat.css

@ -83,10 +83,11 @@
padding-right: 1em;
display: inline-block;
margin: 0px;
width: 145px;
width: 62%;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 3px;
font-size: 0.9em;
white-space: nowrap;
}
@ -144,12 +145,16 @@
#chats .chat .panel .text textarea {
width: 100%;
border: 0px;
padding: 2px;
padding: 0.2em;
overflow: auto;
background-color: white;
resize: none;
height: 17px;
line-height: 17px;
/*height: 1em;
line-height: 1em;
font-size: 1em;*/
font-size: 1em;
height: 1.3em;
overflow-y: hidden;
}
#chats .chat .panel .text textarea:focus {

12
system/Widget/widgets/Chat/chat.js

@ -38,10 +38,6 @@ function hideTalk(n) {
tab.style.display = 'block';
}
function closeTalk(n) {
n.parentNode.parentNode.parentNode.parentNode.removeChild(n.parentNode.parentNode.parentNode);
}
function scrollTalk(params) {
var messages = document.getElementById(params);
messages.scrollTop = messages.scrollHeight;
@ -104,11 +100,3 @@ function sendMessage(n, jid)
function disableSound(){
chatSoundNotif.volume = 0;
}
function setBackgroundColor(where, color)
{
target = document.getElementById(where);
if(target) {
target.style.backgroundColor = color;
}
}

13
system/Widget/widgets/ChatExt/ChatExt.php

@ -29,11 +29,6 @@ class ChatExt extends WidgetBase
$this->registerEvent('message', 'onMessage');
$this->registerEvent('openchat', 'onEvent');
$this->registerEvent('closechat', 'onEvent');
/*$this->registerEvent('messagepublished', 'onMessagePublished');
$this->registerEvent('composing', 'onComposing');
$this->registerEvent('paused', 'onPaused');
$this->registerEvent('attention', 'onAttention');
$this->registerEvent('presence', 'onPresence');*/
}
function prepareChat($contact)
@ -102,9 +97,11 @@ class ChatExt extends WidgetBase
function onEvent()
{
$html = $this->preparePop();
RPC::call('popUpEvent', 'movim_fill', 'chatpop', $html);
RPC::call('popUpEvent', 'scrollAllTalks');
if(!Cache::c('chatpop')) {
$html = $this->preparePop();
RPC::call('popUpEvent', 'movim_fill', 'chatpop', $html);
RPC::call('popUpEvent', 'scrollAllTalks');
}
}
function preparePop()

6
system/Widget/widgets/ChatPop/ChatPop.php

@ -26,12 +26,6 @@ class ChatPop extends WidgetBase
{
$this->addcss('chatpop.css');
$this->addjs('chatpop.js');
//$this->registerEvent('message', 'onMessage');
/*$this->registerEvent('messagepublished', 'onMessagePublished');
$this->registerEvent('composing', 'onComposing');
$this->registerEvent('paused', 'onPaused');
$this->registerEvent('attention', 'onAttention');
$this->registerEvent('presence', 'onPresence');*/
}
function build()

2
system/Widget/widgets/ChatPop/chatpop.js

@ -19,7 +19,7 @@ function handleError() {
window.onerror = handleError;
window.onunload = function() {
self.opener.Chat_ajaxToggleChat();
self.opener.Roster_ajaxToggleChat();
};
function scrollAllTalks() {

12
system/Widget/widgets/Config/Config.php

@ -91,7 +91,7 @@ class Config extends WidgetBase
onclick="
document.querySelector('input[name=color]').value = '082D50';
document.body.style.backgroundColor = '#082D50';"
style="width: 28%; float: right; margin-top: 5px"
style="width: 45%; float: right;"
class="button icon back">
<?php echo t('Reset');?>
</a>
@ -152,13 +152,13 @@ class Config extends WidgetBase
<input type="radio" name="pattern" id="stars" value="stars"/>
<label for="stars"><span></span>
<div class="preview stars"
style="background-color:black;"></div>
style="background-color:black; background-size: 100px 100px;"></div>
</label>
<input type="radio" name="pattern" id="paper" value="paper"/>
<label for="paper"><span></span>
<div class="preview paper"
style="background-color:gray;"></div>
style="background-color: #23343E;"></div>
</label>
<input type="radio" name="pattern" id="tartan" value="tartan"/>
@ -166,6 +166,12 @@ class Config extends WidgetBase
<div class="preview tartan"
style="background-color: hsl(2, 57%, 40%);"></div>
</label>
<input type="radio" name="pattern" id="empty" value=""/>
<label for="empty"><span></span>
<div class="preview empty"
style="background-color: white;"></div>
</label>
</div>
</fieldset>
<br />

48
system/Widget/widgets/ContactInfo/ContactInfo.php

@ -54,9 +54,15 @@ class ContactInfo extends WidgetCommon
$html .= t("I'm ").substr($mood, 0, -1).'<br />';
}
if($c->tuneartist) {
if($c->tuneartist || $c->tunetitle) {
$html .= '<h2>'.t('Listening').'</h2>';
$html .= $c->tuneartist. ' - '.$c->tunetitle.' '.t('on').' '.$c->tunesource;
if($c->tuneartist)
$artist = $c->tuneartist. ' - ';
if($c->tunetitle)
$title = $c->tunetitle;
if($c->tunesource)
$album = t('on').' '.$c->tunesource;
$html .= $artist.$title.' '.$album;
}
// Last seen
@ -75,30 +81,24 @@ class ContactInfo extends WidgetCommon
if($c->getPlace() != '')
$html .= $c->getPlace().'<br /><br />';
if(isset($c->loclatitude) && isset($c->loclongitude))
$html .= '
<div id="mapdiv" style="width: auto; height: 250px;"></div>
<script>
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var lonLat = new OpenLayers.LonLat( '.$c->loclongitude.' ,'.$c->loclatitude.' )
.transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
map.getProjectionObject() // to Spherical Mercator Projection
);
var zoom=11;
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(lonLat));
map.setCenter (lonLat, zoom);
</script>';
if(isset($c->loclatitude) && isset($c->loclongitude))
$html .= '
<div style="height: 250px;" id="map"></div>
<script type="text/javascript">
var map = L.map("map").setView(['.$c->loclatitude.' ,'.$c->loclongitude.'], 11);
L.tileLayer("http://tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "",
maxZoom: 18
}).addTo(map);
var marker = L.marker(['.$c->loclatitude.' ,'.$c->loclongitude.']).addTo(map)
</script>';
}
// Client informations
if($c->node && $c->ver) {
$node = $c->node.'#'.$c->ver;

3
system/Widget/widgets/ContactSummary/ContactSummary.php

@ -73,7 +73,8 @@ class ContactSummary extends WidgetCommon
<div
class="block"
style="
max-height: 90px;
max-height: 7em;
margin: 1em;
min-height: auto;
overflow: hidden;
text-overflow: ellipsis;"

35
system/Widget/widgets/Explore/Explore.php

@ -20,6 +20,29 @@ class Explore extends WidgetCommon {
$text
);
}
function prepareServers() {
$nd = new \modl\NodeDAO();
$servers = $nd->getServers();
$html = '<ul class="list">';
foreach($servers as $s) {
$html .= '
<li>
<a href="?q=server&s='.$s->serverid.'">'.
$s->serverid. '
<span class="tag">'.$s->number.'</span>
</a>
</li>';
}
$html .= '</ul>';
return $html;
//var_dump($nd->getServers());
}
function prepareContacts($form = false) {
/*if(!$form){
@ -57,7 +80,7 @@ class Explore extends WidgetCommon {
<div class="clear"></div>
</div>';*/
$cd = new \modl\ContactDAO();
$users = $cd->getAllPublic();
$users = array_reverse($cd->getAllPublic());
$gender = getGender();
$marital = getMarital();
@ -118,8 +141,16 @@ class Explore extends WidgetCommon {
</a>
</div>
</form>-->
<div id="serverresult" class="paddedtop">
<h2><?php echo t('Discussion Servers'); ?></h2>
<?php echo $this->prepareServers(); ?>
</div>
<div id="contactsresult">
<div class="paddedtopbottom">
<h2><?php echo t('Last registered'); ?></h2>
</div>
<div id="contactsresult">
<?php echo $this->prepareContacts(); ?>
</div>
</div>

1
system/Widget/widgets/Explore/explore.css

@ -1,5 +1,4 @@
#explore {
margin-bottom: 2em;
background-color: #F5F5F5;
min-height: 600px;
}

12
system/Widget/widgets/Feed/Feed.php

@ -1,6 +1,8 @@
<?php
class Feed extends WidgetCommon {
private $_feedsize = 10;
function WidgetLoad()
{
$this->addcss('feed.css');
@ -67,7 +69,7 @@ class Feed extends WidgetCommon {
function onPostPublished($post) {
$pd = new \modl\PostnDAO();
$pl = $pd->getFeed(-1, 10);
$pl = $pd->getFeed(-1, $this->_feedsize);
$html = $this->preparePosts($pl);
@ -122,16 +124,16 @@ class Feed extends WidgetCommon {
function prepareFeed($start) {
$pd = new \modl\PostnDAO();
$pl = $pd->getFeed($start+1, 10);
$pl = $pd->getFeed($start+1, $this->_feedsize);
$html = $this->preparePosts($pl);
// We ask for the HTML of all the posts
$next = $start + 10;
$next = $start + $this->_feedsize;
if(sizeof($pl) > 9 && $html != '') {
if(sizeof($pl) > $this->_feedsize-1 && $html != '') {
$html .= '
<div class="post">
<div
@ -184,7 +186,7 @@ class Feed extends WidgetCommon {
<div class="posthead">
<a
class="button tiny icon feed merged left"
class="button tiny icon blog merged left"
href="?q=blog&f=<?php echo $this->user->getLogin(); ?>"
target="_blank">
<?php echo t('Blog'); ?>

2
system/Widget/widgets/Help/Help.php

@ -26,7 +26,7 @@ class Help extends WidgetBase
function build()
{
?>
<div id="help" class="padded">
<div class="tabelem paddedtop" title="<?php echo t('Help'); ?>" id="help">
<h2><?php echo t('What is Movim?'); ?></h2>

24
system/Widget/widgets/Login/Login.php

@ -275,13 +275,32 @@ class Login extends WidgetBase {
</div>
<div class="element">
<a
class="button icon yes"
class="button"
onclick="<?php echo $submit; ?> loginButtonSet('<?php echo t('Connecting...');?>', true); this.onclick=null;"
id="submit"
name="submit"><?php echo t("Come in!"); ?></a>
</div>
<input style="display: none;" type="submit" id="submitb" name="submitb" value="submit"/>
<div class="clear"></div>
<ul id="loginhelp">
<li id="jabber"><?php echo t('You can login using your favorite Jabber account')?>
<a href="#" onclick="fillExample('demonstration@movim.eu', 'demonstration');">
<?php echo t('or with our demonstration account'); ?>
</a>
</li>
<li id="gmail">
<?php echo t('%sGmail accounts are also compatible%s but are not fully supported',
'<a href="#" onclick="fillExample(\'your.id@gmail.com \', \'\');">', '</a>')?>
</li>
<li id="facebook">
<?php echo t('You can login with Facebook (chat only) using %s your.id@chat.facebook.com %s and your password',
'<a href="#" onclick="fillExample(\'your.id@chat.facebook.com \', \'\');">', '</a>'); ?>
</li>
</ul>
<iframe id="passwordiframe" name="passwordiframe" style="display: none;"></iframe>
<div id="warning"><?php echo $this->displayWarning($_GET['err'], true); ?></div>
@ -296,7 +315,8 @@ class Login extends WidgetBase {
<?php echo t('Create one !'); ?>
</a>
</div>
<div class="clear"></div>
<div class="clear"></div>
</form>
<?php

BIN
system/Widget/widgets/Login/img/beaker.png

After

Width: 22  |  Height: 22  |  Size: 316 B

BIN
system/Widget/widgets/Login/img/envelope.png

After

Width: 22  |  Height: 22  |  Size: 336 B

BIN
system/Widget/widgets/Login/img/facebook.png

After

Width: 22  |  Height: 22  |  Size: 259 B

BIN
system/Widget/widgets/Login/img/jabber.png

After

Width: 22  |  Height: 22  |  Size: 616 B

47
system/Widget/widgets/Login/login.css

@ -1,7 +1,7 @@
body {
width: 100%;
margin: 0 auto;
max-width: 350px;
max-width: 28em;
}
#content {
@ -16,7 +16,7 @@ body {
background-image: url(img/logo.png);
background-repeat: no-repeat;
background-position: center 10%;
background-position: center 1em;
background-size: auto auto;
padding-top: 40%;
@ -54,7 +54,11 @@ body {
margin: 0 auto;
padding: 0px;
width: 100%;
min-height: 40px;
min-height: 2.5em;
}
#loginpage #connectform .element:last-child {
min-height: 1em;
}
#loginpage #connectform .element input {
@ -68,8 +72,6 @@ body {
#loginpage #connectform a[name=submit] {
margin: 0px 1px;
display: block;
padding: 0px;
padding-left: 5px;
text-align: center;
margin-top: 1px;
@ -108,14 +110,6 @@ body {
color: white;
}
#connectform a[name=submit]:active {
/*background: linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -moz-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -webkit-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -o-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background-color: #455E74;*/
}
#connectform a[name=submit]:before {
color: white;
}
@ -125,6 +119,33 @@ body {
text-align: center;
}
#loginpage #loginhelp {
list-style-type: none;
color: white;
line-height: 1.2em;
text-align: justify;
transition: height 1s ease;
height: 0em;
overflow: hidden;
}
#loginpage #loginhelp li {
height: 2.5em;
background-repeat: no-repeat;
background-image: url(img/beaker.png);
padding-left: 2.5em;
background-position: 0.2em center;
margin: 0.5em 0em;
}
#loginpage #connectform:hover > #loginhelp {
height: 9em;
}
#loginpage #loginhelp li#jabber { background-image: url(img/jabber.png); }
#loginpage #loginhelp li#gmail { background-image: url(img/envelope.png); }
#loginpage #loginhelp li#facebook { background-image: url(img/facebook.png); }
#footer {
display: none;
}

9
system/Widget/widgets/Login/login.js

@ -4,8 +4,9 @@ function enterMovim(url) {
function loginButtonSet(val, loading) {
document.querySelector('#submit').innerHTML = val;
if(loading)
document.querySelector('#submit').className = 'button icon loading';
else
document.querySelector('#submit').className = 'button icon yes';
}
function fillExample(login, pass) {
document.querySelector('#login').value = login;
document.querySelector('#pass').value = pass;
}

2
system/Widget/widgets/Logout/Logout.php

@ -97,7 +97,7 @@ class Logout extends WidgetBase
$pd = new \modl\PresenceDAO();
$p = $pd->getPresence($this->user->getLogin(), $session['ressource']);
$html = '<div id="logouttab" class="'.$txts[$p->presence].'" onclick="showLogoutList();">'.$txt[$p->presence].'</div>';
$html .= '

22
system/Widget/widgets/Logout/logout.css

@ -1,5 +1,5 @@
#logout {
font-size: 13px;
font-size: 1em;
color: #ccc;
}
@ -15,10 +15,15 @@
margin-right: -250px;
cursor: pointer;
z-index: 5;
padding: 12px 10px;
padding-left: 20px;
/*padding: 12px 10px;*/
max-width: 70px;
line-height: 3em;
padding-left: 2em;
background-repeat: no-repeat;
background-position: 0px 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-position: 0px center;
}
#logouttab:hover {
@ -28,7 +33,7 @@
#logoutlist {
display: none;
position: fixed;
top: 38px;
top: 3em;
right: 50%;
margin-right: -300px;
z-index: 1;
@ -39,10 +44,11 @@
#logoutlist a {
display: block;
padding: 12px 10px;
/*padding: 12px 10px;*/
line-height: 3em;
background-repeat: no-repeat;
background-position: 10px 16px;
padding-left: 28px;
background-position: 0.5em center;
padding-left: 2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

15
system/Widget/widgets/Node/Node.php

@ -25,6 +25,7 @@ class Node extends WidgetCommon
$this->registerEvent('stream', 'onStream');
$this->registerEvent('nostream', 'onStream');
$this->registerEvent('pubsubsubscribed', 'onPubsubSubscribed');
$this->registerEvent('pubsubsubscribederror', 'onPubsubSubscribedError');
$this->registerEvent('pubsubunsubscribed', 'onPubsubUnsubscribed');
}
@ -35,11 +36,14 @@ class Node extends WidgetCommon
RPC::call('movim_fill', 'node', $html);
}
function onPubsubSubscribedError($params)
{
$this->onPubsubSubscribed($params);
}
function onPubsubUnsubscribed($params)
{
$html = $this->prepareGroup($params[0], $params[1]);
RPC::call('setBookmark');
RPC::call('movim_fill', 'node', $html);
$this->onPubsubSubscribed($params);
}
function onStream($payload) {
@ -110,6 +114,9 @@ class Node extends WidgetCommon
$html = '
<div class="breadcrumb">
<a href="?q=explore">
'.t('Explore').'
</a>
<a href="?q=server&s='.$serverid.'">
'.$serverid.'
</a>
@ -124,7 +131,7 @@ class Node extends WidgetCommon
href="#"
onclick="'.$this->genCallAjax('ajaxGetItems', "'".$serverid."'", "'".$groupid."'").'
this.className=\'button tiny icon loading\'; this.onclick=null;"
class="button tiny icon follow">
class="button tiny icon refresh">
'.('Refresh').'
</a>

8
system/Widget/widgets/NodeAffiliations/NodeAffiliations.php

@ -25,7 +25,6 @@ class NodeAffiliations extends WidgetBase
{
$this->registerEvent('pubsubaffiliations', 'onGroupMemberList');
$this->registerEvent('pubsubaffiliationssubmited', 'onSubmit');
$this->registerEvent('pubsubaffiliationserror', 'onGroupMemberListError');
}
function prepareList($list) { //0:data 1:server 2:node
@ -71,11 +70,6 @@ class NodeAffiliations extends WidgetBase
RPC::commit();
}
function onGroupMemberListError($error) {
Notification::appendNotification(t('Error').' : '.$error, 'error');
RPC::commit();
}
function ajaxChangeAffiliation($server, $node, $data){
$r = new moxl\PubsubSetAffiliations();
$r->setNode($node)->setTo($server)->setData($data)
@ -94,7 +88,7 @@ class NodeAffiliations extends WidgetBase
<div class="tabelem" title="<?php echo t('Manage your members'); ?>" id="groupmemberlist">
<div class="posthead">
<a
class="button icon submit"
class="button icon users"
onclick="<?php echo $this->genCallAjax('ajaxGetGroupMemberList', "'".$_GET['s']."'", "'".$_GET['n']."'"); ?> this.parentNode.style.display = 'none'">
<?php echo t("Get the members");?>
</a>

15
system/Widget/widgets/NodeConfig/NodeConfig.php

@ -25,7 +25,6 @@ class NodeConfig extends WidgetBase
{
$this->registerEvent('pubsubconfig', 'onConfigForm');
$this->registerEvent('pubsubconfigsubmited', 'onGroupConfig');
$this->registerEvent('pubsubconfigerror', 'onGroupConfigError');
$this->registerEvent('deletionsuccess', 'onGroupDeleted');
}
@ -33,7 +32,7 @@ class NodeConfig extends WidgetBase
$html = '
<a href="?q=server&s='.$server.'">
'.t("Return to %s's list of groups", $server).'
</a>';
</a><br /><br />';
Notification::appendNotification(t('Group deleted'), 'success');
RPC::call('movim_fill', 'handlingmessages', $html);
@ -45,11 +44,6 @@ class NodeConfig extends WidgetBase
RPC::commit();
}
function onGroupConfigError($error) {
Notification::appendNotification(t('Error').' : '.$error, 'error');
RPC::commit();
}
function onConfigForm($form) {
$submit = $this->genCallAjax('ajaxSubmitConfig', "movim_parse_form('config')", "'".$form[1]."'", "'".$form[2]."'");
$html = '
@ -80,6 +74,9 @@ class NodeConfig extends WidgetBase
}
function ajaxGroupDelete($server, $node){
$nd = new modl\NodeDAO();
$nd->deleteNode($server, $node);
$r = new moxl\GroupDelete();
$r->setTo($server)
->setNode($node)
@ -104,12 +101,12 @@ class NodeConfig extends WidgetBase
<div id="groupconfiguration" class="paddedtop">
<div id="handlingmessages"></div>
<a
class="button icon submit"
class="button icon write"
onclick="<?php echo $this->genCallAjax('ajaxGroupConfig', "'".$_GET['s']."'", "'".$_GET['n']."'"); ?> this.style.display = 'none'">
<?php echo t("Configure your group");?>
</a>
<a
class="button icon"
class="button icon no"
onclick="<?php echo $this->genCallAjax('ajaxGroupDelete', "'".$_GET['s']."'", "'".$_GET['n']."'"); ?> this.style.display = 'none'">
<?php echo t("Delete this group");?>
</a>

5
system/Widget/widgets/Notification/Notification.php

@ -24,6 +24,7 @@ class Notification extends WidgetCommon
{
$this->addcss('notification.css');
$this->addjs('notification.js');
$this->registerEvent('pubsuberror', 'onPubsubError');
}
static function appendNotification($message, $type = 'info')
@ -35,6 +36,10 @@ class Notification extends WidgetCommon
RPC::call('removeDiff', $id);
RPC::commit();
}
function onPubsubError($error) {
Notification::appendNotification($error, 'error');
}
function build()
{

10
system/Widget/widgets/Notification/notification.css

@ -7,16 +7,18 @@
#notification .notif {
background-color: rgba(0, 0, 0, 0.8);
width: 250px;
margin: 5px;
width: 20em;
margin: 0.5em;
box-shadow: 0px 0px 5px black;
color: white;
padding: 1em;
padding: 0.7em;
padding-left: 3em;
opacity: 1;
line-height: 1.5em;
background-repeat: no-repeat;
background-position: 1em 1em;
background-position: 1em center;
background-image: url(img/success.png);
}

2
system/Widget/widgets/Notifs/Notifs.php

@ -129,7 +129,7 @@ class Notifs extends WidgetCommon
<a
class="button tiny icon follow black"
href="#"
style="margin: 5px;"
style="margin: 0.5em;"
onclick="'.$this->genCallAjax("ajaxGetNotifications").';
this.innerHTML = \''.t('Updating').'\';
this.className= \'button tiny icon loading black\';

60
system/Widget/widgets/Notifs/notifs.css

@ -1,5 +1,4 @@
#notifs {
font-size: 13px;
color: #ccc;
}
@ -14,21 +13,19 @@
padding-left: 20px;
}
#notifstab span {
#notifs span {
color: white;
font-size: 10px;
font-size: 0.8em;
padding: 0px;
line-height: 1.7em;
float: right;
padding: 0px 8px;
border-radius: 3px;
margin-left: 10px;
padding: 0px 0.7em;
border-radius: 2px;
background-color: #444;
}
#notifstab span.red {
background-color: #C5371E;
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.3) inset, 0px 0px 2px rgba(0, 0, 0, 0.3);
}
#notifstab:hover {
@ -39,10 +36,14 @@
background-color: #888;
}
#notifslist #acceptcontact p {
padding: 0.5em;
}
#notifslist {
display: none;
position: fixed;
top: 38px;
top: 3em;
right: 50%;
margin-right: -300px;
z-index: 3;
@ -69,47 +70,48 @@
#notifslist ul {
list-style-type: none;
clear: both;
background-color: #242424;
border-top: 1px solid #444;
background-color: rgba(36, 36, 36, 1);
box-shadow: 0px -1px 0px #222;
}
#notifslist ul li {
padding: 5px;
line-height: 28px;
line-height: 2em;
width: 100%;
display: block;
border-top: 1px solid #333;
}
#notifslist ul li:nth-child(2n) {
background-color: rgba(255, 255, 255, 0.03);
}
#notifslist ul li p {
line-height: 1em;
margin: 5px 0px;
padding: 0em 0.5em;
}
#notifslist ul li a#notifsvalidate {
margin-right: 0.5em;
}
#notifslist ul li span.num {
color: white;
font-size: 10px;
/*color: white;
font-size: 0.8em;
padding: 0px;
line-height: 1.7em;
float: right;
line-height: 2em;
float: right;*/
background-color: #C5371E;
margin-top: 6px;
padding: 0px 8px;
border-radius: 3px;
margin-left: 10px;
margin-right: 10px;
/*padding: 0px 8px;
border-radius: 3px;*/
margin: 0.4em;
}
#notifslist ul li:hover {
background-color: #EEE;
color: black;
border-top: 1px solid #EEE;
}
#notifslist ul li.title {
border-bottom: 1px solid #222;
padding: 0px 5px;
text-align: center;
border-top: none;
color: white;
}
@ -121,11 +123,9 @@
}
#notifslist ul li img {
margin-top: 2px;
max-width: 24px;
max-width: 2em;
float: left;
border-radius: 2px;
margin-right: 5px;
margin-right: 0.5em;
}
#notifslist ul li a {

5
system/Widget/widgets/Poller/poller.js

@ -25,14 +25,15 @@ function movim_poll()
{
if(poller.status == 200) {
// Handling poll return.
if(poller.responseXML == null) {
if(poller.response == null) {
if(empty_count == 3)
movim_disconnect('&err=session');
else
empty_count++;
} else {
empty_count = 0;
rpc.handle_rpc(poller.responseXML);
rpc.handle_rpc_json(poller.response);
}
} else if(poller.status == 500 || poller.status == 400) {
movim_disconnect('&err=internal');

2
system/Widget/widgets/Profile/Profile.php

@ -117,7 +117,7 @@ class Profile extends WidgetCommon
';
$html .= '
<div class="block" style="width: 550px;">
<div class="block" style="width: 550px; margin: 1em 0em;">
<div class="textbubble">
<textarea
id="status"

4
system/Widget/widgets/ProfileData/ProfileData.php

@ -97,7 +97,7 @@ class ProfileData extends WidgetBase
<div id="mapdiv" style="width: auto; height: 250px; display: none;"></div>
<div class="clear"></div>
<a
class="button tiny icon add"
class="button tiny icon geo"
onclick="getMyPosition(); this.style.display = \'none\';">'.
t('Update my position').'
</a>
@ -109,7 +109,7 @@ class ProfileData extends WidgetBase
style="display: none; margin-top: 1em;"
id="myposrefuse"
onclick="hidePositionChoice();"
class="button tiny icon no merged right">'.t('Cancel').'</a>
class="button tiny icon alone no merged right"></a>
</div>';
return $html;

23
system/Widget/widgets/ProfileData/profiledata.js

@ -20,24 +20,13 @@ function getMyPosition() {
document.querySelector("#mapdiv").style.display = 'block';
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var lonLat = new OpenLayers.LonLat( position.coords.longitude ,position.coords.latitude )
.transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
map.getProjectionObject() // to Spherical Mercator Projection
);
var zoom=11;
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(lonLat));
map.setCenter (lonLat, zoom);
var map = L.map("mapdiv").setView([position.coords.latitude ,position.coords.longitude], 11);
L.tileLayer("http://tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "",
maxZoom: 18
}).addTo(map);
var marker = L.marker([position.coords.latitude ,position.coords.longitude]).addTo(map)
var s = document.createElement('script');
s.src = 'http://nominatim.openstreetmap.org/reverse?json_callback=cb&format=json&lat='+position.coords.latitude+'&lon='+position.coords.longitude+'&zoom=27&addressdetails=1';

57
system/Widget/widgets/Roster/Roster.php

@ -37,7 +37,6 @@ class Roster extends WidgetBase
function onPresence($presence)
{
$arr = $presence->getPresence();
//Notification::appendNotification($arr['jid'].' '. $arr['presence_txt']);
RPC::call('incomingPresence', $arr['jid'], $arr['presence_txt']);
}
@ -76,6 +75,9 @@ class Roster extends WidgetBase
class="';
if($contact->jid == $_GET['f'])
$html .= 'active ';
if(isset($contact->last) && $contact->last > 60)
$html .= 'inactive ';
if(isset($contact->presence)) {
$presencestxt = getPresencesTxt();
@ -110,7 +112,8 @@ class Roster extends WidgetBase
if($type == 'bot')
$html .= '<div class="infoicon bot"></div>';
if(isset($contact->tuneartist) && $contact->tuneartist != '')
if((isset($contact->tuneartist) && $contact->tuneartist != '') ||
(isset($contact->tunetitle) && $contact->tunetitle != ''))
$html .= '<div class="infoicon tune"></div>';
$html .= '<a
@ -264,6 +267,42 @@ class Roster extends WidgetBase
RPC::commit();
}
function ajaxToggleChat()
{
//$bool = !currentValue
$bool = (Cache::c('chatpop') == true) ? false : true;
//toggling value in cache
Cache::c('chatpop', $bool);
RPC::call('movim_fill', 'chattoggle', $this->prepareChatToggle());
RPC::commit();
}
function prepareChatToggle()
{
$chatpop = Cache::c('chatpop');
if($chatpop) {
$arrow = 'expand';
$ptoggle = 'openPopup();';
$call = $this->genCallAjax('ajaxToggleChat');
} else {
$arrow = 'contract';
$ptoggle = 'closePopup();';
$call = '';
}
$html = '
<li
onclick="'.$call.' '.$ptoggle.'"
title="'.t('Show/Hide').'">
<a class="'.$arrow.'" href="#"></a>
</li>';
return $html;
}
/**
* @brief Show/Hide the Roster
*/
@ -284,7 +323,7 @@ class Roster extends WidgetBase
$rostershow = 'hide';
if($offlineState == true)
$offlineshown = 'offlineshown';
$offlineshown = 'offlineshown';
?>
<div id="roster" class="<?php echo $rostershow; ?>">
<ul id="rosterlist" class="<?php echo $offlineshown; ?>">
@ -325,7 +364,7 @@ class Roster extends WidgetBase
onblur="myBlur(this);"
/>
</div>
<div class="element large mini">
<!--<div class="element large mini">
<label for="addalias"><?php echo t('Alias'); ?></label>
<input
id="addalias"
@ -335,7 +374,7 @@ class Roster extends WidgetBase
onfocus="myFocus(this);"
onblur="myBlur(this);"
/>
</div>
</div>-->
<a
class="button tiny icon no merged left black"
href="#"
@ -357,11 +396,9 @@ class Roster extends WidgetBase
title="<?php echo t('Show/Hide'); ?>">
<a class="users" href="#"></a>
</li>
<li
onclick="<?php echo $this->callAjax('ajaxToggleChat', "'offlineshown'");?> closePopup();"
title="<?php echo t('Show/Hide'); ?>">
<a class="expand" href="#"></a>
</li>
<div id="chattoggle">
<?php echo $this->prepareChatToggle(); ?>
</div>
<li
onclick="<?php echo $this->callAjax('ajaxShowHideRoster');?>"
title="<?php echo t('Show/Hide'); ?>">

21
system/Widget/widgets/Roster/roster.css

@ -8,7 +8,7 @@
list-style-type: none;
display: block;
background-color: rgba(36, 36, 36, 1);
padding-bottom: 91px;
padding-bottom: 7em;
pointer-events: auto;
}
@ -41,7 +41,8 @@
#roster ul#rosterlist li img {
float: left;
width: 30px;
width: 2em;
height: 2em;
margin-right: 7px;
}
@ -51,8 +52,8 @@
width: auto;
overflow: hidden;
color: #BBB;
font-size: 13px;
line-height: 28px;
font-size: 1em;
line-height: 1.8em;
text-overflow: ellipsis;
}
@ -66,7 +67,7 @@
padding: 0.5em;
color: #777;
line-height: 1em;
font-size: 15px;
font-size: 1em;
}
#roster ul#rosterlist h1:hover {
@ -95,6 +96,10 @@
background-position: 3px 6px;
}
#roster ul#rosterlist li.inactive {
opacity: 0.5;
}
#roster ul#rosterlist li .chat.on:hover {
cursor: pointer;
}
@ -164,10 +169,14 @@
}
#rostermenu li#search input {
height: 30px;
height: 2em;
width: 100%;
}
#rostermenu li:last-child {
float: right;
}
#rostermenu div#chattoggle {
display: inline-block;
}

98
system/Widget/widgets/ServerNodes/ServerNodes.php

@ -23,38 +23,35 @@ class ServerNodes extends WidgetCommon
function WidgetLoad()
{
$this->registerEvent('discoitems', 'onDiscoItems');
$this->registerEvent('discoerror', 'onDiscoError');
$this->registerEvent('disconodes', 'onDiscoNodes');
$this->registerEvent('creationsuccess', 'onCreationSuccess');
$this->registerEvent('creationerror', 'onCreationError');
}
function onDiscoError($error)
{
RPC::call('movim_fill', 'servernodeshead', '');
}
function onDiscoNodes($items)
{
$html = '<ul class="list">';
foreach($items[0] as $item) {
if (substr($item->attributes()->node, 0, 20) != 'urn:xmpp:microblog:0') {
$name = '';
if(isset($item->attributes()->name))
$name = $item->attributes()->name;
else
$name = $item->attributes()->node;
$html .= '
<li>
<a href="?q=node&s='.$item->attributes()->jid.'&n='.$item->attributes()->node.'">'.
$name.'
</a>
</li>';
}
}
$html .= '</ul>';
$submit = $this->genCallAjax('ajaxCreateGroup', "movim_parse_form('groupCreation')");
$html .= '<div class="popup" id="groupCreation">
$head = '
<a
class="button tiny icon add"
onclick="movim_toggle_display(\'#groupCreation\')">
'.t("Create a new group").'
</a>';
if(reset($items) != false)
$html .= $this->prepareServer($items[1]);
$html .= '
<div class="popup" id="groupCreation">
<form name="groupCreation">
<fieldset>
<legend>'.t('Give a friendly name to your group').'</legend>
@ -78,6 +75,7 @@ class ServerNodes extends WidgetCommon
</div>';
RPC::call('movim_fill', 'servernodeslist', $html);
RPC::call('movim_fill', 'servernodeshead', $head);
RPC::commit();
}
@ -98,9 +96,41 @@ class ServerNodes extends WidgetCommon
$html .= '</ul>';
RPC::call('movim_fill', 'servernodeslist', $html);
RPC::call('movim_fill', 'servernodeshead', '');
RPC::commit();
}
function prepareServer($server) {
$nd = new \modl\NodeDAO();
$nodes = $nd->getNodes($server);
$html = '<ul class="list">';
foreach($nodes as $n) {
if (substr($n->nodeid, 0, 20) != 'urn:xmpp:microblog:0') {
$name = '';
if(isset($n->title) && $n->title != '')
$name = $n->title;
else
$name = $n->nodeid;
$html .= '
<li>
<a href="?q=node&s='.$n->serverid.'&n='.$n->nodeid.'">'.
$name.'
<span class="tag">'.$n->number.'</span>
</a>
</li>';
}
}
$html .= '</ul>';
return $html;
}
function onCreationSuccess($items)
{
$html = '<a class="" href="?q=node&s='.
@ -113,12 +143,14 @@ class ServerNodes extends WidgetCommon
function onCreationError($error) {
RPC::call('movim_fill', 'servernodes', '');
Notification::appendNotification(t('Error').' : '.$error, 'error');
RPC::commit();
}
function ajaxGetNodes($server)
{
$nd = new modl\NodeDAO();
$nd->deleteNodes($server);
$r = new moxl\PubsubDiscoItems();
$r->setTo($server)->request();
}
@ -135,35 +167,31 @@ class ServerNodes extends WidgetCommon
function build()
{
if (substr($_GET['s'], 0, 7) == 'pubsub.') {
$create = '
<a
class="button tiny icon add"
onclick="movim_toggle_display(\'#groupCreation\')">
'.t("Create a new group").'
</a>';
}
if (substr($_GET['s'], 0, 7) == 'pubsub.')
$server = $this->prepareServer($_GET['s']);
?>
<div class="breadcrumb protect red ">
<a href="?q=explore"><?php echo t('Explore'); ?></a>
<a href="?q=server&s=<?php echo $_GET['s']; ?>">
<?php echo $_GET['s']; ?>
</a>
<a><?php echo t('Topics'); ?></a>
</div>
<div class="posthead ">
<div class="posthead " id="servernodeshead">
<a
href="#"
onclick="<?php echo $this->genCallAjax('ajaxGetNodes', "'".$_GET['s']."'"); ?>; this.style.display = 'none';"
class="button tiny icon follow">
onclick="<?php echo $this->genCallAjax('ajaxGetNodes', "'".$_GET['s']."'"); ?>;
this.className='button tiny icon loading'; this.onclick=null;"
class="button tiny icon refresh">
<?php echo t('Refresh'); ?>
</a>
<?php echo $create; ?>
</div>
<div id="servernodes" class="tabelem paddedtop" title="<?php echo t('Server'); ?>">
<div id="newGroupForm"></div>
<div id="servernodeslist" title="<?php echo t('Groups');?>">
<script type="text/javascript"><?php echo $this->genCallAjax('ajaxGetNodes', "'".$_GET['s']."'"); ?></script>
<div id="servernodeslist">
<?php echo $server; ?>
</div>
</div>
<?php

10
system/Widget/widgets/Syndication/Syndication.php

@ -33,9 +33,7 @@ class Syndication extends WidgetBase
$xml = '
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>'.t("%s's feed",$messages[0]->getContact()->getTrueName()).'</title>
<link href="http://example.org/"/>
<updated>'.date('c').'</updated>
<author>
<name>'.$messages[0]->getContact()->getTrueName().'</name>
@ -46,15 +44,15 @@ class Syndication extends WidgetBase
foreach($messages as $message) {
$title = $message->title;
if($title == null)
$title = substr(strip_tags(html_entity_decode($message->content)), 0, 40).'...';
$title = trim(substr(strip_tags(html_entity_decode($message->content)), 0, 40)).'...';
$xml .= '
<entry>
<title>'.prepareString(html_entity_decode($title)).'</title>
<id>urn:uuid:'.$message->nodeid.'</id>
<updated>'.date('c', strtotime($message->published)).'</updated>
<summary type="html">
<content type="html">
<![CDATA['.prepareString(html_entity_decode($message->content)).']]>
</summary>
</content>
</entry>
';
}
@ -64,6 +62,8 @@ class Syndication extends WidgetBase
} else {
echo t('No public feed for this contact');
}
//var_dump($messages);
} else {
echo t('No contact specified');
}

2
system/Widget/widgets/Tabs/tabs.css

@ -10,7 +10,7 @@
#navtabs li {
display: inline;
cursor: pointer;
line-height: 3em;
line-height: 2.5em;
padding: 1em 20px;
}

8
system/Widget/widgets/Vcard/Vcard.php

@ -233,7 +233,7 @@ class Vcard extends WidgetBase
$html .= '<div class="element"><label for="url">'.t('Website').'</label>
<input type="url" name ="url" class="content" value="'.$me->url.'">
</div>';
$html .= '<div class="element"><label for="avatar">'.t('Avatar').'</label>
<input type="file" onchange="vCardImageLoad(this.files);">
<img id="vCardPhotoPreview" src="data:'.$me->phototype.';base64,'.$me->photobin.'">
@ -241,6 +241,12 @@ class Vcard extends WidgetBase
<input type="hidden" name="phototype" value="'.$me->phototype.'"/>
<input type="hidden" name="photobin" value="'.$me->photobin.'"/><br />
</div>';
$html .= '<div class="element large" id="camdiv">
<video id="runningcam" class="squares" autoplay></video>
<canvas style="display:none;"></canvas><button id="shoot" class="hide" onclick="return false;">'.t("Cheese !").'</button>
<button id="capture" onclick="showVideo(); return false;">'.t("Take a snapshot from your webcam").'</button>
</div>';
$html .= '<div class="element large"><label for="desc">'.t('About Me').'</label>
<textarea name="desc" id="desctext" class="content" onkeyup="movim_textarea_autoheight(this);">'.trim($me->desc).'</textarea>

4
system/Widget/widgets/Vcard/vcard.css

@ -1,3 +1,7 @@
#vcard img {
margin: 0 auto;
}
.squares, #snap{
height:150px;
}

39
system/Widget/widgets/Vcard/vcard.js

@ -2,7 +2,6 @@ function getPos(n)
{
//n.style.display = "none";
if(navigator.geolocation){
console.log(navigator.geolocation.getCurrentPosition);
navigator.geolocation.getCurrentPosition(function(position){
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
@ -70,3 +69,41 @@ function vCardImageLoad(files) {
};
};
};
function showVideo(){
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
navigator.getUserMedia({video:true}, successCallback, errorCallback);
}
function successCallback(stream) {
video = document.getElementById("runningcam");
video.src = window.URL.createObjectURL(stream);
localMediaStream = stream; // stream available to console
video.addEventListener('loadeddata', addCanvasImg, false);
document.getElementById("shoot").addEventListener('click', snapshot, false);
}
function errorCallback(error){
console.log("navigator.getUserMedia error: ", error);
}
function addCanvasImg(){
canvas = document.querySelector("canvas");
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
ctx = canvas.getContext('2d');
}
function snapshot() {
if (localMediaStream) {
video = document.getElementById("runningcam");
ctx.drawImage(video,0,0);
// "image/webp" works in Chrome 18. In other browsers, this will fall back to image/png.
var img = new Image();
img.src = canvas.toDataURL('image/webp');
img.onload = function() {
vCardImageResize(this);
}
//document.querySelector("#snap").src = canvas.toDataURL('image/webp');
}
}

2
system/Widget/widgets/Wall/Wall.php

@ -78,7 +78,7 @@ class Wall extends WidgetCommon
>
'.t('Feed').' (Atom)
</a><a
class="button tiny icon follow merged right"
class="button tiny icon refresh merged right"
href="#"
onclick="'.$this->genCallAjax('ajaxWall', "'".$from."'").'
this.innerHTML = \''.t('Updating').'\';

7
system/XMPPtoForm.php

@ -23,8 +23,7 @@ class XMPPtoForm{
public function create(){
$this->xmpp = str_replace('xmlns=', 'ns=', $this->xmpp);
$x = new SimpleXMLElement($this->xmpp);
\movim_log($x);
foreach($x->children() as $element){
switch($element->getName()){
@ -81,7 +80,9 @@ class XMPPtoForm{
case 'username':
case 'email':
case 'password':
$this->outGeneric($element->getName());
$this->html .='<div class="element">';
$this->outGeneric($element->getName());
$this->html .='</div>';
break;
default:
$this->html .= "";

BIN
system/js/images/bold.png

Before

Width: 16  |  Height: 16  |  Size: 304 B

BIN
system/js/images/center.png

Before

Width: 16  |  Height: 16  |  Size: 234 B

BIN
system/js/images/h1.png

Before

Width: 16  |  Height: 16  |  Size: 276 B

BIN
system/js/images/h2.png

Before

Width: 16  |  Height: 16  |  Size: 304 B

BIN
system/js/images/h3.png

Before

Width: 16  |  Height: 16  |  Size: 306 B

BIN
system/js/images/h4.png

Before

Width: 16  |  Height: 16  |  Size: 293 B

BIN
system/js/images/help.gif

Before

Width: 20  |  Height: 20  |  Size: 288 B

BIN
system/js/images/indent.png

Before

Width: 16  |  Height: 16  |  Size: 353 B

BIN
system/js/images/italic.png

Before

Width: 16  |  Height: 16  |  Size: 223 B

BIN
system/js/images/left.png

Before

Width: 16  |  Height: 16  |  Size: 209 B

BIN
system/js/images/link.png

Before

Width: 16  |  Height: 16  |  Size: 343 B

BIN
system/js/images/marker-icon.png

After

Width: 25  |  Height: 41  |  Size: 1.7 KiB

BIN
system/js/images/ol.png

Before

Width: 16  |  Height: 16  |  Size: 357 B

BIN
system/js/images/outdent.png

Before

Width: 16  |  Height: 16  |  Size: 351 B

BIN
system/js/images/paragraph.png

Before

Width: 16  |  Height: 16  |  Size: 236 B

BIN
system/js/images/picture.png

Before

Width: 16  |  Height: 16  |  Size: 606 B

BIN
system/js/images/right.png

Before

Width: 16  |  Height: 16  |  Size: 209 B

BIN
system/js/images/ul.png

Before

Width: 16  |  Height: 16  |  Size: 344 B

BIN
system/js/images/underline.png

Before

Width: 16  |  Height: 16  |  Size: 273 B

455
system/js/leaflet.css

@ -0,0 +1,455 @@
/* required styles */
.leaflet-map-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-overlay-pane svg,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
-ms-touch-action: none;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container img {
max-width: none !important;
}
/* stupid Android 2 doesn't understand "max-width: none" properly */
.leaflet-container img.leaflet-image-layer {
max-width: 15000px !important;
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
}
.leaflet-tile-pane { z-index: 2; }
.leaflet-objects-pane { z-index: 3; }
.leaflet-overlay-pane { z-index: 4; }
.leaflet-shadow-pane { z-index: 5; }
.leaflet-marker-pane { z-index: 6; }
.leaflet-popup-pane { z-index: 7; }
/* control positioning */
.leaflet-control {
position: relative;
z-index: 7;
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile,
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-tile-loaded,
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile,
.leaflet-touching .leaflet-zoom-animated {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-clickable {
cursor: pointer;
}
.leaflet-container {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging,
.leaflet-dragging .leaflet-clickable,
.leaflet-dragging .leaflet-container {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline: 0;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #05f;
background: white;
opacity: 0.5;
}
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 0 8px rgba(0,0,0,0.4);
border: 1px solid #888;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.leaflet-bar-part {
background-color: rgba(255, 255, 255, 0.8);
border-bottom: 1px solid #aaa;
}
.leaflet-bar-part-top {
-webkit-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.leaflet-bar-part-bottom {
-webkit-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
border-bottom: none;
}
.leaflet-touch .leaflet-bar {
-webkit-border-radius: 10px;
border-radius: 10px;
}
.leaflet-touch .leaflet-bar-part {
border-bottom: 4px solid rgba(0,0,0,0.3);
}
.leaflet-touch .leaflet-bar-part-top {
-webkit-border-radius: 7px 7px 0 0;
border-radius: 7px 7px 0 0;
}
.leaflet-touch .leaflet-bar-part-bottom {
-webkit-border-radius: 0 0 7px 7px;
border-radius: 0 0 7px 7px;
border-bottom: none;
}
/* zoom control */
.leaflet-container .leaflet-control-zoom {
margin-left: 13px;
margin-top: 12px;
}
.leaflet-control-zoom a {
width: 22px;
height: 22px;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-control-zoom a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-control-zoom a:hover {
background-color: #fff;
color: #777;
}
.leaflet-control-zoom-in {
font: bold 18px/24px Arial, Helvetica, sans-serif;
}
.leaflet-control-zoom-out {
font: bold 23px/20px Tahoma, Verdana, sans-serif;
}
.leaflet-control-zoom a.leaflet-control-zoom-disabled {
cursor: default;
background-color: rgba(255, 255, 255, 0.8);
color: #bbb;
}
.leaflet-touch .leaflet-control-zoom a {
width: 30px;
height: 30px;
}
.leaflet-touch .leaflet-control-zoom-in {
font-size: 24px;
line-height: 29px;
}
.leaflet-touch .leaflet-control-zoom-out {
font-size: 28px;
line-height: 24px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 7px rgba(0,0,0,0.4);
background: #f8f8f9;
-webkit-border-radius: 8px;
border-radius: 8px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background-color: rgba(255, 255, 255, 0.7);
box-shadow: 0 0 5px #bbb;
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
color: black;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
text-shadow: 1px 1px 1px #fff;
background-color: rgba(255, 255, 255, 0.5);
box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
white-space: nowrap;
overflow: hidden;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-control-zoom {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-control-zoom {
border: 4px solid rgba(0,0,0,0.3);
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
}
.leaflet-popup-content {
margin: 14px 20px;
line-height: 1.4;
}
.leaflet-popup-content p {
margin: 18px 0;
}
.leaflet-popup-tip-container {
margin: 0 auto;
width: 40px;
height: 20px;
position: relative;
overflow: hidden;
}
.leaflet-popup-tip {
width: 15px;
height: 15px;
padding: 1px;
margin: -8px auto 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
background: white;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
padding: 4px 5px 0 0;
text-align: center;
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
}
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
.leaflet-editing-icon {
-webkit-border-radius: 2px;
border-radius: 2px;
}

8
system/js/leaflet.js
File diff suppressed because it is too large
View File

39
system/js/movim.js

@ -1,5 +1,7 @@
var movimPollHandlers = new Array();
var onloaders = new Array();
var lastkeypress = new Date().getTime();
var lastkeyup = new Date().getTime();
/**
* Adds a function to the onload event.
@ -95,6 +97,13 @@ function movim_toggle_class(element, classname) {
movim_add_class(element, classname);
}
function movim_ajax_script() {
var s = document.querySelectorAll('.ajaxscript');
console.log(s);
for (var i=0; i<s.length; i++)
eval(s.item(i).firstChild.innerHTML);
}
/**
* Set a global var for widgets to see if document is focused
*/
@ -134,13 +143,13 @@ function getFeedMessage() {
return encodeURIComponent(message);
}
function frameHeight(n) {
if(n.className == 'button tiny icon add merged left') {
n.className = 'button tiny icon rm merged left';
document.querySelector('iframe#feedmessagecontent-frame').style.height = '400px';
function frameHeight(n, text) {
if(n.className == 'button tiny icon alone add merged left') {
n.className = 'button tiny icon alone rm merged left';
text.style.minHeight = '20em';
} else {
n.className = 'button tiny icon add merged left';
document.querySelector('iframe#feedmessagecontent-frame').style.height = '50px';
n.className = 'button tiny icon alone add merged left';
text.style.minHeight = '1.5em';
}
}
@ -154,3 +163,21 @@ function richText(n) {
}
}
/**
* Geolocalisation function
*/
function setPosition(node) {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function (position) {
var poss = position.coords.latitude +','+position.coords.longitude;
node.value = poss;
showPosition(poss);
},
// next function is the error callback
function (error) { }
);
}
}

94
system/js/movimrpc.js

@ -108,27 +108,21 @@ function MovimRPC()
movim_xmlhttp.open('POST', 'jajax.php', true);
var handler = this.handle_rpc;
var handler = this.handle_rpc_json;
movim_xmlhttp.onreadystatechange = function()
{
//if(movim_xmlhttp.readyState == 4 && movim_xmlhttp.status == 200) {
handler(movim_xmlhttp.responseXML);
//}
if(movim_xmlhttp.readyState == 4 && movim_xmlhttp.status == 500) {
var url = window.location.href;
var urlparts = url.split('/');
var txt = urlparts[0]+'//';
for(i = 2; i < urlparts.length-1; i++) {
txt = txt+urlparts[i]+'/'
}
window.location.replace(txt+'index.php?q=disconnect&err=internal');
}
if(movim_xmlhttp.readyState == 4 && movim_xmlhttp.status == 200)
handler(movim_xmlhttp.response);
if(movim_xmlhttp.readyState == 4 && movim_xmlhttp.status == 500)
movim_disconnect('&err=internal');
};
movim_xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
var data = this.generate_xml();
movim_xmlhttp.send(data);
movim_xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
var json = this.generate_json();
movim_xmlhttp.send(json);
};
/**
@ -168,77 +162,29 @@ function MovimRPC()
/**
* Handles returns (xmlrpc)
*/
this.handle_rpc = function(xml)
this.handle_rpc_json = function(json)
{
if(xml != null) {
var funcalls = xml.getElementsByTagName("funcall");
var funcalls = eval(json);
if(funcalls != null) {
for(h = 0; h < funcalls.length; h++) {
var func = funcalls[h];
var funcname = func.attributes.getNamedItem("name").value;
var f = window[funcname];
var params = func.childNodes;
var aparams = new Array();
for(p = 0; p < params.length; p++) {
if(params[p].nodeName != "param")
continue;
aparams.push(params[p].textContent);
}
var funcall = funcalls[h];
try {
f(aparams);
window[funcall.func](funcall.params);
}
catch(err) {
log("Error caught: " + err.toString());
}
}
}
};
}
/**
* Generates the XML document corresponding to the provided parameters.
* Generates the JSON document corresponding to the provided parameters.
*/
this.generate_xml = function()
this.generate_json = function()
{
var params = "";
for(var i = 0; i < this.params.length; i++) {
params += '<param>';
// Argh! this is an array!
if(this.params[i].constructor == Array) {
var array = this.params[i]
params += "<array>\n";
for(var j = 0; j < array.length; j++) {
params += "<arrayelt><![CDATA[" + array[j] + "]]></arrayelt>\n";
}
params += "</array>\n";
}
else if(this.params[i].constructor == Hash) {
var iter = this.params[i].iterate();
iter.start();
params += "<array>\n";
while(iter.next()) {
params += '<arrayelt name="' + iter.key() + '">'
+ '<![CDATA[' + iter.val() + ']]>'
+ "</arrayelt>\n";
}
params += "</array>\n";
}
else {
params += '<![CDATA[' + this.params[i] + ']]>';
}
params +="</param>\n";
}
var request =
'<?xml version="1.0" encoding="UTF-8" ?>'
+ '<funcall widget="'+ this.widget + '" name="' + this.func + '">' + "\n"
+ params + "\n"
+ '</funcall>' + "\n";
return request;
return JSON.stringify(this);
};
/* Properties */

207
system/js/steditor.js

@ -1,207 +0,0 @@
// +----------------------------------------------------------------+
// | SimpleTextEditor 1.0 |
// | Author: Cezary Tomczak [www.gosu.pl] |
// | Free for any use as long as all copyright messages are intact. |
// +----------------------------------------------------------------+
function SimpleTextEditor(id, objectId) {
if (!id || !objectId) { alert("SimpleTextEditor.constructor(id, objectId) failed, two arguments are required"); }
var self = this;
this.id = id;
this.objectId = objectId;
this.frame;
this.viewSource = false;
this.path = "system/js/"; // with slash at the end
this.cssFile = "";
this.charset = "iso-8859-1";
this.editorHtml = "";
this.frameHtml = "";
this.textareaValue = "";
this.browser = {
"ie": Boolean(document.body.currentStyle),
"gecko" : (navigator.userAgent.toLowerCase().indexOf("gecko") != -1)
};
this.init = function() {
if (document.getElementById && document.createElement && document.designMode && (this.browser.ie || this.browser.gecko)) {
// EDITOR
if (!document.getElementById(this.id)) { alert("SimpleTextEditor "+this.objectId+".init() failed, element '"+this.id+"' does not exist"); return; }
this.textareaValue = document.getElementById(this.id).value;
var ste = document.createElement("div");
document.getElementById(this.id).parentNode.replaceChild(ste, document.getElementById(this.id));
ste.id = this.id+"-ste";
ste.innerHTML = this.editorHtml ? this.editorHtml : this.getEditorHtml();
// BUTTONS
var buttons = ste.getElementsByTagName("td");
for (var i = 0; i < buttons.length; ++i) {
if (buttons[i].className == "button") {
buttons[i].id = this.id+'-button-'+i;
//buttons[i].onmouseover = function() { this.className = "button"; }
buttons[i].onmouseout = function() { this.className = this.className.replace(/button-hover(\s)?/, "button"); }
buttons[i].onclick = function(id) { return function() { this.className = "button-hover button-click"; setTimeout(function(){ document.getElementById(id).className = document.getElementById(id).className.replace(/(\s)?button-click/, ""); }, 100); } }(buttons[i].id);
}
}
// FRAME
if (this.browser.ie) {
this.frame = frames[this.id+"-frame"];
} else if (this.browser.gecko) {
this.frame = document.getElementById(this.id+"-frame").contentWindow;
}
this.frame.document.designMode = "on";
this.frame.document.open();
this.frame.document.write(this.frameHtml ? this.frameHtml : this.getFrameHtml());
this.frame.document.close();
insertHtmlFromTextarea();
}
};
function lockUrls(s) {
if (self.browser.gecko) { return s; }
return s.replace(/href=["']([^"']*)["']/g, 'href="simpletexteditor://simpletexteditor/$1"');
}
function unlockUrls(s) {
if (self.browser.gecko) { return s; }
return s.replace(/href=["']simpletexteditor:\/\/simpletexteditor\/([^"']*)["']/g, 'href="$1"');
}
function insertHtmlFromTextarea() {
try { self.frame.document.body.innerHTML = lockUrls(self.textareaValue); } catch (e) { setTimeout(insertHtmlFromTextarea, 10); }
}
this.getEditorHtml = function() {
var html = "";
html += '<input type="hidden" id="'+this.id+'" name="'+this.id+'" value="" autofocus="autofocus">';
html += '<table class="ste" cellspacing="0" cellpadding="0">';
html += '<div class="menueditor">';
html += '<a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'formatblock\', \'<h1>\');"><img src="'+this.path+'images/h1.png" alt="H1" title="H1" ></a>';
html += '<a class="button tiny merged" onclick="'+this.objectId+'.execCommand(\'formatblock\', \'<h2>\');"><img src="'+this.path+'images/h2.png" alt="H2" title="H2" ></a>';
html += '<a class="button tiny merged" onclick="'+this.objectId+'.execCommand(\'formatblock\', \'<h3>\');"><img src="'+this.path+'images/h3.png" alt="H3" title="H3" ></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'formatblock\', \'<h4>\');"><img src="'+this.path+'images/h4.png" alt="H4" title="H4" ></a>';
html += '<a class="button tiny" style="margin-right: 5px;" onclick="'+this.objectId+'.execCommand(\'formatblock\', \'<p>\');"><img src="'+this.path+'images/paragraph.png" alt="Paragraph" title="Paragraph" ></a>';
html += '<a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'bold\')"><img src="'+this.path+'images/bold.png" alt="Bold" title="Bold"></a>';
html += '<a class="button tiny merged" onclick="'+this.objectId+'.execCommand(\'italic\')"><img src="'+this.path+'images/italic.png" alt="Italic" title="Italic"></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'underline\')"><img src="'+this.path+'images/underline.png" alt="Underline" title="Underline"></a>';
html += '<a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'justifyleft\')"><img src="'+this.path+'images/left.png" alt="Align Left" title="Align Left"></a>';
html += '<a class="button tiny merged" onclick="'+this.objectId+'.execCommand(\'justifycenter\')"><img src="'+this.path+'images/center.png" alt="Center" title="Center"></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'justifyright\')"><img src="'+this.path+'images/right.png" alt="Align Right" title="Align Right"></a>';
html += '<a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'insertorderedlist\')"><img src="'+this.path+'images/ol.png" alt="Ordered List" title="Ordered List"></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'insertunorderedlist\')"><img src="'+this.path+'images/ul.png" alt="Unordered List" title="Unordered List"></a>';
html += '<br /><a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'outdent\')"><img src="'+this.path+'images/outdent.png" alt="Outdent" title="Outdent"></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'indent\')"><img src="'+this.path+'images/indent.png" alt="Indent" title="Indent"></a>';
html += '<a class="button tiny merged left" onclick="'+this.objectId+'.execCommand(\'createlink\')"><img src="'+this.path+'images/link.png" alt="Insert Link" title="Insert Link"></a>';
html += '<a class="button tiny merged right" onclick="'+this.objectId+'.execCommand(\'insertimage\')"><img src="'+this.path+'images/picture.png" alt="Insert Image" title="Insert Image"></a>';
html += '</div>';
html += '<tr><td class="frame"><iframe style="height: 50px;" id="'+this.id+'-frame" frameborder="0"></iframe></td></tr>';
html += '</table>';
return html;
};
this.getFrameHtml = function() {
var html = "";
html += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
html += '<html><head>';
html += '<meta http-equiv="Content-Type" content="text/html; charset='+this.charset+'">';
html += '<title>SimpleTextEditor frame</title>';
html += '<style type="text/css">html,body { cursor: text; } body { margin: 0px; padding: 0; font-size: 12px; }</style>';
html += '</head><body></body></html>';
return html;
};
this.openWindow = function(url, width, height) {
var x = (screen.width/2-width/2);
var y = (screen.height/2-height/2);
window.open(url, "", "scrollbars=yes,width="+width+",height="+height+",screenX="+(x)+",screenY="+y+",left="+x+",top="+y);
};
this.toggleSource = function() {
var html, text;
if (this.browser.ie) {
if (!this.viewSource) {
html = this.frame.document.body.innerHTML;
this.frame.document.body.innerText = unlockUrls(html);
document.getElementById(this.id+"-buttons").style.visibility = "hidden";
this.viewSource = true;
} else {
text = this.frame.document.body.innerText;
this.frame.document.body.innerHTML = lockUrls(text);
document.getElementById(this.id+"-buttons").style.visibility = "visible";
this.viewSource = false;
}
} else if (this.browser.gecko) {
if (!this.viewSource) {
html = document.createTextNode(this.frame.document.body.innerHTML);
this.frame.document.body.innerHTML = "";
this.frame.document.body.appendChild(html);
document.getElementById(this.id+"-buttons").style.visibility = "hidden";
this.viewSource = true;
} else {
html = this.frame.document.body.ownerDocument.createRange();
html.selectNodeContents(this.frame.document.body);
this.frame.document.body.innerHTML = html.toString();
document.getElementById(this.id+"-buttons").style.visibility = "visible";
this.viewSource = false;
}
}
document.getElementById(this.id+"-viewSource").checked = this.viewSource ? "checked" : "";
document.getElementById(this.id+"-viewSource").blur();
};
this.execCommand = function(cmd, value) {
if (cmd == "createlink" && !value) {
var url = prompt("Enter URL:", "");
if (url) {
this.frame.focus();
this.frame.document.execCommand("unlink", false, null);
if (this.browser.ie) this.frame.document.execCommand(cmd, false, "simpletexteditor://simpletexteditor/"+url);
else if (this.browser.gecko) this.frame.document.execCommand(cmd, false, url);
this.frame.focus();
}
} else if (cmd == "insertimage" && !value) {
var imageUrl = prompt("Enter Image URL:", "");
if (imageUrl) {
this.frame.focus();
this.frame.document.execCommand(cmd, false, imageUrl);
this.frame.focus();
}
} else {
this.frame.focus();
this.frame.document.execCommand(cmd, false, value);
this.frame.focus();
}
};
this.isOn = function() {
return Boolean(this.frame);
};
this.getContent = function() {
try { return unlockUrls(this.frame.document.body.innerHTML); } catch(e) { alert("SimpleTextEditor "+this.objectId+".getContent() failed"); }
};
this.submit = function() {
if (this.isOn()) {
if (this.viewSource) { this.toggleSource(); }
document.getElementById(this.id).value = this.getContent();
}
};
this.clearContent = function() {
this.frame.document.body.innerHTML = '';
};
}

13
themes/movim/about.tpl

@ -0,0 +1,13 @@
<?php /* -*- mode: html -*- */
?>
<div id="head">
</div>
<div id="main" style="margin-top: 0px;">
<div id="left">
</div>
<div id="center">
<?php $this->widget('About');?>
</div>
</div>

141
themes/movim/css/forms.css

@ -4,6 +4,10 @@ form * {
float: none;
}
form p {
clear: both;
}
fieldset {
border: none;
margin-bottom: 2em !important;
@ -12,17 +16,17 @@ fieldset {
legend {
float: left;
position: relative;
top: -12px;
top: -0.5em;
clear: both;
display: block;
width: 51%;
border-bottom: 1px solid rgb(220, 220, 220) !important;
line-height: 1.5em !important;
line-height: 2em !important;
}
.element {
overflow: auto;
min-height: 80px;
min-height: 6em;
width: 50%;
padding-right: 2%;
float: left;
@ -30,6 +34,8 @@ legend {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
overflow-y: hidden;
}
.element.large {
@ -46,23 +52,24 @@ legend {
}
.element.mini > input {
min-height: 1.7em;
min-height: 2em;
margin-bottom: 0.5em;
}
.element > label {
display: block;
margin: 8px 0px;
margin: 1em 0px;
}
.element > *:not(label):not(img):not(span):not(a) {
display: inline-block;
width: 100%;
border: 1px solid #999;
min-height: 30px;
border-radius: 2px;
min-height: 2em;
border-radius: 1px;
background-color: white;
box-shadow: inset 0 2px 1px #ddd;
margin: 5px 0px;
margin: 0px;
padding: 0% 0.5em;
box-sizing: border-box;
-webkit-box-sizing: border-box;
@ -88,7 +95,7 @@ form .element.simple > *:not(label):not(img):focus {
.element > textarea, textarea {
font-family: helvetica, sans-serif, Helvetica, "lucida grande",tahoma,verdana,arial,sans-serif;
font-size: 13px;
/*font-size: 13px;*/
padding: 0px;
resize: vertical;
background-color: white;
@ -119,9 +126,9 @@ form .element.simple > *:not(label):not(img):focus {
width: 120%;
background-color: transparent;
display: block;
padding-top: 5px;
padding-left: 5px;
height: 30px;
padding-top: 0.3em;
padding-left: 0.3em;
height: 2em;
}
.element .select:before {
@ -137,8 +144,8 @@ form .element.simple > *:not(label):not(img):focus {
}
.element .select select option {
height: 20px;
padding: 5px;
height: 1em;
padding: 0.4em;
}
/* Radio button */
@ -151,7 +158,6 @@ form .element.simple > *:not(label):not(img):focus {
float: left;
width: 46%;
margin-right: 3%;
margin-top: 2%;
}
.element input[type="radio"] + label:hover {
@ -165,9 +171,11 @@ form .element.simple > *:not(label):not(img):focus {
.element input[type="radio"] + label .preview {
border: 2px solid gray;
width: 100;
height: 60px;
height: 5em;
border-radius: 2px;
padding: 3px;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.element input[type="radio"]:checked + label .preview {
@ -268,7 +276,6 @@ input[type=submit], input[type=reset], input[type=button], .button, .button:link
box-shadow: 0 1px 0px #ddd;
border-top: 1px solid #ccc;
border-bottom: 1px solid #888;
padding: 0px 10px;
position: relative;
overflow: hidden;
background-image: -moz-linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.04) 1px);
@ -276,6 +283,12 @@ input[type=submit], input[type=reset], input[type=button], .button, .button:link
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.04) 1px);
background-color: white;
background-size: 100% 100%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
padding-right: 1em;
height: 2em;
line-height: 1.9em;
}
input:hover[type=submit], input[type=reset]:hover, input[type=button]:hover, .button:hover {
@ -291,13 +304,14 @@ form .element input:invalid {
}
.button.icon {
padding-left: 35px;
background-repeat: no-repeat;
line-height: 28px;
padding-left: 2.5em;
position: relative;
overflow: hidden;
max-width: 100%;
}
/* Button loading */
.button.icon.loading {
background-image: url(../img/loader.png);
background-repeat: no-repeat;
@ -318,30 +332,55 @@ form .element input:invalid {
}
.button.icon:before {
content: "";
font: 14px sans-serif;
content: "";
font: 1em sans-serif;
font-weight: bold;
color: #444;
left: 0px;
padding: 5px 10px;
position: absolute;
background-position: 6px 6px;
background-position: center center;
background-repeat: no-repeat;
padding: 0px 0.7em;
line-height: 2em;
min-height: 2em;
min-width: 10px;
min-height: 10px;
}
/* Button tiny */
.button.tiny {
white-space: nowrap;
line-height: 2em;
padding-left: 1em;
height: 2em;
font-size: 0.9em;
overflow: hidden;
text-overflow: ellipsis;
}
.button.tiny.icon {
padding-left: 2.5em;
}
.button.tiny.icon.alone {
padding-left: 1em;
}
.button.tiny.icon:before {
line-height: 1.9em;
}
/* Button merged */
.button.merged {
border-radius: 0px;
border-left: none;
}
.button.merged.left {
.button.merged.left:not(.loading) {
border-radius: 2px 0px 0px 2px;
border-left: 1px solid #999;
}
.button.merged.right {
.button.merged.right:not(.loading) {
border-radius: 0px 2px 2px 0px;
}
@ -352,37 +391,25 @@ form .element input:invalid {
border-color: #444;
}
.icon.yes:before { content: "✔"; padding: 6px 10px;}
.icon.no:before { content: "✘"; padding: 6px 10px; }
.icon.bubble { background-image: url(../img/icons/comments_icon.png); }
.icon.bubbleadd { background-image: url(../img/icons/comments_add.png); }
.icon.bubbleold { background-image: url(../img/icons/comments_show.png); }
.icon.yes:before { background-image: url(../img/icons/button/checkmark.png); }
.icon.no:before { background-image: url(../img/icons/button/close.png); }
.icon.bubble { background-image: url(../img/icons/comments_icon.png); }
.icon.bubbleadd { background-image: url(../img/icons/comments_add.png); }
.icon.bubbleold { background-image: url(../img/icons/comments_show.png); }
.icon.follow:before { content:"⇒" }
.icon.chat:before { background-image: url(../img/icons/chat_icon.png); content:"";}
.icon.add:before { content: "+"; }
.icon.rm:before { content:"—"; }
.icon.chat:before { background-image: url(../img/icons/button/comment.png);}
.icon.add:before { content: "+"; }
.icon.rm:before { content: "–"; }
.icon.write:before { background-image: url(../img/icons/button/pencil.png); }
.icon.help:before { background-image: url(../img/icons/button/support.png); }
.icon.submit:before { content: "▼"; }
.icon.upload:before { content: "▲"; }
.icon.next:before { content: "→"; }
.icon.feed:before { content: "≡"; }
.icon.back:before { content: "←"; }
.icon.next:before { content: "→"; }
.icon.next:before { content: "→"; }
.icon.refresh:before{ background-image: url(../img/icons/button/loop.png); }
.icon.blog:before { background-image: url(../img/icons/button/quill.png); }
.icon.feed:before { background-image: url(../img/icons/button/feed.png); }
.icon.back:before { background-image: url(../img/icons/button/arrow-left.png); }
.icon.next:before { background-image: url(../img/icons/button/arrow-right.png); }
.icon.geo:before { background-image: url(../img/icons/button/location.png); }
.icon.users:before { background-image: url(../img/icons/users.png); }
.tiny.icon.loading:before { padding: 4px 7px; }
.button.tiny {
max-width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tiny.icon {
font-size: 11px;
line-height: 22px;
padding-left: 23px;
}
.tiny.icon:before {
padding: 5px 6px;
font-size: 11px;
}

4
themes/movim/css/mobile.css

@ -76,7 +76,7 @@ h1 {
#nav .menu li a.main {
opacity: 1;
width: 0px;
width: 40px;
}
#nav .menu li:last-child {
@ -140,7 +140,7 @@ h1 {
display: none;
}
.menu li a, .menu li a:hover,
.menu li a:not(.button), .menu li a:hover,
.menu li a.active, .menu li a.active:hover,
.menu li label, .menu li label:hover {
width: 0px;

57
themes/movim/css/posts.css

@ -3,7 +3,7 @@
.posthead {
display: block;
width: 100%;
min-height: 40px;
min-height: 3em;
padding-left: 1.5em;
padding-top: 1em;
}
@ -17,22 +17,22 @@
.post {
width: auto;
padding: 0em 1.5em 1.5em;
min-height: 50px;
min-height: 4em;
clear: both;
}
.post .header {
display: block;
height: auto;
overflow: auto;
}
.post:first-child {
padding-top: 1.5em;
overflow-y: hidden;
padding-right: 1.5em;
}
.post .content {
padding: 1em;
padding-top: 0em;
line-height: 1.3em;
word-wrap: break-word;
}
.post .postbubble {
@ -75,12 +75,16 @@
border-top: 1px solid #DDD;
padding: 0.7em 0em 1em;
line-height: 1em;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.post span {
font-weight: bold;
line-height: 1.5em;
overflow: hidden;
padding-left: 1em;
line-height: 1.5em;
display: inline-block;
}
@ -118,9 +122,9 @@
display: inline-block;
padding-left: 20px;
font-weight: normal;
margin-top: 5px;
margin-top: 0.5em;
float: right;
margin-left: 10px;
margin-left: 1em;
padding-right: 0.5em;
max-width: 300px;
@ -173,16 +177,16 @@
}
.post .comments .comment .avatar {
margin-top: 5px;
margin-left: 3px;
margin-top: 0.5em;
margin-left: 0.5em;
}
.post .getcomments {
background-repeat: no-repeat;
background-position: 5px 5px;
background-position: 0.5em center;
padding: 2px;
display: block;
padding-left: 25px;
padding-left: 2em;
}
.post .avatar {
@ -246,29 +250,6 @@
margin-left: 2em;
}
.post .attachment {
display: block;
margin-left: 65px;
clear: both;
margin-top: 10px;
}
.post .attachment img {
max-width: 140px;
padding: 5px;
margin-bottom: 5px;
margin-right: 7px;
border: 1px solid #CCC;
background-color: white;
}
.post .attachment img:hover {
transform: scale(1.2);
-moz-transform: scale(1.2);
-webkit-transform: scale(1.2);
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}
.post .older {
text-align: center;
font-weight: bold;
@ -295,7 +276,7 @@
}
.post table#commentsubmit td {
padding: 5px;
padding: 0.5em;
width: 100%;
}

208
themes/movim/css/style2.css

@ -17,22 +17,35 @@ time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
#baseline {
width: 100%;
height: 10000%;
position: absolute;
top: 0px;
left: 0px;
background-image:
linear-gradient(red 1px, transparent 1px);
background-position: -1px -1px;
background-size: 14px 14px;
z-index: 999;
pointer-events: none;
}
/* Zeu CSS */
body {
font-family: helvetica,sans-serif, Helvetica, "lucida grande",tahoma,verdana,arial,sans-serif;
font-size: 0.8em;
font-size: 14px;
line-height: 1em;
color: #4E4E4E;
background-color: #082D50;
margin: 0 auto;
width: 1000px;
position: relative;
background-attachment:fixed;
}
@ -58,12 +71,6 @@ body {
}
.carbon {
/*
background:
radial-gradient(black 15%, transparent 16%) 0 0,
radial-gradient(black 15%, transparent 16%) 8px 8px,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;*/
background-size:16px 16px;
}
@ -146,20 +153,17 @@ hr {
h1 {
color: #183C67;
padding: 15px 20px;
line-height: 2.5em;
font-size: 1.5em;
}
h2:first-child {
padding-top: 0px;
margin: 0px;
padding: 0em 1em;
vertical-align: bottom;
}
h2 {
color: #777;
margin: 0.5em 0px;
margin-top: 1em;
padding: 0.3em 0px;
font-size: 1.15em;
color: #777;
line-height: 2em;
margin: 1em 0em;
border-bottom: 1px solid #CCC;
}
@ -169,12 +173,20 @@ h2.post-title {
h3 {
color: #777;
font-size: 1.1em;
padding: 0.3em 0px;
line-height: 2em;
}
p {
text-align: justify;
line-height: 1.3em;
}
pre {
padding: 1em 0em;
}
code {
font-family: monospace;
}
/* For the simple xHTML lists */
@ -197,6 +209,10 @@ ul.clean li {
padding-top: 0px;
}
.paddedtopbottom {
padding: 0em 1.5em;
}
/* The main parts of the page */
#top {
z-index: 3;
@ -207,7 +223,7 @@ ul.clean li {
width: 800px;
margin-right: 200px;
position: relative;
margin-top: 55px;
margin-top: 4em;
}
#head {
@ -216,15 +232,15 @@ ul.clean li {
}
#head .block {
min-height: 160px;
/*min-height: 160px;*/
float: left;
max-width: 260px;
overflow: hidden;
color: white;
text-shadow: 0px 0px 2px #333;
font-size: 1em;
margin-right: 20px;
padding-top: 10px;
/*font-size: 1em;*/
margin-right: 1em;
/*padding-top: 10px;*/
}
#head .block:first-child {
@ -233,15 +249,14 @@ ul.clean li {
#head .block h1 {
font-family: "Trebuchet MS", Helvetica, sans-serif;
font-size: 2em;
font-size: 1.7em;
line-height: 2em;
color: white;
font-weight: bold;
margin: 0px;
padding: 10px 0px;
padding: 0px;
background-repeat: no-repeat;
background-position: right center;
display: inline;
line-height: 1.2em;
padding-right: 20px;
}
@ -265,22 +280,21 @@ ul.clean li {
background-color: white;
width: 150px;
height: 150px;
margin-left: 22px;
margin-right: 9px;
margin-left: 1.8em;
margin-right: 1em;
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5), 0px 0px 4px rgba(0, 0, 0, 0.4);
}
#head .block .textbubble {
position: relative;
padding: 10px;
padding: 1em;
text-align: center;
margin-top: 5px;
}
#head .block .textbubble:before {
content: '\201C';
position: absolute;
top: -10px;
top: 0.30em;
left: 0px;
font-size: 4em;
color: rgba(255, 255, 255, 0.3);
@ -290,7 +304,7 @@ ul.clean li {
#head .block .textbubble:after {
content: '\201D';
position: absolute;
bottom: -25px;
bottom: -10px;
right: 0px;
font-size: 4em;
color: rgba(255, 255, 255, 0.3);
@ -315,8 +329,8 @@ ul.clean li {
overflow: hidden;
height: 100%;
background-color: #EEE;
margin-top: -50px;
/*border-bottom: 1px solid #555;*/
margin-top: -3em;
}
#left
@ -325,9 +339,9 @@ ul.clean li {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
float: left;
padding: 20px;
padding: 1em;
width: 25%;
margin-top: 20px;
margin-top: 2em;
}
#left ul {
@ -339,7 +353,7 @@ ul.clean li {
float: right;
width: 75%;
background-color: white;
min-height: 600px;
min-height: 1000px;
}
#right
@ -351,7 +365,7 @@ ul.clean li {
right: 0px;
/*border-left: 1px solid rgba(0, 0, 0, 0.8);*/
pointer-events:none;
padding-top: 38px;
padding-top: 3em;
height: 100%;
overflow: auto;
z-index: 2;
@ -374,7 +388,6 @@ ul.clean li {
#nav {
margin: 0px;
padding: 0px;
font-size: 13px;
padding-top: 0px;
text-decoration: none;
width: 100%;
@ -391,25 +404,30 @@ ul.clean li {
margin: 0px auto;
list-style-type: none;
overflow: hidden;
}
.menu li {
float: left;
}
.menu li input[type=checkbox] {
display: none;
}
.menu li a, .menu li label {
line-height: 38px;
padding-left: 30px;
padding-right: 10px;
.menu li a:not(.button), .menu li label {
line-height: 3em;
padding-left: 2.5em;
display: block;
color: #ccc;
min-height: 34px;
background-repeat: no-repeat;
background-position: 7px 11px;
background-position: 0.7em center;
height: 3em;
}
.menu li a, .menu li label:last-child {
padding-right: 5px;
}
.menu li a.disconnect{
@ -444,7 +462,7 @@ ul.clean li {
color: transparent;
background-image: url(../img/logo.png);
background-repeat: no-repeat;
background-position: center 7px;
background-position: center center;
}
.menu li .explore { background-image: url(../img/icons/menu/globe.png); }
@ -458,15 +476,17 @@ ul.clean li {
.menu li .search { background-image: url(../img/icons/menu/search.png); }
.menu li .users, .menu li .account { background-image: url(../img/icons/menu/users.png); }
.menu li .expand { background-image: url(../img/icons/menu/expand.png); }
.menu li .contract { background-image: url(../img/icons/menu/contract.png); }
.menu li .media { background-image: url(../img/icons/menu/folder.png); }
.menu li .blog { background-image: url(../img/icons/menu/quill.png); }
.menu li .admin { background-image: url(../img/icons/menu/admin.png); }
.menu li .about { background-image: url(../img/icons/menu/info.png); }
ul li .tabbed {
background-color: rgba(36, 36, 36, 1);
display: none;
position: absolute;
bottom: 35px;
bottom: 3em;
left: 0px;
width: 100%;
border-top: 1px solid rgba(100, 100, 100, 0.4);
@ -514,10 +534,10 @@ ul li input[type=checkbox]:checked ~ .tabbed {
border-bottom: 1px solid rgba(255, 255, 255, 0.4);
color: #fff;
padding: 10px;
padding: 0.5em;
text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1);
font-size: 1.1em;
margin: 5px 0px;
/*font-size: 1.1em;*/
margin: 0.5em 0px;
clear: both;
}
@ -550,13 +570,14 @@ ul li input[type=checkbox]:checked ~ .tabbed {
float: right;
margin: 0px;
padding: 0px;
font-size: 1.2em;
/*font-size: 1.2em;*/
margin-right: 1.5em;
}
.filters li {
display: inline-block;
padding: 0em 1.5em;
line-height: 2em;
}
.filters li:hover {
@ -576,6 +597,7 @@ table thead {
table thead tr td {
text-align: center;
line-height: 2em;
}
table#list tbody tr:nth-child(2n+1) {
@ -613,6 +635,20 @@ ul.list li a.action:hover {
cursor: pointer;
}
ul.list li span.tag {
background-color: #555;
/*font-size: 0.9em;*/
color: white;
display: inline-block;
min-width: 3em;
border-radius: 2px;
text-align: center;
line-height: 1.8em;
font-size: 0.8em;
float: right;
margin-top: -0.3em;
}
/* Thumb */
ul.thumb {
list-style-type: none;
@ -638,18 +674,40 @@ ul.thumb a {
height: 100px;
}
/* Definition list */
dl > * {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
padding: 0 1em;
display: inline-block;
line-height: 2em;
vertical-align: middle;
}
dl dt {
text-align: right;
font-weight: bold;
width: 25%;
}
dl dd {
text-align: left;
width: 75%;
}
/* Breadcrumb */
.breadcrumb {
padding: 0px 5px;
height: 28px;
height: 2em;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.breadcrumb > a {
display: inline-block;
line-height: 28px;
padding-left: 30px;
padding-right: 15px;
line-height: 2em;
padding-left: 2em;
padding-right: 1em;
position: relative;
overflow: hidden;
}
@ -676,24 +734,42 @@ ul.thumb a {
/* Popup */
.popup {
background-color: rgba(0, 0, 0, 0.9);
position: fixed;
top: 10%;
left: 25%;
z-index: 10;
width: 50%;
max-height: 80%;
overflow-y: auto;
display: none;
background-color: rgba(0, 0, 0, 0.9);
padding: 2em;
border-radius: 3px;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
.popup:after {
position: fixed;
display: block;
z-index: 4;
top: 0px;
left: 0px;
z-index: 5;
width: 50%;
height: 80%;
padding: 10% 25%;
content: "";
width: 100%;
height: 100%;
pointer-events: none;
}
.popup span {
.popup span, .popup p, .popup pre, .popup h2, .popup h3, .popup a {
color: white;
}
.popup legend {
color: white;
font-size: 1.3em !important;
/*font-size: 1.3em !important;*/
border: 0px !important;
text-shadow: 0px -1px 0px black;
}

35
themes/movim/css/submitform.css

@ -38,12 +38,6 @@ table#feedsubmitform {
#feedcontent {
clear: both;
/*padding-top: 1.5em;
background-color: rgb(245,245,245);
}
#feedcontent .post:first-child {
padding-top: 0px;*/
}
#feednotifs {
@ -53,7 +47,17 @@ table#feedsubmitform {
#feedsubmitform .ste {
width: 100%;
margin: 0px;
padding: 0px;
padding: 0.2em;
}
#feedsubmitform span#postpublishlocation {
line-height: 1.8em;
height: 1.5em;
display: block;
white-space: nowrap;
width: 55%;
overflow: hidden;
text-overflow: ellipsis;
}
#feedsubmitform .button.merged.right {
@ -63,21 +67,8 @@ table#feedsubmitform {
#feedsubmitform .button img {
margin: 0px;
padding: 0px;
margin-top: 2px;
width: auto;
margin-top: 0.3em;
margin-left: 1em;
height: auto;
}
#feedsubmitform td.frame {
padding: 0px;
}
#feedsubmitform .menueditor {
margin-bottom: 5px;
padding-bottom: 5px;
display: none;
}
iframe {
width: 100%;
}

3
themes/movim/help.tpl

@ -16,8 +16,9 @@
<?php $this->widget('ProfileData');?>
</div>
<div id="center">
<h1><?php echo t('Help'); ?></h1>
<?php $this->widget('Tabs');?>
<?php $this->widget('Help');?>
<?php $this->widget('About');?>
</div>
</div>

BIN
themes/movim/img/icons/button/arrow-left.png

After

Width: 12  |  Height: 12  |  Size: 127 B

BIN
themes/movim/img/icons/button/arrow-right.png

After

Width: 12  |  Height: 12  |  Size: 127 B

BIN
themes/movim/img/icons/button/chat.png

After

Width: 12  |  Height: 12  |  Size: 231 B

BIN
themes/movim/img/icons/button/checkmark.png

After

Width: 12  |  Height: 12  |  Size: 157 B

BIN
themes/movim/img/icons/button/close.png

After

Width: 12  |  Height: 12  |  Size: 161 B

BIN
themes/movim/img/icons/button/comment.png

After

Width: 12  |  Height: 12  |  Size: 179 B

BIN
themes/movim/img/icons/button/envelope.png

After

Width: 12  |  Height: 12  |  Size: 219 B

BIN
themes/movim/img/icons/button/feed.png

After

Width: 12  |  Height: 12  |  Size: 326 B

BIN
themes/movim/img/icons/button/image.png

After

Width: 12  |  Height: 12  |  Size: 221 B

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save