├── README.md ├── bootstrap └── app.php ├── controllers ├── Controller.php ├── CustomerController.php ├── EmployeeController.php ├── HomeController.php ├── ItemsSoldController.php ├── LoginController.php ├── MerchantController.php ├── ProductController.php ├── ProfileController.php ├── RateController.php ├── StockController.php ├── TableController.php ├── TransactionController.php └── UserController.php ├── helpers ├── ActivitySummary.php ├── Auth.php └── ValidateParams.php ├── model ├── Customer.php ├── Employee.php ├── ItemsSold.php ├── Merchant.php ├── Model.php ├── Product.php ├── Rate.php ├── Stock.php ├── Transaction.php └── User.php ├── public ├── .htaccess ├── dist │ ├── css │ │ ├── work.css │ │ └── work.min.css │ ├── favicon-32x32.png │ └── js │ │ ├── page.js │ │ ├── work.js │ │ └── work.min.js ├── index.php └── vendor │ ├── bootstrap-social │ ├── bootstrap-social.css │ ├── bootstrap-social.less │ └── bootstrap-social.scss │ ├── bootstrap │ ├── css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ ├── datatables-editor │ ├── css │ │ ├── dataTables.editor.css │ │ ├── editor.bootstrap.css │ │ ├── editor.bootstrap.min.css │ │ ├── editor.bootstrap4.css │ │ ├── editor.bootstrap4.min.css │ │ ├── editor.dataTables.css │ │ ├── editor.dataTables.min.css │ │ ├── editor.foundation.css │ │ ├── editor.foundation.min.css │ │ ├── editor.jqueryui.css │ │ ├── editor.jqueryui.min.css │ │ ├── editor.semanticui.css │ │ ├── editor.semanticui.min.css │ │ └── scss │ │ │ ├── bubble.scss │ │ │ ├── datatable.scss │ │ │ ├── datetime.scss │ │ │ ├── envelope.scss │ │ │ ├── fields.scss │ │ │ ├── inline.scss │ │ │ ├── lightbox.scss │ │ │ ├── main.scss │ │ │ ├── mixins.scss │ │ │ ├── processing.scss │ │ │ └── upload.scss │ └── js │ │ ├── dataTables.editor.js │ │ ├── dataTables.editor.min.js │ │ ├── editor.bootstrap.js │ │ ├── editor.bootstrap.min.js │ │ ├── editor.bootstrap4.js │ │ ├── editor.bootstrap4.min.js │ │ ├── editor.foundation.js │ │ ├── editor.foundation.min.js │ │ ├── editor.jqueryui.js │ │ ├── editor.jqueryui.min.js │ │ ├── editor.semanticui.js │ │ └── editor.semanticui.min.js │ ├── datatables-plugins │ ├── dataTables.bootstrap.css │ ├── dataTables.bootstrap.js │ ├── dataTables.bootstrap.min.js │ ├── dataTables.buttons.min.js │ ├── dataTables.select.min.js │ ├── index.html │ └── select.bootstrap.min.css │ ├── datatables-responsive │ ├── dataTables.responsive.css │ ├── dataTables.responsive.js │ └── dataTables.responsive.scss │ ├── datatables │ ├── css │ │ ├── dataTables.bootstrap.css │ │ ├── dataTables.bootstrap.min.css │ │ ├── dataTables.bootstrap4.css │ │ ├── dataTables.bootstrap4.min.css │ │ ├── dataTables.foundation.css │ │ ├── dataTables.foundation.min.css │ │ ├── dataTables.jqueryui.css │ │ ├── dataTables.jqueryui.min.css │ │ ├── dataTables.material.css │ │ ├── dataTables.material.min.css │ │ ├── dataTables.semanticui.css │ │ ├── dataTables.semanticui.min.css │ │ ├── dataTables.uikit.css │ │ ├── dataTables.uikit.min.css │ │ ├── jquery.dataTables.css │ │ ├── jquery.dataTables.min.css │ │ └── jquery.dataTables_themeroller.css │ ├── images │ │ ├── Sorting icons.psd │ │ ├── favicon.ico │ │ ├── sort_asc.png │ │ ├── sort_asc_disabled.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ └── sort_desc_disabled.png │ └── js │ │ ├── dataTables.bootstrap.js │ │ ├── dataTables.bootstrap.min.js │ │ ├── dataTables.bootstrap4.js │ │ ├── dataTables.bootstrap4.min.js │ │ ├── dataTables.foundation.js │ │ ├── dataTables.foundation.min.js │ │ ├── dataTables.jqueryui.js │ │ ├── dataTables.jqueryui.min.js │ │ ├── dataTables.material.js │ │ ├── dataTables.material.min.js │ │ ├── dataTables.semanticui.js │ │ ├── dataTables.semanticui.min.js │ │ ├── dataTables.uikit.js │ │ ├── dataTables.uikit.min.js │ │ ├── jquery.dataTables.js │ │ ├── jquery.dataTables.min.js │ │ └── jquery.js │ ├── flot-tooltip │ ├── jquery.flot.tooltip.js │ ├── jquery.flot.tooltip.min.js │ └── jquery.flot.tooltip.source.js │ ├── flot │ ├── excanvas.js │ ├── excanvas.min.js │ ├── jquery.colorhelpers.js │ ├── jquery.flot.canvas.js │ ├── jquery.flot.categories.js │ ├── jquery.flot.crosshair.js │ ├── jquery.flot.errorbars.js │ ├── jquery.flot.fillbetween.js │ ├── jquery.flot.image.js │ ├── jquery.flot.js │ ├── jquery.flot.navigate.js │ ├── jquery.flot.pie.js │ ├── jquery.flot.resize.js │ ├── jquery.flot.selection.js │ ├── jquery.flot.stack.js │ ├── jquery.flot.symbol.js │ ├── jquery.flot.threshold.js │ ├── jquery.flot.time.js │ └── jquery.js │ ├── font-awesome │ ├── HELP-US-OUT.txt │ ├── css │ │ ├── font-awesome.css │ │ ├── font-awesome.css.map │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── less │ │ ├── animated.less │ │ ├── bordered-pulled.less │ │ ├── core.less │ │ ├── extras.less │ │ ├── fixed-width.less │ │ ├── font-awesome.less │ │ ├── icons.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── mixins.less │ │ ├── path.less │ │ ├── rotated-flipped.less │ │ ├── screen-reader.less │ │ ├── spinning.less │ │ ├── stacked.less │ │ └── variables.less │ └── scss │ │ ├── _animated.scss │ │ ├── _bordered-pulled.scss │ │ ├── _core.scss │ │ ├── _extras.scss │ │ ├── _fixed-width.scss │ │ ├── _icons.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── _mixins.scss │ │ ├── _path.scss │ │ ├── _rotated-flipped.scss │ │ ├── _screen-reader.scss │ │ ├── _spinning.scss │ │ ├── _stacked.scss │ │ ├── _variables.scss │ │ └── font-awesome.scss │ ├── images │ ├── Sorting icons.psd │ ├── favicon.ico │ ├── sort_asc.png │ ├── sort_asc_disabled.png │ ├── sort_both.png │ ├── sort_desc.png │ └── sort_desc_disabled.png │ ├── jquery │ ├── jquery.js │ └── jquery.min.js │ ├── metisMenu │ ├── metisMenu.css │ ├── metisMenu.js │ ├── metisMenu.min.css │ └── metisMenu.min.js │ ├── morrisjs │ ├── morris.css │ ├── morris.js │ └── morris.min.js │ ├── notify │ └── notify.min.js │ └── raphael │ ├── raphael.js │ └── raphael.min.js ├── routes ├── ApiRoutes.php ├── Route.php ├── ValidateRoutes.php └── WebRoutes.php ├── sql └── project5_6.sql └── views ├── auth └── login.php ├── components ├── header.php ├── menu.php └── top-links.php ├── errors └── 404.php ├── home.php ├── layouts ├── app.php └── error.php ├── profile.php └── table.php /README.md: -------------------------------------------------------------------------------- 1 | # Stock-Management-System 2 | 3 | ## Screenshots 4 | ### Login 5 | ![Login](https://image.prntscr.com/image/KDvSfkUlRf6rX5_PMpJ5OQ.jpg) 6 | ### Dashboard 7 | ![Dashboard](https://image.prntscr.com/image/XoYw81I1RG2WokJEN-kx6Q.jpg) 8 | ### Profile 9 | ![Profile](https://image.prntscr.com/image/rf6toHFzSBqv_zqmCg7TLg.jpg) 10 | ### Records 11 | ![Records](https://image.prntscr.com/image/7wAvaTW3QHOsmWJbfixPhg.jpg) 12 | ### Modifying Records 13 | ![Modifying Records](https://image.prntscr.com/image/z9Aj8Iw_TUyJSZoc5mt9WQ.jpg) 14 | 15 | ## How to install 16 | 1. Add this lines in path/to/xampp/apache/conf/extra/httpd-vhosts.conf: 17 | ``` 18 | 19 | DocumentRoot "path/to/xampp/htdocs" 20 | ServerName localhost 21 | 22 | 23 | 24 | 25 | DocumentRoot "path/to/project/public" 26 | ServerName project.dev 27 | 28 | ``` 29 | 2. Add this in C:\Windows\System32\drivers\etc\hosts file: 30 | ``` 31 | 127.0.0.1 localhost 32 | 127.0.0.1 project.dev 33 | ``` 34 | 3. Make sure you restart xampp after following step 1 & 2. 35 | 4. Import database "project5.6" from sql file present in sql folder. 36 | 5. Get your CurrencyLayer API Key from [here](https://currencylayer.com/) and replace it in *path/to/project/public/dist/js/page.js* line number 1439. This is for receiving live commodity rates in dashboard. Don't forget to clear cache of browser after editing. 37 | 6. Enter "project.dev" in browser to visit the app, make sure your XAMPP(Apache, MySQL) is running. 38 | 7. Done 39 | 40 | ### Note 41 | If incase you're receiving alert that Editor Datatables trial has expired, download the editor-datatable's JS/CSS files from [Editor](http://editor.datatables.net/download) and replace the content in css & js folder present in *path/to/project/public/vendor/datatables-editor*. Don't forget to clear cache after replacing files. 42 | If you are recieving some bugs in editing tables, maybe the project's js file handling the editor-datatables has became out of date. 43 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | valid($data['email'], $data['password'])) { 36 | $result = false; 37 | $d['email'] = ['These credentials do not match our record.']; 38 | } 39 | } 40 | if($result==false) { 41 | header('Content-type: application/json'); 42 | http_response_code(422); 43 | echo json_encode($d); 44 | }else{ 45 | if(session_id() == '' || !isset($_SESSION)) { 46 | session_start(); 47 | } 48 | new ActivitySummary(); 49 | $_SESSION['username'] = $data['email']; 50 | } 51 | } 52 | 53 | public static function logout(){ 54 | session_destroy(); 55 | if(isset($_SESSION['username'])) 56 | unset($_SESSION['username']); 57 | header('Location: /login'); 58 | } 59 | } -------------------------------------------------------------------------------- /controllers/ProductController.php: -------------------------------------------------------------------------------- 1 | get(); 23 | $data['data'] = $products; 24 | echo json_encode($data); 25 | } 26 | 27 | public static function show($id) 28 | { 29 | $product = new Product(); 30 | $product = $product->show($id); 31 | if($product == false){ 32 | $d = ['product' => ['No product found with this id.']]; 33 | header('Content-type: application/json'); 34 | http_response_code(422); 35 | echo json_encode($d); 36 | }else{ 37 | $data['data'] = ['name' => $product['name']]; 38 | header('Content-type: application/json'); 39 | echo json_encode($data); 40 | } 41 | } 42 | 43 | public static function insert($data){ 44 | $product = new Product(); 45 | $result = true; 46 | $d = []; 47 | if (!ValidateParams::productName($data['name'])) { 48 | $result = false; 49 | $d['name'] = ['The name must be a valid string and it\'s length must not be greater than 70 chars.']; 50 | } 51 | if($result == true){ 52 | $product = $product->insert($data); 53 | if ($product == false) { 54 | $d = ['product' => ['There was an error inserting product.']]; 55 | header('Content-type: application/json'); 56 | http_response_code(422); 57 | echo json_encode($d); 58 | } else { 59 | $d = ['product' => ['Product has been successfully added.']]; 60 | header('Content-type: application/json'); 61 | echo json_encode($d); 62 | } 63 | }else{ 64 | header('Content-type: application/json'); 65 | http_response_code(422); 66 | echo json_encode($d); 67 | } 68 | } 69 | 70 | public static function update($data){ 71 | $product = new Product(); 72 | $result = true; 73 | $d = []; 74 | if (!ValidateParams::name($data['name'])) { 75 | $result = false; 76 | $d['name'] = ['The name must be a valid string and it\'s length must not be greater than 70 chars.']; 77 | } 78 | if($result == true){ 79 | $product = $product->update($data); 80 | if ($product == false) { 81 | $d = ['product' => ['There was an error inserting product.']]; 82 | header('Content-type: application/json'); 83 | http_response_code(422); 84 | echo json_encode($d); 85 | } else { 86 | $d = ['product' => ['Product has been successfully updated.']]; 87 | header('Content-type: application/json'); 88 | echo json_encode($d); 89 | } 90 | }else{ 91 | header('Content-type: application/json'); 92 | http_response_code(422); 93 | echo json_encode($d); 94 | } 95 | } 96 | 97 | public static function delete($id){ 98 | $product = new Product(); 99 | if($product->delete($id)){ 100 | $d = ['product' => ['Product has been successfully deleted.']]; 101 | header('Content-type: application/json'); 102 | echo json_encode($d); 103 | }else{ 104 | $d = ['product' => ['There was an error deleting product.']]; 105 | header('Content-type: application/json'); 106 | http_response_code(422); 107 | echo json_encode($d); 108 | } 109 | } 110 | } -------------------------------------------------------------------------------- /controllers/ProfileController.php: -------------------------------------------------------------------------------- 1 | get(); 23 | $data['data'] = $rates; 24 | echo json_encode($data); 25 | } 26 | 27 | public static function show($id) 28 | { 29 | $rate = new Rate(); 30 | $rate = $rate->show($id); 31 | if($rate == false){ 32 | $d = ['rate' => ['No rate found with this id.']]; 33 | header('Content-type: application/json'); 34 | http_response_code(422); 35 | echo json_encode($d); 36 | }else{ 37 | $data['data'] = ['rate' => $rate['rate'], 'date' => $rate['date']]; 38 | header('Content-type: application/json'); 39 | echo json_encode($data); 40 | } 41 | } 42 | 43 | public static function insert($data){ 44 | $rate = new Rate(); 45 | $result = true; 46 | $d = []; 47 | if (!ValidateParams::rate($data['rate'])) { 48 | $result = false; 49 | $d['name'] = ['The name must be a valid string and it\'s length must not be greater than 70 chars.']; 50 | } 51 | if (!ValidateParams::date($data['date'])) { 52 | $result = false; 53 | $d['address'] = ['The address must be a valid string and it\'s length must not be greater than 95 chars.']; 54 | } 55 | if($result == true){ 56 | $rate = $rate->insert($data); 57 | if ($rate == false) { 58 | $d = ['rate' => ['There was an error inserting rate.']]; 59 | header('Content-type: application/json'); 60 | http_response_code(422); 61 | echo json_encode($d); 62 | } else { 63 | $d = ['rate' => ['Rate has been successfully added.']]; 64 | header('Content-type: application/json'); 65 | echo json_encode($d); 66 | } 67 | }else{ 68 | header('Content-type: application/json'); 69 | http_response_code(422); 70 | echo json_encode($d); 71 | } 72 | } 73 | 74 | public static function update($data){ 75 | $rate = new Rate(); 76 | $result = true; 77 | $d = []; 78 | if (!ValidateParams::rate($data['rate'])) { 79 | $result = false; 80 | $d['name'] = ['The name must be a valid string and it\'s length must not be greater than 70 chars.']; 81 | } 82 | if (!ValidateParams::date($data['date'])) { 83 | $result = false; 84 | $d['address'] = ['The address must be a valid string and it\'s length must not be greater than 95 chars.']; 85 | } 86 | if($result == true){ 87 | $rate = $rate->update($data); 88 | if ($rate == false) { 89 | $d = ['rate' => ['There was an error updating content.']]; 90 | header('Content-type: application/json'); 91 | http_response_code(422); 92 | echo json_encode($d); 93 | } else { 94 | $d = ['rate' => ['Information has been successfully updated.']]; 95 | header('Content-type: application/json'); 96 | echo json_encode($d); 97 | } 98 | }else{ 99 | header('Content-type: application/json'); 100 | http_response_code(422); 101 | echo json_encode($d); 102 | } 103 | } 104 | 105 | public static function delete($id){ 106 | $rate = new Rate(); 107 | if($rate->delete($id)){ 108 | $d = ['rate' => ['Rate has been successfully deleted.']]; 109 | header('Content-type: application/json'); 110 | echo json_encode($d); 111 | }else{ 112 | $d = ['rate' => ['There was an error deleting rate.']]; 113 | header('Content-type: application/json'); 114 | http_response_code(422); 115 | echo json_encode($d); 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /controllers/TableController.php: -------------------------------------------------------------------------------- 1 | count(); 19 | $transactions = new Transaction(); 20 | $transactions = $transactions->count(); 21 | $employees = new Employee(); 22 | $employees = $employees->count(); 23 | $sold_items = new ItemsSold(); 24 | $sold_items = $sold_items->count(); 25 | $data['data'] = ['employees' => $employees, 'customers' => $customers, 'transactions' => $transactions, 'items_sold' => $sold_items]; 26 | header('Content-type: application/json'); 27 | echo json_encode($data); 28 | 29 | } 30 | } -------------------------------------------------------------------------------- /helpers/ActivitySummary.php: -------------------------------------------------------------------------------- 1 | 120) { 23 | return false; 24 | } 25 | return true; 26 | } 27 | 28 | static function name($name){ 29 | $name = self::security($name); 30 | if (!preg_match("/^[a-zA-Z ]*$/",$name) || strlen($name) >70) { 31 | return false; 32 | } 33 | return true; 34 | } 35 | 36 | static function productName($name){ 37 | $name = self::security($name); 38 | if (strlen($name) >35) { 39 | return false; 40 | } 41 | return true; 42 | } 43 | 44 | static function address($address){ 45 | $address = self::security($address); 46 | if (strlen($address) >95) { 47 | return false; 48 | } 49 | return true; 50 | } 51 | 52 | static function gender($gender){ 53 | $gender = self::security($gender); 54 | if ($gender == 'M' || $gender =='F') { 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | static function phone($phone){ 61 | $phone = self::security($phone); 62 | if (!preg_match("/^[1-9][0-9]{2,14}$/",$phone) || strlen($phone) >15 || strlen($phone) <3 ) { 63 | return false; 64 | } 65 | return true; 66 | } 67 | 68 | static function rate($rate){ 69 | $rate = self::security($rate); 70 | if (!preg_match('/^\s*[+\-]?(?:\d+(?:\.\d*)?|\.\d+)\s*$/',$rate) || strlen($rate) >13 ) { 71 | return false; 72 | } 73 | return true; 74 | } 75 | 76 | static function validateInteger($weight){ 77 | $weight = self::security($weight); 78 | if (!filter_var($weight, FILTER_VALIDATE_INT) ) { 79 | return false; 80 | } 81 | return true; 82 | } 83 | 84 | 85 | static function date($date) { 86 | $date = self::security($date); 87 | if(preg_match("/^(\d{4})-(\d{2})-(\d{2})$/", $date, $matches)) 88 | { 89 | if(checkdate($matches[2], $matches[3], $matches[1])) 90 | { 91 | return true; 92 | } 93 | return false; 94 | } 95 | return false; 96 | } 97 | 98 | static function dateTime($dateTime) { 99 | $dateTime = self::security($dateTime); 100 | if(DateTime::createFromFormat('Y-m-d H:i:s', $dateTime)) 101 | { 102 | return true; 103 | } 104 | return false; 105 | } 106 | 107 | static function password($pass){ 108 | $pass = self::security($pass); 109 | if (strlen($pass) >128 || strlen($pass) <6 ) { 110 | return false; 111 | } 112 | return true; 113 | } 114 | } -------------------------------------------------------------------------------- /model/Customer.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | 21 | function get(){ 22 | $json = []; 23 | $sql = "SELECT * FROM customers;"; 24 | $result = $this->conn->query($sql); 25 | while($row = mysqli_fetch_assoc($result)){ 26 | $json[] = $row; 27 | } 28 | 29 | return $json; 30 | } 31 | 32 | function show($id){ 33 | $sql = "SELECT * FROM customers WHERE id='$id';"; 34 | $result = $this->conn->query($sql); 35 | 36 | if ($result->num_rows > 0) { 37 | $row = $result->fetch_assoc(); 38 | $this->conn->close(); 39 | return $row; 40 | } else { 41 | $this->conn->close(); 42 | return false; 43 | } 44 | } 45 | 46 | 47 | function insert($data){ 48 | $sql = "INSERT INTO customers (name, address, phone, email) VALUES ('".$data['name']."', '".$data['address']."', '".$data['phone']."', '".$data['email']."')"; 49 | 50 | if ($this->conn->query($sql) === TRUE) { 51 | $this->conn->close(); 52 | return true; 53 | } else { 54 | $this->conn->close(); 55 | return false; 56 | } 57 | } 58 | 59 | function update($data){ 60 | $sql = "UPDATE customers SET name='".$data['name']."', address='".$data['address']."', email='".$data['email']."', phone='".$data['phone']."' WHERE id=".$data["id"]; 61 | 62 | if ($this->conn->query($sql) === TRUE) { 63 | $this->conn->close(); 64 | return true; 65 | } else { 66 | $this->conn->close(); 67 | return false; 68 | } 69 | } 70 | 71 | function delete($id){ 72 | $sql = "DELETE FROM customers WHERE id='$id'"; 73 | 74 | if ($this->conn->query($sql) === TRUE) { 75 | $this->conn->close(); 76 | return true; 77 | } else { 78 | $this->conn->close(); 79 | return false; 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /model/Employee.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | 21 | function get(){ 22 | $json = []; 23 | $sql = "SELECT * FROM employees;"; 24 | $result = $this->conn->query($sql); 25 | while($row = mysqli_fetch_assoc($result)){ 26 | $json[] = $row; 27 | } 28 | 29 | return $json; 30 | } 31 | 32 | function insert($data){ 33 | $sql = "INSERT INTO employees (`name`, `address`, `phone`, `gender`, `doj`) VALUES ('".$data['name']."', '".$data['address']."', '".$data['phone']."', '".$data['gender']."', '".$data['doj']."')"; 34 | 35 | if ($this->conn->query($sql) === TRUE) { 36 | $this->conn->close(); 37 | return true; 38 | } else { 39 | $this->conn->close(); 40 | return false; 41 | } 42 | } 43 | 44 | function show($id){ 45 | $sql = "SELECT * FROM employees WHERE id='$id';"; 46 | $result = $this->conn->query($sql); 47 | 48 | if ($result->num_rows > 0) { 49 | $row = $result->fetch_assoc(); 50 | $this->conn->close(); 51 | return $row; 52 | } else { 53 | $this->conn->close(); 54 | return false; 55 | } 56 | } 57 | 58 | function update($data){ 59 | $sql = "UPDATE employees SET name='".$data['name']."', address='".$data['address']."', phone='".$data['phone']."', gender='".$data['gender']."', doj='".$data['doj']."' WHERE id=".$data["id"]; 60 | 61 | if ($this->conn->query($sql) === TRUE) { 62 | $this->conn->close(); 63 | return true; 64 | } else { 65 | $this->conn->close(); 66 | return false; 67 | } 68 | } 69 | 70 | function delete($id){ 71 | $sql = "DELETE FROM employees WHERE id='$id'"; 72 | 73 | if ($this->conn->query($sql) === TRUE) { 74 | $this->conn->close(); 75 | return true; 76 | } else { 77 | $this->conn->close(); 78 | return false; 79 | } 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /model/ItemsSold.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 16 | 17 | return $result->num_rows; 18 | } 19 | 20 | function get(){ 21 | $json = []; 22 | $sql = "SELECT * FROM sold_items;"; 23 | $result = $this->conn->query($sql); 24 | while($row = mysqli_fetch_assoc($result)){ 25 | $json[] = $row; 26 | } 27 | 28 | return $json; 29 | } 30 | 31 | function insert($data){ 32 | $sql = "INSERT INTO sold_items (`stock_id`, `customer_id`, `employee_id`, `transaction_id`, `price`, `dos`) VALUES ('".$data['stock_id']."', '".$data['customer_id']."', '".$data['employee_id']."', '".$data['transaction_id']."', '".$data['price']."', '".$data['dos']."')"; 33 | 34 | if ($this->conn->query($sql) === TRUE) { 35 | $this->conn->close(); 36 | return true; 37 | } else { 38 | $this->conn->close(); 39 | return false; 40 | } 41 | } 42 | 43 | function show($id){ 44 | $sql = "SELECT * FROM sold_items WHERE id='$id';"; 45 | $result = $this->conn->query($sql); 46 | 47 | if ($result->num_rows > 0) { 48 | $row = $result->fetch_assoc(); 49 | $this->conn->close(); 50 | return $row; 51 | } else { 52 | $this->conn->close(); 53 | return false; 54 | } 55 | } 56 | 57 | function update($data){ 58 | $sql = "UPDATE sold_items SET stock_id='".$data['stock_id']."', customer_id='".$data['customer_id']."', employee_id='".$data['employee_id']."', transaction_id='".$data['transaction_id']."', price='".$data['price']."', dos='".$data['dos']."' WHERE id=".$data["id"]; 59 | 60 | if ($this->conn->query($sql) === TRUE) { 61 | $this->conn->close(); 62 | return true; 63 | } else { 64 | $this->conn->close(); 65 | return false; 66 | } 67 | } 68 | 69 | function delete($id){ 70 | $sql = "DELETE FROM sold_items WHERE id='$id'"; 71 | 72 | if ($this->conn->query($sql) === TRUE) { 73 | $this->conn->close(); 74 | return true; 75 | } else { 76 | $this->conn->close(); 77 | return false; 78 | } 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /model/Merchant.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | 21 | function get() 22 | { 23 | $json = []; 24 | $sql = "SELECT * FROM merchants;"; 25 | $result = $this->conn->query($sql); 26 | while ($row = mysqli_fetch_assoc($result)) { 27 | $json[] = $row; 28 | } 29 | 30 | return $json; 31 | } 32 | 33 | function insert($data) 34 | { 35 | $sql = "INSERT INTO merchants (`name`, `address`, `email`, `phone`) VALUES ('" . $data['name'] . "', '" . $data['address'] . "', '" . $data['email'] . "', '" . $data['phone'] . "')"; 36 | 37 | if ($this->conn->query($sql) === TRUE) { 38 | $this->conn->close(); 39 | return true; 40 | } else { 41 | $this->conn->close(); 42 | return false; 43 | } 44 | } 45 | 46 | function show($id) 47 | { 48 | $sql = "SELECT * FROM merchants WHERE id='$id';"; 49 | $result = $this->conn->query($sql); 50 | 51 | if ($result->num_rows > 0) { 52 | $row = $result->fetch_assoc(); 53 | $this->conn->close(); 54 | return $row; 55 | } else { 56 | $this->conn->close(); 57 | return false; 58 | } 59 | } 60 | 61 | function update($data) 62 | { 63 | $sql = "UPDATE merchants SET name='" . $data['name'] . "', address='" . $data['address'] . "', phone='" . $data['phone'] . "', email='" . $data['email'] . "' WHERE id=" . $data["id"]; 64 | 65 | if ($this->conn->query($sql) === TRUE) { 66 | $this->conn->close(); 67 | return true; 68 | } else { 69 | $this->conn->close(); 70 | return false; 71 | } 72 | } 73 | 74 | function delete($id) 75 | { 76 | $sql = "DELETE FROM merchants WHERE id='$id'"; 77 | 78 | if ($this->conn->query($sql) === TRUE) { 79 | $this->conn->close(); 80 | return true; 81 | } else { 82 | $this->conn->close(); 83 | return false; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /model/Model.php: -------------------------------------------------------------------------------- 1 | conn = new mysqli($servername, $username, $password, $dbname); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /model/Product.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 18 | while ($row = mysqli_fetch_assoc($result)) { 19 | $json[] = $row; 20 | } 21 | 22 | return $json; 23 | } 24 | 25 | function insert($data) 26 | { 27 | $sql = "INSERT INTO products (`name`) VALUES ('" . $data['name'] . "')"; 28 | 29 | if ($this->conn->query($sql) === TRUE) { 30 | $this->conn->close(); 31 | return true; 32 | } else { 33 | $this->conn->close(); 34 | return false; 35 | } 36 | } 37 | 38 | function show($id) 39 | { 40 | $sql = "SELECT * FROM products WHERE id='$id';"; 41 | $result = $this->conn->query($sql); 42 | 43 | if ($result->num_rows > 0) { 44 | $row = $result->fetch_assoc(); 45 | $this->conn->close(); 46 | return $row; 47 | } else { 48 | $this->conn->close(); 49 | return false; 50 | } 51 | } 52 | 53 | function update($data) 54 | { 55 | $sql = "UPDATE products SET name='" . $data['name'] . "' WHERE id=" . $data["id"]; 56 | 57 | if ($this->conn->query($sql) === TRUE) { 58 | $this->conn->close(); 59 | return true; 60 | } else { 61 | $this->conn->close(); 62 | return false; 63 | } 64 | } 65 | 66 | function delete($id) 67 | { 68 | $sql = "DELETE FROM products WHERE id='$id'"; 69 | 70 | if ($this->conn->query($sql) === TRUE) { 71 | $this->conn->close(); 72 | return true; 73 | } else { 74 | $this->conn->close(); 75 | return false; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /model/Rate.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | 21 | function get() 22 | { 23 | $json = []; 24 | $sql = "SELECT * FROM rates;"; 25 | $result = $this->conn->query($sql); 26 | while ($row = mysqli_fetch_assoc($result)) { 27 | $row['id'] = (int) $row['id']; 28 | $row['rate'] = (float) $row['rate']; 29 | $json[] = $row; 30 | } 31 | 32 | return $json; 33 | } 34 | 35 | function insert($data) 36 | { 37 | $sql = "INSERT INTO rates (`rate`, `date`) VALUES ('" . $data['rate'] . "', '" . $data['date'] . "')"; 38 | 39 | if ($this->conn->query($sql) === TRUE) { 40 | $this->conn->close(); 41 | return true; 42 | } else { 43 | $this->conn->close(); 44 | return false; 45 | } 46 | } 47 | 48 | function show($id) 49 | { 50 | $sql = "SELECT * FROM rates WHERE id='$id';"; 51 | $result = $this->conn->query($sql); 52 | 53 | if ($result->num_rows > 0) { 54 | $row = $result->fetch_assoc(); 55 | $row['id'] = (int) $row['id']; 56 | $row['rate'] = (float) $row['rate']; 57 | $this->conn->close(); 58 | return $row; 59 | } else { 60 | $this->conn->close(); 61 | return false; 62 | } 63 | } 64 | 65 | function update($data) 66 | { 67 | $sql = "UPDATE rates SET rate='" . $data['rate'] . "', date='" . $data['date'] . "' WHERE id=" . $data["id"]; 68 | 69 | if ($this->conn->query($sql) === TRUE) { 70 | $this->conn->close(); 71 | return true; 72 | } else { 73 | $this->conn->close(); 74 | return false; 75 | } 76 | } 77 | 78 | function delete($id) 79 | { 80 | $sql = "DELETE FROM rates WHERE id='$id'"; 81 | 82 | if ($this->conn->query($sql) === TRUE) { 83 | $this->conn->close(); 84 | return true; 85 | } else { 86 | $this->conn->close(); 87 | return false; 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /model/Stock.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | function get(){ 21 | $json = []; 22 | $sql = "SELECT * FROM stocks;"; 23 | $result = $this->conn->query($sql); 24 | while($row = mysqli_fetch_assoc($result)){ 25 | $row['id'] = (int) $row['id']; 26 | $row['weight'] = (int) $row['weight']; 27 | $row['purity'] = (int) $row['purity']; 28 | $row['merchant_id'] = (int) $row['merchant_id']; 29 | $row['product_id'] = (int) $row['product_id']; 30 | $json[] = $row; 31 | } 32 | 33 | return $json; 34 | } 35 | 36 | function insert($data){ 37 | $sql = "INSERT INTO stocks (`weight`, `purity`, `merchant_id`, `product_id`) VALUES ('".$data['weight']."', '".$data['purity']."', '".$data['merchant_id']."', '".$data['product_id']."')"; 38 | 39 | if ($this->conn->query($sql) === TRUE) { 40 | $this->conn->close(); 41 | return true; 42 | } else { 43 | $this->conn->close(); 44 | return false; 45 | } 46 | } 47 | 48 | function show($id){ 49 | $sql = "SELECT * FROM stocks WHERE id='$id';"; 50 | $result = $this->conn->query($sql); 51 | 52 | if ($result->num_rows > 0) { 53 | $row = $result->fetch_assoc(); 54 | $row['id'] = (int) $row['id']; 55 | $row['weight'] = (int) $row['weight']; 56 | $row['purity'] = (int) $row['purity']; 57 | $row['merchant_id'] = (int) $row['merchant_id']; 58 | $row['product_id'] = (int) $row['product_id']; 59 | $this->conn->close(); 60 | return $row; 61 | } else { 62 | $this->conn->close(); 63 | return false; 64 | } 65 | } 66 | 67 | function update($data){ 68 | $sql = "UPDATE stocks SET weight='".$data['weight']."', purity='".$data['purity']."', product_id='".$data['product_id']."', merchant_id ='".$data['merchant_id']."' WHERE id=".$data["id"]; 69 | 70 | if ($this->conn->query($sql) === TRUE) { 71 | $this->conn->close(); 72 | return true; 73 | } else { 74 | $this->conn->close(); 75 | return false; 76 | } 77 | } 78 | 79 | function delete($id){ 80 | $sql = "DELETE FROM stocks WHERE id='$id'"; 81 | 82 | if ($this->conn->query($sql) === TRUE) { 83 | $this->conn->close(); 84 | return true; 85 | } else { 86 | $this->conn->close(); 87 | return false; 88 | } 89 | } 90 | 91 | } -------------------------------------------------------------------------------- /model/Transaction.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 17 | 18 | return $result->num_rows; 19 | } 20 | function get($latest){ 21 | $json = []; 22 | if($latest) 23 | $sql = "SELECT * FROM transactions ORDER BY id DESC LIMIT 2;"; 24 | else 25 | $sql = "SELECT * FROM transactions;"; 26 | $result = $this->conn->query($sql); 27 | while($row = mysqli_fetch_assoc($result)){ 28 | $row['id'] = (int) $row['id']; 29 | $row['weight'] = (int) $row['weight']; 30 | $row['purity'] = (int) $row['purity']; 31 | $row['rate_id'] = (int) $row['rate_id']; 32 | $json[] = $row; 33 | } 34 | 35 | return $json; 36 | } 37 | 38 | function insert($data){ 39 | $sql = "INSERT INTO transactions (`weight`, `purity`, `rate_id`) VALUES ('".$data['weight']."', '".$data['purity']."', '".$data['rate_id']."')"; 40 | 41 | if ($this->conn->query($sql) === TRUE) { 42 | $this->conn->close(); 43 | return true; 44 | } else { 45 | $this->conn->close(); 46 | return false; 47 | } 48 | } 49 | 50 | function show($id){ 51 | $sql = "SELECT * FROM transactions WHERE id='$id';"; 52 | $result = $this->conn->query($sql); 53 | 54 | if ($result->num_rows > 0) { 55 | $row = $result->fetch_assoc(); 56 | $row['id'] = (int) $row['id']; 57 | $row['weight'] = (int) $row['weight']; 58 | $row['purity'] = (int) $row['purity']; 59 | $row['rate_id'] = (int) $row['rate_id']; 60 | $this->conn->close(); 61 | return $row; 62 | } else { 63 | $this->conn->close(); 64 | return false; 65 | } 66 | } 67 | 68 | function update($data){ 69 | $sql = "UPDATE transactions SET weight='".$data['weight']."', purity='".$data['purity']."', rate_id='".$data['rate_id']."' WHERE id=".$data["id"]; 70 | 71 | if ($this->conn->query($sql) === TRUE) { 72 | $this->conn->close(); 73 | return true; 74 | } else { 75 | $this->conn->close(); 76 | return false; 77 | } 78 | } 79 | 80 | function delete($id){ 81 | $sql = "DELETE FROM transactions WHERE id='$id'"; 82 | 83 | if ($this->conn->query($sql) === TRUE) { 84 | $this->conn->close(); 85 | return true; 86 | } else { 87 | $this->conn->close(); 88 | return false; 89 | } 90 | } 91 | 92 | } -------------------------------------------------------------------------------- /model/User.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 16 | 17 | if ($result->num_rows > 0) { 18 | $row = $result->fetch_assoc(); 19 | session_start(); 20 | $_SESSION['id'] = $row['employee_id']; 21 | $_SESSION['admin'] = $row['admin']; 22 | $this->conn->close(); 23 | return true; 24 | } else { 25 | $this->conn->close(); 26 | } 27 | 28 | } 29 | 30 | function get(){ 31 | $json = []; 32 | $sql = "SELECT * FROM users;"; 33 | $result = $this->conn->query($sql); 34 | while($row = mysqli_fetch_assoc($result)){ 35 | $json[] = $row; 36 | } 37 | 38 | return $json; 39 | } 40 | 41 | function insert($data){ 42 | $sql = "INSERT INTO users (`employee_id`, `email`, `password`, `admin`) VALUES ('".$data['emp_id']."', '".$data['email']."', 'secret', '".$data['admin']."')"; 43 | 44 | if ($this->conn->query($sql) === TRUE) { 45 | $this->conn->close(); 46 | return true; 47 | } else { 48 | $this->conn->close(); 49 | return false; 50 | } 51 | } 52 | 53 | function show($id){ 54 | $sql = "SELECT * FROM users WHERE id='$id';"; 55 | $result = $this->conn->query($sql); 56 | 57 | if ($result->num_rows > 0) { 58 | $row = $result->fetch_assoc(); 59 | $this->conn->close(); 60 | return $row; 61 | } else { 62 | $this->conn->close(); 63 | return false; 64 | } 65 | } 66 | 67 | function showByEmployee($emp_id){ 68 | $sql = "SELECT * FROM users WHERE employee_id='$emp_id';"; 69 | $result = $this->conn->query($sql); 70 | 71 | if ($result->num_rows > 0) { 72 | $row = $result->fetch_assoc(); 73 | $this->conn->close(); 74 | return $row; 75 | } else { 76 | $this->conn->close(); 77 | return false; 78 | } 79 | } 80 | 81 | function update($data){ 82 | $sql = "UPDATE users SET email='".$data['email']."', admin='".$data['admin']."' WHERE id=".$data["id"]; 83 | 84 | if ($this->conn->query($sql) === TRUE) { 85 | $this->conn->close(); 86 | return true; 87 | } else { 88 | $this->conn->close(); 89 | return false; 90 | } 91 | } 92 | 93 | function updateByEmployee($data){ 94 | $sql = "UPDATE users SET email='".$data['email']."', password='".$data['password']."' WHERE employee_id=".$data["employee_id"]; 95 | 96 | if ($this->conn->query($sql) === TRUE) { 97 | $this->conn->close(); 98 | return true; 99 | } else { 100 | $this->conn->close(); 101 | return false; 102 | } 103 | } 104 | 105 | function delete($id){ 106 | $sql = "DELETE FROM users WHERE id='$id'"; 107 | 108 | if ($this->conn->query($sql) === TRUE) { 109 | $this->conn->close(); 110 | return true; 111 | } else { 112 | $this->conn->close(); 113 | return false; 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/dist/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/dist/favicon-32x32.png -------------------------------------------------------------------------------- /public/dist/js/work.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('#side-menu').metisMenu(); 3 | }); 4 | 5 | //Loads the correct sidebar on window load, 6 | //collapses the sidebar on window resize. 7 | // Sets the min-height of #page-wrapper to window size 8 | $(function() { 9 | $(window).bind("load resize", function() { 10 | var topOffset = 50; 11 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 12 | if (width < 768) { 13 | $('div.navbar-collapse').addClass('collapse'); 14 | topOffset = 100; // 2-row-menu 15 | } else { 16 | $('div.navbar-collapse').removeClass('collapse'); 17 | } 18 | 19 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 20 | height = height - topOffset; 21 | if (height < 1) height = 1; 22 | if (height > topOffset) { 23 | $("#page-wrapper").css("min-height", (height) + "px"); 24 | } 25 | }); 26 | if (location.pathname != '/login') { 27 | var element = $('a[href="' + location.pathname + '"]'); 28 | element.addClass('active'); 29 | if (element.length) { 30 | if(!element.parent().parent(). 31 | hasClass('dropdown-menu')) { 32 | parent_list = element.parent().parent(); 33 | if(parent_list[0]) 34 | if (parent_list[0].tagName == 'UL') { 35 | parent_list.removeClass('collapse'); 36 | parent_list.addClass('collapse in'); 37 | parent_list.parent().addClass('active'); 38 | grand_parent = parent_list.parent().parent(); 39 | if (grand_parent[0].tagName == 'UL') { 40 | grand_parent.removeClass('collapse'); 41 | grand_parent.addClass('collapse in'); 42 | grand_parent.parent().addClass('active'); 43 | } 44 | } 45 | } 46 | 47 | } 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /public/dist/js/work.min.js: -------------------------------------------------------------------------------- 1 | $(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){var i=50,n=this.window.innerWidth>0?this.window.innerWidth:this.screen.width;n<768?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse");var e=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1;e-=i,e<1&&(e=1),e>i&&$("#page-wrapper").css("min-height",e+"px")});for(var i=window.location,n=$("ul.nav a").filter(function(){return this.href==i}).addClass("active").parent();;){if(!n.is("li"))break;n=n.parent().addClass("in").parent()}}); -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | start(); -------------------------------------------------------------------------------- /public/vendor/bootstrap-social/bootstrap-social.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Social Buttons for Bootstrap 3 | * 4 | * Copyright 2013-2014 Panayiotis Lipiridis 5 | * Licensed under the MIT License 6 | * 7 | * https://github.com/lipis/bootstrap-social 8 | */ 9 | 10 | @bs-height-base: (@line-height-computed + @padding-base-vertical * 2); 11 | @bs-height-lg: (floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2); 12 | @bs-height-sm: (floor(@font-size-small * 1.5) + @padding-small-vertical * 2); 13 | @bs-height-xs: (floor(@font-size-small * 1.2) + @padding-small-vertical + 1); 14 | 15 | .btn-social { 16 | position: relative; 17 | padding-left: (@bs-height-base + @padding-base-horizontal); 18 | text-align: left; 19 | white-space: nowrap; 20 | overflow: hidden; 21 | text-overflow: ellipsis; 22 | > :first-child { 23 | position: absolute; 24 | left: 0; 25 | top: 0; 26 | bottom: 0; 27 | width: @bs-height-base; 28 | line-height: (@bs-height-base + 2); 29 | font-size: 1.6em; 30 | text-align: center; 31 | border-right: 1px solid rgba(0, 0, 0, 0.2); 32 | } 33 | &.btn-lg { 34 | padding-left: (@bs-height-lg + @padding-large-horizontal); 35 | :first-child { 36 | line-height: @bs-height-lg; 37 | width: @bs-height-lg; 38 | font-size: 1.8em; 39 | } 40 | } 41 | &.btn-sm { 42 | padding-left: (@bs-height-sm + @padding-small-horizontal); 43 | :first-child { 44 | line-height: @bs-height-sm; 45 | width: @bs-height-sm; 46 | font-size: 1.4em; 47 | } 48 | } 49 | &.btn-xs { 50 | padding-left: (@bs-height-xs + @padding-small-horizontal); 51 | :first-child { 52 | line-height: @bs-height-xs; 53 | width: @bs-height-xs; 54 | font-size: 1.2em; 55 | } 56 | } 57 | } 58 | 59 | .btn-social-icon { 60 | .btn-social; 61 | height: (@bs-height-base + 2); 62 | width: (@bs-height-base + 2); 63 | padding: 0; 64 | :first-child { 65 | border: none; 66 | text-align: center; 67 | width: 100%!important; 68 | } 69 | &.btn-lg { 70 | height: @bs-height-lg; 71 | width: @bs-height-lg; 72 | padding-left: 0; 73 | padding-right: 0; 74 | } 75 | &.btn-sm { 76 | height: (@bs-height-sm + 2); 77 | width: (@bs-height-sm + 2); 78 | padding-left: 0; 79 | padding-right: 0; 80 | } 81 | &.btn-xs { 82 | height: (@bs-height-xs + 2); 83 | width: (@bs-height-xs + 2); 84 | padding-left: 0; 85 | padding-right: 0; 86 | } 87 | } 88 | 89 | .btn-social(@color-bg, @color: #fff) { 90 | background-color: @color-bg; 91 | .button-variant(@color, @color-bg, rgba(0,0,0,.2)); 92 | } 93 | 94 | 95 | .btn-adn { .btn-social(#d87a68); } 96 | .btn-bitbucket { .btn-social(#205081); } 97 | .btn-dropbox { .btn-social(#1087dd); } 98 | .btn-facebook { .btn-social(#3b5998); } 99 | .btn-flickr { .btn-social(#ff0084); } 100 | .btn-foursquare { .btn-social(#f94877); } 101 | .btn-github { .btn-social(#444444); } 102 | .btn-google-plus { .btn-social(#dd4b39); } 103 | .btn-instagram { .btn-social(#3f729b); } 104 | .btn-linkedin { .btn-social(#007bb6); } 105 | .btn-microsoft { .btn-social(#2672ec); } 106 | .btn-openid { .btn-social(#f7931e); } 107 | .btn-pinterest { .btn-social(#cb2027); } 108 | .btn-reddit { .btn-social(#eff7ff, #000); } 109 | .btn-soundcloud { .btn-social(#ff5500); } 110 | .btn-tumblr { .btn-social(#2c4762); } 111 | .btn-twitter { .btn-social(#55acee); } 112 | .btn-vimeo { .btn-social(#1ab7ea); } 113 | .btn-vk { .btn-social(#587ea3); } 114 | .btn-yahoo { .btn-social(#720e9e); } 115 | -------------------------------------------------------------------------------- /public/vendor/bootstrap-social/bootstrap-social.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Social Buttons for Bootstrap 3 | * 4 | * Copyright 2013-2014 Panayiotis Lipiridis 5 | * Licensed under the MIT License 6 | * 7 | * https://github.com/lipis/bootstrap-social 8 | */ 9 | 10 | $bs-height-base: ($line-height-computed + $padding-base-vertical * 2); 11 | $bs-height-lg: (floor($font-size-large * $line-height-base) + $padding-large-vertical * 2); 12 | $bs-height-sm: (floor($font-size-small * 1.5) + $padding-small-vertical * 2); 13 | $bs-height-xs: (floor($font-size-small * 1.2) + $padding-small-vertical + 1); 14 | 15 | .btn-social { 16 | position: relative; 17 | padding-left: ($bs-height-base + $padding-base-horizontal); 18 | text-align: left; 19 | white-space: nowrap; 20 | overflow: hidden; 21 | text-overflow: ellipsis; 22 | > :first-child { 23 | position: absolute; 24 | left: 0; 25 | top: 0; 26 | bottom: 0; 27 | width: $bs-height-base; 28 | line-height: ($bs-height-base + 2); 29 | font-size: 1.6em; 30 | text-align: center; 31 | border-right: 1px solid rgba(0, 0, 0, 0.2); 32 | } 33 | &.btn-lg { 34 | padding-left: ($bs-height-lg + $padding-large-horizontal); 35 | :first-child { 36 | line-height: $bs-height-lg; 37 | width: $bs-height-lg; 38 | font-size: 1.8em; 39 | } 40 | } 41 | &.btn-sm { 42 | padding-left: ($bs-height-sm + $padding-small-horizontal); 43 | :first-child { 44 | line-height: $bs-height-sm; 45 | width: $bs-height-sm; 46 | font-size: 1.4em; 47 | } 48 | } 49 | &.btn-xs { 50 | padding-left: ($bs-height-xs + $padding-small-horizontal); 51 | :first-child { 52 | line-height: $bs-height-xs; 53 | width: $bs-height-xs; 54 | font-size: 1.2em; 55 | } 56 | } 57 | } 58 | 59 | .btn-social-icon { 60 | @extend .btn-social; 61 | height: ($bs-height-base + 2); 62 | width: ($bs-height-base + 2); 63 | padding: 0; 64 | :first-child { 65 | border: none; 66 | text-align: center; 67 | width: 100%!important; 68 | } 69 | &.btn-lg { 70 | height: $bs-height-lg; 71 | width: $bs-height-lg; 72 | padding-left: 0; 73 | padding-right: 0; 74 | } 75 | &.btn-sm { 76 | height: ($bs-height-sm + 2); 77 | width: ($bs-height-sm + 2); 78 | padding-left: 0; 79 | padding-right: 0; 80 | } 81 | &.btn-xs { 82 | height: ($bs-height-xs + 2); 83 | width: ($bs-height-xs + 2); 84 | padding-left: 0; 85 | padding-right: 0; 86 | } 87 | } 88 | 89 | @mixin btn-social($color-bg, $color: #fff) { 90 | background-color: $color-bg; 91 | @include button-variant($color, $color-bg, rgba(0,0,0,.2)); 92 | } 93 | 94 | 95 | .btn-adn { @include btn-social(#d87a68); } 96 | .btn-bitbucket { @include btn-social(#205081); } 97 | .btn-dropbox { @include btn-social(#1087dd); } 98 | .btn-facebook { @include btn-social(#3b5998); } 99 | .btn-flickr { @include btn-social(#ff0084); } 100 | .btn-foursquare { @include btn-social(#f94877); } 101 | .btn-github { @include btn-social(#444444); } 102 | .btn-google-plus { @include btn-social(#dd4b39); } 103 | .btn-instagram { @include btn-social(#3f729b); } 104 | .btn-linkedin { @include btn-social(#007bb6); } 105 | .btn-microsoft { @include btn-social(#2672ec); } 106 | .btn-openid { @include btn-social(#f7931e); } 107 | .btn-pinterest { @include btn-social(#cb2027); } 108 | .btn-reddit { @include btn-social(#eff7ff, #000); } 109 | .btn-soundcloud { @include btn-social(#ff5500); } 110 | .btn-tumblr { @include btn-social(#2c4762); } 111 | .btn-twitter { @include btn-social(#55acee); } 112 | .btn-vimeo { @include btn-social(#1ab7ea); } 113 | .btn-vk { @include btn-social(#587ea3); } 114 | .btn-yahoo { @include btn-social(#720e9e); } 115 | -------------------------------------------------------------------------------- /public/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/dataTables.editor.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haxxorsid/stock-management-system/fbbbf213e9c93b87183a3891f77e3cc7095f22b0/public/vendor/datatables-editor/css/dataTables.editor.css -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/bubble.scss: -------------------------------------------------------------------------------- 1 | 2 | // Bubble form editing 3 | // Very similar to the main form, but attached to a particular node and the 4 | // form layout is slightly different with the fields container and buttons 5 | // making up a table of a single row and two columns. This allows the buttons 6 | // to be removed from the display and under this condition the fields will 7 | // take up the full width available. 8 | div.DTE_Bubble { 9 | position: absolute; 10 | z-index: 11; 11 | margin-top: -6px; 12 | opacity: 0; 13 | 14 | div.DTE_Bubble_Liner { 15 | position: absolute; 16 | bottom: 0; 17 | border: 1px solid black; 18 | width: 300px; 19 | margin-left: -150px; 20 | background-color: white; 21 | box-shadow: 2px 2px 7px #555; 22 | border-radius: 5px; 23 | border: 2px solid #444; 24 | padding: 1em; 25 | @include box-sizing(border-box); 26 | 27 | div.DTE_Bubble_Table { 28 | display: table; 29 | width: 100%; 30 | 31 | > form { 32 | display: table-cell; 33 | 34 | div.DTE_Form_Content { 35 | padding: 0; 36 | 37 | div.DTE_Field { 38 | position: relative; 39 | zoom: 1; 40 | margin-bottom: 0.5em; 41 | 42 | &:last-child { 43 | margin-bottom: 0; 44 | } 45 | } 46 | } 47 | } 48 | 49 | div.DTE_Form_Buttons { 50 | display: table-cell; 51 | vertical-align: bottom; 52 | padding: 0 0 0 0.75em; 53 | width: 1%; // browser will resize to a min width 54 | } 55 | } 56 | 57 | div.DTE_Header { 58 | border-top-left-radius: 5px; 59 | border-top-right-radius: 5px; 60 | } 61 | 62 | div.DTE_Header + div.DTE_Form_Info, 63 | div.DTE_Header + div.DTE_Bubble_Table { 64 | padding-top: 42px; 65 | } 66 | 67 | 68 | div.DTE_Form_Error { 69 | float: none; 70 | display: none; 71 | padding: 0; 72 | margin-bottom: 0.5em; 73 | } 74 | 75 | div.DTE_Bubble_Close { 76 | @include close-icon(); 77 | } 78 | } 79 | 80 | div.DTE_Bubble_Triangle { 81 | position: absolute; 82 | height: 10px; 83 | width: 10px; 84 | top: -6px; 85 | background-color: white; 86 | border: 2px solid #444; 87 | border-top: none; 88 | border-right: none; 89 | 90 | -webkit-transform: rotate(-45deg); 91 | -moz-transform: rotate(-45deg); 92 | -ms-transform: rotate(-45deg); 93 | -o-transform: rotate(-45deg); 94 | transform: rotate(-45deg); 95 | } 96 | 97 | &.below { 98 | div.DTE_Bubble_Liner { 99 | top: 10px; 100 | bottom: auto; 101 | } 102 | 103 | div.DTE_Bubble_Triangle { 104 | top: 4px; 105 | -webkit-transform: rotate(135deg); 106 | -moz-transform: rotate(135deg); 107 | -ms-transform: rotate(135deg); 108 | -o-transform: rotate(135deg); 109 | transform: rotate(135deg); 110 | } 111 | } 112 | } 113 | 114 | div.DTE_Bubble_Background { 115 | @include overlay-background(); 116 | } 117 | 118 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/datatable.scss: -------------------------------------------------------------------------------- 1 | 2 | // Row highlighting on edit styles 3 | // 4 | // To change the colour of the highlight, simply modify the variable below and 5 | // recompile the SCSS stylesheet (if you don't have SASS installed, you can use 6 | // the online service at http://sassmeister.com/ . 7 | // 8 | // The DataTables styles below match the default DataTables stylesheet: 9 | // http://next.datatables.net/manual/styling/classes so you can retain the full 10 | // benefits of the DataTables styling options. 11 | 12 | $table-row-highlight: #FFFBCC; 13 | 14 | table.dataTable { 15 | tbody { 16 | tr.highlight { 17 | background-color: $table-row-highlight !important; 18 | } 19 | 20 | tr.highlight, 21 | tr.noHighlight, 22 | tr.highlight td, 23 | tr.noHighlight td { 24 | @include background-transision(); 25 | } 26 | } 27 | 28 | &.stripe tbody, 29 | &.display tbody { 30 | tr.odd { 31 | &.highlight { 32 | background-color: shade($table-row-highlight, 2.35%); 33 | } 34 | } 35 | } 36 | 37 | // Hover classes - add "hover" class to the table to activate 38 | &.hover tbody, 39 | &.display tbody { 40 | tr:hover, 41 | tr.odd:hover, 42 | tr.even:hover { 43 | &.highlight { 44 | background-color: shade($table-row-highlight, 3.6%); 45 | } 46 | } 47 | } 48 | 49 | 50 | // Sort column highlighting - add "hover" class to the table to activate 51 | &.order-column, 52 | &.display { 53 | tbody { 54 | tr.highlight>.sorting_1, 55 | tr.highlight>.sorting_2, 56 | tr.highlight>.sorting_3 { 57 | background-color: shade($table-row-highlight, 2%); 58 | } 59 | } 60 | } 61 | 62 | &.display tbody, 63 | &.order-column.stripe tbody { 64 | tr.odd { 65 | &.highlight { 66 | >.sorting_1 { background-color: shade($table-row-highlight, 5.4%);} 67 | >.sorting_2 { background-color: shade($table-row-highlight, 4.7%);} 68 | >.sorting_3 { background-color: shade($table-row-highlight, 3.9%);} 69 | } 70 | } 71 | 72 | tr.even { 73 | &.highlight { 74 | >.sorting_1 { background-color: shade($table-row-highlight, 2%); } 75 | >.sorting_2 { background-color: shade($table-row-highlight, 1.2%); } 76 | >.sorting_3 { background-color: shade($table-row-highlight, 0.4%); } 77 | } 78 | } 79 | } 80 | 81 | &.display tbody, 82 | &.order-column.hover tbody { 83 | tr:hover, 84 | tr.odd:hover, 85 | tr.even:hover { 86 | &.highlight { 87 | >.sorting_1 { background-color: shade($table-row-highlight, 8.2%); } 88 | >.sorting_2 { background-color: shade($table-row-highlight, 7.5%); } 89 | >.sorting_3 { background-color: shade($table-row-highlight, 6.3%); } 90 | } 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/envelope.scss: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Namespace: DTED - DataTables Editor Display - Envelope 4 | */ 5 | 6 | div.DTED_Envelope_Wrapper { 7 | position: absolute; 8 | top: 0; 9 | bottom: 0; 10 | left: 50%; 11 | height: 100%; 12 | z-index: 11; 13 | display: none; 14 | overflow: hidden; 15 | 16 | // Create a shadow display at the top of the evelope to make it look like it has 17 | // come from under the element that it is attached to/ Left and right to give a 18 | // slight fade and the two ends 19 | div.DTED_Envelope_Shadow { 20 | position: absolute; 21 | top: -10px; 22 | left: 10px; 23 | right: 10px; 24 | height: 10px; 25 | z-index: 10; 26 | box-shadow: 0 0 20px black; 27 | } 28 | 29 | div.DTED_Envelope_Container { 30 | position: absolute; 31 | top: 0; 32 | left: 5%; 33 | width: 90%; 34 | 35 | border-left: 1px solid #777; 36 | border-right: 1px solid #777; 37 | border-bottom: 1px solid #777; 38 | box-shadow: 3px 3px 10px #555; 39 | border-bottom-left-radius: 5px; 40 | border-bottom-right-radius: 5px; 41 | background-color: white; 42 | 43 | div.DTE_Processing_Indicator { 44 | right: 36px; 45 | } 46 | 47 | div.DTE_Footer { 48 | border-bottom-left-radius: 5px; 49 | border-bottom-right-radius: 5px; 50 | } 51 | 52 | div.DTED_Envelope_Close { 53 | position: absolute; 54 | top: 16px; 55 | right: 10px; 56 | width: 18px; 57 | height: 18px; 58 | cursor: pointer; 59 | *cursor: hand; 60 | z-index: 12; 61 | text-align: center; 62 | font-size: 12px; 63 | 64 | background: #F8F8F8; 65 | background: -webkit-gradient(linear, center bottom, center top, from(#CCC), to(white)); 66 | background: -moz-linear-gradient(top, white, #CCC); 67 | background: linear-gradient(to bottom, white, #CCC); 68 | text-shadow: 0 1px 0 white; 69 | border: 1px solid #999; 70 | border-radius: 2px; 71 | -moz-border-radius: 2px; 72 | -webkit-border-radius: 2px; 73 | box-shadow: 0px 0px 1px #999; 74 | -moz-box-shadow: 0px 0px 1px #999; 75 | -webkit-box-shadow: 0px 0px 1px #999; 76 | } 77 | } 78 | } 79 | 80 | 81 | div.DTED_Envelope_Background { 82 | position: fixed; 83 | top: 0; 84 | left: 0; 85 | width: 100%; 86 | height: 100%; 87 | z-index: 10; 88 | @include radial-gradient( rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4) ); 89 | } 90 | 91 | 92 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/fields.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Generic field styling 4 | div.DTE_Field { 5 | input, 6 | textarea { 7 | box-sizing: border-box; 8 | background-color: white; 9 | -webkit-transition: background-color ease-in-out .15s; 10 | transition: background-color ease-in-out .15s; 11 | } 12 | 13 | input:focus, 14 | textarea:focus { 15 | background-color: #ffffee; 16 | } 17 | 18 | input[type="color"], 19 | input[type="date"], 20 | input[type="datetime"], 21 | input[type="datetime-local"], 22 | input[type="email"], 23 | input[type="month"], 24 | input[type="number"], 25 | input[type="password"], 26 | input[type="search"], 27 | input[type="tel"], 28 | input[type="text"], 29 | input[type="time"], 30 | input[type="url"], 31 | input[type="week"] { 32 | padding: 6px 4px; 33 | width: 100%; 34 | } 35 | 36 | label div.DTE_Label_Info { 37 | font-size: 0.85em; 38 | margin-top: 0.25em; 39 | 40 | &:empty { 41 | margin-top: 0; 42 | } 43 | } 44 | 45 | div.DTE_Field_Info, 46 | div.DTE_Field_Message, 47 | div.DTE_Field_Error { 48 | font-size: 11px; 49 | line-height: 1em; 50 | margin-top: 5px; 51 | 52 | &:empty { 53 | margin-top: 0; 54 | } 55 | } 56 | 57 | div.DTE_Field_Error { 58 | display: none; 59 | color: #b11f1f; 60 | } 61 | 62 | div.multi-value { 63 | display: none; 64 | border: 1px dotted #666; 65 | border-radius: 3px; 66 | padding: 5px; 67 | background-color: #fafafa; 68 | cursor: pointer; 69 | 70 | span { 71 | font-size: 0.8em; 72 | line-height: 1.25em; 73 | display: block; 74 | color: #666; 75 | } 76 | 77 | &.multi-noEdit { 78 | border: 1px solid #ccc; 79 | cursor: auto; 80 | background-color: #fcfcfc; 81 | 82 | &:hover { 83 | background-color: #fcfcfc; 84 | } 85 | } 86 | 87 | &:hover { 88 | background-color: #f1f1f1; 89 | } 90 | } 91 | 92 | &.disabled { 93 | color: grey; 94 | 95 | div.multi-value { 96 | cursor: default; 97 | border: 1px dotted #aaa; 98 | background-color: transparent; 99 | } 100 | } 101 | 102 | div.multi-restore { 103 | display: none; 104 | margin-top: 0.5em; 105 | font-size: 0.8em; 106 | line-height: 1.25em; 107 | color: #3879d9; 108 | 109 | &:hover { 110 | text-decoration: underline; 111 | cursor: pointer; 112 | } 113 | } 114 | } 115 | 116 | // Specific field type styling 117 | div.DTE_Field_Type_textarea { 118 | textarea { 119 | padding: 3px; 120 | width: 100%; 121 | height: 80px; 122 | } 123 | } 124 | 125 | div.DTE_Field.DTE_Field_Type_date { 126 | img { 127 | vertical-align: middle; 128 | cursor: pointer; 129 | *cursor: hand; 130 | } 131 | 132 | input.jqueryui { 133 | width: 87%; 134 | margin-right: 6px; 135 | } 136 | } 137 | 138 | div.DTE_Field_Type_checkbox, 139 | div.DTE_Field_Type_radio { 140 | div.DTE_Field_Input > div > div { 141 | margin-bottom: 0.25em; 142 | 143 | &:last-child { 144 | margin-bottom: 0; 145 | } 146 | 147 | input { 148 | } 149 | 150 | label { 151 | margin-left: 0.75em; 152 | vertical-align: middle; 153 | } 154 | } 155 | } 156 | 157 | div.DTE_Field_Type_select div.DTE_Field_Input { 158 | padding-top: 4px; 159 | } 160 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/inline.scss: -------------------------------------------------------------------------------- 1 | 2 | // Inline form editing 3 | // Hide the label and allow the field to take the full width 4 | div.DTE_Inline { 5 | position: relative; 6 | display: table; 7 | width: 100%; 8 | 9 | div.DTE_Inline_Field, 10 | div.DTE_Inline_Buttons { 11 | display: table-cell; 12 | vertical-align: middle; 13 | 14 | div.DTE_Field { 15 | padding: 0; 16 | 17 | >label { 18 | display: none; 19 | } 20 | 21 | input { 22 | width: 100%; 23 | } 24 | } 25 | 26 | div.DTE_Form_Buttons button { 27 | margin: -6px 0 -6px 4px; 28 | padding: 5px; 29 | } 30 | } 31 | 32 | // Have the input types take up full space, taking into account the cell padding 33 | div.DTE_Field input[type="color"], 34 | div.DTE_Field input[type="date"], 35 | div.DTE_Field input[type="datetime"], 36 | div.DTE_Field input[type="datetime-local"], 37 | div.DTE_Field input[type="email"], 38 | div.DTE_Field input[type="month"], 39 | div.DTE_Field input[type="number"], 40 | div.DTE_Field input[type="password"], 41 | div.DTE_Field input[type="search"], 42 | div.DTE_Field input[type="tel"], 43 | div.DTE_Field input[type="text"], 44 | div.DTE_Field input[type="time"], 45 | div.DTE_Field input[type="url"], 46 | div.DTE_Field input[type="week"] { 47 | margin: -6px 0; 48 | } 49 | 50 | div.DTE_Field_Error, 51 | div.DTE_Form_Error { 52 | font-size: 11px; 53 | line-height: 1.2em; 54 | padding: 0; 55 | margin-top: 10px; 56 | 57 | &:empty { 58 | margin-top: 0; 59 | } 60 | } 61 | } 62 | 63 | // Responsive integration 64 | span.dtr-data div.DTE_Inline { 65 | display: inline-table; 66 | } -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/lightbox.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | div.DTED_Lightbox_Wrapper { 4 | position: fixed; 5 | top: 0; 6 | left: 50%; 7 | margin-left: -390px; 8 | width: 780px; 9 | height: 100%; 10 | z-index: 11; 11 | 12 | div.DTED_Lightbox_Container { 13 | *position: absolute; /* IE6 */ 14 | *top: 50%; 15 | #position: absolute; /* IE7 */ 16 | #top: 50%; 17 | display: table; 18 | height: 100%; 19 | width: 100%; 20 | 21 | div.DTED_Lightbox_Content_Wrapper { 22 | *position: relative; /* IE6 */ 23 | #position: relative; /* IE7 */ 24 | display: table-cell; 25 | vertical-align: middle; 26 | width: 100%; 27 | 28 | div.DTED_Lightbox_Content { 29 | *top: -50%; /* IE6 */ 30 | #top: -50%; /* IE7 */ 31 | position: relative; 32 | border: 7px solid rgba(220, 220, 220, 0.5); 33 | box-shadow: 2px 2px 10px #555; 34 | border-radius: 10px; 35 | @include box-sizing(border-box); 36 | 37 | div.DTE { 38 | background: white; 39 | border-radius: 6px; 40 | box-shadow: 0 0 5px #555; 41 | border: 2px solid #444; 42 | @include box-sizing(border-box); 43 | 44 | div.DTE_Header { 45 | top: 2px; 46 | left: 2px; 47 | right: 2px; 48 | width: auto; 49 | border-top-left-radius: 5px; 50 | border-top-right-radius: 5px; 51 | } 52 | 53 | div.DTE_Footer { 54 | bottom: 2px; 55 | left: 2px; 56 | right: 2px; 57 | width: auto; 58 | border-bottom-left-radius: 5px; 59 | border-bottom-right-radius: 5px; 60 | } 61 | } 62 | 63 | div.DTED_Lightbox_Close { 64 | @include close-icon(); 65 | } 66 | } 67 | } 68 | } 69 | } 70 | 71 | 72 | div.DTED_Lightbox_Background { 73 | @include overlay-background(); 74 | } 75 | 76 | 77 | body.DTED_Lightbox_Mobile { 78 | div.DTED_Lightbox_Background { 79 | height: 0; 80 | } 81 | 82 | div.DTED_Lightbox_Shown { 83 | display: none; 84 | } 85 | 86 | div.DTED_Lightbox_Wrapper { 87 | position: absolute; 88 | top: 0px; 89 | left: 0px; 90 | right: 0px; 91 | bottom: 0px; 92 | width: auto; 93 | height: auto; 94 | margin-left: 0; 95 | -webkit-overflow-scrolling: touch; 96 | 97 | div.DTED_Lightbox_Container { 98 | display: block; 99 | 100 | div.DTED_Lightbox_Content_Wrapper { 101 | display: block; 102 | 103 | div.DTED_Lightbox_Content { 104 | border: 4px solid rgba(220, 220, 220, 0.5); 105 | border-radius: 0; 106 | 107 | div.DTE { 108 | border-radius: 0; 109 | box-shadow: 0 0 5px #555; 110 | border: 2px solid #444; 111 | 112 | div.DTE_Header { 113 | border-top-left-radius: 0; 114 | border-top-right-radius: 0; 115 | } 116 | 117 | div.DTE_Footer { 118 | border-bottom-left-radius: 0; 119 | border-bottom-right-radius: 0; 120 | } 121 | } 122 | 123 | div.DTED_Lightbox_Close { 124 | top: 11px; 125 | right: 15px; 126 | } 127 | } 128 | } 129 | } 130 | } 131 | } 132 | 133 | @media only screen 134 | and (max-width: 780px) { 135 | div.DTED_Lightbox_Wrapper { 136 | position: fixed; 137 | top: 0; 138 | left: 0; 139 | width: 100%; 140 | margin-left: 0; 141 | } 142 | } 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/main.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | // The main form. 4 | // Most of the styles for display of the main form come from the display 5 | // controller (lightbox and envelope are the two built in options). 6 | div.DTE_Body { 7 | padding: 50px 0; // space for hte header and footer which are position: absolute 8 | 9 | div.DTE_Body_Content { 10 | position: relative; 11 | overflow: auto; 12 | 13 | div.DTE_Form_Info { 14 | padding: 1em 1em 0 1em; 15 | margin: 0; 16 | } 17 | 18 | div.DTE_Field { 19 | position: relative; 20 | zoom: 1; 21 | 22 | clear: both; 23 | padding: 5px 20%; 24 | border: 1px solid transparent; 25 | 26 | &:after { 27 | display: block; 28 | content: "."; 29 | height: 0; 30 | line-height: 0; 31 | clear: both; 32 | visibility: hidden; 33 | } 34 | 35 | &:hover { 36 | background-color: #f9f9f9; 37 | border: 1px solid #f3f3f3; 38 | } 39 | 40 | >label { 41 | float: left; 42 | width: 40%; 43 | padding-top: 6px; 44 | } 45 | 46 | >div.DTE_Field_Input { 47 | float: right; 48 | width: 60%; 49 | } 50 | 51 | // Field in error state 52 | &.DTE_Field_StateError { } 53 | 54 | &.full { 55 | padding: 5px 0 5px 20%; 56 | 57 | >label { 58 | width: 30%; 59 | } 60 | 61 | >div.DTE_Field_Input { 62 | width: 70%; 63 | } 64 | } 65 | 66 | &.block { 67 | >div.DTE_Field_Input { 68 | float: none; 69 | clear: both; 70 | width: 100%; 71 | } 72 | } 73 | } 74 | } 75 | } 76 | 77 | html[dir="rtl"] { 78 | div.DTE_Body div.DTE_Body_Content div.DTE_Field { 79 | > label { 80 | float: right; 81 | } 82 | 83 | >div.DTE_Field_Input { 84 | float: left; 85 | } 86 | } 87 | 88 | div.DTE div.DTE_Form_Buttons button { 89 | float: left; 90 | } 91 | } 92 | 93 | // iPad in portrait 94 | @media only screen 95 | and (max-width : 768px) { 96 | div.DTE_Body { 97 | div.DTE_Body_Content { 98 | div.DTE_Field { 99 | padding: 5px 10%; 100 | 101 | &.full { 102 | padding: 5px 0 5px 10%; 103 | 104 | >label { 105 | width: 35.5%; 106 | } 107 | 108 | >div.DTE_Field_Input { 109 | width: 64.5%; 110 | } 111 | } 112 | 113 | &.block { 114 | >div.DTE_Field_Input { 115 | width: 100%; 116 | } 117 | } 118 | } 119 | } 120 | } 121 | } 122 | 123 | @media only screen 124 | and (max-width : 640px) { 125 | div.DTE_Body { 126 | div.DTE_Body_Content { 127 | div.DTE_Field { 128 | padding: 5px 0; 129 | 130 | &.full { 131 | padding: 5px 0%; 132 | 133 | >label { 134 | width: 40%; 135 | } 136 | 137 | >div.DTE_Field_Input { 138 | width: 60%; 139 | } 140 | } 141 | 142 | &.block { 143 | >div.DTE_Field_Input { 144 | width: 100%; 145 | } 146 | } 147 | } 148 | } 149 | } 150 | } 151 | 152 | // For devices with smaller screens, the fields should be shown stacked 153 | @media only screen 154 | and (max-width : 580px) { 155 | div.DTE_Body { 156 | div.DTE_Body_Content { 157 | div.DTE_Field { 158 | position: relative; 159 | zoom: 1; 160 | 161 | clear: both; 162 | padding: 5px 0; 163 | 164 | >label { 165 | float: none; 166 | width: auto; 167 | padding-top: 0; 168 | } 169 | 170 | >div.DTE_Field_Input { 171 | float: none; 172 | width: auto; 173 | } 174 | 175 | &.full, 176 | &.block { 177 | padding: 5px 0; 178 | 179 | >label, 180 | >div.DTE_Field_Input { 181 | width: 100%; 182 | } 183 | } 184 | } 185 | } 186 | } 187 | } 188 | 189 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/processing.scss: -------------------------------------------------------------------------------- 1 | 2 | div.DTE { 3 | div.DTE_Processing_Indicator { 4 | position: absolute; 5 | top: 17px; 6 | right: 9px; 7 | height: 2em; 8 | width: 2em; 9 | z-index: 20; 10 | font-size: 12px; 11 | display: none; 12 | 13 | -webkit-transform: translateZ(0); 14 | -ms-transform: translateZ(0); 15 | transform: translateZ(0); 16 | } 17 | 18 | &.processing { 19 | div.DTE_Processing_Indicator { 20 | display: block; 21 | } 22 | } 23 | 24 | &.DTE_Inline { 25 | div.DTE_Processing_Indicator { 26 | top: 5px; 27 | right: 6px; 28 | font-size: 6px; 29 | } 30 | } 31 | 32 | &.DTE_Bubble { 33 | div.DTE_Processing_Indicator { 34 | top: 10px; 35 | right: 14px; 36 | font-size: 8px; 37 | } 38 | } 39 | 40 | div.DTE_Processing_Indicator span, 41 | div.DTE_Processing_Indicator:before, 42 | div.DTE_Processing_Indicator:after { 43 | display: block; 44 | background: black; 45 | width: 0.5em; 46 | height: 1.5em; 47 | border: 1px solid rgba( 0, 0, 0, 0.4 ); 48 | background-color: rgba( 0, 0, 0, 0.1 ); 49 | 50 | -webkit-animation: editorProcessing 0.9s infinite ease-in-out; 51 | animation: editorProcessing 0.9s infinite ease-in-out; 52 | } 53 | 54 | div.DTE_Processing_Indicator:before, 55 | div.DTE_Processing_Indicator:after { 56 | position: absolute; 57 | top: 0; 58 | content: ''; 59 | } 60 | 61 | div.DTE_Processing_Indicator:before { 62 | left: -1em; 63 | -webkit-animation-delay: -0.3s; 64 | animation-delay: -0.3s; 65 | } 66 | 67 | div.DTE_Processing_Indicator span { 68 | -webkit-animation-delay: -0.15s; 69 | animation-delay: -0.15s; 70 | } 71 | 72 | div.DTE_Processing_Indicator:after { 73 | left: 1em; 74 | } 75 | 76 | @-webkit-keyframes editorProcessing { 77 | 0%, 78 | 80%, 79 | 100% { 80 | transform: scale(1, 1); 81 | } 82 | 40% { 83 | transform: scale(1, 1.5); 84 | } 85 | } 86 | @keyframes editorProcessing { 87 | 0%, 88 | 80%, 89 | 100% { 90 | transform: scale(1, 1); 91 | } 92 | 40% { 93 | transform: scale(1, 1.5); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/css/scss/upload.scss: -------------------------------------------------------------------------------- 1 | 2 | div.DTE div.editor_upload { 3 | padding-top: 4px; 4 | 5 | div.eu_table { 6 | display: table; 7 | width: 100%; 8 | } 9 | 10 | div.row { 11 | display: table-row; 12 | } 13 | 14 | div.cell { 15 | display: table-cell; 16 | position: relative; 17 | width: 50%; 18 | vertical-align: top; 19 | } 20 | 21 | div.cell + div.cell { 22 | padding-left: 10px; 23 | } 24 | 25 | div.row + div.row { 26 | div.cell { 27 | padding-top: 10px; 28 | } 29 | } 30 | 31 | button.btn, 32 | input[type=file] { 33 | width: 100%; 34 | height: 2.3em; 35 | font-size: 0.8em; 36 | text-align: center; 37 | line-height: 1em; 38 | } 39 | 40 | input[type=file] { 41 | position: absolute; 42 | top: 0; 43 | left: 0; 44 | width: 100%; 45 | opacity: 0; 46 | } 47 | 48 | div.drop { 49 | position: relative; 50 | box-sizing: border-box; 51 | width: 100%; 52 | height: 100%; 53 | border: 3px dashed #ccc; 54 | border-radius: 6px; 55 | min-height: 4em; 56 | color: #999; 57 | padding-top: 3px; 58 | text-align: center; 59 | 60 | &.over { 61 | border: 3px dashed #111; 62 | color: #111; 63 | } 64 | 65 | span { 66 | max-width: 75%; 67 | font-size: 0.85em; 68 | line-height: 1em; 69 | } 70 | } 71 | 72 | div.rendered { 73 | img { 74 | max-width: 8em; 75 | margin: 0 auto; 76 | } 77 | } 78 | 79 | &.noDrop { 80 | div.drop { 81 | display: none; 82 | } 83 | 84 | div.row.second { 85 | display: none; 86 | } 87 | 88 | div.rendered { 89 | margin-top: 10px; 90 | } 91 | } 92 | 93 | &.noClear { 94 | div.clearValue button { 95 | display: none; 96 | } 97 | } 98 | 99 | &.multi { 100 | div.cell { 101 | display: block; 102 | width: 100%; 103 | 104 | div.drop { 105 | min-height: 0; 106 | padding-bottom: 5px; 107 | } 108 | } 109 | 110 | div.clearValue { 111 | display: none; 112 | } 113 | 114 | ul { 115 | list-style-type: none; 116 | margin: 0; 117 | padding: 0; 118 | 119 | li { 120 | position: relative; 121 | margin-top: 0.5em; 122 | 123 | &:first-child { 124 | margin-top: 0; 125 | } 126 | 127 | img { 128 | vertical-align: middle; 129 | } 130 | 131 | button { 132 | position: absolute; 133 | width: 40px; 134 | right: 0; 135 | top: 50%; 136 | margin-top: -1.5em; 137 | } 138 | } 139 | } 140 | } 141 | } 142 | 143 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Bootstrap integration for DataTables' Editor 3 | ©2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-editor"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net-bs")(a,d).$;d.fn.dataTable.Editor||require("datatables.net-editor")(a,d);return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d){a=c.fn.dataTable;a.Editor.defaults.display="bootstrap";var e=a.Editor.defaults.i18n; 6 | e.create.title="

