2016-08-10 03:48:06 +00:00
|
|
|
console.log('Guy');
|
|
|
|
|
|
|
|
$( function() {
|
2016-08-11 02:24:32 +00:00
|
|
|
buttons = $(".choose_file_button");
|
|
|
|
popups = $(".choose_file_widget");
|
|
|
|
popups.dialog({
|
2016-08-10 03:48:06 +00:00
|
|
|
autoOpen: false,
|
|
|
|
modal: true,
|
2016-08-15 19:04:06 +00:00
|
|
|
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() {
|
2016-08-11 02:24:32 +00:00
|
|
|
console.log($("#file_id"));
|
|
|
|
$("input[name="+$(this).attr('name')+"]").attr('value', $("#file_id").attr('value'));
|
|
|
|
$( this ).dialog( "close" );
|
2016-08-15 19:04:06 +00:00
|
|
|
},
|
|
|
|
disabled: true,
|
2016-08-11 02:24:32 +00:00
|
|
|
}
|
2016-08-15 19:04:06 +00:00
|
|
|
],
|
2016-08-10 03:48:06 +00:00
|
|
|
});
|
|
|
|
$( ".choose_file_button" ).button().on( "click", function() {
|
2016-08-11 02:24:32 +00:00
|
|
|
popup = popups.filter("[name="+$(this).attr('name')+"]");
|
|
|
|
console.log(popup);
|
2016-08-15 19:04:06 +00:00
|
|
|
popup.html('<iframe src="/file/popup" width="100%" height="95%"></iframe><div id="file_id" value="null" />');
|
|
|
|
popup.dialog({title: $(this).text()}).dialog( "open" );
|
|
|
|
});
|
2017-01-07 14:07:28 +00:00
|
|
|
$("#quick_notif li").click(function () {
|
|
|
|
$(this).hide();
|
|
|
|
})
|
2016-08-10 03:48:06 +00:00
|
|
|
} );
|
2016-12-08 18:47:28 +00:00
|
|
|
|
|
|
|
function display_notif() {
|
|
|
|
$('#notif').toggle();
|
|
|
|
}
|