+ * No bytes were intentionally harmed during the development of this application.
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package com.openkm.servlet;
+
+import com.ibm.icu.util.Calendar;
+import com.openkm.core.Config;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Rss Servlet
+ */
+@WebServlet("/Rss")
+public class RssServlet extends HttpServlet {
+ private static Logger log = LoggerFactory.getLogger(RssServlet.class);
+ private static final long serialVersionUID = 1L;
+ private static String date = "";
+ private static String rssData = "";
+
+ @Override
+ public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+ request.setCharacterEncoding("UTF-8");
+ InputStream rss = null;
+ InputStream is = null;
+
+ try {
+ // Only refresh RSS one time per day
+ Calendar cal = Calendar.getInstance();
+ String today = String.valueOf(cal.get(Calendar.YEAR)) + String.valueOf(cal.get(Calendar.MONTH) + 1) + String.valueOf(cal.get(Calendar.DATE));
+
+ if (date.isEmpty() || !date.equals(today)) {
+ date = today;
+ rss = new URL("https://www.openkm.com/news.rss?ver=com&limit=" + Config.RSS_NEWS_MAX_SIZE).openStream();
+ rssData = IOUtils.toString(rss);
+ log.debug("Remote RSS News\n" + rssData);
+ }
+
+ is = new ByteArrayInputStream(rssData.getBytes(StandardCharsets.UTF_8));
+ response.setContentType("text/xml; charset=UTF-8");
+ response.setHeader("Content-type", "application/xhtml+xml");
+ PrintWriter out = response.getWriter();
+ IOUtils.copy(is, out);
+ out.close();
+ } catch (Exception e) {
+ log.warn(e.getMessage(), e);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
+ } finally {
+ IOUtils.closeQuietly(rss);
+ IOUtils.closeQuietly(is);
+ }
+ }
+}
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 80cd80aa..1cf02673 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
-
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
OpenKM
diff --git a/src/main/webapp/css/login.css b/src/main/webapp/css/login.css
index c7ab7d58..9b7596f9 100644
--- a/src/main/webapp/css/login.css
+++ b/src/main/webapp/css/login.css
@@ -3171,4 +3171,65 @@ only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5) {
/* If you used a CSS img background, you can put your high resolution here */
+}
+
+/*
+=================================================================
+OpenKM RSS
+=================================================================
+*/
+.openkm-news {
+ width:200px;
+ position:fixed;
+ top:0px;
+ left:0px;
+ z-index:1;
+}
+
+.openkm-version {
+ padding: 5px 20px;
+ color: #404040;
+ font-weight: bold;
+ background:#fed400;
+}
+
+.openkm-sticker {
+ position:absolute;
+ top: 5px;
+ right: 5px;
+ z-index:2;
+}
+
+.openkm-sticker img {
+ padding: 0px 5px;
+}
+
+.vticket-border-right {
+ border-right: 1px solid #394263;
+}
+
+.vticker {
+ border-left: 1px solid #394263;
+ border-right: 1px solid #394263;
+ border-bottom: 1px solid #394263;
+ background: white;
+ position: relative;
+ top: 0px;
+ left: 0px;
+ border-bottom-right-radius: 10px;
+}
+
+.vticker ul{
+ padding: 0;
+}
+
+.vticker li{
+ list-style: none;
+ border-bottom: 1px solid green;
+ padding: 10px;
+}
+
+.vticker h4 {
+ color: #0885bd;
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/src/main/webapp/img/backward.png b/src/main/webapp/img/backward.png
new file mode 100644
index 00000000..341e213f
Binary files /dev/null and b/src/main/webapp/img/backward.png differ
diff --git a/src/main/webapp/img/eye-disabled.png b/src/main/webapp/img/eye-disabled.png
new file mode 100644
index 00000000..11589475
Binary files /dev/null and b/src/main/webapp/img/eye-disabled.png differ
diff --git a/src/main/webapp/img/eye.png b/src/main/webapp/img/eye.png
new file mode 100644
index 00000000..41594dfc
Binary files /dev/null and b/src/main/webapp/img/eye.png differ
diff --git a/src/main/webapp/img/forward.png b/src/main/webapp/img/forward.png
new file mode 100644
index 00000000..25529008
Binary files /dev/null and b/src/main/webapp/img/forward.png differ
diff --git a/src/main/webapp/img/pause.png b/src/main/webapp/img/pause.png
new file mode 100644
index 00000000..874558ee
Binary files /dev/null and b/src/main/webapp/img/pause.png differ
diff --git a/src/main/webapp/img/stop.png b/src/main/webapp/img/stop.png
new file mode 100644
index 00000000..2b0bef5c
Binary files /dev/null and b/src/main/webapp/img/stop.png differ
diff --git a/src/main/webapp/js/flexpaper/FlexPaperViewer.swf b/src/main/webapp/js/flexpaper/FlexPaperViewer.swf
index 73549ddf..bf10608a 100644
Binary files a/src/main/webapp/js/flexpaper/FlexPaperViewer.swf and b/src/main/webapp/js/flexpaper/FlexPaperViewer.swf differ
diff --git a/src/main/webapp/js/flexpaper/FlexPaperViewerRO.swf b/src/main/webapp/js/flexpaper/FlexPaperViewerRO.swf
deleted file mode 100644
index 1916597a..00000000
Binary files a/src/main/webapp/js/flexpaper/FlexPaperViewerRO.swf and /dev/null differ
diff --git a/src/main/webapp/js/jquery.easy-ticker.min.js b/src/main/webapp/js/jquery.easy-ticker.min.js
new file mode 100644
index 00000000..cffd5a4e
--- /dev/null
+++ b/src/main/webapp/js/jquery.easy-ticker.min.js
@@ -0,0 +1,2 @@
+/* jQuery - Easy Ticker - Plugin v2.0 www.aakashweb.com (c) 2014 Aakash Chakravarthy MIT License. */
+;(function($,h,i,j){var k="easyTicker",defaults={direction:'up',easing:'swing',speed:'slow',interval:2000,height:'auto',visible:0,mousePause:1,controls:{up:'',down:'',toggle:'',playText:'Play',stopText:'Stop'}};function EasyTicker(f,g){var s=this;s.opts=$.extend({},defaults,g);s.elem=$(f);s.targ=$(f).children(':first-child');s.timer=0;s.mHover=0;s.winFocus=1;init();start();$([h,i]).off('focus.jqet').on('focus.jqet',function(){s.winFocus=1}).off('blur.jqet').on('blur.jqet',function(){s.winFocus=0});if(s.opts.mousePause==1){s.elem.mouseenter(function(){s.timerTemp=s.timer;stop()}).mouseleave(function(){if(s.timerTemp!==0)start()})}$(s.opts.controls.up).on('click',function(e){e.preventDefault();moveDir('up')});$(s.opts.controls.down).on('click',function(e){e.preventDefault();moveDir('down')});$(s.opts.controls.toggle).on('click',function(e){e.preventDefault();if(s.timer==0)start();else stop()});function init(){s.elem.children().css('margin',0).children().css('margin',0);s.elem.css({position:'relative',height:s.opts.height,overflow:'hidden'});s.targ.css({'position':'absolute','margin':0});setInterval(function(){adjHeight()},100)}function start(){s.timer=setInterval(function(){if(s.winFocus==1){move(s.opts.direction)}},s.opts.interval);$(s.opts.controls.toggle).addClass('et-run').html(s.opts.controls.stopText)}function stop(){clearInterval(s.timer);s.timer=0;$(s.opts.controls.toggle).removeClass('et-run').html(s.opts.controls.playText)}function move(a){var b,eq,appType;if(!s.elem.is(':visible'))return;if(a=='up'){b=':first-child';eq='-=';appType='appendTo'}else{b=':last-child';eq='+=';appType='prependTo'}var c=s.targ.children(b);var d=c.outerHeight();s.targ.stop(true,true).animate({'top':eq+d+"px"},s.opts.speed,s.opts.easing,function(){c.hide()[appType](s.targ).fadeIn();s.targ.css('top',0);adjHeight()})}function moveDir(a){stop();if(a=='up')move('up');else move('down')}function fullHeight(){var a=0;var b=s.elem.css('display');s.elem.css('display','block');s.targ.children().each(function(){a+=$(this).outerHeight()});s.elem.css({'display':b,'height':a})}function visHeight(a){var b=0;s.targ.children(':lt('+s.opts.visible+')').each(function(){b+=$(this).outerHeight()});if(a==1){s.elem.stop(true,true).animate({height:b},s.opts.speed)}else{s.elem.css('height',b)}}function adjHeight(){if(s.opts.height=='auto'&&s.opts.visible!=0){anim=arguments.callee.caller.name=='init'?0:1;visHeight(anim)}else if(s.opts.height=='auto'){fullHeight()}}return{up:function(){moveDir('up')},down:function(){moveDir('down')},start:start,stop:stop,options:s.opts}}$.fn[k]=function(a){return this.each(function(){if(!$.data(this,k)){$.data(this,k,new EasyTicker(this,a))}})}})(jQuery,window,document);
\ No newline at end of file
diff --git a/src/main/webapp/login_desktop.jsp b/src/main/webapp/login_desktop.jsp
index 61d9c3c8..9d0eb711 100644
--- a/src/main/webapp/login_desktop.jsp
+++ b/src/main/webapp/login_desktop.jsp
@@ -15,7 +15,113 @@
-
+
+
+
+
+ <% if (Config.RSS_NEWS) { %>
+
+ <% } %>
<%
Locale locale = request.getLocale();
Cookie[] cookies = request.getCookies();
@@ -36,9 +142,19 @@
<%=Config.TEXT_TITLE%>
-