View Full Version : [Feature Request] Ext.isLinux
Nullity
4 Jun 2007, 12:08 PM
Didn't know where else to put this...
I would like to request that the following be added to core/Ext.js to the function which defines the OS/Browser:
isLinux = ua.indexOf("linux") != -1;
There are times when I would like to check is the user is using Linux. I know I can do it manually, but it would be nice if this were included with all the other checks for quick reference.
Nullity
4 Jun 2007, 1:04 PM
I missed a few things...
After doing the above, you can then add the following to the section of core/EventManager.js to set a css class on the document.body to identify the OS in addition to the browser:
cls += Ext.isWindows ? "ext-win"
: Ext.isMac ? "ext-mac"
: Ext.isLinux ? "ext-linux" : "";
The main reason I am doing this is so I can easily fix some CSS rules because Linux/Firefox renders some things differently. After the above is in place, you can then apply these CSS fixes:
/* fix for ComboBox trigger being offset 1px too high when DOCTYPE is Strict */
.ext-strict .ext-linux .x-form-field-wrap .x-form-trigger {
margin-top: 1px;
}
/* fix for Toolbar buttons to vertically center text and remove the incorrect sprites at the bottom */
.ext-linux .x-btn-text-icon .x-btn-center .x-btn-text{
padding-top: 0;
padding-bottom: 0;
}
/* fix for text in input fields being mis-aligned */
.ext-gecko .ext-linux .x-form-text {
padding-top: 0;
padding-bottom: 2px;
}
/* fix for paging info text being mis-aligned to bottom */
.x-paging-info {
/* position:absolute; */
top: 4px;
right: 8px;
}
There may be more, but these are the ones I've found so far.
jack.slocum
4 Jun 2007, 2:27 PM
I added it. I also made another change that will need some testing before I commit it. I made it so it puts ext-strict on the html element instead of the body which allows for more control via selectors like .ext-strict .ext-ie. By putting it a level up it will work in IE6.
Nullity
4 Jun 2007, 9:09 PM
Thanks Jack! And just for reference, I forgot to finish up that last one before I made the post. It should have been be:
/* fix for paging info text being mis-aligned to bottom */
.ext-gecko .ext-linux .x-paging-info {
top: 4px;
}
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.