Make file modale chooser and complete user profile

This commit is contained in:
Skia
2016-08-11 04:24:32 +02:00
parent a8858fa781
commit 43b709bfd5
40 changed files with 850 additions and 177 deletions

View File

@ -1,11 +1,29 @@
console.log('Guy');
$( function() {
dialog = $( ".choose_file_widget" ).dialog({
buttons = $(".choose_file_button");
popups = $(".choose_file_widget");
popups.dialog({
autoOpen: false,
modal: true,
width: "80%",
minHeight: "300",
buttons: {
"Choose": function() {
console.log($("#file_id"));
$("input[name="+$(this).attr('name')+"]").attr('value', $("#file_id").attr('value'));
$( this ).dialog( "close" );
}
}
});
$('.select_date').datepicker({
changeMonth: true,
changeYear: true
});
$( ".choose_file_button" ).button().on( "click", function() {
dialog.dialog( "open" );
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" );
});
} );