mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 18:41:09 +03:00 
			
		
		
		
	updates page
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@419 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									d65956f59e
								
							
						
					
					
						commit
						4a50f1b346
					
				| @ -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; | ||||
| } | ||||
|  | ||||
							
								
								
									
										33
									
								
								src/messenger/webim/js/update.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								src/messenger/webim/js/update.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | ||||
| function loadNews() { | ||||
| 	if (typeof(window.webimNews) == "undefined" || typeof(window.webimNews.length) == "undefined") | ||||
| 		return; | ||||
| 	 | ||||
| 	var str = "<div>"; | ||||
| 	for (var i = 0; i < window.webimNews.length; i++) { | ||||
| 		str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.webimNews[i].link + "\">" + window.webimNews[i].title + "</a>, <span class=\"small\">" + window.webimNews[i].date + "</span></div>"; | ||||
| 		str += "<div class=\"newstext\">" + window.webimNews[i].message+"</div>"; | ||||
| 	} | ||||
| 	$("#news").html(str + "</div>"); | ||||
| } | ||||
| 
 | ||||
| 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 <a href=\""+window.webimLatest.download+"\">"+window.webimLatest.title+"</a>"); | ||||
| 	} else { | ||||
| 		$("#cver").css("color","green"); | ||||
| 		$("#lver").html(window.webimLatest.version); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $(function(){ | ||||
| 	loadNews(); | ||||
| 	loadVersion(); | ||||
| }); | ||||
| @ -16,6 +16,14 @@ require_once("inc_menu.php"); | ||||
| $page['title'] = getlocal("updates.title"); | ||||
| $page['menuid'] = "settings"; | ||||
| 
 | ||||
| function tpl_header() { global $page, $webimroot; | ||||
| ?>	
 | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/jquery-1.3.2.min.js"></script> | ||||
| <script type="text/javascript" language="javascript" src="http://openwebim.org/latestWebim.js"></script> | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/update.js"></script> | ||||
| <?php | ||||
| } | ||||
| 
 | ||||
| function tpl_content() { global $page, $webimroot; | ||||
| ?>
 | ||||
| 
 | ||||
| @ -33,11 +41,20 @@ function tpl_content() { global $page, $webimroot; | ||||
| 	</ul> | ||||
| <?php } ?>
 | ||||
| 	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> | ||||
| 
 | ||||
| 	 | ||||
| 		News:<br/> | ||||
| 		<div id="news"> | ||||
| 		</div> | ||||
| 		 | ||||
| 		You are using:<br/> | ||||
| 			«<span style="color:#bb5500;">Open</span> Web Messenger» <?php echo $page['version'] ?>
 | ||||
| 			<div id="cver"><?php echo $page['version'] ?></div>
 | ||||
| 			 | ||||
| 		<br/><br/> | ||||
| 		<br/> | ||||
| 
 | ||||
| 		Latest version: | ||||
| 			<div id="lver"></div> | ||||
| 		 | ||||
| 		<br/> | ||||
| 			 | ||||
| 		Installed localizations:<br/> | ||||
| 			<?php foreach( $page['localizations'] as $loc ) { ?>
 | ||||
| @ -48,9 +65,7 @@ function tpl_content() { global $page, $webimroot; | ||||
| 		 | ||||
| 		Environment:<br/> | ||||
| 			PHP <?php echo $page['phpVersion'] ?>
 | ||||
| 			 | ||||
| 		<br/> | ||||
| 	 | ||||
| 
 | ||||
| 	</div><div class="formbottom"><div class="formbottomi"></div></div></div> | ||||
| </div>		 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user