├── .gitignore ├── src ├── less │ ├── variables.less │ └── fs-modal.less └── js │ └── fs-modal.js ├── package.json ├── Gruntfile.js ├── LICENSE.txt ├── dist ├── css │ ├── fs-modal.min.css │ └── fs-modal.css └── js │ └── fs-modal.min.js ├── README.md └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /temp 3 | -------------------------------------------------------------------------------- /src/less/variables.less: -------------------------------------------------------------------------------- 1 | @modal-fullscreen-mobile-header-height: 50px; 2 | @modal-fullscreen-mobile-content-padding: 7px; 3 | @modal-fullscreen-mobile-header-background: #f8f8f8; 4 | @modal-fullscreen-mobile-header-border-color: #e7e7e7; 5 | @modal-fullscreen-mobile-header-font-size: 22px; 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-fs-modal", 3 | "version": "0.3.6", 4 | "license": "MIT", 5 | "description": "A simple way to improve Bootstrap modals UX on mobile phones", 6 | "author": { 7 | "name": "Oleksandr Popov", 8 | "url": "github.com/keaukraine/" 9 | }, 10 | "repository" : 11 | { 12 | "type" : "git", 13 | "url" : "https://github.com/keaukraine/bootstrap-fs-modal.git" 14 | }, 15 | "devDependencies": {}, 16 | "dependencies": { 17 | "bootstrap": "^3.3.7", 18 | "grunt": "^1.0.1", 19 | "grunt-contrib-cssmin": "^2.2.0", 20 | "grunt-contrib-less": "^1.4.1", 21 | "grunt-contrib-uglify": "^3.0.1" 22 | }, 23 | "keywords": [ 24 | "twitter", 25 | "bootstrap", 26 | "modal", 27 | "responsive", 28 | "mobile", 29 | "javascript", 30 | "jquery", 31 | "jquery-plugin" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | grunt.initConfig({ 3 | less: { 4 | development: { 5 | files: { 6 | 'dist/css/fs-modal.css': 'src/less/fs-modal.less' 7 | } 8 | } 9 | }, 10 | cssmin: { 11 | target: { 12 | files: { 13 | 'dist/css/fs-modal.min.css': ['dist/css/fs-modal.css'] 14 | } 15 | } 16 | }, 17 | uglify: { 18 | my_target: { 19 | files: { 20 | 'dist/js/fs-modal.min.js': ['src/js/fs-modal.js'], 21 | }, 22 | }, 23 | } 24 | }); 25 | 26 | grunt.loadNpmTasks('grunt-contrib-less'); 27 | grunt.loadNpmTasks('grunt-contrib-cssmin'); 28 | grunt.loadNpmTasks('grunt-contrib-uglify'); 29 | 30 | grunt.registerTask('default', ['less', 'cssmin', 'uglify']); 31 | }; 32 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Oleksandr Popov 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 4 | files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 5 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software 6 | is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 11 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 12 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 13 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | -------------------------------------------------------------------------------- /dist/css/fs-modal.min.css: -------------------------------------------------------------------------------- 1 | @media (max-width:992px){.modal.modal-fullscreen{box-shadow:0 0 0 100px #fff}.modal.modal-fullscreen .modal-dialog{margin:0;width:100%;height:100%}.modal.modal-fullscreen .modal-dialog .modal-content{border:none;border-radius:0;box-shadow:none;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header{position:absolute;left:0;right:0;top:0;z-index:1;height:50px;padding:0;line-height:50px;background-color:#f8f8f8;border-color:#e7e7e7}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .modal-title{display:inline-block;line-height:50px;position:absolute}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .btn{vertical-align:top;height:50px}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .btn .glyphicon{font-size:22px}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .close{display:none}.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .fullscreen-buttons{position:relative;z-index:1;background-color:#f8f8f8;height:calc(49px)}.modal.modal-fullscreen .modal-dialog .modal-content .modal-body{position:absolute;top:50px;left:0;right:0;bottom:0;overflow:scroll;padding:7px}.modal.modal-fullscreen .modal-dialog .modal-content .modal-footer{display:none}}@media (min-width:992px){.modal.modal-fullscreen .modal-dialog .modal-content .modal-header .btn{display:none}} -------------------------------------------------------------------------------- /dist/js/fs-modal.min.js: -------------------------------------------------------------------------------- 1 | $(function(){var t=0;$("body").on("show.bs.modal",".modal.modal-fullscreen",function(){var a,o=$(this),n=o.find('.modal-footer .btn:not([data-dismiss="modal"])');o.find(".modal-header .pull-right, .modal-header [data-additional-close]").remove(),$('