mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-55727 javascript: Add modal module
This commit is contained in:
parent
e845b96b83
commit
2bcef5594a
22 changed files with 1475 additions and 35 deletions
|
@ -52,7 +52,8 @@ $THEME->sheets = array(
|
|||
'filemanager',
|
||||
'templates',
|
||||
'autocomplete',
|
||||
'search'
|
||||
'search',
|
||||
'modal'
|
||||
);
|
||||
|
||||
$THEME->editor_sheets = array('editor');
|
||||
|
|
141
theme/base/style/modal.css
Normal file
141
theme/base/style/modal.css
Normal file
|
@ -0,0 +1,141 @@
|
|||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 4050;
|
||||
outline: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.modal-container.large .modal {
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.modal-container .modal {
|
||||
position: relative;
|
||||
margin: 50px auto 30px;
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
width: auto;
|
||||
max-width: 560px;
|
||||
box-shadow: 5px 5px 20px 0 #666;
|
||||
-webkit-box-shadow: 5px 5px 20px 0 #666;
|
||||
-moz-box-shadow: 5px 5px 20px 0 #666;
|
||||
border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border: none;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-header {
|
||||
min-height: 13px;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
text-shadow: 1px 1px 1px #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
background: #ccc;
|
||||
background-color: #ebebeb;
|
||||
background-image:
|
||||
linear-gradient(to bottom, #fff, #ccc),
|
||||
-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#ccc));
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 10px 10px 0 0;
|
||||
-webkit-border-radius: 10px 10px 0 0;
|
||||
-moz-border-radius: 10px 10px 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-header h3 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-header .close {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
width: 25px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
opacity: 1;
|
||||
background-image: url([[pix:theme|sprite]]);
|
||||
background-repeat: no-repeat;
|
||||
border-style: none;
|
||||
border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.25) inset,
|
||||
0 2px 0 rgba(255, 255, 255, 0.30) inset,
|
||||
0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
-webkit-box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.25) inset,
|
||||
0 2px 0 rgba(255, 255, 255, 0.30) inset,
|
||||
0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.25) inset,
|
||||
0 2px 0 rgba(255, 255, 255, 0.30) inset,
|
||||
0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-header .close:hover,
|
||||
.modal-container .modal .modal-header .close:active,
|
||||
.modal-container .modal .modal-header .close:focus {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-body {
|
||||
max-height: none;
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.modal-container .modal .modal-footer {
|
||||
border-top: 1px solid #bbb;
|
||||
text-align: center;
|
||||
padding: .7em 0;
|
||||
background-color: #f2f2f2;
|
||||
box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
border-radius: 0 0 10px 10px;
|
||||
-webkit-border-radius: 0 0 10px 10px;
|
||||
-moz-border-radius: 0 0 10px 10px;
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
z-index: 4049;
|
||||
background-color: #aaa;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.dir-rtl .modal-container .modal .modal-header .close {
|
||||
left: 5px;
|
||||
right: auto;
|
||||
}
|
|
@ -50,6 +50,7 @@ body {
|
|||
// New Moodle stuff that builds on Bootstrap.
|
||||
@import "moodle/blocks";
|
||||
@import "moodle/forms";
|
||||
@import "moodle/modal";
|
||||
@import "moodle/modules";
|
||||
@import "moodle/chat";
|
||||
@import "moodle/reports";
|
||||
|
|
126
theme/bootstrapbase/less/moodle/modal.less
Normal file
126
theme/bootstrapbase/less/moodle/modal.less
Normal file
|
@ -0,0 +1,126 @@
|
|||
body {
|
||||
&.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 4050;
|
||||
outline: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.modal {
|
||||
position: relative;
|
||||
margin: 50px auto 30px;
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
width: auto;
|
||||
max-width: 560px;
|
||||
box-shadow: 5px 5px 20px 0 #666;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
|
||||
.modal-header {
|
||||
min-height: 13px;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
text-shadow: 1px 1px 1px #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
background: #ccc;
|
||||
background-color: #ebebeb;
|
||||
background-image: linear-gradient(to bottom, #fff, #ccc);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 10px 10px 0 0;
|
||||
position: relative;
|
||||
|
||||
h3 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
letter-spacing: 1px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
width: 25px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
opacity: 1;
|
||||
background-image: url([[pix:theme|sprite]]);
|
||||
background-repeat: no-repeat;
|
||||
border-style: none;
|
||||
border-radius: 4px;
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.25) inset,
|
||||
0 2px 0 rgba(255, 255, 255, 0.30) inset,
|
||||
0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
|
||||
&:hover {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: 1px solid #bbb;
|
||||
text-align: center;
|
||||
padding: .7em 0;
|
||||
background-color: #f2f2f2;
|
||||
box-shadow: none;
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&.large {
|
||||
.modal {
|
||||
max-width: 900px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
z-index: 4049;
|
||||
background-color: #aaa;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.dir-rtl {
|
||||
.modal-container {
|
||||
.modal {
|
||||
.modal-header {
|
||||
.close {
|
||||
left: 5px;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue