├── samples ├── alert_medium.png ├── alert_small.png ├── 02_alert.html ├── 03_confirm.html ├── 01_info.html ├── 05_modalbox_reuse.html ├── 05_modalbox.html └── 04_skins.html ├── license.txt ├── codebase ├── themes │ ├── message_skyblue.css │ ├── message_solid.css │ ├── message_growl_shiny.css │ ├── message_growl_dark.css │ └── message_default.css └── message.js └── README.md /samples/alert_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DHTMLX/message/HEAD/samples/alert_medium.png -------------------------------------------------------------------------------- /samples/alert_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DHTMLX/message/HEAD/samples/alert_small.png -------------------------------------------------------------------------------- /samples/02_alert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | -------------------------------------------------------------------------------- /samples/03_confirm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by dhtmlx.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /samples/01_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 | 48 | 49 | -------------------------------------------------------------------------------- /samples/05_modalbox_reuse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 27 | 28 | 29 | Create once, use multiple times 30 | 31 | 32 |
33 | 43 | 44 | 45 | 52 | 53 | -------------------------------------------------------------------------------- /samples/05_modalbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 27 | 28 | 29 |
30 |
31 |
32 | 33 |
34 | 35 | 83 | 84 | -------------------------------------------------------------------------------- /samples/04_skins.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Message - info 5 | 6 | 7 | 8 | 9 | 10 | 11 | 26 | 35 | 36 | 37 | 38 | 39 |
40 | Skin 41 | 48 |
49 | 50 |
51 | Message 52 |
53 |
54 |
55 |
56 | 57 |
58 | Alert 59 |
60 |
61 |
62 |
63 |
64 | 65 |
66 | Confirm 67 |
68 |
69 |
70 |
71 |
72 | 73 | 74 | 75 | 76 | 105 | 106 | -------------------------------------------------------------------------------- /codebase/themes/message_skyblue.css: -------------------------------------------------------------------------------- 1 | .dhtmlx_message_area{ 2 | position:fixed; 3 | right:5px; 4 | width:250px; 5 | z-index:1000; 6 | } 7 | 8 | .dhtmlx-info{ 9 | min-width: 120px; 10 | min-height: 20px; 11 | padding:4px 4px 4px 20px; 12 | font-family:Tahoma; 13 | z-index: 10000; 14 | 15 | margin:5px; 16 | margin-bottom:10px; 17 | 18 | -webkit-transition: all .5s ease; 19 | -moz-transition: all .5s ease; 20 | -o-transition: all .5s ease; 21 | transition: all .5s ease; 22 | } 23 | .dhtmlx-info.hidden{ 24 | height:0px; 25 | min-height: 0px; 26 | padding-top:0px; 27 | padding-bottom:0px; 28 | border-width:0px; 29 | margin-top:0px; 30 | margin-bottom:0px; 31 | overflow:hidden; 32 | } 33 | 34 | .dhtmlx_modal_box{ 35 | overflow:hidden; 36 | display: inline-block; 37 | min-width: 300px; 38 | width: 300px; 39 | text-align: center; 40 | position:fixed; 41 | 42 | background-color: #fff; 43 | background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 44 | background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 45 | box-shadow: 0px 0px 14px #888; 46 | 47 | font-family: Tahoma; 48 | 49 | z-index:20000; 50 | 51 | border-radius:6px; 52 | border: 1px solid #ffffff; 53 | } 54 | 55 | .dhtmlx_popup_title{ 56 | border-top-left-radius:5px; 57 | border-top-right-radius:5px; 58 | 59 | border-width:0px; 60 | background-color: #4c4c4c; 61 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAARElEQVR4nH3MMQqAQBQD0dnZBTvvf80tBBEhNh9EFKuERwhz2z3OGDA0EwxI5aelvDq/hkn54+O210dtujjEYXN0XJdc1CE1MA5mcdsAAAAASUVORK5CYII=); 62 | } 63 | 64 | .dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{ 65 | user-select: none; 66 | -webkit-user-select: none; 67 | -moz-user-select:-moz-none; 68 | 69 | cursor:pointer; 70 | } 71 | 72 | .dhtmlx_popup_text{ 73 | overflow:hidden; 74 | } 75 | 76 | .dhtmlx_popup_controls{ 77 | border-radius:6px; 78 | padding:5px; 79 | } 80 | 81 | .dhtmlx_popup_button, .dhtmlx_button{ 82 | height: 30px; 83 | line-height:30px; 84 | 85 | display: inline-block; 86 | margin: 0 5px; 87 | border-radius: 6px; 88 | 89 | color:#FFF; 90 | } 91 | .dhtmlx_popup_button{ 92 | min-width: 120px; 93 | } 94 | 95 | div.dhx_modal_cover { 96 | background-color:#000; 97 | cursor:default; 98 | 99 | filter:alpha(opacity = 20); 100 | opacity: 0.2; 101 | 102 | position: fixed; 103 | z-index:19999; 104 | left: 0px; top: 0px; 105 | width: 100%; height: 100%; 106 | 107 | border: none; 108 | zoom: 1; 109 | } 110 | 111 | .dhtmlx-info img, .dhtmlx_modal_box img{ 112 | float:left; 113 | margin-right:20px; 114 | } 115 | .dhtmlx-info img{ 116 | margin-left:-10px; 117 | } 118 | 119 | .dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{ 120 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC); 121 | } 122 | .dhtmlx-alert-error, .dhtmlx-confirm-error { 123 | border: 1px solid #ff0000; 124 | } 125 | 126 | /*Skin section*/ 127 | .dhtmlx_button, .dhtmlx_popup_button{ 128 | box-shadow: 0px 0px 4px #888; 129 | border:1px solid #838383; 130 | } 131 | .dhtmlx_button input, .dhtmlx_popup_button div{ 132 | border:1px solid #FFF; 133 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAIAAABi9+OQAAAAQElEQVR4nE3LMQ7AIAxD0R9TxP3PydalW8xAQJ0i2y/M95ONTOxrlCC7MigdMtz92LxdlKPc/3d7jPqDRgv1xgLuDiwEIl5MZQAAAABJRU5ErkJggg==); 134 | color:#000; 135 | border-radius:6px; 136 | font-size:15px; 137 | 138 | -moz-box-sizing:content-box; 139 | box-sizing:content-box; 140 | 141 | color:#000; padding:0px; margin:0px; 142 | vertical-align:top; 143 | 144 | height:28px; 145 | line-height:28px; 146 | } 147 | 148 | .dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{ 149 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAIAAABi9+OQAAAARklEQVR4nE2LMQ6AIADEykUG3Nz9/yf4Ar8g7K4Oeg4KOFxyTVNyqUrbLoMwAgt4+dt0nT0+IP/cbD0ag0JAabm1xkvn0R7oABW07Ic3sQAAAABJRU5ErkJggg==); 150 | } 151 | .dhtmlx_popup_title{ 152 | color:#000; 153 | 154 | height:40px; line-height:40px; 155 | font-size:20px; 156 | } 157 | .dhtmlx_popup_text{ 158 | margin:15px 15px 5px 15px; 159 | font-size:14px; 160 | color:#000; 161 | min-height:30px; 162 | border-radius:6px; 163 | } 164 | 165 | 166 | .dhtmlx-info, .dhtmlx-error{ 167 | font-size:14px; 168 | color:#000; 169 | box-shadow: 0px 0px 4px #000; 170 | margin-bottom:10px; 171 | 172 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAARElEQVR4nH3MMQqAQBQD0dnZBTvvf80tBBEhNh9EFKuERwhz2z3OGDA0EwxI5aelvDq/hkn54+O210dtujjEYXN0XJdc1CE1MA5mcdsAAAAASUVORK5CYII=); 173 | 174 | background-color:rgba(0,0,0,0.8); 175 | border-radius:5px; 176 | border:2px solid #fff; 177 | } 178 | 179 | .dhtmlx-error{ 180 | color:red; 181 | } 182 | -------------------------------------------------------------------------------- /codebase/themes/message_solid.css: -------------------------------------------------------------------------------- 1 | .dhtmlx_message_area{ 2 | position:fixed; 3 | right:5px; 4 | width:250px; 5 | z-index:1000; 6 | } 7 | 8 | .dhtmlx-info{ 9 | min-width: 120px; 10 | min-height: 20px; 11 | padding:4px 4px 4px 20px; 12 | font-family:Tahoma; 13 | z-index: 10000; 14 | 15 | margin:5px; 16 | margin-bottom:10px; 17 | 18 | -webkit-transition: all .5s ease; 19 | -moz-transition: all .5s ease; 20 | -o-transition: all .5s ease; 21 | transition: all .5s ease; 22 | } 23 | .dhtmlx-info.hidden{ 24 | height:0px; 25 | min-height: 0px; 26 | padding-top:0px; 27 | padding-bottom:0px; 28 | border-width:0px; 29 | margin-top:0px; 30 | margin-bottom:0px; 31 | overflow:hidden; 32 | } 33 | 34 | .dhtmlx_modal_box{ 35 | overflow:hidden; 36 | display: inline-block; 37 | min-width: 300px; 38 | width: 300px; 39 | text-align: center; 40 | position:fixed; 41 | 42 | background-color: #fff; 43 | background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 44 | background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 45 | box-shadow: 0px 0px 14px #888; 46 | 47 | font-family: Tahoma; 48 | 49 | z-index:20000; 50 | 51 | border-radius:6px; 52 | border: 1px solid #ffffff; 53 | } 54 | 55 | .dhtmlx_popup_title{ 56 | border-top-left-radius:5px; 57 | border-top-right-radius:5px; 58 | 59 | border-width:0px; 60 | 61 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC); 62 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 63 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 64 | } 65 | 66 | .dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{ 67 | user-select: none; 68 | -webkit-user-select: none; 69 | -moz-user-select:-moz-none; 70 | 71 | cursor:pointer; 72 | } 73 | 74 | .dhtmlx_popup_text{ 75 | overflow:hidden; 76 | } 77 | 78 | .dhtmlx_popup_controls{ 79 | border-radius:6px; 80 | padding:5px; 81 | } 82 | 83 | .dhtmlx_popup_button, .dhtmlx_button{ 84 | height: 30px; 85 | line-height:30px; 86 | 87 | display: inline-block; 88 | margin: 0 5px; 89 | border-radius: 6px; 90 | 91 | color:#FFF; 92 | } 93 | .dhtmlx_popup_button{ 94 | min-width: 120px; 95 | } 96 | 97 | div.dhx_modal_cover { 98 | background-color:#000; 99 | cursor:default; 100 | 101 | filter:alpha(opacity = 20); 102 | opacity: 0.2; 103 | 104 | position: fixed; 105 | z-index:19999; 106 | left: 0px; top: 0px; 107 | width: 100%; height: 100%; 108 | 109 | border: none; 110 | zoom: 1; 111 | } 112 | 113 | .dhtmlx-info img, .dhtmlx_modal_box img{ 114 | float:left; 115 | margin-right:20px; 116 | } 117 | .dhtmlx-info img{ 118 | margin-left:-10px; 119 | } 120 | 121 | .dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{ 122 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC); 123 | } 124 | .dhtmlx-alert-error, .dhtmlx-confirm-error { 125 | border: 1px solid #ff0000; 126 | } 127 | 128 | /*Skin section*/ 129 | .dhtmlx_button, .dhtmlx_popup_button{ 130 | box-shadow: 0px 0px 4px #888; 131 | border:1px solid #838383; 132 | } 133 | .dhtmlx_button input, .dhtmlx_popup_button div{ 134 | border:1px solid #FFF; 135 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=); 136 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 137 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 138 | 139 | border-radius:6px; 140 | font-size:15px; 141 | 142 | -moz-box-sizing:content-box; 143 | box-sizing:content-box; 144 | 145 | color:#fff; padding:0px; margin:0px; 146 | vertical-align:top; 147 | 148 | height:28px; 149 | line-height:28px; 150 | } 151 | 152 | .dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{ 153 | 154 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==); 155 | background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%); 156 | background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%); 157 | } 158 | .dhtmlx_popup_title{ 159 | color:#fff; 160 | text-shadow: 1px 1px #000; 161 | height:40px; line-height:40px; 162 | font-size:20px; 163 | } 164 | .dhtmlx_popup_text{ 165 | margin:15px 15px 5px 15px; 166 | font-size:14px; 167 | color:#000; 168 | min-height:30px; 169 | border-radius:6px; 170 | } 171 | 172 | 173 | .dhtmlx-info, .dhtmlx-error{ 174 | font-size:14px; 175 | color:#fff; 176 | box-shadow: 0 4px 4px -4px #000; 177 | 178 | border-radius:5px; 179 | 180 | background-color:#000; 181 | background-color:rgba(0,0,0,0.8); 182 | } 183 | 184 | .dhtmlx-error{ 185 | color:#F00; 186 | } 187 | -------------------------------------------------------------------------------- /codebase/themes/message_growl_shiny.css: -------------------------------------------------------------------------------- 1 | .dhtmlx_message_area{ 2 | position:fixed; 3 | right:5px; 4 | width:250px; 5 | z-index:1000; 6 | } 7 | 8 | .dhtmlx-info{ 9 | min-width: 120px; 10 | min-height: 20px; 11 | padding:4px 4px 4px 20px; 12 | font-family:Tahoma; 13 | z-index: 10000; 14 | 15 | margin:5px; 16 | margin-bottom:10px; 17 | 18 | -webkit-transition: all .5s ease; 19 | -moz-transition: all .5s ease; 20 | -o-transition: all .5s ease; 21 | transition: all .5s ease; 22 | } 23 | .dhtmlx-info.hidden{ 24 | height:0px; 25 | min-height: 0px; 26 | padding-top:0px; 27 | padding-bottom:0px; 28 | border-width:0px; 29 | margin-top:0px; 30 | margin-bottom:0px; 31 | overflow:hidden; 32 | } 33 | 34 | .dhtmlx_modal_box{ 35 | overflow:hidden; 36 | display: inline-block; 37 | min-width: 300px; 38 | width: 300px; 39 | text-align: center; 40 | position:fixed; 41 | 42 | background-color: #fff; 43 | background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 44 | background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 45 | box-shadow: 0px 0px 14px #888; 46 | 47 | font-family: Tahoma; 48 | 49 | z-index:20000; 50 | 51 | border-radius:6px; 52 | border: 1px solid #ffffff; 53 | } 54 | 55 | .dhtmlx_popup_title{ 56 | border-top-left-radius:5px; 57 | border-top-right-radius:5px; 58 | 59 | border-width:0px; 60 | 61 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZER 62 | ERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC); 63 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 64 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 65 | } 66 | 67 | .dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{ 68 | user-select: none; 69 | -webkit-user-select: none; 70 | -moz-user-select:-moz-none; 71 | 72 | cursor:pointer; 73 | } 74 | 75 | .dhtmlx_popup_text{ 76 | overflow:hidden; 77 | } 78 | 79 | .dhtmlx_popup_controls{ 80 | border-radius:6px; 81 | padding:5px; 82 | } 83 | 84 | .dhtmlx_popup_button, .dhtmlx_button{ 85 | height: 30px; 86 | line-height:30px; 87 | 88 | display: inline-block; 89 | margin: 0 5px; 90 | border-radius: 6px; 91 | 92 | color:#FFF; 93 | } 94 | .dhtmlx_popup_button{ 95 | min-width: 120px; 96 | } 97 | 98 | div.dhx_modal_cover { 99 | background-color:#000; 100 | cursor:default; 101 | 102 | filter:alpha(opacity = 20); 103 | opacity: 0.2; 104 | 105 | position: fixed; 106 | z-index:19999; 107 | left: 0px; top: 0px; 108 | width: 100%; height: 100%; 109 | 110 | border: none; 111 | zoom: 1; 112 | } 113 | 114 | .dhtmlx-info img, .dhtmlx_modal_box img{ 115 | float:left; 116 | margin-right:20px; 117 | } 118 | .dhtmlx-info img{ 119 | margin-left:-10px; 120 | } 121 | 122 | .dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{ 123 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC); 124 | } 125 | .dhtmlx-alert-error, .dhtmlx-confirm-error { 126 | border: 1px solid #ff0000; 127 | } 128 | 129 | /*Skin section*/ 130 | .dhtmlx_button, .dhtmlx_popup_button{ 131 | box-shadow: 0px 0px 4px #888; 132 | border:1px solid #838383; 133 | } 134 | .dhtmlx_button input, .dhtmlx_popup_button div{ 135 | border:1px solid #FFF; 136 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=); 137 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 138 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 139 | 140 | border-radius:6px; 141 | font-size:15px; 142 | 143 | -moz-box-sizing:content-box; 144 | box-sizing:content-box; 145 | 146 | color:#fff; padding:0px; margin:0px; 147 | vertical-align:top; 148 | 149 | height:28px; 150 | line-height:28px; 151 | } 152 | 153 | .dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{ 154 | 155 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==); 156 | background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%); 157 | background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%); 158 | } 159 | .dhtmlx_popup_title{ 160 | color:#fff; 161 | text-shadow: 1px 1px #000; 162 | height:40px; line-height:40px; 163 | font-size:20px; 164 | } 165 | .dhtmlx_popup_text{ 166 | margin:15px 15px 5px 15px; 167 | font-size:14px; 168 | color:#000; 169 | min-height:30px; 170 | border-radius:6px; 171 | } 172 | 173 | 174 | .dhtmlx-info, .dhtmlx-error{ 175 | font-size:14px; 176 | color:#000; 177 | box-shadow: 0px 0px 4px #fff; 178 | margin-bottom:10px; 179 | 180 | background-color:#fff; 181 | 182 | border-radius:5px; 183 | border:2px solid #000; 184 | } 185 | 186 | .dhtmlx-error{ 187 | background-color:#F00; 188 | color:white; 189 | } 190 | -------------------------------------------------------------------------------- /codebase/themes/message_growl_dark.css: -------------------------------------------------------------------------------- 1 | .dhtmlx_message_area{ 2 | position:fixed; 3 | right:5px; 4 | width:250px; 5 | z-index:1000; 6 | } 7 | 8 | .dhtmlx-info{ 9 | min-width: 120px; 10 | min-height: 20px; 11 | padding:4px 4px 4px 20px; 12 | font-family:Tahoma; 13 | z-index: 10000; 14 | 15 | margin:5px; 16 | margin-bottom:10px; 17 | 18 | -webkit-transition: all .5s ease; 19 | -moz-transition: all .5s ease; 20 | -o-transition: all .5s ease; 21 | transition: all .5s ease; 22 | } 23 | .dhtmlx-info.hidden{ 24 | height:0px; 25 | min-height: 0px; 26 | padding-top:0px; 27 | padding-bottom:0px; 28 | border-width:0px; 29 | margin-top:0px; 30 | margin-bottom:0px; 31 | overflow:hidden; 32 | } 33 | 34 | .dhtmlx_modal_box{ 35 | overflow:hidden; 36 | display: inline-block; 37 | min-width: 300px; 38 | width: 300px; 39 | text-align: center; 40 | position:fixed; 41 | 42 | background-color: #fff; 43 | background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 44 | background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 45 | box-shadow: 0px 0px 14px #888; 46 | 47 | font-family: Tahoma; 48 | 49 | z-index:20000; 50 | 51 | border-radius:6px; 52 | border: 1px solid #ffffff; 53 | } 54 | 55 | .dhtmlx_popup_title{ 56 | border-top-left-radius:5px; 57 | border-top-right-radius:5px; 58 | 59 | border-width:0px; 60 | 61 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC); 62 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 63 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 64 | } 65 | 66 | .dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{ 67 | user-select: none; 68 | -webkit-user-select: none; 69 | -moz-user-select:-moz-none; 70 | 71 | cursor:pointer; 72 | } 73 | 74 | .dhtmlx_popup_text{ 75 | overflow:hidden; 76 | } 77 | 78 | .dhtmlx_popup_controls{ 79 | border-radius:6px; 80 | padding:5px; 81 | } 82 | 83 | .dhtmlx_popup_button, .dhtmlx_button{ 84 | height: 30px; 85 | line-height:30px; 86 | 87 | display: inline-block; 88 | margin: 0 5px; 89 | border-radius: 6px; 90 | 91 | color:#FFF; 92 | } 93 | .dhtmlx_popup_button{ 94 | min-width: 120px; 95 | } 96 | 97 | div.dhx_modal_cover { 98 | background-color:#000; 99 | cursor:default; 100 | 101 | filter:alpha(opacity = 20); 102 | opacity: 0.2; 103 | 104 | position: fixed; 105 | z-index:19999; 106 | left: 0px; top: 0px; 107 | width: 100%; height: 100%; 108 | 109 | border: none; 110 | zoom: 1; 111 | } 112 | 113 | .dhtmlx-info img, .dhtmlx_modal_box img{ 114 | float:left; 115 | margin-right:20px; 116 | } 117 | .dhtmlx-info img{ 118 | margin-left:-10px; 119 | } 120 | 121 | .dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{ 122 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC); 123 | } 124 | .dhtmlx-alert-error, .dhtmlx-confirm-error { 125 | border: 1px solid #ff0000; 126 | } 127 | 128 | /*Skin section*/ 129 | .dhtmlx_button, .dhtmlx_popup_button{ 130 | box-shadow: 0px 0px 4px #888; 131 | border:1px solid #838383; 132 | } 133 | .dhtmlx_button input, .dhtmlx_popup_button div{ 134 | border:1px solid #FFF; 135 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=); 136 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 137 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 138 | 139 | border-radius:6px; 140 | font-size:15px; 141 | 142 | -moz-box-sizing:content-box; 143 | box-sizing:content-box; 144 | 145 | color:#fff; padding:0px; margin:0px; 146 | vertical-align:top; 147 | 148 | height:28px; 149 | line-height:28px; 150 | } 151 | 152 | .dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{ 153 | 154 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==); 155 | background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%); 156 | background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%); 157 | } 158 | .dhtmlx_popup_title{ 159 | color:#fff; 160 | text-shadow: 1px 1px #000; 161 | height:40px; line-height:40px; 162 | font-size:20px; 163 | } 164 | .dhtmlx_popup_text{ 165 | margin:15px 15px 5px 15px; 166 | font-size:14px; 167 | color:#000; 168 | min-height:30px; 169 | border-radius:6px; 170 | } 171 | 172 | 173 | .dhtmlx-info, .dhtmlx-error{ 174 | font-size:14px; 175 | color:#fff; 176 | box-shadow: 0px 0px 4px #000; 177 | margin-bottom:10px; 178 | 179 | background-color:#000; 180 | background-color:rgba(0,0,0,0.8); 181 | border-radius:5px; 182 | border:2px solid #fff; 183 | } 184 | 185 | .dhtmlx-error{ 186 | background-color:#F00; 187 | } 188 | -------------------------------------------------------------------------------- /codebase/themes/message_default.css: -------------------------------------------------------------------------------- 1 | .dhtmlx_message_area{ 2 | position:fixed; 3 | right:5px; 4 | width:250px; 5 | z-index:1000; 6 | } 7 | 8 | .dhtmlx-info{ 9 | min-width: 120px; 10 | min-height:20px; 11 | padding:4px 4px 4px 20px; 12 | font-family:Tahoma; 13 | z-index: 10000; 14 | 15 | margin:5px; 16 | margin-bottom:10px; 17 | 18 | -webkit-transition: all .5s ease; 19 | -moz-transition: all .5s ease; 20 | -o-transition: all .5s ease; 21 | transition: all .5s ease; 22 | } 23 | .dhtmlx-info.hidden{ 24 | height:0px; 25 | min-height: 0px; 26 | padding-top:0px; 27 | padding-bottom:0px; 28 | border-width:0px; 29 | margin-top:0px; 30 | margin-bottom:0px; 31 | overflow:hidden; 32 | } 33 | 34 | .dhtmlx_modal_box{ 35 | overflow:hidden; 36 | display: inline-block; 37 | min-width: 300px; 38 | width: 300px; 39 | text-align: center; 40 | position:fixed; 41 | 42 | background-color: #fff; 43 | background:-webkit-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 44 | background:-moz-linear-gradient(top, #ffffff 1%, #d0d0d0 99%); 45 | box-shadow: 0px 0px 14px #888; 46 | 47 | font-family: Tahoma; 48 | 49 | z-index:20000; 50 | 51 | border-radius:6px; 52 | border: 1px solid #ffffff; 53 | } 54 | 55 | .dhtmlx_popup_title{ 56 | border-top-left-radius:5px; 57 | border-top-right-radius:5px; 58 | 59 | border-width:0px; 60 | 61 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAMAAAAIaGBFAAAAhFBMVEVwcHBubm5sbGxqampoaGhmZmZlZWVjY2NhYWFfX19dXV1bW1taWlpYWFhWVlZUVFRSUlJRUVFPT09NTU1LS0tJSUlHR0dGRkZERERCQkJAQEA+Pj49PT09PT0+Pj5AQEBBQUFDQ0NERERGRkZHR0dJSUlKSkpMTExMTEw5OTk5OTk5OTkny8YEAAAAQklEQVQImQXBCRJCAAAAwKVSQqdyjSPXNP7/QLsIhA6OTiJnF7GrRCpzc/fw9PKW+/gqlCq1RqvTG/yMJrPF6m/bAVEhAxxnHG0oAAAAAElFTkSuQmCC); 62 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 63 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 97%, #393939 97%); 64 | } 65 | 66 | .dhtmlx-info, .dhtmlx_popup_button, .dhtmlx_button{ 67 | user-select: none; 68 | -webkit-user-select: none; 69 | -moz-user-select:-moz-none; 70 | 71 | cursor:pointer; 72 | } 73 | 74 | .dhtmlx_popup_text{ 75 | overflow:hidden; 76 | } 77 | 78 | .dhtmlx_popup_controls{ 79 | border-radius:6px; 80 | padding:5px; 81 | } 82 | 83 | .dhtmlx_popup_button, .dhtmlx_button{ 84 | height: 30px; 85 | line-height:30px; 86 | 87 | display: inline-block; 88 | margin: 0 5px; 89 | border-radius: 6px; 90 | 91 | color:#FFF; 92 | } 93 | .dhtmlx_popup_button{ 94 | min-width: 120px; 95 | } 96 | 97 | div.dhx_modal_cover { 98 | background-color:#000; 99 | cursor:default; 100 | 101 | filter:alpha(opacity = 20); 102 | opacity: 0.2; 103 | 104 | position: fixed; 105 | z-index:19999; 106 | left: 0px; top: 0px; 107 | width: 100%; height: 100%; 108 | 109 | border: none; 110 | zoom: 1; 111 | } 112 | 113 | .dhtmlx-info img, .dhtmlx_modal_box img{ 114 | float:left; 115 | margin-right:20px; 116 | } 117 | 118 | .dhtmlx-alert-error .dhtmlx_popup_title, .dhtmlx-confirm-error .dhtmlx_popup_title{ 119 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAAATklEQVR4nIWLuw2AMBBDjVuQiBT2oWbRDATrnB0KQOJoqPzRe3BrHI6dcBASYREKovtK6/6DsDOX+stN+3H1YX9ciRgnYq5EWYhS2dftBIuLT4JyIrPCAAAAAElFTkSuQmCC); 120 | } 121 | .dhtmlx-alert-error, .dhtmlx-confirm-error { 122 | border: 1px solid #ff0000; 123 | } 124 | 125 | /*Skin section*/ 126 | .dhtmlx_button, .dhtmlx_popup_button{ 127 | box-shadow: 0px 0px 4px #888; 128 | border:1px solid #838383; 129 | } 130 | .dhtmlx_button input, .dhtmlx_popup_button div{ 131 | border:1px solid #FFF; 132 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAYFBMVEVwcHBtbW1ra2toaGhmZmZjY2NhYWFeXl5cXFxaWlpXV1dVVVVSUlJQUFBNTU1LS0tJSUlGRkZERERBQUE/Pz88PDw9PT0+Pj5AQEBCQkJDQ0NFRUVHR0dISEhKSkpMTEzqthaMAAAAMklEQVQImQXBhQ2AMAAAsOIMlwWH/8+kRSKVyRVKlVrQaHV6g9FktlhFm93hdLk9Xt8PIfgBvdUqyskAAAAASUVORK5CYII=); 133 | background-image: -webkit-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 134 | background-image: -moz-linear-gradient(top, #707070 1%, #3d3d3d 70%, #4c4c4c 99%); 135 | 136 | border-radius:6px; 137 | font-size:15px; 138 | font-weight:normal; 139 | -moz-box-sizing:content-box; 140 | box-sizing:content-box; 141 | 142 | color:#fff; padding:0px; margin:0px; 143 | vertical-align:top; 144 | 145 | height:28px; 146 | line-height:28px; 147 | } 148 | 149 | .dhtmlx_button input:focus, .dhtmlx_button input:active, .dhtmlx_popup_button div:active, .dhtmlx_popup_button div:focus{ 150 | 151 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAeCAMAAADaS4T1AAAAXVBMVEVwcHBubm5tbW1sbGxra2tpaWloaGhnZ2dmZmZlZWVjY2NiYmJhYWFgYGBfX19dXV1cXFxbW1taWlpZWVlXV1dWVlZVVVVUVFRTU1NRUVFQUFBPT09OTk5NTU1LS0tT9SY0AAAAMUlEQVQImQXBhQGAMAAAIGxnx2z9/00BiVQmVyhVakGj1ekNRpPZYhVtdofT5fZ4fT8hpwG05JjexgAAAABJRU5ErkJggg==); 152 | background-image: -webkit-linear-gradient(top, #707070 1%, #4c4c4c 99%); 153 | background-image: -moz-linear-gradient(top, #707070 1%, #4c4c4c 99%); 154 | } 155 | .dhtmlx_popup_title{ 156 | color:#fff; 157 | text-shadow: 1px 1px #000; 158 | height:40px; line-height:40px; 159 | font-size:20px; 160 | } 161 | .dhtmlx_popup_text{ 162 | margin:15px 15px 5px 15px; 163 | font-size:14px; 164 | color:#000; 165 | min-height:30px; 166 | border-radius:6px; 167 | } 168 | 169 | 170 | .dhtmlx-info, .dhtmlx-error{ 171 | font-size:14px; 172 | color:#000; 173 | box-shadow: 0px 0px 10px #888; 174 | 175 | padding:0px; 176 | 177 | background-color:#FFF; 178 | border-radius:3px; 179 | border:1px solid #ffffff; 180 | } 181 | .dhtmlx-info div{ 182 | padding:5px 10px 5px 10px; 183 | background-color: #fff; 184 | 185 | border-radius:3px; 186 | border:1px solid #B8B8B8; 187 | } 188 | .dhtmlx-error{ 189 | background-color: #d81b1b; 190 | border:1px solid #ff3c3c; 191 | box-shadow: 0px 0px 10px #000; 192 | } 193 | .dhtmlx-error div{ 194 | background-color: #d81b1b; 195 | border:1px solid #940000; 196 | color:#FFF; 197 | } 198 | 199 | -------------------------------------------------------------------------------- /codebase/message.js: -------------------------------------------------------------------------------- 1 | if(!window.dhtmlx) 2 | window.dhtmlx = {}; 3 | 4 | (function(){ 5 | var _dhx_msg_cfg = null; 6 | function callback(config, result){ 7 | var usercall = config.callback; 8 | modality(false); 9 | config.box.parentNode.removeChild(config.box); 10 | _dhx_msg_cfg = config.box = null; 11 | if (usercall) 12 | usercall(result); 13 | } 14 | function modal_key(e){ 15 | if (_dhx_msg_cfg){ 16 | e = e||event; 17 | var code = e.which||event.keyCode; 18 | if (dhtmlx.message.keyboard){ 19 | if (code == 13 || code == 32) 20 | callback(_dhx_msg_cfg, true); 21 | if (code == 27) 22 | callback(_dhx_msg_cfg, false); 23 | } 24 | if (e.preventDefault) 25 | e.preventDefault(); 26 | return !(e.cancelBubble = true); 27 | } 28 | } 29 | if (document.attachEvent) 30 | document.attachEvent("onkeydown", modal_key); 31 | else 32 | document.addEventListener("keydown", modal_key, true); 33 | 34 | function modality(mode){ 35 | if(!modality.cover){ 36 | modality.cover = document.createElement("DIV"); 37 | //necessary for IE only 38 | modality.cover.onkeydown = modal_key; 39 | modality.cover.className = "dhx_modal_cover"; 40 | document.body.appendChild(modality.cover); 41 | } 42 | var height = document.body.scrollHeight; 43 | modality.cover.style.display = mode?"inline-block":"none"; 44 | } 45 | 46 | function button(text, result){ 47 | return "
"+text+"
"; 48 | } 49 | 50 | function info(text){ 51 | if (!t.area){ 52 | t.area = document.createElement("DIV"); 53 | t.area.className = "dhtmlx_message_area"; 54 | t.area.style[t.position]="5px"; 55 | document.body.appendChild(t.area); 56 | } 57 | 58 | t.hide(text.id); 59 | var message = document.createElement("DIV"); 60 | message.innerHTML = "
"+text.text+"
"; 61 | message.className = "dhtmlx-info dhtmlx-" + text.type; 62 | message.onclick = function(){ 63 | t.hide(text.id); 64 | text = null; 65 | }; 66 | 67 | if (t.position == "bottom" && t.area.firstChild) 68 | t.area.insertBefore(message,t.area.firstChild); 69 | else 70 | t.area.appendChild(message); 71 | 72 | if (text.expire > 0) 73 | t.timers[text.id]=window.setTimeout(function(){ 74 | t.hide(text.id); 75 | }, text.expire); 76 | 77 | t.pull[text.id] = message; 78 | message = null; 79 | 80 | return text.id; 81 | } 82 | function _boxStructure(config, ok, cancel){ 83 | var box = document.createElement("DIV"); 84 | box.className = " dhtmlx_modal_box dhtmlx-"+config.type; 85 | box.setAttribute("dhxbox", 1); 86 | 87 | var inner = ''; 88 | 89 | if (config.width) 90 | box.style.width = config.width; 91 | if (config.height) 92 | box.style.height = config.height; 93 | if (config.title) 94 | inner+='
'+config.title+'
'; 95 | inner+='
'+(config.content?'':config.text)+'
'; 96 | if (ok) 97 | inner += button(config.ok || "OK", true); 98 | if (cancel) 99 | inner += button(config.cancel || "Cancel", false); 100 | if (config.buttons){ 101 | for (var i=0; i 63 | .dhtmlx-myCss{ 64 | font-weight:bold !important; 65 | color:white !important; 66 | background-color:red !important; 67 | } 68 | 69 | 72 | ``` 73 | 74 | Options 75 | --------- 76 | 77 | ### Alert 78 | 79 | - title - (string) the text of the header (by default, 'Alert'). 80 | - type - the subtype of the window or a custom css class. The default value for the window - 'alert'. 81 | - text - (string) the text of the window body. 82 | - ok - (string) the text of the 'Ok' button. 83 | - callback - (function) the function called on button click 84 | - position - for now support only one value "top", any other value will result in center align 85 | - width - width of the modal box ( samples "100px", "50%") 86 | - height - height of the modal box 87 | 88 | **Full form** 89 | 90 | ```javascript 91 | dhtmlx.message({ 92 | title: "Close", 93 | type: "alert", 94 | text: "You can't close this window!", 95 | callback: function() {dhtmlx.alert("Test alert");} 96 | }) 97 | //or 98 | dhtmlx.alert({ 99 | text: "Download is completed.", 100 | callback: function() {dhtmlx.alert("Test alert");} 101 | }) 102 | ``` 103 | 104 | **Short form** 105 | 106 | ```javascript 107 | dhtmlx.alert("someText"); 108 | ``` 109 | 110 | Both alert and confirm blocks keyboard input while active. Pressing SPACE or ENTER will close message with positive result. Pressing ESC will close message with negative result. (you can use dhtmlx.message.keyboard = false; to disable this behavior) 111 | 112 | ### Confirm 113 | 114 | - title - (string) the text of the header (by default, 'Alert'). 115 | - type - the subtype of the window or a custom css class 116 | - text - (string) the text of the window body. 117 | - ok - (string) the text of the 'Ok' button. 118 | - cancel - (string) the text of the 'Cancel' button. 119 | - callback - (function) the function called on button click. Receives 'true' or 'false' as the parameter (subject to the clicked button). 120 | - position - for now support only one value "top", any other value will result in center align 121 | - width - width of the modal box ( samples "100px", "50%") 122 | - height - height of the modal box 123 | 124 | **Full form** 125 | 126 | ```javascript 127 | dhtmlx.message({ 128 | type:"confirm", 129 | text: "Continue?", 130 | callback: function() {dhtmlx.confirm("Test confirm");} 131 | }); 132 | //or 133 | dhtmlx.confirm({ 134 | title: "Close", 135 | type:"confirm-warning", 136 | text: "Are you sure you want to do it?", 137 | callback: function() {dhtmlx.confirm("Test confirm");} 138 | }); 139 | ``` 140 | 141 | **Short form** 142 | 143 | ```javascript 144 | dhtmlx.confirm("ConfirmText"); 145 | ``` 146 | 147 | ### ModalBox 148 | 149 | - title - (string) the text of the header (by default, 'Alert'). 150 | - type - the subtype of the window or a custom css class 151 | - text - (string) the text of the window body. 152 | - ok - (string) the text of the 'Ok' button. 153 | - cancel - (string) the text of the 'Cancel' button. 154 | - callback - (function) the function called on button click. Receives 'true' or 'false' as the parameter (subject to the clicked button). 155 | - buttons - array of labels, each one will be converted to the button ( much like multi-button confirm ). Callback function will receive index of pressed button ( 0 - for first button, 1 - for second button and etc. ) 156 | - position - for now support only one value "top", any other value will result in center align 157 | - width - width of the modal box ( samples "100px", "50%") 158 | - height - height of the modal box 159 | - content - can be used instead of text, defines html element (or its ID) which will be shown inside of a popup 160 | 161 | **Examples** 162 | 163 | ```javascript 164 | dhtmlx.modalbox({ 165 | title:"Settings" 166 | text: " ... html code here... ", 167 | buttons:["Save", "Defaults", "Cancel"], 168 | callback:process_result 169 | }); 170 | ``` 171 | 172 | function returns the html container of the box which can be used for some actions 173 | 174 | ```javascript 175 | var box = dhtmlx.modalbox(...); 176 | box.getElementsByTagName("input")[0].focus(); 177 | ... 178 | dhtmlx.modalbox.hide(box); //hide popup 179 | ``` 180 | 181 | #### Closing modal box 182 | 183 | There are 3 way to close modal box 184 | 185 | - call dhtmlx.modalbox.hide(box) - where "box" is result of dhtmlx.modalbox command 186 | - call dhtmlx.modalbox.hide(node) - where node - any html node in the box (allows to create "close" links easily) 187 | - click on any button, which was defined through "buttons" property 188 | 189 | ```javascript 190 | var box = dhtmlx.modalbox({ 191 | text:"Click to close" 192 | }); 193 | ``` 194 | 195 | 196 | #### Custom buttons 197 | 198 | You can place a custom button in the popup, which is styled exactly as default message buttons. To do so you need to place the next html snippet 199 | 200 | ```javascript 201 | var box = dhtmlx.modalbox({ 202 | text:"" 203 | }); 204 | ``` 205 | 206 | #### Content reusage 207 | 208 | Instead of setting html text you can place any html container on the page in the modalbox 209 | 210 | ```html 211 |
Some form here
212 | ``` 213 | 214 | ```javascript 215 | var box = dhtmlx.modalbox(content:"mycontent"); 216 | ``` 217 | 218 | after box will be closed, you can reopen it by 219 | 220 | ```javascript 221 | dhtmlx.modalbox(box); 222 | ``` 223 | 224 | 225 | ### Notification (message) 226 | 227 | - type - the subtype of the window or a custom css class. The default value for the window - 'alert'. 228 | - text - (string) the text of the window body. 229 | - expire - the time after passing which the window disappears (in milliseconds). You can use negative value (-1) to make notice persistent. 230 | 231 | **Full form** 232 | 233 | ```javascript 234 | dhtmlx.message({ 235 | text:"An error has occured.
Please, see the log file!", 236 | expire:1000, You can use negative value (-1) to make notice persistent. 237 | type:"customCss" // 'customCss' - css class 238 | }); 239 | ``` 240 | 241 | **Short form** 242 | 243 | ```javascript 244 | dhtmlx.message("Your data has been successfully saved!"); 245 | ``` 246 | 247 | Extra configuration 248 | ------------------- 249 | 250 | Default delay of notifications can be set as 251 | 252 | ```javascript 253 | dhtmlx.message.expire = 4000; //time in milliseconds 254 | t.position = "top"; 255 | ``` 256 | 257 | Default position of notices can be set as 258 | 259 | ```javascript 260 | dhtmlx.message.position = "top"; // possible values "top" or "bottom" 261 | ``` 262 | 263 | 264 | Interaction with alert and confirm from keyboard can be disabled by 265 | 266 | ```javascript 267 | dhtmlx.message.keyboard = false; // possible values "top" or "bottom" 268 | ``` 269 | 270 | ### Alert subtypes 271 | 272 | For all kinds of messages, there are alert variations, which can be used for more important notifications 273 | 274 | ```javascript 275 | dhtmlx.message({ type:"error", "Critical error!"}); 276 | //or 277 | dhtmlx.message({ type:"alert-error", "Critical error!"}); 278 | //or 279 | dhtmlx.message({ type:"confirm-error", "Confirm self-destruction!"}); 280 | ``` 281 | 282 | [dhtmlx]: http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml?message 283 | [message]: http://dhtmlx.github.com/message/ 284 | [mit]: http://en.wikipedia.org/wiki/MIT_License --------------------------------------------------------------------------------