Module: nagvis
Branch: master
Commit: 8fa837cafdc46bb30262c2e064c67056ef78a41f
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=8fa837cafdc46bb30262c2e064c67056ef78a41f

Author: Lars Michelsen <[email protected]>
Date:   Sat Aug 14 13:41:55 2010 +0200

Fixed shape upload label (Removed png); Added warning about spaces in shape 
names

---

 .../nagvis-js/locale/en_US/LC_MESSAGES/nagvis.po   |    2 +-
 share/frontend/wui/classes/WuiCore.php             |    1 +
 share/frontend/wui/js/ManageShapes.js              |    9 ++++++---
 share/server/core/classes/WuiViewManageShapes.php  |    2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/share/frontend/nagvis-js/locale/en_US/LC_MESSAGES/nagvis.po 
b/share/frontend/nagvis-js/locale/en_US/LC_MESSAGES/nagvis.po
index c9fff9e..6b0e487 100644
--- a/share/frontend/nagvis-js/locale/en_US/LC_MESSAGES/nagvis.po
+++ b/share/frontend/nagvis-js/locale/en_US/LC_MESSAGES/nagvis.po
@@ -1662,7 +1662,7 @@ msgstr "You have to insert a name for the new map."
 #: share/server/core/classes/WuiViewManageShapes.php:59
 #: share/server/core/classes/WuiViewManageShapes.php:59
 msgid "choosePngImage"
-msgstr "Select a PNG image"
+msgstr "Select a PNG/GIF/JPG image"
 
 #: wui/includes/classes/WuiMap.php:695
 #: share/frontend/wui/includes/classes/WuiMap.php:700
diff --git a/share/frontend/wui/classes/WuiCore.php 
b/share/frontend/wui/classes/WuiCore.php
index a07f150..737a4dd 100644
--- a/share/frontend/wui/classes/WuiCore.php
+++ b/share/frontend/wui/classes/WuiCore.php
@@ -144,6 +144,7 @@ class WuiCore extends GlobalCore {
                        'loopInMapRecursion' => 
$this->getLang()->getText('loopInMapRecursion'),
                        'mapObjectWillShowSummaryState' => 
$this->getLang()->getText('mapObjectWillShowSummaryState'),
                        'firstMustChoosePngImage' => 
$this->getLang()->getText('firstMustChoosePngImage'),
+                       'noSpaceAllowedInName' => 
$this->getLang()->getText('Spaces are not allowed in file names.'),
                        'mustChooseValidImageFormat' => 
$this->getLang()->getText('mustChooseValidImageFormat'),
                        'foundNoBackgroundToDelete' => 
$this->getLang()->getText('foundNoBackgroundToDelete'),
                        'confirmBackgroundDeletion' => 
$this->getLang()->getText('confirmBackgroundDeletion'),
diff --git a/share/frontend/wui/js/ManageShapes.js 
b/share/frontend/wui/js/ManageShapes.js
index 6838898..882e772 100644
--- a/share/frontend/wui/js/ManageShapes.js
+++ b/share/frontend/wui/js/ManageShapes.js
@@ -65,15 +65,18 @@ function checkShapeInUse(shapeName,mapOptions) {
 }
 
 function check_image_add() {
-    if(document.shape_add.shape_image.value.length == 0) {
+  if(document.shape_add.shape_image.value.length == 0) {
                alert(printLang(lang['firstMustChoosePngImage'],''));
-               
                return false;
        }
        
        if(!checkPng(document.shape_add.shape_image.value) && 
!checkJpg(document.shape_add.shape_image.value) && 
!checkGif(document.shape_add.shape_image.value)) {
                alert(printLang(lang['mustChooseValidImageFormat'],''));
-               
+               return false;
+       }
+
+  if(document.shape_add.shape_image.value.indexOf(" ") != -1) {
+               alert(printLang(lang['noSpaceAllowedInName'],''));
                return false;
        }
 }
diff --git a/share/server/core/classes/WuiViewManageShapes.php 
b/share/server/core/classes/WuiViewManageShapes.php
index c86894c..cb03383 100644
--- a/share/server/core/classes/WuiViewManageShapes.php
+++ b/share/server/core/classes/WuiViewManageShapes.php
@@ -56,7 +56,7 @@ class WuiViewManageShapes {
                $aData = Array(
                        'htmlBase' => 
$this->CORE->getMainCfg()->getValue('paths', 'htmlbase'),
                        'langUploadShape' => 
$this->CORE->getLang()->getText('uploadShape'),
-                       'langChoosePngImage' => 
$this->CORE->getLang()->getText('choosePngImage'),
+                       'langChoosePngImage' => 
$this->CORE->getLang()->getText('chooseImage'),
                        'langUpload' => 
$this->CORE->getLang()->getText('upload'),
                        'langDeleteShape' => 
$this->CORE->getLang()->getText('deleteShape'),
                        'langDelete' => 
$this->CORE->getLang()->getText('delete'),


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to