From 1c6dba36f5d2833a0eb9e165494bc61b02e7acee Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 20 Jul 2021 13:47:48 -0400 Subject: [PATCH] Switch to Boostrap 5 --- assignTasks.ur | 2 +- assignTimes.ur | 2 +- auth.ur | 2 +- cached.ur | 2 +- calendar.ur | 2 +- calendarAddons.ur | 2 +- choicesFromPreferences.ur | 2 +- chooseForeign.ur | 2 +- closedBallot.ur | 2 +- csv.ur | 2 +- default.ur | 4 +- default.urp | 4 +- discussion.ur | 2 +- displayRow.ur | 2 +- editGrid.ur | 2 +- editableTable.ur | 2 +- explorer.ur | 2 +- finalGrades.ur | 2 +- formToTable.ur | 2 +- grades.ur | 2 +- input.ur | 2 +- inputStrings.ur | 2 +- ledger.ur | 2 +- lib.urp | 2 +- linearStateMachine.ur | 2 +- meetingGrid.ur | 2 +- navbar.urp | 1 - news.ur | 2 +- openBallot.ur | 2 +- paramQuery.ur | 2 +- paramQuery1.ur | 2 +- parameterizedQuery.ur | 2 +- permissionedSettings.ur | 2 +- pickerGrid.ur | 2 +- preferences.ur | 2 +- profile.ur | 2 +- review.ur | 2 +- rsvp2.ur | 2 +- scheduleSessions.ur | 2 +- setTimes.ur | 2 +- simpleQuery.ur | 2 +- simpleQuery1.ur | 2 +- simplerAssignTimes.ur | 2 +- smartInsert.ur | 2 +- smartList.ur | 2 +- smartTable.ur | 2 +- submission.ur | 2 +- tableToTable.ur | 2 +- timePreferences.ur | 2 +- todo.ur | 2 +- toggle.ur | 2 +- toggle3.ur | 2 +- ui.ur | 2 +- userlist.ur | 2 +- usersFromPreferences.ur | 2 +- widget.ur | 88 +++++++++++++++++++-------------------- withComments.ur | 2 +- 57 files changed, 101 insertions(+), 102 deletions(-) diff --git a/assignTasks.ur b/assignTasks.ur index 7867be4..071505f 100644 --- a/assignTasks.ur +++ b/assignTasks.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con assignable :: {Type} diff --git a/assignTimes.ur b/assignTimes.ur index b9e4fe2..e647f02 100644 --- a/assignTimes.ur +++ b/assignTimes.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap val eventLengthInSeconds = 60 * 90 diff --git a/auth.ur b/auth.ur index 042cb49..971e887 100644 --- a/auth.ur +++ b/auth.ur @@ -1,6 +1,6 @@ (* Generic authentication backed by a database table *) -open Bootstrap4 +open Bootstrap style alert_fixed diff --git a/cached.ur b/cached.ur index 4d3f7ab..9ea10a7 100644 --- a/cached.ur +++ b/cached.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap con r = _ val fl = _ diff --git a/calendar.ur b/calendar.ur index 6f36f56..b255bfb 100644 --- a/calendar.ur +++ b/calendar.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap datatype level = Forbidden | Read | Write diff --git a/calendarAddons.ur b/calendarAddons.ur index 9ee5c82..2e00d1b 100644 --- a/calendarAddons.ur +++ b/calendarAddons.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type event_data = { Id : option string, diff --git a/choicesFromPreferences.ur b/choicesFromPreferences.ur index 3944a53..331d346 100644 --- a/choicesFromPreferences.ur +++ b/choicesFromPreferences.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con choice :: Name diff --git a/chooseForeign.ur b/chooseForeign.ur index 186c63e..1bdeeea 100644 --- a/chooseForeign.ur +++ b/chooseForeign.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con const :: {Type} diff --git a/closedBallot.ur b/closedBallot.ur index ca8a973..b3d417d 100644 --- a/closedBallot.ur +++ b/closedBallot.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con voterKey1 :: Name diff --git a/csv.ur b/csv.ur index 5c3a887..6a24587 100644 --- a/csv.ur +++ b/csv.ur @@ -186,7 +186,7 @@ fun importTableWithHeader [fs] [fsC] [cs] [fs ~ fsC] return hso) sep 1 input None) -open Bootstrap4 +open Bootstrap functor Import1(M : sig con fs :: {Type} diff --git a/default.ur b/default.ur index 6101ecc..8076b6e 100644 --- a/default.ur +++ b/default.ur @@ -1,10 +1,10 @@ -open Bootstrap4 +open Bootstrap con r = _ val fl = _ val css = - {Bootstrap = bless "https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", + {Bootstrap = bless "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css", FontAwesome = bless "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/fontawesome.min.css", FontAwesomeSolid = bless "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/solid.min.css", FontAwesomeRegular = bless "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/regular.min.css", diff --git a/default.urp b/default.urp index 4517760..8a652ee 100644 --- a/default.urp +++ b/default.urp @@ -1,10 +1,10 @@ library . -allow url https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css +allow url https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css allow url https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css allow url https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css script https://code.jquery.com/jquery-3.4.1.slim.min.js script https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js -script https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js +script https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js script https://cdn.ckeditor.com/4.13.1/standard/ckeditor.js script https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js script https://cdn.jsdelivr.net/npm/jquery-datetimepicker@2.5.21/build/jquery.datetimepicker.full.min.js diff --git a/discussion.ur b/discussion.ur index 01e8362..6eab88d 100644 --- a/discussion.ur +++ b/discussion.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap datatype access = Forbidden diff --git a/displayRow.ur b/displayRow.ur index 5ab7a18..ae22c5d 100644 --- a/displayRow.ur +++ b/displayRow.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: {(Type * Type * Type)} diff --git a/editGrid.ur b/editGrid.ur index 64c1b66..3894a33 100644 --- a/editGrid.ur +++ b/editGrid.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: {Type} diff --git a/editableTable.ur b/editableTable.ur index 0de474b..a25ed5c 100644 --- a/editableTable.ur +++ b/editableTable.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type permission = {Add : bool, Delete : bool, diff --git a/explorer.ur b/explorer.ur index 9fe3aa5..dadb7a3 100644 --- a/explorer.ur +++ b/explorer.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type t1 (full :: {Type}) (p :: (Type * {Type} * {Type} * {{Unit}} * Type * Type * Type)) = {Title : string, diff --git a/finalGrades.ur b/finalGrades.ur index ca89ecf..24f8dbc 100644 --- a/finalGrades.ur +++ b/finalGrades.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap datatype access = Forbidden | Read | Write diff --git a/formToTable.ur b/formToTable.ur index 4e8cc38..24a23d5 100644 --- a/formToTable.ur +++ b/formToTable.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con widgets :: {(Type * Type * Type)} diff --git a/grades.ur b/grades.ur index b809155..9cf2c3c 100644 --- a/grades.ur +++ b/grades.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap datatype single_student = Atomic of string * option int diff --git a/input.ur b/input.ur index 130293a..63a5378 100644 --- a/input.ur +++ b/input.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con const :: {Type} diff --git a/inputStrings.ur b/inputStrings.ur index 5d1cba6..15430a0 100644 --- a/inputStrings.ur +++ b/inputStrings.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con const :: {Type} diff --git a/ledger.ur b/ledger.ur index 3a917fd..5cb30e1 100644 --- a/ledger.ur +++ b/ledger.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type month = int * Datetime.month diff --git a/lib.urp b/lib.urp index 13342d2..5da1be4 100644 --- a/lib.urp +++ b/lib.urp @@ -1,5 +1,5 @@ html5 -library $/bootstrap/bootstrap4 +library $/bootstrap/bootstrap5 library $/ajaxUpload library ckeditor library dateTimePicker diff --git a/linearStateMachine.ur b/linearStateMachine.ur index e322302..6bda190 100644 --- a/linearStateMachine.ur +++ b/linearStateMachine.ur @@ -1,6 +1,6 @@ (* Moving through steps in the life cycle of an application *) -open Bootstrap4 +open Bootstrap datatype activatedAs = NextStep | FastForward | Rewind diff --git a/meetingGrid.ur b/meetingGrid.ur index 37d1cad..1b79554 100644 --- a/meetingGrid.ur +++ b/meetingGrid.ur @@ -5,7 +5,7 @@ style meeting_selected style meeting_conflict style meeting_movable -open Bootstrap4 +open Bootstrap open Tooltip functor Make(M : sig diff --git a/navbar.urp b/navbar.urp index a028bfd..e69de29 100644 --- a/navbar.urp +++ b/navbar.urp @@ -1 +0,0 @@ -jsFile navbar.js diff --git a/news.ur b/news.ur index 8318b76..b081fbd 100644 --- a/news.ur +++ b/news.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap datatype access = Forbidden diff --git a/openBallot.ur b/openBallot.ur index 421b420..196373b 100644 --- a/openBallot.ur +++ b/openBallot.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con voterKey1 :: Name diff --git a/paramQuery.ur b/paramQuery.ur index 69c4738..1241b43 100644 --- a/paramQuery.ur +++ b/paramQuery.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig type input diff --git a/paramQuery1.ur b/paramQuery1.ur index 26d36de..82bc9e5 100644 --- a/paramQuery1.ur +++ b/paramQuery1.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig type input diff --git a/parameterizedQuery.ur b/parameterizedQuery.ur index d4775bc..e71766a 100644 --- a/parameterizedQuery.ur +++ b/parameterizedQuery.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap signature S = sig con params :: {(Type * Type * Type)} diff --git a/permissionedSettings.ur b/permissionedSettings.ur index cb6b54e..396eb6e 100644 --- a/permissionedSettings.ur +++ b/permissionedSettings.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type t (w :: Type) (d :: Type) = { Create : string -> transaction w, diff --git a/pickerGrid.ur b/pickerGrid.ur index e2e04d1..c8198d8 100644 --- a/pickerGrid.ur +++ b/pickerGrid.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con hidden :: {Type} diff --git a/preferences.ur b/preferences.ur index c949089..bc68a1c 100644 --- a/preferences.ur +++ b/preferences.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con choice :: Name diff --git a/profile.ur b/profile.ur index ee59d91..4c1b740 100644 --- a/profile.ur +++ b/profile.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: {Type} diff --git a/review.ur b/review.ur index 486e7f0..d15063e 100644 --- a/review.ur +++ b/review.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con when :: Name diff --git a/rsvp2.ur b/rsvp2.ur index 2c7370b..a49850b 100644 --- a/rsvp2.ur +++ b/rsvp2.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig val homeLabel : string diff --git a/scheduleSessions.ur b/scheduleSessions.ur index 2f5d69e..bf6ba9f 100644 --- a/scheduleSessions.ur +++ b/scheduleSessions.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M: sig con sessionKey1 :: Name diff --git a/setTimes.ur b/setTimes.ur index 11d5954..b567f61 100644 --- a/setTimes.ur +++ b/setTimes.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: Name diff --git a/simpleQuery.ur b/simpleQuery.ur index 372138e..e615fdb 100644 --- a/simpleQuery.ur +++ b/simpleQuery.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con fs :: {Type} diff --git a/simpleQuery1.ur b/simpleQuery1.ur index 2ce5ad9..a489e3d 100644 --- a/simpleQuery1.ur +++ b/simpleQuery1.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con fs :: {Type} diff --git a/simplerAssignTimes.ur b/simplerAssignTimes.ur index 2fa3003..4716cef 100644 --- a/simplerAssignTimes.ur +++ b/simplerAssignTimes.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: Name diff --git a/smartInsert.ur b/smartInsert.ur index 6d90742..18a8ddc 100644 --- a/smartInsert.ur +++ b/smartInsert.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con custom :: {Type} diff --git a/smartList.ur b/smartList.ur index c0ca61b..f835efa 100644 --- a/smartList.ur +++ b/smartList.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap (* One of these is all about generating content for the two main parts of a Bootstrap card. *) type t (inp :: Type) (r :: {Type}) (cfg :: Type) (st :: Type) = { diff --git a/smartTable.ur b/smartTable.ur index 374a307..ef9edd3 100644 --- a/smartTable.ur +++ b/smartTable.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap (* One of these is all about generating content table headers and rows *) type t (inp :: Type) (r :: {Type}) (cfg :: Type) (st :: Type) = { diff --git a/submission.ur b/submission.ur index d39939b..0ed65cf 100644 --- a/submission.ur +++ b/submission.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key1 :: Name diff --git a/tableToTable.ur b/tableToTable.ur index 7678dd0..ea6f9ef 100644 --- a/tableToTable.ur +++ b/tableToTable.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: {(Type * Type * Type)} diff --git a/timePreferences.ur b/timePreferences.ur index a1fb589..c0aa7e6 100644 --- a/timePreferences.ur +++ b/timePreferences.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: Name diff --git a/todo.ur b/todo.ur index ed0a8f4..b114cbf 100644 --- a/todo.ur +++ b/todo.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type tag (t :: Type) = {Label : string, diff --git a/toggle.ur b/toggle.ur index 0a4b7cc..e8a8912 100644 --- a/toggle.ur +++ b/toggle.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type xbody' = xml [Body] [] [] diff --git a/toggle3.ur b/toggle3.ur index 9947313..0f4ad3c 100644 --- a/toggle3.ur +++ b/toggle3.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type xbody' = xml [Body] [] [] diff --git a/ui.ur b/ui.ur index 98e5452..7071557 100644 --- a/ui.ur +++ b/ui.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap type context = { ModalId : id, diff --git a/userlist.ur b/userlist.ur index 3e423ff..f934b3e 100644 --- a/userlist.ur +++ b/userlist.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key :: Name diff --git a/usersFromPreferences.ur b/usersFromPreferences.ur index a0fc901..07a1db9 100644 --- a/usersFromPreferences.ur +++ b/usersFromPreferences.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con choice :: Name diff --git a/widget.ur b/widget.ur index 56d77ac..ceca872 100644 --- a/widget.ur +++ b/widget.ur @@ -36,12 +36,12 @@ val textbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = signal, AsValue = txt, Optional = False } @@ -54,12 +54,12 @@ val opt_textbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = fn s => v <- signal s; return (case v of @@ -78,12 +78,12 @@ val checkbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = signal, AsValue = txt, Optional = False } @@ -96,12 +96,12 @@ val opt_checkbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = fn st => b <- signal st; return (Some b), AsValue = txt, Optional = True } @@ -114,12 +114,12 @@ val intbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = fn s => v <- signal s; return (Option.get 0 (read v)), AsValue = txt, Optional = False } @@ -132,12 +132,12 @@ val opt_intbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = fn s => v <- signal s; return (read v), AsValue = txt, Optional = True } @@ -177,12 +177,12 @@ val urlbox = { Configure = return (), Reconfigure = fn _ () => return (), AsWidget = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , AsWidgetSimple = fn s ido => case ido of - None => - | Some id => , + None => + | Some id => , Value = signal, AsValue = fn s => case checkUrl s of @@ -280,8 +280,8 @@ fun choicebox [a ::: Type] (_ : show a) (_ : read a) (choice : a) (choices : lis in case id of - None => {inner} - | Some id => {inner} + None => {inner} + | Some id => {inner} end, AsWidgetSimple = fn me id => let @@ -290,8 +290,8 @@ fun choicebox [a ::: Type] (_ : show a) (_ : read a) (choice : a) (choices : lis in case id of - None => {inner} - | Some id => {inner} + None => {inner} + | Some id => {inner} end, Value = fn me => s <- signal me.Source; @@ -330,13 +330,13 @@ fun foreignbox [a ::: Type] [f ::: Name] (_ : show a) (_ : read a) (q : sql_quer {inner choices} - | Some id => {inner choices})}/> + None => {inner choices} + | Some id => {inner choices})}/> end, AsWidgetSimple = fn me id => case id of - None => - | Some id => , + None => + | Some id => , Value = fn me => v <- signal me.Source; return (case v of @@ -370,13 +370,13 @@ fun foreignbox_default [a ::: Type] [f ::: Name] (_ : show a) (_ : read a) (q : {inner choices} - | Some id => {inner choices})}/> + None => {inner choices} + | Some id => {inner choices})}/> end, AsWidgetSimple = fn me id => case id of - None => - | Some id => , + None => + | Some id => , Value = fn me => v <- signal me.Source; return (case v of @@ -455,13 +455,13 @@ functor Fuzzybox(M : sig | _ => choices <- signal me.Choices; return (case id of - None => {inner choices} - | Some id => {inner choices})}/> + None => {inner choices} + | Some id => {inner choices})}/> end, AsWidgetSimple = fn me id => case id of - None => - | Some id => , + None => + | Some id => , Value = fn me => signal me.Source, AsValue = txt, Optional = False } diff --git a/withComments.ur b/withComments.ur index 2c8cec6..ad3ac17 100644 --- a/withComments.ur +++ b/withComments.ur @@ -1,4 +1,4 @@ -open Bootstrap4 +open Bootstrap functor Make(M : sig con key1 :: Name