Position and size, more or less correctly, sql edit window
authorKarl O. Pinc <kop@karlpinc.com>
Fri, 13 Sep 2024 18:05:47 +0000 (13:05 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Fri, 13 Sep 2024 18:05:47 +0000 (13:05 -0500)
src/pgwui_sql/static/pgwui_sql.css
src/pgwui_sql/templates/sql.mak

index a7f9949c650ecd7640316a80cf992543ae1433aa..dff8bd08f4c3255e6562835c04a8f20c1989680a 100644 (file)
@@ -24,7 +24,7 @@
 /* The SQL entry window. */
 .sqltext { font-family: monospace; }
 textarea.sqltext { height: 40em;
-                   width: 80em; }
+                   width: 68em; }
 
 /* The "status" message which goes with each SQL result (set) */
 .sql_status { font-size: 50%; }
index 8684dd892b0dea5e75fd74d0841da6525bad3ed9..24e376145b3e6b954f561a20ea352c7bc24dcbba 100644 (file)
            window.open(
                 '${request.route_path("pgwui_sql_edit")|n}',
                 'sql_edit',
-                'popup=true,width=800,height=600').focus();
+                'popup=true,width=' + window.innerWidth
+                  + ',height=' + window.innerHeight
+                  + ',left=' + (window.screenLeft + window.outerWidth)
+                  + ',top=' + window.screenTop)
+           .focus();
   };
   % if havecreds:
       open_sql_edit();