]> _ Git - fluidbook-html5.git/commitdiff
wait #4459
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 May 2021 17:24:46 +0000 (19:24 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 May 2021 17:24:46 +0000 (19:24 +0200)
js/libs/fluidbook/fluidbook.utils.js
js/libs/fluidbook/special/wescosales.js

index 0c87ea3bf351bcf69792b12dc2f6b49d777222b3..5354347e6838cccd4ef419944d2fe16cd01be92b 100644 (file)
@@ -121,32 +121,3 @@ function getIframeDocument(iframe) {
     return doc;
 }
 
-function parseRange(string) {
-    let res = [];
-    let m;
-
-    for (let str of string.split(",").map((str) => str.trim())) {
-        // just a number
-        if (/^-?\d+$/.test(str)) {
-            res.push(parseInt(str, 10));
-        } else if (
-            (m = str.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/))
-        ) {
-            // 1-5 or 1..5 (equivalent) or 1...5 (doesn't include 5)
-            let [_, lhs, sep, rhs] = m;
-
-            if (lhs && rhs) {
-                lhs = parseInt(lhs);
-                rhs = parseInt(rhs);
-                const incr = lhs < rhs ? 1 : -1;
-
-                // Make it inclusive by moving the right 'stop-point' away by one.
-                if (sep === "-" || sep === ".." || sep === "\u2025") rhs += incr;
-
-                for (let i = lhs; i !== rhs; i += incr) res.push(i);
-            }
-        }
-    }
-
-    return res;
-}
\ No newline at end of file
index f635649b601a98e22912600491821bba555301cd..bbf8193eec5b7cccbf59413c3591831eb7dc48c0 100644 (file)
@@ -454,4 +454,34 @@ WescoSalesSearchPlugin.prototype = {
     clearHighlights: function () {
         $('[data-wescosales-ref].highlight').removeClass('highlight');
     },
-};
\ No newline at end of file
+};
+
+function parseRange(string) {
+    let res = [];
+    let m;
+
+    for (let str of string.split(",").map((str) => str.trim())) {
+        // just a number
+        if (/^-?\d+$/.test(str)) {
+            res.push(parseInt(str, 10));
+        } else if (
+            (m = str.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/))
+        ) {
+            // 1-5 or 1..5 (equivalent) or 1...5 (doesn't include 5)
+            let [_, lhs, sep, rhs] = m;
+
+            if (lhs && rhs) {
+                lhs = parseInt(lhs);
+                rhs = parseInt(rhs);
+                const incr = lhs < rhs ? 1 : -1;
+
+                // Make it inclusive by moving the right 'stop-point' away by one.
+                if (sep === "-" || sep === ".." || sep === "\u2025") rhs += incr;
+
+                for (let i = lhs; i !== rhs; i += incr) res.push(i);
+            }
+        }
+    }
+
+    return res;
+}
\ No newline at end of file