Author: Lars Michelsen <[email protected]>
Date: Mon Nov 7 17:24:52 2011 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Mon Nov 7 17:24:52 2011 +0100
Removed some deprecated localized strings
---
share/frontend/nagvis-js/js/ajax.js | 24 ++++++++++--------------
share/frontend/nagvis-js/js/edit.js | 5 ++---
share/server/core/classes/GlobalCore.php | 21 ++++-----------------
3 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/share/frontend/nagvis-js/js/ajax.js
b/share/frontend/nagvis-js/js/ajax.js
index 6cd41d7..4b426e2 100644
--- a/share/frontend/nagvis-js/js/ajax.js
+++ b/share/frontend/nagvis-js/js/ajax.js
@@ -528,21 +528,17 @@ function getFormParams(formId) {
sel = aFields[i].selectedIndex;
}
- if(typeof lang !== 'undefined' && (sel != -1 &&
aFields[i].options[aFields[i].selectedIndex].value === lang['manualInput'])) {
- sReturn += aFields[i].name + "=" +
escapeUrlValues(document.getElementById('_inp_'+aFields[i].name).value) + "&";
+ // Can't use the selectedIndex when using select fields with
multiple
+ if(!aFields[i].multiple || aFields[i].multiple !== true) {
+ // Maybe nothing is selected
+ if(sel != -1) {
+ sReturn += aFields[i].name + "=" +
escapeUrlValues(aFields[i].options[sel].value) + "&";
+ }
} else {
- // Can't use the selectedIndex when using select fields with
multiple
- if(!aFields[i].multiple || aFields[i].multiple !== true) {
- // Maybe nothing is selected
- if(sel != -1) {
- sReturn += aFields[i].name + "=" +
escapeUrlValues(aFields[i].options[sel].value) + "&";
- }
- } else {
- for(var a = 0; a < aFields[i].options.length; a++) {
- // Only add selected ones
- if(aFields[i].options[a].selected == true) {
- sReturn += aFields[i].name + "[]=" +
escapeUrlValues(aFields[i].options[a].value) + "&";
- }
+ for(var a = 0; a < aFields[i].options.length; a++) {
+ // Only add selected ones
+ if(aFields[i].options[a].selected == true) {
+ sReturn += aFields[i].name + "[]=" +
escapeUrlValues(aFields[i].options[a].value) + "&";
}
}
}
diff --git a/share/frontend/nagvis-js/js/edit.js
b/share/frontend/nagvis-js/js/edit.js
index ed69e71..17e551a 100644
--- a/share/frontend/nagvis-js/js/edit.js
+++ b/share/frontend/nagvis-js/js/edit.js
@@ -621,9 +621,8 @@ function toggleFieldType(sName, sValue) {
// Check if the field should be changed
// this is toggled on
- // a) Select field set to "Manual Input..." or
- // b) Input helper field set to ""
- if((bInputHelper == false && sValue === lang['manualInput']) ||
(bInputHelper === true && sValue == '')) {
+ // - Input helper field set to ""
+ if(bInputHelper === true && sValue == '') {
var oSelectField = document.getElementById(sBaseName);
var oInputField = document.getElementById('_inp_' + sBaseName);
diff --git a/share/server/core/classes/GlobalCore.php
b/share/server/core/classes/GlobalCore.php
index 375808c..2749292 100644
--- a/share/server/core/classes/GlobalCore.php
+++ b/share/server/core/classes/GlobalCore.php
@@ -543,28 +543,15 @@ class GlobalCore {
*
* @return String JSON encoded array
* @author Lars Michelsen <[email protected]>
- * FIXME: DEPRECATED? Check if still needed!
+ * FIXME: Remove this when the edit dialogs are rewritten to
+ * a validation within the PHP code and do not need the js
+ * validation anymore.
*/
public function getJsLang() {
$lang = Array(
- 'clickMapToSetPoints' => l('clickMapToSetPoints'),
- 'confirmDelete' => l('confirmDelete'),
- 'confirmRestore' => l('confirmRestore'),
'wrongValueFormat' => l('wrongValueFormat'),
- 'wrongValueFormatMap' => l('wrongValueFormatMap'),
'wrongValueFormatOption' => l('wrongValueFormatOption'),
- 'unableToWorkWithMap' => l('unableToWorkWithMap'),
'mustValueNotSet' => l('mustValueNotSet'),
- 'chosenLineTypeNotValid' => l('chosenLineTypeNotValid'),
- 'onlyLineOrIcon' => l('onlyLineOrIcon'),
- 'not2coordsX' => l('not2coords', 'COORD~X'),
- 'not2coordsY' => l('not2coords', 'COORD~Y'),
- 'only1or2coordsX' => l('only1or2coords', 'COORD~X'),
- 'only1or2coordsY' => l('only1or2coords', 'COORD~Y'),
- 'viewTypeWrong' => l('viewTypeWrong'),
- 'lineTypeNotSet' => l('lineTypeNotSet'),
- 'loopInMapRecursion' => l('loopInMapRecursion'),
- 'mapObjectWillShowSummaryState' =>
l('mapObjectWillShowSummaryState'),
'firstMustChoosePngImage' => l('firstMustChoosePngImage'),
'noSpaceAllowedInName' => l('Spaces are not allowed in
file names.'),
'mustChooseValidImageFormat' => l('mustChooseValidImageFormat'),
@@ -593,7 +580,7 @@ class GlobalCore {
'minOneUserWriteAccess' => l('minOneUserWriteAccess'),
'noSpaceAllowed' => l('noSpaceAllowed'),
'properties' => l('properties'),
- 'manualInput' => l('manualInput'));
+ );
return json_encode($lang);
}
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins