Author: Lars Michelsen <[email protected]>
Date: Fri Sep 21 11:32:58 2012 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Fri Sep 21 11:32:58 2012 +0200
Bugfix: Don't try to flash deleted map objects during eventhandling
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/frontend.js | 22 ++++++++++++----------
share/userfiles/templates/default.header.html | 2 +-
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 39047a6..43d3fef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Frontend
* Localized some non localized strings like "more items..." in the hover menu
* Bugfix: Fixed javascript error in state change eventhandler on e.g.
automaps
* Bugfix: Cloning of textbox objects is now possible again
+ * Bugfix: Don't try to flash deleted map objects during eventhandling
1.7
Core
diff --git a/share/frontend/nagvis-js/js/frontend.js
b/share/frontend/nagvis-js/js/frontend.js
index 449eb66..3e931ee 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -219,18 +219,18 @@ function searchObjects(sMatch) {
// - name1
// - name2
- if(obj.conf.type.search(regex) !== -1)
+ if(obj.conf.type.search(regex) !== -1)
bMatch = true;
- if(obj.conf.name.search(regex) !== -1)
+ if(obj.conf.name.search(regex) !== -1)
bMatch = true;
// only search the service_description on service objects
- if(obj.conf.type === 'service'
- && obj.conf.service_description.search(regex) !== -1)
+ if(obj.conf.type === 'service'
+ && obj.conf.service_description.search(regex) !== -1)
bMatch = true;
- regex = null;
+ regex = null;
// Found some match?
if(bMatch === true)
@@ -1226,13 +1226,15 @@ function playSound(objectId, iNumTimes){
* @author Lars Michelsen <[email protected]>
*/
function flashIcon(objectId, iDuration, iInterval){
- oMapObjects[objectId].highlight(!oMapObjects[objectId].bIsFlashing);
+ if(isset(oMapObjects[objectId])) {
+ oMapObjects[objectId].highlight(!oMapObjects[objectId].bIsFlashing);
- var iDurationNew = iDuration - iInterval;
+ var iDurationNew = iDuration - iInterval;
- // Flash again until timer counted down and the border is hidden
- if(iDurationNew > 0 || (iDurationNew <= 0 &&
oMapObjects[objectId].bIsFlashing === true))
- setTimeout(function() { flashIcon(objectId, iDurationNew, iInterval);
}, iInterval);
+ // Flash again until timer counted down and the border is hidden
+ if(iDurationNew > 0 || (iDurationNew <= 0 &&
oMapObjects[objectId].bIsFlashing === true))
+ setTimeout(function() { flashIcon(objectId, iDurationNew,
iInterval); }, iInterval);
+ }
}
//--- Overview
-----------------------------------------------------------------
diff --git a/share/userfiles/templates/default.header.html
b/share/userfiles/templates/default.header.html
index 058f31b..371fc47 100644
--- a/share/userfiles/templates/default.header.html
+++ b/share/userfiles/templates/default.header.html
@@ -33,7 +33,7 @@
<span id="action-ddheader">{$langActions} <img
src="{$pathTemplateImages}default.header_down.png" alt="∇" /></span>
<ul id="action-ddcontent">
{if $mod == 'Map' && $permittedSearch}
- <li><a href="#"
onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Search&act=view',
'{$langSearch}')">{$langSearch}</a></li>
+ <li><a href="javascript:void(0)"
onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Search&act=view',
'{$langSearch}')">{$langSearch}</a></li>
{/if}
{if $mod == 'Map' && $permittedEdit == true}
<li><a href="#"
onclick="showFrontendDialog(oGeneralProperties.path_server+'?mod=Map&act=addModify&show={$currentMap}&object_id=0&mode=view_params'+getViewParams(null,
true), '{$langModifyParams}');" class="underline">{$langModifyParams}</a></li>
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins