diff --git a/src/messenger/webim/default.css b/src/messenger/webim/default.css index e66a6705..ffa17d6d 100644 --- a/src/messenger/webim/default.css +++ b/src/messenger/webim/default.css @@ -734,3 +734,16 @@ table.awaiting td.visitor { color: #A1A1A1; font-size: 11px; } + +/* updates */ + +#news { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 11px; + margin-bottom:15px; + padding:4px; +} + +.newstext { + margin-bottom:1em; +} diff --git a/src/messenger/webim/js/update.js b/src/messenger/webim/js/update.js new file mode 100644 index 00000000..a575db8c --- /dev/null +++ b/src/messenger/webim/js/update.js @@ -0,0 +1,33 @@ +function loadNews() { + if (typeof(window.webimNews) == "undefined" || typeof(window.webimNews.length) == "undefined") + return; + + var str = "
"; + for (var i = 0; i < window.webimNews.length; i++) { + str += "
" + window.webimNews[i].title + ", " + window.webimNews[i].date + "
"; + str += "
" + window.webimNews[i].message+"
"; + } + $("#news").html(str + "
"); +} + +function loadVersion() { + if(typeof(window.webimLatest) == "undefined" || typeof(window.webimLatest.version) == "undefined") + return; + + var current = $("#cver").html(); + + if(current != window.webimLatest.version) { + if(current < window.webimLatest.version) { + $("#cver").css("color","red"); + } + $("#lver").html(window.webimLatest.version+", Download "+window.webimLatest.title+""); + } else { + $("#cver").css("color","green"); + $("#lver").html(window.webimLatest.version); + } +} + +$(function(){ + loadNews(); + loadVersion(); +}); \ No newline at end of file diff --git a/src/messenger/webim/view/updates.php b/src/messenger/webim/view/updates.php index dcd9436b..ef39e5f7 100644 --- a/src/messenger/webim/view/updates.php +++ b/src/messenger/webim/view/updates.php @@ -16,6 +16,14 @@ require_once("inc_menu.php"); $page['title'] = getlocal("updates.title"); $page['menuid'] = "settings"; +function tpl_header() { global $page, $webimroot; +?> + + + + @@ -33,11 +41,20 @@ function tpl_content() { global $page, $webimroot;
- + + News:
+
+
+ You are using:
- «Open Web Messenger» +
-

+
+ + Latest version: +
+ +
Installed localizations:
@@ -48,9 +65,7 @@ function tpl_content() { global $page, $webimroot; Environment:
PHP - -
- +