1 | Index: themes/base/jquery.ui.core.css |
---|
2 | =================================================================== |
---|
3 | --- themes/base/jquery.ui.core.css (revision 3849) |
---|
4 | +++ themes/base/jquery.ui.core.css (working copy) |
---|
5 | @@ -32,6 +32,34 @@ |
---|
6 | |
---|
7 | /* Misc visuals |
---|
8 | ----------------------------------*/ |
---|
9 | |
---|
10 | /* Overlays */ |
---|
11 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } |
---|
12 | + |
---|
13 | +/* High contrast compatibility |
---|
14 | ++----------------------------------*/ |
---|
15 | +.high-contrast .ui-icon, |
---|
16 | +.high-contrast .ui-dialog .ui-dialog-titlebar-close, |
---|
17 | +.high-contrast .ui-datepicker .ui-datepicker-next, |
---|
18 | +.high-contrast .ui-datepicker .ui-datepicker-prev |
---|
19 | +{ width: auto; text-indent: 0; } |
---|
20 | + |
---|
21 | +/* Focus highlight for tabs */ |
---|
22 | +.high-contrast .ui-tabs.ui-widget-content .ui-state-focus { border-width: 3px; } |
---|
23 | + |
---|
24 | +/* Focus highlight for accordion (also out of high contrast, maybe that needs to go somewhere else? */ |
---|
25 | +.ui-accordion-header.ui-state-focus { border-width: 2px; } |
---|
26 | +.high-contrast .ui-accordion-header.ui-state-focus { border-width: 4px; } |
---|
27 | + |
---|
28 | +/* Fancy positioning for datepicker buttons: */ |
---|
29 | +.high-contrast .ui-datepicker .ui-datepicker-next span { position: static; margin: 3px; } |
---|
30 | +.high-contrast .ui-datepicker .ui-datepicker-prev span { position: static; margin: 3px; } |
---|
31 | + |
---|
32 | +/* Value for progress bar */ |
---|
33 | + |
---|
34 | +.ui-progressbar-valuetext { display: none; } |
---|
35 | +.high-contrast .ui-progressbar-valuetext { display: block; position: absolute; margin: 0; margin-top: 3px; top: 0; width: 100%; text-align: center; } |
---|
36 | + |
---|
37 | +/* Resize icon for dialog */ |
---|
38 | +.ui-dialog-resize-grippy.ui-resizable-handle { display: none; } |
---|
39 | +.high-contrast .ui-dialog-resize-grippy { display: block; right: 0; bottom: 0; } |
---|
40 | Index: themes/base/jquery.ui.progressbar.css |
---|
41 | =================================================================== |
---|
42 | --- themes/base/jquery.ui.progressbar.css (revision 3849) |
---|
43 | +++ themes/base/jquery.ui.progressbar.css (working copy) |
---|
44 | @@ -1,4 +1,4 @@ |
---|
45 | /* Progressbar |
---|
46 | ----------------------------------*/ |
---|
47 | -.ui-progressbar { height:2em; text-align: left; } |
---|
48 | +.ui-progressbar { height:2em; text-align: left; position: relative; } |
---|
49 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } |
---|
50 | \ No newline at end of file |
---|
51 | Index: ui/jquery.ui.core.js |
---|
52 | =================================================================== |
---|
53 | --- ui/jquery.ui.core.js (revision 3849) |
---|
54 | +++ ui/jquery.ui.core.js (working copy) |
---|
55 | @@ -199,7 +199,37 @@ $.extend($.expr[':'], { |
---|
56 | tabbable: function(element) { |
---|
57 | var tabIndex = $.attr(element, 'tabindex'); |
---|
58 | return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable'); |
---|
59 | } |
---|
60 | }); |
---|
61 | |
---|
62 | +// Initialize high-contrast mode check when we have document.body |
---|
63 | +$(function() { |
---|
64 | + // create div for testing if high contrast mode is on or images are turned off |
---|
65 | + var div = document.createElement("div"); |
---|
66 | + // The ui-icon class will give it a background image. |
---|
67 | + // Proper caching should mean no additional requests will be made. |
---|
68 | + div.className = "ui-icon"; |
---|
69 | + div.style.borderWidth = "1px"; |
---|
70 | + div.style.borderStyle = "solid"; |
---|
71 | + div.style.borderTopColor = "red"; |
---|
72 | + div.style.borderRightColor = "green"; |
---|
73 | + div.style.position = "absolute"; |
---|
74 | + div.style.top = "-999px"; |
---|
75 | + document.body.appendChild(div); |
---|
76 | + |
---|
77 | + // test it |
---|
78 | + var bkImg = $.curCSS(div, "backgroundImage"); |
---|
79 | + $.support.highContrast = ($.curCSS(div, "borderTopColor") == $.curCSS(div, "borderRightColor")) || |
---|
80 | + (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)")); |
---|
81 | + if ($.browser.msie) { |
---|
82 | + div.outerHTML = ""; // prevent mixed-content warning, see http://support.microsoft.com/kb/925014 |
---|
83 | + } else { |
---|
84 | + document.body.removeChild(div); |
---|
85 | + } |
---|
86 | + if ($.support.highContrast) { |
---|
87 | + $("body").addClass("high-contrast"); |
---|
88 | + } |
---|
89 | +}); |
---|
90 | + |
---|
91 | + |
---|
92 | })(jQuery); |
---|
93 | Index: ui/jquery.ui.progressbar.js |
---|
94 | =================================================================== |
---|
95 | --- ui/jquery.ui.progressbar.js (revision 3849) |
---|
96 | +++ ui/jquery.ui.progressbar.js (working copy) |
---|
97 | @@ -26,12 +26,15 @@ $.widget( "ui.progressbar", { |
---|
98 | "aria-valuemax": this._valueMax(), |
---|
99 | "aria-valuenow": this._value() |
---|
100 | }); |
---|
101 | |
---|
102 | this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) |
---|
103 | .appendTo( this.element ); |
---|
104 | + |
---|
105 | + this.valueTextDiv = $( "<div class='ui-progressbar-valuetext'>" + this._value() + "</div>") |
---|
106 | + .appendTo( this.element ); |
---|
107 | |
---|
108 | this._refreshValue(); |
---|
109 | }, |
---|
110 | |
---|
111 | destroy: function() { |
---|
112 | this.element |
---|
113 | @@ -93,12 +96,13 @@ $.widget( "ui.progressbar", { |
---|
114 | |
---|
115 | _refreshValue: function() { |
---|
116 | var value = this.value(); |
---|
117 | this.valueDiv |
---|
118 | [ value === this._valueMax() ? "addClass" : "removeClass"]( "ui-corner-right" ) |
---|
119 | .width( value + "%" ); |
---|
120 | + this.valueTextDiv.text(value + "%"); |
---|
121 | this.element.attr( "aria-valuenow", value ); |
---|
122 | } |
---|
123 | }); |
---|
124 | |
---|
125 | $.extend( $.ui.progressbar, { |
---|
126 | version: "@VERSION" |
---|
127 | Index: ui/jquery.ui.button.js |
---|
128 | =================================================================== |
---|
129 | --- ui/jquery.ui.button.js (revision 3849) |
---|
130 | +++ ui/jquery.ui.button.js (working copy) |
---|
131 | @@ -207,13 +207,13 @@ $.widget( "ui.button", { |
---|
132 | .html( this.options.label ) |
---|
133 | .appendTo( buttonElement.empty() ) |
---|
134 | .text(); |
---|
135 | |
---|
136 | var icons = this.options.icons, |
---|
137 | multipleIcons = icons.primary && icons.secondary; |
---|
138 | - if ( icons.primary || icons.secondary ) { |
---|
139 | + if ( !$.support.highContrast && ( icons.primary || icons.secondary ) ) { |
---|
140 | buttonElement.addClass( "ui-button-text-icon" + |
---|
141 | ( multipleIcons ? "s" : "" ) ); |
---|
142 | if ( icons.primary ) { |
---|
143 | buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); |
---|
144 | } |
---|
145 | if ( icons.secondary ) { |
---|
146 | Index: ui/jquery.ui.resizable.js |
---|
147 | =================================================================== |
---|
148 | --- ui/jquery.ui.resizable.js (revision 3849) |
---|
149 | +++ ui/jquery.ui.resizable.js (working copy) |
---|
150 | @@ -33,13 +33,13 @@ $.widget("ui.resizable", $.ui.mouse, { |
---|
151 | minHeight: 10, |
---|
152 | minWidth: 10, |
---|
153 | zIndex: 1000 |
---|
154 | }, |
---|
155 | _create: function() { |
---|
156 | |
---|
157 | - var self = this, o = this.options; |
---|
158 | + var self = this, o = this.options, resizerDataURI = resizerDataURI = 'data:image/gif;base64,R0lGODdhEAAQAOcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///ywAAAAAEAAQAAAIOwABCBxIsKDBgwgTKiRYodtCgQ0rPIw4sZvEhRQbJsxoESHHiwY/euzIsaBIigQ7AlCp8mFBAy4FlggIADs='; |
---|
159 | this.element.addClass("ui-resizable"); |
---|
160 | |
---|
161 | $.extend(this, { |
---|
162 | _aspectRatio: !!(o.aspectRatio), |
---|
163 | aspectRatio: o.aspectRatio, |
---|
164 | originalElement: this.element, |
---|
165 | @@ -106,12 +106,16 @@ $.widget("ui.resizable", $.ui.mouse, { |
---|
166 | //TODO : this modifies original option |
---|
167 | if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex }); |
---|
168 | |
---|
169 | //TODO : What's going on here? |
---|
170 | if ('se' == handle) { |
---|
171 | axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se'); |
---|
172 | + var hcmImg = $("<img class='ui-resizable-handle ui-dialog-resize-grippy' alt='' src='" + resizerDataURI + ">"); |
---|
173 | + axis.append(hcmImg); |
---|
174 | + // Need this to make sure we can actually drag using the image. |
---|
175 | + this.handles['se-img'] = hcmImg; |
---|
176 | }; |
---|
177 | |
---|
178 | //Insert into internal handles object and append to element |
---|
179 | this.handles[handle] = '.ui-resizable-'+handle; |
---|
180 | this.element.append(axis); |
---|
181 | } |
---|