"+e.create.title+"

";e.edit.title="

"+e.edit.title+"

";e.remove.title="

"+e.remove.title+"

";if(e=a.TableTools)e.BUTTONS.editor_create.formButtons[0].className="btn btn-primary",e.BUTTONS.editor_edit.formButtons[0].className="btn btn-primary",e.BUTTONS.editor_remove.formButtons[0].className="btn btn-danger";c.extend(!0,c.fn.dataTable.Editor.classes,{header:{wrapper:"DTE_Header modal-header"},body:{wrapper:"DTE_Body modal-body"},footer:{wrapper:"DTE_Footer modal-footer"}, 7 | form:{tag:"form-horizontal",button:"btn btn-default"},field:{wrapper:"DTE_Field",label:"col-lg-4 control-label",input:"col-lg-8 controls",error:"error has-error","msg-labelInfo":"help-block","msg-info":"help-block","msg-message":"help-block","msg-error":"help-block",multiValue:"well well-sm multi-value",multiInfo:"small",multiRestore:"well well-sm multi-restore"}});c.extend(!0,a.ext.buttons,{create:{formButtons:{className:"btn-primary"}},edit:{formButtons:{className:"btn-primary"}},remove:{formButtons:{className:"btn-danger"}}}); 8 | var b;a.Editor.display.bootstrap=c.extend(!0,{},a.Editor.models.displayController,{init:function(a){if(!b._dom.content){b._dom.content=c('');b._dom.close.click(function(){b._dte.close("icon")});c(d).on("click","div.modal",function(a){c(a.target).hasClass("modal")&&b._shown&&b._dte.background()})}a.on("open.dtebs",function(b,a){(a==="inline"||a==="bubble")&& 9 | c("div.DTE input:not([type=checkbox]):not([type=radio]), div.DTE select, div.DTE textarea").addClass("form-control")});return b},open:function(a,e,d){if(b._shown)d&&d();else{b._dte=a;b._shown=true;a=b._dom.content.find("div.modal-content");a.children().detach();a.append(e);c("div.modal-header",e).prepend(b._dom.close);c(b._dom.content).one("shown.bs.modal",function(){b._dte.s.setFocus&&b._dte.s.setFocus.focus();d&&d()}).one("hidden",function(){b._shown=false}).appendTo("body").modal({backdrop:"static", 10 | keyboard:false});c("input:not([type=checkbox]):not([type=radio]), select, textarea",b._dom.content).addClass("form-control")}},close:function(a,d){if(b._shown){c(b._dom.content).one("hidden.bs.modal",function(){c(this).detach()}).modal("hide");b._dte=a;b._shown=false}d&&d()},node:function(){return b._dom.content[0]},_shown:!1,_dte:null,_dom:{}});b=a.Editor.display.bootstrap;return a.Editor}); 11 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.bootstrap4.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Bootstrap integration for DataTables' Editor 3 | ©2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-editor"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net-bs4")(a,d).$;d.fn.dataTable.Editor||require("datatables.net-editor")(a,d);return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d){a=c.fn.dataTable;a.Editor.defaults.display="bootstrap";var e=a.Editor.defaults.i18n; 6 | e.create.title='";e.edit.title='";e.remove.title='";if(e=a.TableTools)e.BUTTONS.editor_create.formButtons[0].className="btn btn-primary",e.BUTTONS.editor_edit.formButtons[0].className="btn btn-primary",e.BUTTONS.editor_remove.formButtons[0].className="btn btn-danger";c.extend(!0,c.fn.dataTable.Editor.classes,{header:{wrapper:"DTE_Header modal-header"},body:{wrapper:"DTE_Body modal-body"}, 7 | footer:{wrapper:"DTE_Footer modal-footer"},form:{tag:"form-horizontal",button:"btn btn-default"},field:{wrapper:"DTE_Field form-group row",label:"col-lg-4 col-form-label",input:"col-lg-8",error:"error has-error","msg-labelInfo":"form-text text-secondary","msg-info":"form-text text-secondary","msg-message":"form-text text-secondary","msg-error":"form-text text-danger",multiValue:"card multi-value",multiInfo:"small",multiRestore:"card multi-restore"}});c.extend(!0,a.ext.buttons,{create:{formButtons:{className:"btn-primary"}}, 8 | edit:{formButtons:{className:"btn-primary"}},remove:{formButtons:{className:"btn-danger"}}});var b;a.Editor.display.bootstrap=c.extend(!0,{},a.Editor.models.displayController,{init:function(a){if(!b._dom.content){b._dom.content=c('');b._dom.close.click(function(){b._dte.close("icon")});c(d).on("click","div.modal",function(a){c(a.target).hasClass("modal")&& 9 | b._shown&&b._dte.background()})}a.on("open.dtebs",function(b,a){(a==="inline"||a==="bubble")&&c("div.DTE input:not([type=checkbox]):not([type=radio]), div.DTE select, div.DTE textarea").addClass("form-control")});return b},open:function(a,e,d){if(b._shown)d&&d();else{b._dte=a;b._shown=true;a=b._dom.content.find("div.modal-content");a.children().detach();a.append(e);c("div.modal-header",e).append(b._dom.close);c(b._dom.content).one("shown.bs.modal",function(){b._dte.s.setFocus&&b._dte.s.setFocus.focus(); 10 | d&&d()}).one("hidden",function(){b._shown=false}).appendTo("body").modal({backdrop:"static",keyboard:false});c("input:not([type=checkbox]):not([type=radio]), select, textarea",b._dom.content).addClass("form-control")}},close:function(a,d){if(b._shown){c(b._dom.content).one("hidden.bs.modal",function(){c(this).detach()}).modal("hide");b._dte=a;b._shown=false}d&&d()},node:function(){return b._dom.content[0]},_shown:!1,_dte:null,_dom:{}});b=a.Editor.display.bootstrap;return a.Editor}); 11 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.foundation.js: -------------------------------------------------------------------------------- 1 | /*! Foundation integration for DataTables' Editor 2 | * ©2015 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | (function( factory ){ 6 | if ( typeof define === 'function' && define.amd ) { 7 | // AMD 8 | define( ['jquery', 'datatables.net-zf', 'datatables.net-editor'], function ( $ ) { 9 | return factory( $, window, document ); 10 | } ); 11 | } 12 | else if ( typeof exports === 'object' ) { 13 | // CommonJS 14 | module.exports = function (root, $) { 15 | if ( ! root ) { 16 | root = window; 17 | } 18 | 19 | if ( ! $ || ! $.fn.dataTable ) { 20 | $ = require('datatables.net-zf')(root, $).$; 21 | } 22 | 23 | if ( ! $.fn.dataTable.Editor ) { 24 | require('datatables.net-editor')(root, $); 25 | } 26 | 27 | return factory( $, root, root.document ); 28 | }; 29 | } 30 | else { 31 | // Browser 32 | factory( jQuery, window, document ); 33 | } 34 | }(function( $, window, document, undefined ) { 35 | 'use strict'; 36 | var DataTable = $.fn.dataTable; 37 | 38 | 39 | /* 40 | * Set the default display controller to be our foundation control 41 | */ 42 | DataTable.Editor.defaults.display = "foundation"; 43 | 44 | 45 | /* 46 | * Change the default classes from Editor to be classes for Foundation 47 | */ 48 | $.extend( true, $.fn.dataTable.Editor.classes, { 49 | field: { 50 | wrapper: "DTE_Field row", 51 | label: "small-4 columns inline", 52 | input: "small-8 columns", 53 | error: "error", 54 | multiValue: "panel radius multi-value", 55 | multiInfo: "small", 56 | multiRestore: "panel radius multi-restore", 57 | "msg-labelInfo": "label secondary", 58 | "msg-info": "label secondary", 59 | "msg-message": "label secondary", 60 | "msg-error": "label alert" 61 | }, 62 | form: { 63 | button: "button small" 64 | } 65 | } ); 66 | 67 | 68 | /* 69 | * Foundation display controller - this is effectively a proxy to the Foundation 70 | * modal control. 71 | */ 72 | var self; 73 | 74 | DataTable.Editor.display.foundation = $.extend( true, {}, DataTable.Editor.models.displayController, { 75 | /* 76 | * API methods 77 | */ 78 | "init": function ( dte ) { 79 | self._dom.content = $( 80 | '
' 81 | ); 82 | self._dom.close = $('
'); 83 | 84 | self._dom.close.click( function () { 85 | self._dte.close('icon'); 86 | } ); 87 | 88 | return self; 89 | }, 90 | 91 | "open": function ( dte, append, callback ) { 92 | if ( self._shown ) { 93 | if ( callback ) { 94 | callback(); 95 | } 96 | return; 97 | } 98 | 99 | self._dte = dte; 100 | self._shown = true; 101 | 102 | var content = self._dom.content; 103 | content.children().detach(); 104 | content.append( append ); 105 | content.prepend( self._dom.close ); 106 | 107 | $(self._dom.content) 108 | .one('opened.fndtn.reveal', function () { 109 | if ( callback ) { 110 | callback(); 111 | } 112 | }) 113 | .one('closed.fndtn.reveal', function () { 114 | self._shown = false; 115 | }); 116 | 117 | if ( window.Foundation && window.Foundation.Reveal ) { 118 | // Foundation 6 119 | if ( ! self._reveal ) { 120 | self._reveal = new window.Foundation.Reveal( self._dom.content, { 121 | closeOnClick: false 122 | } ); 123 | } 124 | 125 | $(self._dom.content).appendTo('body'); 126 | self._reveal.open(); 127 | } 128 | else { 129 | // Foundation 5 130 | $(self._dom.content).foundation( 'reveal','open' ); 131 | } 132 | 133 | $(document).on('click.dte-zf', 'div.reveal-modal-bg, div.reveal-overlay', function () { 134 | self._dte.background(); 135 | } ); 136 | }, 137 | 138 | "close": function ( dte, callback ) { 139 | if ( !self._shown ) { 140 | if ( callback ) { 141 | callback(); 142 | } 143 | return; 144 | } 145 | 146 | if ( self._reveal ) { 147 | self._reveal.close(); 148 | } 149 | else { 150 | $(self._dom.content).foundation( 'reveal', 'close' ); 151 | } 152 | 153 | $(document).off( 'click.dte-zf' ); 154 | 155 | self._dte = dte; 156 | self._shown = false; 157 | 158 | if ( callback ) { 159 | callback(); 160 | } 161 | }, 162 | 163 | node: function ( dte ) { 164 | return self._dom.content[0]; 165 | }, 166 | 167 | 168 | /* 169 | * Private properties 170 | */ 171 | "_shown": false, 172 | "_dte": null, 173 | "_dom": {} 174 | } ); 175 | 176 | self = DataTable.Editor.display.foundation; 177 | 178 | 179 | return DataTable.Editor; 180 | })); 181 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.foundation.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Foundation integration for DataTables' Editor 3 | ©2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-zf","datatables.net-editor"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,d){c||(c=window);if(!d||!d.fn.dataTable)d=require("datatables.net-zf")(c,d).$;d.fn.dataTable.Editor||require("datatables.net-editor")(c,d);return b(d,c,c.document)}:b(jQuery,window,document)})(function(b,c,d){var e=b.fn.dataTable;e.Editor.defaults.display="foundation";b.extend(!0,b.fn.dataTable.Editor.classes, 6 | {field:{wrapper:"DTE_Field row",label:"small-4 columns inline",input:"small-8 columns",error:"error",multiValue:"panel radius multi-value",multiInfo:"small",multiRestore:"panel radius multi-restore","msg-labelInfo":"label secondary","msg-info":"label secondary","msg-message":"label secondary","msg-error":"label alert"},form:{button:"button small"}});var a;e.Editor.display.foundation=b.extend(!0,{},e.Editor.models.displayController,{init:function(){a._dom.content=b('
'); 7 | a._dom.close=b('
');a._dom.close.click(function(){a._dte.close("icon")});return a},open:function(f,e,g){if(a._shown)g&&g();else{a._dte=f;a._shown=true;f=a._dom.content;f.children().detach();f.append(e);f.prepend(a._dom.close);b(a._dom.content).one("opened.fndtn.reveal",function(){g&&g()}).one("closed.fndtn.reveal",function(){a._shown=false});if(c.Foundation&&c.Foundation.Reveal){if(!a._reveal)a._reveal=new c.Foundation.Reveal(a._dom.content,{closeOnClick:false}); 8 | b(a._dom.content).appendTo("body");a._reveal.open()}else b(a._dom.content).foundation("reveal","open");b(d).on("click.dte-zf","div.reveal-modal-bg, div.reveal-overlay",function(){a._dte.background()})}},close:function(c,e){if(a._shown){a._reveal?a._reveal.close():b(a._dom.content).foundation("reveal","close");b(d).off("click.dte-zf");a._dte=c;a._shown=false}e&&e()},node:function(){return a._dom.content[0]},_shown:!1,_dte:null,_dom:{}});a=e.Editor.display.foundation;return e.Editor}); 9 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.jqueryui.js: -------------------------------------------------------------------------------- 1 | /*! jQuery UI integration for DataTables' Editor 2 | * ©2015 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | (function( factory ){ 6 | if ( typeof define === 'function' && define.amd ) { 7 | // AMD 8 | define( ['jquery', 'datatables.net-jqui', 'datatables.net-editor'], function ( $ ) { 9 | return factory( $, window, document ); 10 | } ); 11 | } 12 | else if ( typeof exports === 'object' ) { 13 | // CommonJS 14 | module.exports = function (root, $) { 15 | if ( ! root ) { 16 | root = window; 17 | } 18 | 19 | if ( ! $ || ! $.fn.dataTable ) { 20 | $ = require('datatables.net-jqui')(root, $).$; 21 | } 22 | 23 | if ( ! $.fn.dataTable.Editor ) { 24 | require('datatables.net-editor')(root, $); 25 | } 26 | 27 | return factory( $, root, root.document ); 28 | }; 29 | } 30 | else { 31 | // Browser 32 | factory( jQuery, window, document ); 33 | } 34 | }(function( $, window, document, undefined ) { 35 | 'use strict'; 36 | var DataTable = $.fn.dataTable; 37 | 38 | 39 | var Editor = DataTable.Editor; 40 | var doingClose = false; 41 | 42 | /* 43 | * Set the default display controller to be our foundation control 44 | */ 45 | Editor.defaults.display = "jqueryui"; 46 | 47 | /* 48 | * Change the default classes from Editor to be classes for Bootstrap 49 | */ 50 | $.extend( true, $.fn.dataTable.Editor.classes, { 51 | form: { 52 | button: "btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" 53 | } 54 | } ); 55 | 56 | /* 57 | * jQuery UI display controller - this is effectively a proxy to the jQuery UI 58 | * modal control. 59 | */ 60 | Editor.display.jqueryui = $.extend( true, {}, Editor.models.displayController, { 61 | init: function ( dte ) { 62 | dte.__dialouge = $('
') 63 | .css('display', 'none') 64 | .appendTo('body') 65 | .dialog( $.extend( true, Editor.display.jqueryui.modalOptions, { 66 | autoOpen: false, 67 | buttons: { "A": function () {} }, // fake button so the button container is created 68 | closeOnEscape: false // allow editor's escape function to run 69 | } ) ); 70 | 71 | // Need to know when the dialogue is closed using its own trigger 72 | // so we can reset the form 73 | $(dte.__dialouge).on( 'dialogclose', function (e) { 74 | if ( ! doingClose ) { 75 | dte.close(); 76 | } 77 | } ); 78 | 79 | return Editor.display.jqueryui; 80 | }, 81 | 82 | open: function ( dte, append, callback ) { 83 | dte.__dialouge 84 | .append( append ) 85 | .dialog( 'open' ); 86 | 87 | $(dte.dom.formError).appendTo( 88 | dte.__dialouge.parent().find('div.ui-dialog-buttonpane') 89 | ); 90 | 91 | dte.__dialouge.parent().find('.ui-dialog-title').html( dte.dom.header.innerHTML ); 92 | dte.__dialouge.parent().addClass('DTED'); 93 | 94 | // Modify the Editor buttons to be jQuery UI suitable 95 | var buttons = $(dte.dom.buttons) 96 | .children() 97 | .addClass( 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only' ) 98 | .each( function () { 99 | $(this).wrapInner( '' ); 100 | } ); 101 | 102 | // Move the buttons into the jQuery UI button set 103 | dte.__dialouge.parent().find('div.ui-dialog-buttonset') 104 | .empty() 105 | .append( buttons.parent() ); 106 | 107 | if ( callback ) { 108 | callback(); 109 | } 110 | }, 111 | 112 | close: function ( dte, callback ) { 113 | if ( dte.__dialouge ) { 114 | // Don't want to trigger a close() call from dialogclose! 115 | doingClose = true; 116 | dte.__dialouge.dialog( 'close' ); 117 | doingClose = false; 118 | } 119 | 120 | if ( callback ) { 121 | callback(); 122 | } 123 | }, 124 | 125 | node: function ( dte ) { 126 | return dte.__dialouge[0]; 127 | }, 128 | 129 | // jQuery UI dialogues perform their own focus capture 130 | captureFocus: false 131 | } ); 132 | 133 | 134 | Editor.display.jqueryui.modalOptions = { 135 | width: 600, 136 | modal: true 137 | }; 138 | 139 | 140 | return DataTable.Editor; 141 | })); 142 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.jqueryui.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | jQuery UI integration for DataTables' Editor 3 | ©2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-jqui","datatables.net-editor"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,a){c||(c=window);if(!a||!a.fn.dataTable)a=require("datatables.net-jqui")(c,a).$;a.fn.dataTable.Editor||require("datatables.net-editor")(c,a);return b(a,c,c.document)}:b(jQuery,window,document)})(function(b){var c=b.fn.dataTable,a=c.Editor,e=!1;a.defaults.display="jqueryui";b.extend(!0,b.fn.dataTable.Editor.classes, 6 | {form:{button:"btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"}});a.display.jqueryui=b.extend(!0,{},a.models.displayController,{init:function(d){d.__dialouge=b("
").css("display","none").appendTo("body").dialog(b.extend(true,a.display.jqueryui.modalOptions,{autoOpen:false,buttons:{A:function(){}},closeOnEscape:false}));b(d.__dialouge).on("dialogclose",function(){e||d.close()});return a.display.jqueryui},open:function(d,a,c){d.__dialouge.append(a).dialog("open");b(d.dom.formError).appendTo(d.__dialouge.parent().find("div.ui-dialog-buttonpane")); 7 | d.__dialouge.parent().find(".ui-dialog-title").html(d.dom.header.innerHTML);d.__dialouge.parent().addClass("DTED");a=b(d.dom.buttons).children().addClass("ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only").each(function(){b(this).wrapInner('')});d.__dialouge.parent().find("div.ui-dialog-buttonset").empty().append(a.parent());c&&c()},close:function(a,b){if(a.__dialouge){e=true;a.__dialouge.dialog("close");e=false}b&&b()},node:function(a){return a.__dialouge[0]}, 8 | captureFocus:!1});a.display.jqueryui.modalOptions={width:600,modal:!0};return c.Editor}); 9 | -------------------------------------------------------------------------------- /public/vendor/datatables-editor/js/editor.semanticui.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Bootstrap integration for DataTables' Editor 3 | ©2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-editor"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net-se")(a,d).$;d.fn.dataTable.Editor||require("datatables.net-editor")(a,d);return c(d,a,a.document)}:c(jQuery,window,document)})(function(c,a,d){a=c.fn.dataTable;a.Editor.defaults.display="semanticui";c.extend(!0,c.fn.dataTable.Editor.classes, 6 | {header:{wrapper:"DTE_Header header"},body:{wrapper:"DTE_Body content"},footer:{wrapper:"DTE_Footer actions"},form:{tag:"ui form",button:"ui button",content:"DTE_Form_Content"},field:{wrapper:"DTE_Field inline fields",label:"right aligned five wide field",input:"eight wide field DTE_Field_Input",error:"error has-error","msg-labelInfo":"ui small","msg-info":"ui small","msg-message":"ui message small","msg-error":"ui error message small",multiValue:"ui message multi-value",multiInfo:"small",multiRestore:"ui message multi-restore"}, 7 | inline:{wrapper:"DTE DTE_Inline ui form"},bubble:{table:"DTE_Bubble_Table ui form",bg:"ui dimmer modals page transition visible active"}});c.extend(!0,a.ext.buttons,{create:{formButtons:{className:"primary"}},edit:{formButtons:{className:"primary"}},remove:{formButtons:{className:"negative"}}});var b;a.Editor.display.semanticui=c.extend(!0,{},a.Editor.models.displayController,{init:function(){if(!b._dom.modal){b._dom.modal=c('');b._dom.close=c('').click(function(){b._dte.close("icon"); 8 | return false});c(d).on("click","div.ui.dimmer.modals",function(a){c(a.target).hasClass("modal")&&b._shown&&b._dte.background()})}return b},open:function(a,d,e){if(b._shown)e&&e();else{b._dte=a;b._shown=true;var a=b._dom.modal,f=c(d).children();a.children().detach();a.append(f).prepend(a.children(".header")).addClass(d.className).prepend(b._dom.close);c(b._dom.modal).appendTo("body").modal("setting",{dimmerSettings:{closable:false},onVisible:function(){b._dte.s.setFocus&&b._dte.s.setFocus.focus(); 9 | e&&e()},onHidden:function(){c(d).append(f);c(this).detach();b._shown=false}}).modal("show")}},close:function(a,c){var d=b._dom.modal;if(b._shown){d.modal("hide");b._dte=a;b._shown=false}c&&c()},node:function(){return b._dom.modal[0]},_shown:!1,_dte:null,_dom:{}});b=a.Editor.display.semanticui;return a.Editor}); 10 | -------------------------------------------------------------------------------- /public/vendor/datatables-plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('