From 453f97706eace7e9f1f368fdbd62e53bbab2c1bc Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 29 Jan 2018 00:37:39 -0700 Subject: [PATCH] Upgrade to Bootstrap 4.0, FontAwesome 5.0, jQuery 3.3.1 --- app.php | 249 +- index.php | 131 +- lib/getitemtable.php | 4 +- pages.php | 10 +- pages/404.php | 4 +- pages/categories.php | 16 +- pages/editcat.php | 37 +- pages/edititem.php | 62 +- pages/editloc.php | 28 +- pages/export.php | 65 +- pages/home.php | 51 +- pages/items.php | 34 +- pages/locations.php | 16 +- static/css/app.css | 107 +- static/css/bootstrap.min.css | 16 +- static/css/datatables.min.css | 10 +- static/css/fa-svg-with-js.css | 343 +++ static/css/font-awesome.min.css | 4 - static/css/index.css | 11 + static/css/material-color | 2 +- static/css/tables.css | 32 +- static/fonts/FontAwesome.otf | Bin 134808 -> 0 bytes static/fonts/fontawesome-webfont.eot | Bin 165742 -> 0 bytes static/fonts/fontawesome-webfont.svg | 2671 ----------------- static/fonts/fontawesome-webfont.ttf | Bin 165548 -> 0 bytes static/fonts/fontawesome-webfont.woff | Bin 98024 -> 0 bytes static/fonts/fontawesome-webfont.woff2 | Bin 77160 -> 0 bytes static/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes static/fonts/glyphicons-halflings-regular.svg | 288 -- static/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes static/img/minus-square.svg | 1 + static/img/search-plus.svg | 1 + static/js/bootstrap.min.js | 12 +- static/js/datatables.min.js | 431 +-- static/js/fontawesome-all.min.js | 5 + static/js/jquery-3.2.1.min.js | 4 - static/js/jquery-3.3.1.min.js | 2 + 39 files changed, 978 insertions(+), 3669 deletions(-) create mode 100644 static/css/fa-svg-with-js.css delete mode 100644 static/css/font-awesome.min.css create mode 100644 static/css/index.css delete mode 100644 static/fonts/FontAwesome.otf delete mode 100644 static/fonts/fontawesome-webfont.eot delete mode 100644 static/fonts/fontawesome-webfont.svg delete mode 100644 static/fonts/fontawesome-webfont.ttf delete mode 100644 static/fonts/fontawesome-webfont.woff delete mode 100644 static/fonts/fontawesome-webfont.woff2 delete mode 100644 static/fonts/glyphicons-halflings-regular.eot delete mode 100644 static/fonts/glyphicons-halflings-regular.svg delete mode 100644 static/fonts/glyphicons-halflings-regular.ttf delete mode 100644 static/fonts/glyphicons-halflings-regular.woff delete mode 100644 static/fonts/glyphicons-halflings-regular.woff2 create mode 100644 static/img/minus-square.svg create mode 100644 static/img/search-plus.svg create mode 100644 static/js/fontawesome-all.min.js delete mode 100644 static/js/jquery-3.2.1.min.js create mode 100644 static/js/jquery-3.3.1.min.js diff --git a/app.php b/app.php index 8eae1e2..21bfb1f 100644 --- a/app.php +++ b/app.php @@ -1,11 +1,10 @@ - - + + + + -
-
-
- - - + + strip_tags($_GET['arg'])], false); + } + $alerttype = MESSAGES[$_GET['msg']]['type']; + $alerticon = "square-o"; + switch (MESSAGES[$_GET['msg']]['type']) { + case "danger": + $alerticon = "times"; + break; + case "warning": + $alerticon = "exclamation-triangle"; + break; + case "info": + $alerticon = "info-circle"; + break; + case "success": + $alerticon = "check"; + break; + } + echo << +
+
+ + $alertmsg +
- + +
- + \n"; diff --git a/index.php b/index.php index 088c0e7..0072492 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,10 @@ - - + -
-
-
-
+
+
+ +
+
+
+
+
+
+
- - -
-
-
-

-
-
- - -
- -
- + +
+ - " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
- -
-
- - - -
- -
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- - - - - -
-
+ if ($multiauth != true) { + ?> + " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
+ " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
+ +
+
+ + + +
+ +
+ " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
+ + + + +
-
- - - + +
+ + + \ No newline at end of file diff --git a/lib/getitemtable.php b/lib/getitemtable.php index 0c833f5..9a45d52 100644 --- a/lib/getitemtable.php +++ b/lib/getitemtable.php @@ -115,8 +115,8 @@ $out['recordsFiltered'] = $recordsFiltered; $usercache = []; for ($i = 0; $i < count($items); $i++) { - $items[$i]["editbtn"] = ' ' . lang("edit", false) . ''; - $items[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; + $items[$i]["editbtn"] = ' ' . lang("edit", false) . ''; + $items[$i]["clonebtn"] = ' ' . lang("clone", false) . ''; if (is_null($items[$i]['userid'])) { $items[$i]["username"] = ""; } else { diff --git a/pages.php b/pages.php index a450419..9c3ab32 100644 --- a/pages.php +++ b/pages.php @@ -10,12 +10,12 @@ define("PAGES", [ "home" => [ "title" => "home", "navbar" => true, - "icon" => "home" + "icon" => "fas fa-home" ], "items" => [ "title" => "items", "navbar" => true, - "icon" => "cubes", + "icon" => "fas fa-cubes", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -28,7 +28,7 @@ define("PAGES", [ "locations" => [ "title" => "locations", "navbar" => true, - "icon" => "map-marker", + "icon" => "fas fa-map-marker", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -41,7 +41,7 @@ define("PAGES", [ "categories" => [ "title" => "categories", "navbar" => true, - "icon" => "archive", + "icon" => "fas fa-archive", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -79,7 +79,7 @@ define("PAGES", [ "export" => [ "title" => "report export", "navbar" => true, - "icon" => "download", + "icon" => "fas fa-download", "scripts" => [ "static/js/export.js" ] diff --git a/pages/404.php b/pages/404.php index 4b4197f..eeccaea 100644 --- a/pages/404.php +++ b/pages/404.php @@ -3,8 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ?> -
-
+
+

\ No newline at end of file diff --git a/pages/categories.php b/pages/categories.php index cfacc25..1c8fd98 100644 --- a/pages/categories.php +++ b/pages/categories.php @@ -7,16 +7,16 @@ require_once __DIR__ . '/../required.php'; redirectifnotloggedin(); ?> -
- +
+
- +
- - + + @@ -31,7 +31,7 @@ redirectifnotloggedin(); @@ -44,8 +44,8 @@ redirectifnotloggedin(); - - + +
- +
\ No newline at end of file diff --git a/pages/editcat.php b/pages/editcat.php index 5742bd6..024d241 100644 --- a/pages/editcat.php +++ b/pages/editcat.php @@ -1,5 +1,4 @@
-
-
-

+
+

+ + "" . htmlspecialchars($catdata['catname']) . ""]); ?> - "" . htmlspecialchars($catdata['catname']) . ""]); ?> - - - -

-
-
+ + +

+
- +
@@ -59,12 +56,12 @@ if (!is_empty($VARS['id'])) { -