In browsers without support for _DOMElement.removeEventListener CPPopover
throws an exception when closing, and the popover is not removed. This fix
checks for support implicitly using the _browserAnimates variable.
Previously, selecting an empty text field hid the contentView, causing the placeholder string to dissapear. This fix leaves the contentView of the text field visible when the internal _stringValue is nil or empty.
Fixes#2049
When having a CPSegmentedControl within a a XIB files, nib2cib crashes with the following error:
```
'undefined' is not an object (evaluating 'self._themeStates[aSegment].without')
```
This pull request fixes the problem by making sure that the drawBezel method is called with a valid segment index when accessing the themeState.
Reduction: https://dl.dropboxusercontent.com/u/14629300/BugCPSegmentedControl.zip
Previously with the CPRoundRectBezelStyle we got a CPNull themeState. Now we get an instance of ThemeState with the theme CPButtonStateBezelStyleRoundRect. CPButtonStateBezelStyleRoundRect is equal to CPThemeState("roundRect").
Depending on whether min < max or max > min CPLevelIndicator changes the order of the normal/warning/critical color. This commit enables this behavior for both cases.
Previously, the day/month/hour of the textual datePicker had always two digits, even when the number was under 10. For instance the day 8 was displayed 08.
Now it's like in cocoa, 8 is displayed 8.
Fixes#2059
Previously, clicking anywhere in an empty CPTableView with variable row height was causing a crash due to the code trying to find the latest cached row height. This patch adds a check to ensure the last cached row height is not nil.
Before this commit, row templates and views belo,ging to them were copied via archiving/unarchiving.
This was causing problems when the view was not completely CPCoding compliant, like for CPDatePicker.
With this commit, template views use CPCopying (-copy method) when available.
Also added CPCopying for CPDatePicker as a category in CPPredicateEditor.
Test: in CPPredicateEditorTest, on the right panel, choose a keypath, operator, and select 'Dates' in the popup for the right expression.
Fixes#2041