inline the regexp the sprintf implementation uses
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Nov 2007 20:59:27 +0000 (20:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Nov 2007 20:59:27 +0000 (20:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8008 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/bindings.xml

index c9ec267..641514d 100644 (file)
                                                        }
 
                                                        var a = arguments, i = 0, format = a[i++];
-                                                       return format.replace(this.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
+                                                       return format.replace(/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEGS])/g, function(substring, valueIndex, flags, minWidth, _, precision, type) {
                                                                if (substring == '%%') return '%';
 
                                                                // parse flags
                                                                }
                                                                });
                                                }
-                                               this.sprintf.regex = /%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;
                                        } catch(e) {
                                                alert("*** Failed to load sprintf library: " + e + "\n");
                                                throw(e);