Browse Source

FIX: notification link issues

Giancarlo Voci 7 years ago
parent
commit
5e0672edcd
4 changed files with 6 additions and 6 deletions
  1. 1 1
      cfg/config.ini
  2. 3 2
      package.json
  3. 1 1
      ui/header.tpl
  4. 1 2
      ui/js/omlink.js

+ 1 - 1
cfg/config.ini

@@ -10,7 +10,7 @@ JAR.expire={{time()+31536000}}
 DSN="mysql:host=localhost;port=3306;dbname=omlink"
 DSN="mysql:host=localhost;port=3306;dbname=omlink"
 dbuser=root
 dbuser=root
 dbpass=openmind
 dbpass=openmind
-MAX_BLINK_TIME_SEC=600
+MAX_BLINK_TIME_SEC=300
 MAX_RETRY_FOR_FAULT=10
 MAX_RETRY_FOR_FAULT=10
 DEV=true
 DEV=true
 
 

+ 3 - 2
package.json

@@ -1,6 +1,7 @@
 {
 {
   "name": "OM-Link",
   "name": "OM-Link",
   "version": "1.6.0",
   "version": "1.6.0",
+  "private": true,
   "description": "Default OM-Link version",
   "description": "Default OM-Link version",
   "scripts": {
   "scripts": {
     "clean": "rm -rf tmp bundle.css bundle.js ui/css/omlink.css ui/css/omlink.css.map ui/js/omlink.min.js",
     "clean": "rm -rf tmp bundle.css bundle.js ui/css/omlink.css ui/css/omlink.css.map ui/js/omlink.min.js",
@@ -9,10 +10,10 @@
   },
   },
   "author": "Open Mind",
   "author": "Open Mind",
   "dependencies": {
   "dependencies": {
-    "bootstrap": "^4.1.3",
+    "bootstrap": "^4.2.1",
     "jquery": "^3.3.1",
     "jquery": "^3.3.1",
     "node-minify": "^3.6.0",
     "node-minify": "^3.6.0",
-    "node-sass": "^4.10.0",
+    "node-sass": "^4.11.0",
     "popper.js": "^1.14.6"
     "popper.js": "^1.14.6"
   }
   }
 }
 }

+ 1 - 1
ui/header.tpl

@@ -17,7 +17,7 @@
 	</div>
 	</div>
 
 
 	<div class="ml-auto dropdown dropleft navbar-brand">
 	<div class="ml-auto dropdown dropleft navbar-brand">
-		<a id="notification_area_button" class="disabled" href="javascript:void(0)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="mr-3" style="position: relative">
+		<a id="notification_area_button" class="disabled" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="mr-3" style="position: relative">
 			<img src="{{@BASEURL}}/ui/images/bell.png"/>
 			<img src="{{@BASEURL}}/ui/images/bell.png"/>
 			<span id="sysmsgnum" class="blink badge badge-light"></span>
 			<span id="sysmsgnum" class="blink badge badge-light"></span>
 		</a>
 		</a>

+ 1 - 2
ui/js/omlink.js

@@ -56,7 +56,6 @@ ${tplNotify}
     $('#sysmsgnum').html(notificationCount);
     $('#sysmsgnum').html(notificationCount);
   }
   }
 
 
-
   $('#notification_area').html(htmlNotificationArea);
   $('#notification_area').html(htmlNotificationArea);
 }
 }
 
 
@@ -79,7 +78,7 @@ function refreshNotificationArea() {
 function NotificationDelete(link, code) {
 function NotificationDelete(link, code) {
   fetch(`${BASEURL}/api.system.removenotification/${code}`, {method: "POST"})
   fetch(`${BASEURL}/api.system.removenotification/${code}`, {method: "POST"})
     .then(() => {
     .then(() => {
-      if (link != null)
+      if ((link.length != 0) && (link != '#'))
         window.location.href = `${BASEURL}${link}`;
         window.location.href = `${BASEURL}${link}`;
     })
     })
     .catch(() => {
     .catch(() => {