ResourcesSelected Plugin working with URNs - http://trac.myslice.info/ticket/36
[myslice.git] / portal / static / js / common.functions.js
index 3fe31c4..56b02ca 100644 (file)
@@ -1,6 +1,10 @@
 /*
  * This file is included in tophat_render.php
  */
+// Escape special characters in jQuery Selector
+function escape_id( myid ) {
+    return "#" + myid.replace( /(:|\.|\[|\])/g, "\\$1" );
+}
 
 function getKeySplitId(id,separator){
     // id of elements must respect this rule
@@ -14,11 +18,6 @@ function getKeySplitId(id,separator){
     return key;
 }
 
-function errorDisplay(error){
-    var out = '<div class="error"><dl id="system-message"><dt class="error">Notice</dt><dd class="error message"><ul><li>' + error + '</li></ul></dd></dl></div>';
-    return out;
-}
-
 function arrays_equal(a,b) { return !(a<b || b<a); }
 
 function arrayInArray(elt,tab){