mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Improve file popup
This commit is contained in:
@ -6,24 +6,37 @@ $( function() {
|
||||
popups.dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
width: "80%",
|
||||
minHeight: "300",
|
||||
buttons: {
|
||||
"Choose": function() {
|
||||
width: "90%",
|
||||
create: function (event) {
|
||||
target = $(event.target);
|
||||
target.parent().css({
|
||||
'position': 'fixed',
|
||||
'top': '5%',
|
||||
'bottom': '5%',
|
||||
});
|
||||
target.css("height", "300px");
|
||||
console.log(target);
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
text: "Choose",
|
||||
click: function() {
|
||||
console.log($("#file_id"));
|
||||
$("input[name="+$(this).attr('name')+"]").attr('value', $("#file_id").attr('value'));
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
disabled: true,
|
||||
}
|
||||
],
|
||||
});
|
||||
$( ".choose_file_button" ).button().on( "click", function() {
|
||||
popup = popups.filter("[name="+$(this).attr('name')+"]");
|
||||
console.log(popup);
|
||||
popup.html('<iframe src="/file/popup" width="100%" height="95%"></iframe><div id="file_id" value="null" />');
|
||||
popup.dialog({title: $(this).text()}).dialog( "open" );
|
||||
});
|
||||
$('.select_date').datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
$( ".choose_file_button" ).button().on( "click", function() {
|
||||
popup = popups.filter("[name="+$(this).attr('name')+"]");
|
||||
console.log(popup);
|
||||
popup.html('<iframe src="/file/popup" width="95%"></iframe><span id="file_id" value="null" />');
|
||||
popup.dialog({title: $(this).attr('name')}).dialog( "open" );
|
||||
});
|
||||
} );
|
||||
|
@ -156,6 +156,11 @@ tbody>tr:hover {
|
||||
float: right;
|
||||
padding: 10px;
|
||||
}
|
||||
#user_info {
|
||||
width: 40%;
|
||||
margin: 0px auto;
|
||||
background: lightgrey;
|
||||
}
|
||||
|
||||
/*-----------------------------USER PROFILE----------------------------*/
|
||||
#user_profile {
|
||||
@ -213,7 +218,12 @@ footer{
|
||||
|
||||
/*--------------------------------MODALE-------------------------------*/
|
||||
.choose_file_widget {
|
||||
display: inline;
|
||||
display: none;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane {
|
||||
bottom: 0px;
|
||||
position: absolute;
|
||||
width: 97%;
|
||||
}
|
||||
.form-wrapper {
|
||||
display: inline-block;
|
||||
|
Reference in New Issue
Block a user