mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-20 05:03:23 +00:00
8b9c3fb5c6
Signed-off-by: Skia <skia@libskia.so>
46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
console.log('Guy');
|
|
|
|
$( function() {
|
|
buttons = $(".choose_file_button");
|
|
popups = $(".choose_file_widget");
|
|
popups.dialog({
|
|
autoOpen: false,
|
|
modal: true,
|
|
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" );
|
|
});
|
|
$("#quick_notif li").click(function () {
|
|
$(this).hide();
|
|
})
|
|
} );
|
|
|
|
function display_notif() {
|
|
$('#header_notif').toggle().parent().toggleClass("white");
|
|
}
|