comparison src/settings.sml @ 1597:e283ca05c829

Add read instance for time on the client
author Ron de Bruijn <rmbruijn@gmail.com>
date Thu, 17 Nov 2011 17:14:44 +0100
parents 154cfe2eb366
children 252e05bf199d
comparison
equal deleted inserted replaced
1595:154cfe2eb366 1597:e283ca05c829
14 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
50 in 50 in
51 if Substring.isEmpty after then 51 if Substring.isEmpty after then
52 ("", prefix) 52 ("", prefix)
53 else 53 else
54 (String.substring (prefix, 0, n) ^ Substring.string befor, Substring.string after) 54 (String.substring (prefix, 0, n) ^ Substring.string befor, Substring.string after)
55 end 55 end
56 56
57 val (prepre, prefix) = 57 val (prepre, prefix) =
58 if String.isPrefix "http://" prefix then 58 if String.isPrefix "http://" prefix then
59 findPrefix 7 59 findPrefix 7
60 else if String.isPrefix "https://" prefix then 60 else if String.isPrefix "https://" prefix then
202 fun isServerOnly x = S.member (!server, x) 202 fun isServerOnly x = S.member (!server, x)
203 203
204 val basisM = foldl (fn ((k, v : string), m) => M.insert (m, ("Basis", k), v)) M.empty 204 val basisM = foldl (fn ((k, v : string), m) => M.insert (m, ("Basis", k), v)) M.empty
205 205
206 val jsFuncsBase = basisM [("alert", "alert"), 206 val jsFuncsBase = basisM [("alert", "alert"),
207 ("stringToTime","stringToTime"),
207 ("confirm", "confrm"), 208 ("confirm", "confrm"),
208 ("get_client_source", "sg"), 209 ("get_client_source", "sg"),
209 ("current", "scur"), 210 ("current", "scur"),
210 ("htmlifyBool", "bs"), 211 ("htmlifyBool", "bs"),
211 ("htmlifyFloat", "ts"), 212 ("htmlifyFloat", "ts"),