incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [1/2] git commit: fix cleanId utility
Date Thu, 29 May 2014 11:43:29 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/console-v2 acedc62e4 -> 2652a4518


fix cleanId utility

Signed-off-by: Chris Rohr <rohr.chris@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/c5c33e34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/c5c33e34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/c5c33e34

Branch: refs/heads/console-v2
Commit: c5c33e34596c2e49470e6e55d642394d2f344949
Parents: acedc62
Author: Andrew Avenoso <andrew.va@gmail.com>
Authored: Wed May 28 17:30:12 2014 -0400
Committer: Chris Rohr <rohr.chris@gmail.com>
Committed: Thu May 29 07:42:08 2014 -0400

----------------------------------------------------------------------
 .../blur-console/src/main/webapp/js/blurconsole.b_utils.js   | 2 +-
 contrib/blur-console/src/main/webapp/js/blurconsole.fake.js  | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c5c33e34/contrib/blur-console/src/main/webapp/js/blurconsole.b_utils.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/webapp/js/blurconsole.b_utils.js b/contrib/blur-console/src/main/webapp/js/blurconsole.b_utils.js
index fc8d6ea..1903782 100644
--- a/contrib/blur-console/src/main/webapp/js/blurconsole.b_utils.js
+++ b/contrib/blur-console/src/main/webapp/js/blurconsole.b_utils.js
@@ -103,7 +103,7 @@ blurconsole.browserUtils = (function(){
 	};
 
 	cleanId = function(str) {
-		return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
+		return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '_');
 	};
 
 	booleanImg = function(val) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c5c33e34/contrib/blur-console/src/main/webapp/js/blurconsole.fake.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/webapp/js/blurconsole.fake.js b/contrib/blur-console/src/main/webapp/js/blurconsole.fake.js
index ef5d064..36f31b1 100644
--- a/contrib/blur-console/src/main/webapp/js/blurconsole.fake.js
+++ b/contrib/blur-console/src/main/webapp/js/blurconsole.fake.js
@@ -130,7 +130,11 @@ blurconsole.fake = (function() {
 		for(f=0; f < familyCount; f++) {
 			var c, fam = {}, columnCount = randomNumber(30);
 			for(c=0; c < columnCount; c++) {
-				fam['col'+c] = {
+				var col_name = 'col' + c;
+				if(randomNumber(10) === 1) {
+					col_name += ".sub";
+				}
+				fam[col_name] = {
 					'fieldLess' : randomBoolean(),
 					'type' : types[randomNumber(6, true)],
 					'extra' : null
@@ -141,7 +145,7 @@ blurconsole.fake = (function() {
 					for (e=0; e < extraPropCount; e++) {
 						props['extra'+e] = 'val'+e;
 					}
-					fam['col'+c].extra = props;
+					fam[col_name].extra = props;
 				}
 			}
 			schema['fam'+f] = fam;


Mime
View raw message