In /library/dialog.js
The specs for opening a new window with javascript without menubar or location bar (location=0, menubar=0) seem to be ignored by Firefox 5 and IE9. So in these browsers dialogs such as add appointment which are sized to not need to scrollbars have them in those browsers.
This is a minor cosmetic issue, but kind of a pain. Thinking about how best to address this issue. I’m adding extra pixels in my branch for now, but a proper fix for would be nice.
Figured it out. http://kb.mozillazine.org/Dom.disable_window_open_feature.location
There is an about:config feature in firefox, dom.disable_window_open_feature.location that by default prevents javascript from removing the location bar.
I’m still going to give some thought to this issue as I suspect that many users won’t be savy enough to update their config, and will therefore have to scroll their dialog windows.
Further reading… The main purpose of preventing javascript from removing the location bar is to help guard against website spoofing. It’s a useful security feature, that I don’t think it makes sense to have users disable in the interest of safety. I think it makes sense to change the size of the dialog boxes to accommodate location bars.
Also it seems that someone already realized that IE was doing this in the past.
if (navigator.appName == 'Microsoft Internet Explorer')
{
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 ); // this holds the version number
height = height + 28;
}
Firefox added this feature later, and the code was never adjusted to increase the size of dialogs when location could no longer be disabled by default.
Also the increase in size in IE9 still isn’t quite enough and there is a horizontal scrollbar.
The different browsers seem to render the dialog box contents in slightly different sizes, so the “perfect size” is different for each.
I think I have a solution that works well to autosize the dialog with jQuery. Something along these lines.
I have modified dialog.js so that for firefox (the innerHeight and innerWidth properties which make this clean are only supported in firefox) after the window loads for any dialog, it ensures that the body will fit in it’s entirety.
Thanks Brady,
Question for you regarding git. You mentioned that there’s a way to compact multiple commits in a branch into a single commit. Can you describe the general idea behind that?
Hi,
Was hoping you would ask. Look up interactive rebasing; very powerful. Aas an example, lets say you wanted to combine last three commits:
git rebase -i HEAD~3
-you’ll now be sent to a text editor, which actually gives you instructions
-keep ‘pick’ on the first commit, but change the other two to squash
-write/save from the text editor
-now you can modify your comments for the new combined commit
-write/save from the text editor and now done
When I was learning this stuff, I generally would create another branch in case I screwed (then easy to go back). But once you learn the ‘reflog’ command you don’t even need to do this (reflog can be used to quickly reverse any changes).
Also note the above interactive rebase can do much more; for example, commits can also be reordered.