Changed how the "LFA upload" dialog is sized.

master
Pacman Ghost 4 years ago
parent 4e3ee7d08c
commit ac62b9b98a
  1. 9
      vasl_templates/webapp/static/lfa-upload.js
  2. 9
      vasl_templates/webapp/static/utils.js

@ -2,7 +2,6 @@
var $gLogFilesToUpload ;
var gEventHandlers ;
var gDlgSizeAndPosition = {} ;
var gDisableClickToAddTimestamp = new Date() ;
// --------------------------------------------------------------------
@ -85,9 +84,9 @@ window.on_analyze_vlog = function()
title: "Analyze log files",
dialogClass: "lfa-upload",
modal: true,
width: Math.min( gDlgSizeAndPosition.width || 400, $(window).innerWidth() ),
width: $(window).innerWidth() / 2,
minWidth: 400,
height: Math.min( gDlgSizeAndPosition.height || 300, $(window).innerHeight() ),
height: $(window).innerHeight() / 2,
minHeight: 300,
position: { my: "center", at: "center", of: window },
create: function() {
@ -111,10 +110,6 @@ window.on_analyze_vlog = function()
gEventHandlers.addHandler( $dlg.find(".hint"), "click", onAddFile ) ;
updateUi() ;
},
beforeClose: function() {
// save the current size and position
gDlgSizeAndPosition = getElemSizeAndPosition( $(".ui-dialog.lfa-upload") ) ;
},
close: function() {
// clean up handlers
gEventHandlers.cleanUp() ;

@ -452,15 +452,6 @@ function get_month_name( month )
// --------------------------------------------------------------------
function getElemSizeAndPosition( $elem )
{
// return the element's size and position
return {
width: $elem.width(), height: $elem.height(),
left: $elem.offset().left, top: $elem.offset().top,
} ;
}
function fixup_external_links( $root )
{
// NOTE: We want to open externals links in a new browser window, but simply adding target="_blank"

Loading…
Cancel
Save