|
From: <net...@us...> - 2010-11-07 00:04:45
|
Revision: 90
http://openautomation.svn.sourceforge.net/openautomation/?rev=90&view=rev
Author: netzkind
Date: 2010-11-06 22:51:09 +0000 (Sat, 06 Nov 2010)
Log Message:
-----------
fixed error in logic for address syntax check
Modified Paths:
--------------
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-06 18:48:39 UTC (rev 89)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-06 22:51:09 UTC (rev 90)
@@ -361,7 +361,7 @@
switch (type) {
case "address":
- return !Boolean(val.match(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,2}$/));
+ return Boolean(val.match(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,2}$/) != null);
break;
case "numeric":
return Boolean(val.match(/^\d+([\.,]\d+)?$/g));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2010-11-10 13:46:19
|
Revision: 98
http://openautomation.svn.sourceforge.net/openautomation/?rev=98&view=rev
Author: netzkind
Date: 2010-11-10 13:46:13 +0000 (Wed, 10 Nov 2010)
Log Message:
-----------
Editor: validate GA correctly
Modified Paths:
--------------
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-10 10:38:59 UTC (rev 97)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-10 13:46:13 UTC (rev 98)
@@ -361,7 +361,7 @@
switch (type) {
case "address":
- return Boolean(val.match(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,2}$/) != null);
+ return Boolean(val.match(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,3}$/) != null);
break;
case "numeric":
return Boolean(val.match(/^\d+([\.,]\d+)?$/g));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2010-11-24 11:27:29
|
Revision: 162
http://openautomation.svn.sourceforge.net/openautomation/?rev=162&view=rev
Author: netzkind
Date: 2010-11-24 11:27:22 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
auch negative numerische Werte sind numerische Werte
Modified Paths:
--------------
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-23 20:23:32 UTC (rev 161)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-24 11:27:22 UTC (rev 162)
@@ -29,6 +29,7 @@
jQuery(document).ready(function() {
jQuery("div#addwidgetcontrol").bind("click", function() {
+ $("#addMaster").triggerHandler("cleanup");
jQuery("#addMaster").trigger("show").find("#add_type").triggerHandler("change");
});
@@ -123,6 +124,7 @@
jQuery(".editcontrol").live("click", function() {
+ $("#addMaster").triggerHandler("cleanup");
var widget = $(this).parents("div.widget");
if (widget.is(".pagelink")) {
@@ -171,6 +173,7 @@
.bind("cleanup", function() {
$(this).removeData("widgetdata");
jQuery(this).find("input[type=text]").val("");
+ $("#addMaster div.inputs").empty();
$("#pages").find(".inedit").removeClass("inedit");
})
.find("#add_cancel").click(function() {
@@ -420,7 +423,7 @@
break;
case "datatype":
case "numeric":
- return Boolean(val.match(/^\d+([\.,]\d+)?$/g));
+ return Boolean(val.match(/^-?\d+([\.,]\d+)?$/g));
break;
case "string":
case "uri":
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <net...@us...> - 2010-11-28 16:39:48
|
Revision: 170
http://openautomation.svn.sourceforge.net/openautomation/?rev=170&view=rev
Author: netzkind
Date: 2010-11-28 16:39:42 +0000 (Sun, 28 Nov 2010)
Log Message:
-----------
make editor work with jQuery 1.4.4 by going the hard way using inline xml parsing
Modified Paths:
--------------
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-28 15:18:27 UTC (rev 169)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2010-11-28 16:39:42 UTC (rev 170)
@@ -7,7 +7,7 @@
save_bad: "Config not saved. Error: '%s'",
value_required: "Field '%s' is required but empty. Please correct your input.",
value_invalid: "The value for field '%s' is invalid. Please correct your input.",
- regexp_invalid: "There something wrong with the cable."
+ regexp_invalid: "There's something wrong with the cable."
}
if (typeof texts[element] == "undefined") {
@@ -335,10 +335,33 @@
var container = $("#addMaster div.inputs");
- var dataObject = {
- nodeName: jQuery("#addMaster #add_type").val()
- };
+ // dataObject needs to be a real dom-object, so we need to go all the
+ // way through parsing an xml-string ...
+ var name = jQuery("#addMaster #add_type").val();
+ var text = container.find("#add_textContent:input").val();
+ var xml = "<" + name + ">" + text + "</" + name + ">";
+ var dataObject;
+ if (window.DOMParser) {
+ var parser = new DOMParser();
+ dataObject = parser.parseFromString(xml, "text/xml");
+ } else {
+ // Internet Explorer
+ dataObject = new ActiveXObject("Microsoft.XMLDOM");
+ dataObject.async="false";
+ dataObject.loadXML(xml);
+ }
+
+ dataObject = jQuery(dataObject.documentElement);
+ if (typeof (dataObject.nodeName) == "undefined" || dataObject.nodeName == "") {
+ dataObject.nodeName = name;
+ }
+ if (typeof (text) != "undefined"
+ && (typeof (dataObject.textContent) == "undefined" || dataObject.textContent == "")) {
+ dataObject.textContent = text;
+ }
+
+
var error = false;
// alte Werte zwischenspeichern
@@ -346,10 +369,6 @@
var name;
if ($(this).closest("div.add_input").hasClass("attribute")) {
name = $(this).data("name");
- } else if ($(this).closest("div.add_input").hasClass("content")) {
- name = "textContent";
- // preset text-content to be empty
- dataObject[name] = "";
}
if ($(this).val() != "") {
@@ -359,7 +378,7 @@
// do not save
error = true;
}
- dataObject[name] = $(this).val();
+ dataObject.attr(name, $(this).val());
} else if ($(this).data("required") === true) {
// do not save
alert(lingua("value_required", name));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|