Minify js/source/update.js file

This commit is contained in:
Dmitriy Simushev 2014-08-08 11:51:38 +00:00
parent f8b5cdafa2
commit ac55ecc545
2 changed files with 51 additions and 33 deletions

View File

@ -1,33 +1,8 @@
function loadNews() {
if (typeof(window.mibewNews) == "undefined" || typeof(window.mibewNews.length) == "undefined")
return;
var str = "<div>";
for (var i = 0; i < window.mibewNews.length; i++) {
str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.mibewNews[i].link + "\">" + window.mibewNews[i].title + "</a>, <span class=\"small\">" + window.mibewNews[i].date + "</span></div>";
str += "<div class=\"newstext\">" + window.mibewNews[i].message+"</div>";
}
$("#news").html(str + "</div>");
}
function loadVersion() {
if(typeof(window.mibewLatest) == "undefined" || typeof(window.mibewLatest.version) == "undefined")
return;
var current = $("#cver").html();
if(current != window.mibewLatest.version) {
if(current < window.mibewLatest.version) {
$("#cver").css("color","red");
}
$("#lver").html(window.mibewLatest.version+", Download <a href=\""+window.mibewLatest.download+"\">"+window.mibewLatest.title+"</a>");
} else {
$("#cver").css("color","green");
$("#lver").html(window.mibewLatest.version);
}
}
$(function(){
loadNews();
loadVersion();
});
/**
* @preserve Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
function loadNews(){if("undefined"!=typeof window.mibewNews&&"undefined"!=typeof window.mibewNews.length){for(var e="<div>",w=0;w<window.mibewNews.length;w++)e+='<div class="newstitle"><a href="'+window.mibewNews[w].link+'">'+window.mibewNews[w].title+'</a>, <span class="small">'+window.mibewNews[w].date+"</span></div>",e+='<div class="newstext">'+window.mibewNews[w].message+"</div>";$("#news").html(e+"</div>")}}function loadVersion(){if("undefined"!=typeof window.mibewLatest&&"undefined"!=typeof window.mibewLatest.version){var e=$("#cver").html();e!=window.mibewLatest.version?(e<window.mibewLatest.version&&$("#cver").css("color","red"),$("#lver").html(window.mibewLatest.version+', Download <a href="'+window.mibewLatest.download+'">'+window.mibewLatest.title+"</a>")):($("#cver").css("color","green"),$("#lver").html(window.mibewLatest.version))}}$(function(){loadNews(),loadVersion()});

View File

@ -0,0 +1,43 @@
/**
* @preserve Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
function loadNews() {
if (typeof(window.mibewNews) == "undefined" || typeof(window.mibewNews.length) == "undefined") {
return;
}
var str = "<div>";
for (var i = 0; i < window.mibewNews.length; i++) {
str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.mibewNews[i].link + "\">" + window.mibewNews[i].title + "</a>, <span class=\"small\">" + window.mibewNews[i].date + "</span></div>";
str += "<div class=\"newstext\">" + window.mibewNews[i].message+"</div>";
}
$("#news").html(str + "</div>");
}
function loadVersion() {
if(typeof(window.mibewLatest) == "undefined" || typeof(window.mibewLatest.version) == "undefined") {
return;
}
var current = $("#cver").html();
if(current != window.mibewLatest.version) {
if(current < window.mibewLatest.version) {
$("#cver").css("color","red");
}
$("#lver").html(window.mibewLatest.version+", Download <a href=\""+window.mibewLatest.download+"\">"+window.mibewLatest.title+"</a>");
} else {
$("#cver").css("color","green");
$("#lver").html(window.mibewLatest.version);
}
}
$(function(){
loadNews();
loadVersion();
});