Merge lp:~openerp-dev/openerp-web/trunk-bootstrap-tooltip-csn into lp:openerp-web
- trunk-bootstrap-tooltip-csn
- Merge into trunk
Proposed by
Cedric Snauwaert (OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 3983 |
Proposed branch: | lp:~openerp-dev/openerp-web/trunk-bootstrap-tooltip-csn |
Merge into: | lp:openerp-web |
Diff against target: |
712 lines (+113/-372) 12 files modified
addons/web/__openerp__.py (+0/-2) addons/web/static/lib/jquery.tipsy/jquery.tipsy.js (+0/-250) addons/web/static/lib/jquery.tipsy/tipsy.css (+0/-25) addons/web/static/src/css/base.css (+47/-35) addons/web/static/src/css/base.sass (+39/-28) addons/web/static/src/js/chrome.js (+3/-3) addons/web/static/src/js/core.js (+5/-0) addons/web/static/src/js/view_form.js (+9/-10) addons/web/static/src/js/views.js (+3/-5) addons/web/static/src/xml/base.xml (+1/-2) addons/web_kanban/static/src/js/kanban.js (+5/-11) addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js (+1/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/trunk-bootstrap-tooltip-csn |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavier (Open ERP) (community) | Needs Information | ||
Review via email: mp+216101@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 3976. By Cedric Snauwaert (OpenERP)
-
[FIX]few errors
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
review:
Needs Information
- 3977. By Cedric Snauwaert (OpenERP)
-
[FIX]tooltip: overwrite bootstrap default for tooltip
- 3978. By Cedric Snauwaert (OpenERP)
-
[MERGE]merge with latest trunk
- 3979. By Cedric Snauwaert (OpenERP)
-
[FIX]tooltip: should not use placement auto since it is currently bugged in bootstrap
(see: https://github. com/twbs/ bootstrap/ issues/ 13268) - 3980. By Cedric Snauwaert (OpenERP)
-
[FIX]tooltip: when not in debug mode, display tooltip in form view with bootstrat as well
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'addons/web/__openerp__.py' | |||
2 | --- addons/web/__openerp__.py 2014-03-24 09:30:38 +0000 | |||
3 | +++ addons/web/__openerp__.py 2014-04-17 14:05:17 +0000 | |||
4 | @@ -35,7 +35,6 @@ | |||
5 | 35 | "static/lib/jquery.ui.notify/js/jquery.notify.js", | 35 | "static/lib/jquery.ui.notify/js/jquery.notify.js", |
6 | 36 | "static/lib/jquery.deferred-queue/jquery.deferred-queue.js", | 36 | "static/lib/jquery.deferred-queue/jquery.deferred-queue.js", |
7 | 37 | "static/lib/jquery.scrollTo/jquery.scrollTo-min.js", | 37 | "static/lib/jquery.scrollTo/jquery.scrollTo-min.js", |
8 | 38 | "static/lib/jquery.tipsy/jquery.tipsy.js", | ||
9 | 39 | "static/lib/jquery.textext/jquery.textext.js", | 38 | "static/lib/jquery.textext/jquery.textext.js", |
10 | 40 | "static/lib/jquery.timeago/jquery.timeago.js", | 39 | "static/lib/jquery.timeago/jquery.timeago.js", |
11 | 41 | "static/lib/bootstrap/js/bootstrap.js", | 40 | "static/lib/bootstrap/js/bootstrap.js", |
12 | @@ -66,7 +65,6 @@ | |||
13 | 66 | "static/lib/jquery.ui.bootstrap/css/custom-theme/jquery-ui-1.9.0.custom.css", | 65 | "static/lib/jquery.ui.bootstrap/css/custom-theme/jquery-ui-1.9.0.custom.css", |
14 | 67 | "static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css", | 66 | "static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css", |
15 | 68 | "static/lib/jquery.ui.notify/css/ui.notify.css", | 67 | "static/lib/jquery.ui.notify/css/ui.notify.css", |
16 | 69 | "static/lib/jquery.tipsy/tipsy.css", | ||
17 | 70 | "static/lib/jquery.textext/jquery.textext.css", | 68 | "static/lib/jquery.textext/jquery.textext.css", |
18 | 71 | "static/lib/fontawesome/css/font-awesome.css", | 69 | "static/lib/fontawesome/css/font-awesome.css", |
19 | 72 | "static/lib/bootstrap/css/bootstrap.css", | 70 | "static/lib/bootstrap/css/bootstrap.css", |
20 | 73 | 71 | ||
21 | === removed directory 'addons/web/static/lib/jquery.tipsy' | |||
22 | === removed file 'addons/web/static/lib/jquery.tipsy/jquery.tipsy.js' | |||
23 | --- addons/web/static/lib/jquery.tipsy/jquery.tipsy.js 2012-11-15 16:41:32 +0000 | |||
24 | +++ addons/web/static/lib/jquery.tipsy/jquery.tipsy.js 1970-01-01 00:00:00 +0000 | |||
25 | @@ -1,250 +0,0 @@ | |||
26 | 1 | // tipsy, facebook style tooltips for jquery | ||
27 | 2 | // version 1.0.0a | ||
28 | 3 | // (c) 2008-2010 jason frame [jason@onehackoranother.com] | ||
29 | 4 | // released under the MIT license | ||
30 | 5 | |||
31 | 6 | (function($) { | ||
32 | 7 | |||
33 | 8 | function maybeCall(thing, ctx) { | ||
34 | 9 | return (typeof thing == 'function') ? (thing.call(ctx)) : thing; | ||
35 | 10 | }; | ||
36 | 11 | |||
37 | 12 | function Tipsy(element, options) { | ||
38 | 13 | this.$element = $(element); | ||
39 | 14 | this.options = options; | ||
40 | 15 | this.enabled = true; | ||
41 | 16 | this.fixTitle(); | ||
42 | 17 | }; | ||
43 | 18 | |||
44 | 19 | Tipsy.prototype = { | ||
45 | 20 | show: function() { | ||
46 | 21 | $.fn.tipsy.clear(); | ||
47 | 22 | if (!this.$element.parent().length) { | ||
48 | 23 | return; | ||
49 | 24 | } | ||
50 | 25 | var title = this.getTitle(); | ||
51 | 26 | if (title && this.enabled) { | ||
52 | 27 | var $tip = this.tip(); | ||
53 | 28 | |||
54 | 29 | $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); | ||
55 | 30 | $tip[0].className = 'tipsy '; // reset classname in case of dynamic gravity | ||
56 | 31 | $tip.openerpClass('oe_tooltip'); | ||
57 | 32 | $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body); | ||
58 | 33 | |||
59 | 34 | var pos = $.extend({}, this.$element.offset(), { | ||
60 | 35 | width: this.$element[0].offsetWidth, | ||
61 | 36 | height: this.$element[0].offsetHeight | ||
62 | 37 | }); | ||
63 | 38 | |||
64 | 39 | var actualWidth = $tip[0].offsetWidth, | ||
65 | 40 | actualHeight = $tip[0].offsetHeight, | ||
66 | 41 | gravity = maybeCall(this.options.gravity, this.$element[0]); | ||
67 | 42 | |||
68 | 43 | var tp; | ||
69 | 44 | switch (gravity.charAt(0)) { | ||
70 | 45 | case 'n': | ||
71 | 46 | tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; | ||
72 | 47 | break; | ||
73 | 48 | case 's': | ||
74 | 49 | tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; | ||
75 | 50 | break; | ||
76 | 51 | case 'e': | ||
77 | 52 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; | ||
78 | 53 | break; | ||
79 | 54 | case 'w': | ||
80 | 55 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; | ||
81 | 56 | break; | ||
82 | 57 | } | ||
83 | 58 | |||
84 | 59 | if (gravity.length == 2) { | ||
85 | 60 | if (gravity.charAt(1) == 'w') { | ||
86 | 61 | tp.left = pos.left + pos.width / 2 - 15; | ||
87 | 62 | } else { | ||
88 | 63 | tp.left = pos.left + pos.width / 2 - actualWidth + 15; | ||
89 | 64 | } | ||
90 | 65 | } | ||
91 | 66 | |||
92 | 67 | $tip.css(tp).addClass('tipsy-' + gravity); | ||
93 | 68 | $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0); | ||
94 | 69 | if (this.options.className) { | ||
95 | 70 | $tip.addClass(maybeCall(this.options.className, this.$element[0])); | ||
96 | 71 | } | ||
97 | 72 | |||
98 | 73 | if (this.options.fade) { | ||
99 | 74 | $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); | ||
100 | 75 | } else { | ||
101 | 76 | $tip.css({visibility: 'visible', opacity: this.options.opacity}); | ||
102 | 77 | } | ||
103 | 78 | } | ||
104 | 79 | }, | ||
105 | 80 | |||
106 | 81 | hide: function() { | ||
107 | 82 | if (this.options.fade) { | ||
108 | 83 | this.tip().stop().fadeOut(function() { $(this).remove(); }); | ||
109 | 84 | } else { | ||
110 | 85 | this.tip().remove(); | ||
111 | 86 | } | ||
112 | 87 | }, | ||
113 | 88 | |||
114 | 89 | fixTitle: function() { | ||
115 | 90 | var $e = this.$element; | ||
116 | 91 | if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { | ||
117 | 92 | $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); | ||
118 | 93 | } | ||
119 | 94 | }, | ||
120 | 95 | |||
121 | 96 | getTitle: function() { | ||
122 | 97 | var title, $e = this.$element, o = this.options; | ||
123 | 98 | this.fixTitle(); | ||
124 | 99 | var title, o = this.options; | ||
125 | 100 | if (typeof o.title == 'string') { | ||
126 | 101 | title = $e.attr(o.title == 'title' ? 'original-title' : o.title); | ||
127 | 102 | } else if (typeof o.title == 'function') { | ||
128 | 103 | title = o.title.call($e[0]); | ||
129 | 104 | } | ||
130 | 105 | title = ('' + title).replace(/(^\s*|\s*$)/, ""); | ||
131 | 106 | return title || o.fallback; | ||
132 | 107 | }, | ||
133 | 108 | |||
134 | 109 | tip: function() { | ||
135 | 110 | if (!this.$tip) { | ||
136 | 111 | this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'); | ||
137 | 112 | } | ||
138 | 113 | return this.$tip; | ||
139 | 114 | }, | ||
140 | 115 | |||
141 | 116 | validate: function() { | ||
142 | 117 | if (!this.$element[0].parentNode) { | ||
143 | 118 | this.hide(); | ||
144 | 119 | this.$element = null; | ||
145 | 120 | this.options = null; | ||
146 | 121 | } | ||
147 | 122 | }, | ||
148 | 123 | |||
149 | 124 | enable: function() { this.enabled = true; }, | ||
150 | 125 | disable: function() { this.enabled = false; }, | ||
151 | 126 | toggleEnabled: function() { this.enabled = !this.enabled; } | ||
152 | 127 | }; | ||
153 | 128 | |||
154 | 129 | $.fn.tipsy = function(options) { | ||
155 | 130 | |||
156 | 131 | if (options === true) { | ||
157 | 132 | return this.data('tipsy'); | ||
158 | 133 | } else if (typeof options == 'string') { | ||
159 | 134 | var tipsy = this.data('tipsy'); | ||
160 | 135 | if (tipsy) tipsy[options](); | ||
161 | 136 | return this; | ||
162 | 137 | } | ||
163 | 138 | |||
164 | 139 | options = $.extend({}, $.fn.tipsy.defaults, options); | ||
165 | 140 | |||
166 | 141 | function get(ele) { | ||
167 | 142 | var tipsy = $.data(ele, 'tipsy'); | ||
168 | 143 | if (!tipsy) { | ||
169 | 144 | tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); | ||
170 | 145 | $.data(ele, 'tipsy', tipsy); | ||
171 | 146 | } | ||
172 | 147 | return tipsy; | ||
173 | 148 | } | ||
174 | 149 | |||
175 | 150 | function enter() { | ||
176 | 151 | var tipsy = get(this); | ||
177 | 152 | tipsy.hoverState = 'in'; | ||
178 | 153 | if (options.delayIn == 0) { | ||
179 | 154 | tipsy.show(); | ||
180 | 155 | } else { | ||
181 | 156 | tipsy.fixTitle(); | ||
182 | 157 | setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); | ||
183 | 158 | } | ||
184 | 159 | }; | ||
185 | 160 | |||
186 | 161 | function leave() { | ||
187 | 162 | var tipsy = get(this); | ||
188 | 163 | tipsy.hoverState = 'out'; | ||
189 | 164 | if (options.delayOut == 0) { | ||
190 | 165 | tipsy.hide(); | ||
191 | 166 | } else { | ||
192 | 167 | setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); | ||
193 | 168 | } | ||
194 | 169 | }; | ||
195 | 170 | |||
196 | 171 | if (!options.live) this.each(function() { get(this); }); | ||
197 | 172 | |||
198 | 173 | if (options.trigger != 'manual') { | ||
199 | 174 | var binder = options.live ? 'live' : 'bind', | ||
200 | 175 | eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', | ||
201 | 176 | eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; | ||
202 | 177 | this[binder](eventIn, enter)[binder](eventOut, leave); | ||
203 | 178 | } | ||
204 | 179 | |||
205 | 180 | return this; | ||
206 | 181 | |||
207 | 182 | }; | ||
208 | 183 | |||
209 | 184 | $.fn.tipsy.clear = function() { | ||
210 | 185 | $('div.tipsy').stop().remove(); | ||
211 | 186 | } | ||
212 | 187 | |||
213 | 188 | $.fn.tipsy.defaults = { | ||
214 | 189 | className: null, | ||
215 | 190 | delayIn: 0, | ||
216 | 191 | delayOut: 0, | ||
217 | 192 | fade: false, | ||
218 | 193 | fallback: '', | ||
219 | 194 | gravity: 'n', | ||
220 | 195 | html: false, | ||
221 | 196 | live: false, | ||
222 | 197 | offset: 0, | ||
223 | 198 | opacity: 0.8, | ||
224 | 199 | title: 'title', | ||
225 | 200 | trigger: 'hover' | ||
226 | 201 | }; | ||
227 | 202 | |||
228 | 203 | // Overwrite this method to provide options on a per-element basis. | ||
229 | 204 | // For example, you could store the gravity in a 'tipsy-gravity' attribute: | ||
230 | 205 | // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); | ||
231 | 206 | // (remember - do not modify 'options' in place!) | ||
232 | 207 | $.fn.tipsy.elementOptions = function(ele, options) { | ||
233 | 208 | return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; | ||
234 | 209 | }; | ||
235 | 210 | |||
236 | 211 | $.fn.tipsy.autoNS = function() { | ||
237 | 212 | return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; | ||
238 | 213 | }; | ||
239 | 214 | |||
240 | 215 | $.fn.tipsy.autoWE = function() { | ||
241 | 216 | return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; | ||
242 | 217 | }; | ||
243 | 218 | |||
244 | 219 | /** | ||
245 | 220 | * yields a closure of the supplied parameters, producing a function that takes | ||
246 | 221 | * no arguments and is suitable for use as an autogravity function like so: | ||
247 | 222 | * | ||
248 | 223 | * @param margin (int) - distance from the viewable region edge that an | ||
249 | 224 | * element should be before setting its tooltip's gravity to be away | ||
250 | 225 | * from that edge. | ||
251 | 226 | * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer | ||
252 | 227 | * if there are no viewable region edges effecting the tooltip's | ||
253 | 228 | * gravity. It will try to vary from this minimally, for example, | ||
254 | 229 | * if 'sw' is preferred and an element is near the right viewable | ||
255 | 230 | * region edge, but not the top edge, it will set the gravity for | ||
256 | 231 | * that element's tooltip to be 'se', preserving the southern | ||
257 | 232 | * component. | ||
258 | 233 | */ | ||
259 | 234 | $.fn.tipsy.autoBounds = function(margin, prefer) { | ||
260 | 235 | return function() { | ||
261 | 236 | var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, | ||
262 | 237 | boundTop = $(document).scrollTop() + margin, | ||
263 | 238 | boundLeft = $(document).scrollLeft() + margin, | ||
264 | 239 | $this = $(this); | ||
265 | 240 | |||
266 | 241 | if ($this.offset().top < boundTop) dir.ns = 'n'; | ||
267 | 242 | if ($this.offset().left < boundLeft) dir.ew = 'w'; | ||
268 | 243 | if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e'; | ||
269 | 244 | if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's'; | ||
270 | 245 | |||
271 | 246 | return dir.ns + (dir.ew ? dir.ew : ''); | ||
272 | 247 | } | ||
273 | 248 | }; | ||
274 | 249 | |||
275 | 250 | })(jQuery); | ||
276 | 251 | 0 | ||
277 | === removed file 'addons/web/static/lib/jquery.tipsy/tipsy.css' | |||
278 | --- addons/web/static/lib/jquery.tipsy/tipsy.css 2012-09-21 14:09:32 +0000 | |||
279 | +++ addons/web/static/lib/jquery.tipsy/tipsy.css 1970-01-01 00:00:00 +0000 | |||
280 | @@ -1,25 +0,0 @@ | |||
281 | 1 | .tipsy { font-size: 90%; position: absolute; padding: 5px; z-index: 100000; overflow: hidden;} | ||
282 | 2 | .tipsy-inner { background-color: #000; color: #FFF; max-width: 500px; padding: 5px 8px 4px 8px; } | ||
283 | 3 | |||
284 | 4 | /* Rounded corners */ | ||
285 | 5 | .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } | ||
286 | 6 | |||
287 | 7 | /* Uncomment for shadow */ | ||
288 | 8 | .tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; } | ||
289 | 9 | |||
290 | 10 | .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; } | ||
291 | 11 | |||
292 | 12 | /* Rules to colour arrows */ | ||
293 | 13 | .tipsy-arrow-n { border-bottom-color: #000; } | ||
294 | 14 | .tipsy-arrow-s { border-top-color: #000; } | ||
295 | 15 | .tipsy-arrow-e { border-left-color: #000; } | ||
296 | 16 | .tipsy-arrow-w { border-right-color: #000; } | ||
297 | 17 | |||
298 | 18 | .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } | ||
299 | 19 | .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} | ||
300 | 20 | .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} | ||
301 | 21 | .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } | ||
302 | 22 | .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } | ||
303 | 23 | .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } | ||
304 | 24 | .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } | ||
305 | 25 | .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } | ||
306 | 26 | 0 | ||
307 | === modified file 'addons/web/static/src/css/base.css' | |||
308 | --- addons/web/static/src/css/base.css 2014-04-17 09:10:32 +0000 | |||
309 | +++ addons/web/static/src/css/base.css 2014-04-17 14:05:17 +0000 | |||
310 | @@ -504,40 +504,6 @@ | |||
311 | 504 | font-style: italic; | 504 | font-style: italic; |
312 | 505 | text-decoration: none; | 505 | text-decoration: none; |
313 | 506 | } | 506 | } |
314 | 507 | .openerp.oe_tooltip { | ||
315 | 508 | font-size: 12px; | ||
316 | 509 | } | ||
317 | 510 | .openerp.oe_tooltip .oe_tooltip_string { | ||
318 | 511 | color: #ffdd55; | ||
319 | 512 | font-weight: bold; | ||
320 | 513 | font-size: 13px; | ||
321 | 514 | } | ||
322 | 515 | .openerp.oe_tooltip .oe_tooltip_help { | ||
323 | 516 | white-space: pre-wrap; | ||
324 | 517 | } | ||
325 | 518 | .openerp.oe_tooltip .oe_tooltip_technical { | ||
326 | 519 | padding: 0 0 4px 0; | ||
327 | 520 | margin: 5px 0 0 15px; | ||
328 | 521 | } | ||
329 | 522 | .openerp.oe_tooltip .oe_tooltip_technical li { | ||
330 | 523 | list-style: circle; | ||
331 | 524 | } | ||
332 | 525 | .openerp.oe_tooltip .oe_tooltip_technical_title { | ||
333 | 526 | font-weight: bold; | ||
334 | 527 | } | ||
335 | 528 | .openerp.oe_tooltip .oe_tooltip_close { | ||
336 | 529 | margin: -5px 0 0 2px; | ||
337 | 530 | cursor: default; | ||
338 | 531 | float: right; | ||
339 | 532 | color: white; | ||
340 | 533 | } | ||
341 | 534 | .openerp.oe_tooltip .oe_tooltip_close:hover { | ||
342 | 535 | color: #999999; | ||
343 | 536 | cursor: pointer; | ||
344 | 537 | } | ||
345 | 538 | .openerp.oe_tooltip .oe_tooltip_message { | ||
346 | 539 | max-width: 310px; | ||
347 | 540 | } | ||
348 | 541 | .openerp .oe_notebook { | 507 | .openerp .oe_notebook { |
349 | 542 | margin: 8px 0; | 508 | margin: 8px 0; |
350 | 543 | padding: 0 16px; | 509 | padding: 0 16px; |
351 | @@ -1924,7 +1890,7 @@ | |||
352 | 1924 | .openerp .oe_form > :not(.oe_form_nosheet) header { | 1890 | .openerp .oe_form > :not(.oe_form_nosheet) header { |
353 | 1925 | padding-left: 2px; | 1891 | padding-left: 2px; |
354 | 1926 | } | 1892 | } |
356 | 1927 | .openerp .oe_form > :not(.oe_form_nosheet) header ul { | 1893 | .openerp .oe_form > :not(.oe_form_nosheet) header ul:not(.oe_tooltip_technical) { |
357 | 1928 | display: inline-block; | 1894 | display: inline-block; |
358 | 1929 | float: right; | 1895 | float: right; |
359 | 1930 | } | 1896 | } |
360 | @@ -3331,6 +3297,52 @@ | |||
361 | 3331 | width: 18px; | 3297 | width: 18px; |
362 | 3332 | height: 18px; | 3298 | height: 18px; |
363 | 3333 | } | 3299 | } |
364 | 3300 | |||
365 | 3301 | .tooltip { | ||
366 | 3302 | padding: 0; | ||
367 | 3303 | margin: 0; | ||
368 | 3304 | font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; | ||
369 | 3305 | color: #4c4c4c; | ||
370 | 3306 | font-size: 12px; | ||
371 | 3307 | background: white; | ||
372 | 3308 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); | ||
373 | 3309 | background-color: transparent; | ||
374 | 3310 | } | ||
375 | 3311 | .tooltip .tooltip-inner { | ||
376 | 3312 | text-align: left !important; | ||
377 | 3313 | max-width: 350px; | ||
378 | 3314 | } | ||
379 | 3315 | .tooltip .tooltip-inner .oe_tooltip_string { | ||
380 | 3316 | color: #ffdd55; | ||
381 | 3317 | font-weight: bold; | ||
382 | 3318 | font-size: 13px; | ||
383 | 3319 | } | ||
384 | 3320 | .tooltip .tooltip-inner .oe_tooltip_help { | ||
385 | 3321 | white-space: pre-wrap; | ||
386 | 3322 | } | ||
387 | 3323 | .tooltip .tooltip-inner .oe_tooltip_technical { | ||
388 | 3324 | padding: 0 0 4px 0; | ||
389 | 3325 | margin: 5px 0 0 15px; | ||
390 | 3326 | } | ||
391 | 3327 | .tooltip .tooltip-inner .oe_tooltip_technical li { | ||
392 | 3328 | list-style: circle; | ||
393 | 3329 | } | ||
394 | 3330 | .tooltip .tooltip-inner .oe_tooltip_technical_title { | ||
395 | 3331 | font-weight: bold; | ||
396 | 3332 | } | ||
397 | 3333 | .tooltip .tooltip-inner .oe_tooltip_close { | ||
398 | 3334 | margin: -5px 0 0 2px; | ||
399 | 3335 | cursor: default; | ||
400 | 3336 | float: right; | ||
401 | 3337 | color: white; | ||
402 | 3338 | } | ||
403 | 3339 | .tooltip .tooltip-inner .oe_tooltip_close:hover { | ||
404 | 3340 | color: #999999; | ||
405 | 3341 | cursor: pointer; | ||
406 | 3342 | } | ||
407 | 3343 | .tooltip .tooltip-inner .oe_tooltip_message { | ||
408 | 3344 | max-width: 310px; | ||
409 | 3345 | } | ||
410 | 3334 | .modal .modal-header button.close { | 3346 | .modal .modal-header button.close { |
411 | 3335 | border: none; | 3347 | border: none; |
412 | 3336 | background: none; | 3348 | background: none; |
413 | 3337 | 3349 | ||
414 | === modified file 'addons/web/static/src/css/base.sass' | |||
415 | --- addons/web/static/src/css/base.sass 2014-04-17 09:10:32 +0000 | |||
416 | +++ addons/web/static/src/css/base.sass 2014-04-17 14:05:17 +0000 | |||
417 | @@ -472,33 +472,6 @@ | |||
418 | 472 | text-decoration: none | 472 | text-decoration: none |
419 | 473 | margin-bottom: 1px | 473 | margin-bottom: 1px |
420 | 474 | // }}} | 474 | // }}} |
421 | 475 | // Tooltips {{{ | ||
422 | 476 | &.oe_tooltip | ||
423 | 477 | font-size: 12px | ||
424 | 478 | .oe_tooltip_string | ||
425 | 479 | color: #FD5 | ||
426 | 480 | font-weight: bold | ||
427 | 481 | font-size: 13px | ||
428 | 482 | .oe_tooltip_help | ||
429 | 483 | white-space: pre-wrap | ||
430 | 484 | .oe_tooltip_technical | ||
431 | 485 | padding: 0 0 4px 0 | ||
432 | 486 | margin: 5px 0 0 15px | ||
433 | 487 | li | ||
434 | 488 | list-style: circle | ||
435 | 489 | .oe_tooltip_technical_title | ||
436 | 490 | font-weight: bold | ||
437 | 491 | .oe_tooltip_close | ||
438 | 492 | margin: -5px 0 0 2px | ||
439 | 493 | cursor: default | ||
440 | 494 | float: right | ||
441 | 495 | color: white | ||
442 | 496 | &:hover | ||
443 | 497 | color: #999 | ||
444 | 498 | cursor: pointer | ||
445 | 499 | .oe_tooltip_message | ||
446 | 500 | max-width: 310px | ||
447 | 501 | // }}} | ||
448 | 502 | // Notebook {{{ | 475 | // Notebook {{{ |
449 | 503 | .oe_notebook | 476 | .oe_notebook |
450 | 504 | margin: 8px 0 | 477 | margin: 8px 0 |
451 | @@ -1577,7 +1550,7 @@ | |||
452 | 1577 | // FormView.header {{{ | 1550 | // FormView.header {{{ |
453 | 1578 | .oe_form > :not(.oe_form_nosheet) header | 1551 | .oe_form > :not(.oe_form_nosheet) header |
454 | 1579 | padding-left: 2px | 1552 | padding-left: 2px |
456 | 1580 | ul | 1553 | ul:not(.oe_tooltip_technical) |
457 | 1581 | display: inline-block | 1554 | display: inline-block |
458 | 1582 | float: right | 1555 | float: right |
459 | 1583 | .oe_button | 1556 | .oe_button |
460 | @@ -2703,6 +2676,44 @@ | |||
461 | 2703 | overflow: hidden !important | 2676 | overflow: hidden !important |
462 | 2704 | // }}} | 2677 | // }}} |
463 | 2705 | 2678 | ||
464 | 2679 | // End of customize | ||
465 | 2680 | |||
466 | 2681 | // Customize bootstrap3 for tooltip | ||
467 | 2682 | .tooltip | ||
468 | 2683 | padding: 0 | ||
469 | 2684 | margin: 0 | ||
470 | 2685 | font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif | ||
471 | 2686 | color: #4c4c4c | ||
472 | 2687 | font-size: 12px | ||
473 | 2688 | background: white | ||
474 | 2689 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5) | ||
475 | 2690 | background-color: transparent | ||
476 | 2691 | .tooltip-inner | ||
477 | 2692 | text-align: left !important | ||
478 | 2693 | max-width: 350px | ||
479 | 2694 | .oe_tooltip_string | ||
480 | 2695 | color: #FD5 | ||
481 | 2696 | font-weight: bold | ||
482 | 2697 | font-size: 13px | ||
483 | 2698 | .oe_tooltip_help | ||
484 | 2699 | white-space: pre-wrap | ||
485 | 2700 | .oe_tooltip_technical | ||
486 | 2701 | padding: 0 0 4px 0 | ||
487 | 2702 | margin: 5px 0 0 15px | ||
488 | 2703 | li | ||
489 | 2704 | list-style: circle | ||
490 | 2705 | .oe_tooltip_technical_title | ||
491 | 2706 | font-weight: bold | ||
492 | 2707 | .oe_tooltip_close | ||
493 | 2708 | margin: -5px 0 0 2px | ||
494 | 2709 | cursor: default | ||
495 | 2710 | float: right | ||
496 | 2711 | color: white | ||
497 | 2712 | &:hover | ||
498 | 2713 | color: #999 | ||
499 | 2714 | cursor: pointer | ||
500 | 2715 | .oe_tooltip_message | ||
501 | 2716 | max-width: 310px | ||
502 | 2706 | 2717 | ||
503 | 2707 | // Hack for ui icon {{{ | 2718 | // Hack for ui icon {{{ |
504 | 2708 | .ui-icon | 2719 | .ui-icon |
505 | 2709 | 2720 | ||
506 | === modified file 'addons/web/static/src/js/chrome.js' | |||
507 | --- addons/web/static/src/js/chrome.js 2014-04-16 12:00:34 +0000 | |||
508 | +++ addons/web/static/src/js/chrome.js 2014-04-17 14:05:17 +0000 | |||
509 | @@ -1078,8 +1078,8 @@ | |||
510 | 1078 | }, | 1078 | }, |
511 | 1079 | bind_events: function() { | 1079 | bind_events: function() { |
512 | 1080 | var self = this; | 1080 | var self = this; |
515 | 1081 | this.$el.on('mouseenter', '.oe_systray > div:not([data-tipsy=true])', function() { | 1081 | this.$el.on('mouseenter', '.oe_systray > div:not([data-toggle=tooltip])', function() { |
516 | 1082 | $(this).attr('data-tipsy', 'true').tipsy().trigger('mouseenter'); | 1082 | $(this).attr('data-toggle', 'tooltip').tooltip().trigger('mouseenter'); |
517 | 1083 | }); | 1083 | }); |
518 | 1084 | this.$el.on('click', '.oe_dropdown_toggle', function(ev) { | 1084 | this.$el.on('click', '.oe_dropdown_toggle', function(ev) { |
519 | 1085 | ev.preventDefault(); | 1085 | ev.preventDefault(); |
520 | @@ -1103,7 +1103,7 @@ | |||
521 | 1103 | }, 0); | 1103 | }, 0); |
522 | 1104 | }); | 1104 | }); |
523 | 1105 | instance.web.bus.on('click', this, function(ev) { | 1105 | instance.web.bus.on('click', this, function(ev) { |
525 | 1106 | $.fn.tipsy.clear(); | 1106 | $.fn.tooltip('destroy'); |
526 | 1107 | if (!$(ev.target).is('input[type=file]')) { | 1107 | if (!$(ev.target).is('input[type=file]')) { |
527 | 1108 | self.$el.find('.oe_dropdown_menu.oe_opened, .oe_dropdown_toggle.oe_opened').removeClass('oe_opened'); | 1108 | self.$el.find('.oe_dropdown_menu.oe_opened, .oe_dropdown_toggle.oe_opened').removeClass('oe_opened'); |
528 | 1109 | } | 1109 | } |
529 | 1110 | 1110 | ||
530 | === modified file 'addons/web/static/src/js/core.js' | |||
531 | --- addons/web/static/src/js/core.js 2014-04-02 09:23:10 +0000 | |||
532 | +++ addons/web/static/src/js/core.js 2014-04-17 14:05:17 +0000 | |||
533 | @@ -788,6 +788,11 @@ | |||
534 | 788 | return $.unblockUI.apply($, arguments); | 788 | return $.unblockUI.apply($, arguments); |
535 | 789 | }; | 789 | }; |
536 | 790 | 790 | ||
537 | 791 | |||
538 | 792 | /* Bootstrap defaults overwrite */ | ||
539 | 793 | $.fn.tooltip.Constructor.DEFAULTS.placement = 'bottom'; | ||
540 | 794 | $.fn.tooltip.Constructor.DEFAULTS.html = true; | ||
541 | 795 | |||
542 | 791 | /** | 796 | /** |
543 | 792 | * Registry for all the client actions key: tag value: widget | 797 | * Registry for all the client actions key: tag value: widget |
544 | 793 | */ | 798 | */ |
545 | 794 | 799 | ||
546 | === modified file 'addons/web/static/src/js/view_form.js' | |||
547 | --- addons/web/static/src/js/view_form.js 2014-04-16 15:15:43 +0000 | |||
548 | +++ addons/web/static/src/js/view_form.js 2014-04-17 14:05:17 +0000 | |||
549 | @@ -1835,7 +1835,7 @@ | |||
550 | 1835 | this.$el.addClass(this.node.attrs["class"] || ""); | 1835 | this.$el.addClass(this.node.attrs["class"] || ""); |
551 | 1836 | }, | 1836 | }, |
552 | 1837 | destroy: function() { | 1837 | destroy: function() { |
554 | 1838 | $.fn.tipsy.clear(); | 1838 | $.fn.tooltip('destroy'); |
555 | 1839 | this._super.apply(this, arguments); | 1839 | this._super.apply(this, arguments); |
556 | 1840 | }, | 1840 | }, |
557 | 1841 | /** | 1841 | /** |
558 | @@ -1867,9 +1867,8 @@ | |||
559 | 1867 | widget = widget || this; | 1867 | widget = widget || this; |
560 | 1868 | trigger = trigger || this.$el; | 1868 | trigger = trigger || this.$el; |
561 | 1869 | options = _.extend({ | 1869 | options = _.extend({ |
565 | 1870 | delayIn: 500, | 1870 | delay: { show: 500, hide: 0 }, |
566 | 1871 | delayOut: 0, | 1871 | trigger: 'hover', |
564 | 1872 | fade: true, | ||
567 | 1873 | title: function() { | 1872 | title: function() { |
568 | 1874 | var template = widget.template + '.tooltip'; | 1873 | var template = widget.template + '.tooltip'; |
569 | 1875 | if (!QWeb.has_template(template)) { | 1874 | if (!QWeb.has_template(template)) { |
570 | @@ -1880,12 +1879,12 @@ | |||
571 | 1880 | widget: widget | 1879 | widget: widget |
572 | 1881 | }); | 1880 | }); |
573 | 1882 | }, | 1881 | }, |
574 | 1883 | gravity: $.fn.tipsy.autoBounds(50, 'nw'), | ||
575 | 1884 | html: true, | ||
576 | 1885 | opacity: 0.85, | ||
577 | 1886 | trigger: 'hover' | ||
578 | 1887 | }, options || {}); | 1882 | }, options || {}); |
580 | 1888 | $(trigger).tipsy(options); | 1883 | //only show tooltip if we are in debug or if we have a help to show, otherwise it will display |
581 | 1884 | //as empty | ||
582 | 1885 | if (instance.session.debug || widget.node.attrs.help || (widget.field && widget.field.help)){ | ||
583 | 1886 | $(trigger).tooltip(options); | ||
584 | 1887 | } | ||
585 | 1889 | }, | 1888 | }, |
586 | 1890 | /** | 1889 | /** |
587 | 1891 | * Builds a new context usable for operations related to fields by merging | 1890 | * Builds a new context usable for operations related to fields by merging |
588 | @@ -2122,8 +2121,8 @@ | |||
589 | 2122 | this.$el.find('.oe_field_translate').click(this.on_translate); | 2121 | this.$el.find('.oe_field_translate').click(this.on_translate); |
590 | 2123 | } | 2122 | } |
591 | 2124 | this.$label = this.view ? this.view.$el.find('label[for=' + this.id_for_label + ']') : $(); | 2123 | this.$label = this.view ? this.view.$el.find('label[for=' + this.id_for_label + ']') : $(); |
592 | 2124 | this.do_attach_tooltip(this, this.$label[0] || this.$el); | ||
593 | 2125 | if (instance.session.debug) { | 2125 | if (instance.session.debug) { |
594 | 2126 | this.do_attach_tooltip(this, this.$label[0] || this.$el); | ||
595 | 2127 | this.$label.off('dblclick').on('dblclick', function() { | 2126 | this.$label.off('dblclick').on('dblclick', function() { |
596 | 2128 | console.log("Field '%s' of type '%s' in View: %o", self.name, (self.node.attrs.widget || self.field.type), self.view); | 2127 | console.log("Field '%s' of type '%s' in View: %o", self.name, (self.node.attrs.widget || self.field.type), self.view); |
597 | 2129 | window.w = self; | 2128 | window.w = self; |
598 | 2130 | 2129 | ||
599 | === modified file 'addons/web/static/src/js/views.js' | |||
600 | --- addons/web/static/src/js/views.js 2014-04-15 13:25:28 +0000 | |||
601 | +++ addons/web/static/src/js/views.js 2014-04-17 14:05:17 +0000 | |||
602 | @@ -581,7 +581,7 @@ | |||
603 | 581 | var self = this; | 581 | var self = this; |
604 | 582 | this.$el.find('.oe_view_manager_switch a').click(function() { | 582 | this.$el.find('.oe_view_manager_switch a').click(function() { |
605 | 583 | self.switch_mode($(this).data('view-type')); | 583 | self.switch_mode($(this).data('view-type')); |
607 | 584 | }).tipsy(); | 584 | }).tooltip(); |
608 | 585 | var views_ids = {}; | 585 | var views_ids = {}; |
609 | 586 | _.each(this.views_src, function(view) { | 586 | _.each(this.views_src, function(view) { |
610 | 587 | self.views[view.view_type] = $.extend({}, view, { | 587 | self.views[view.view_type] = $.extend({}, view, { |
611 | @@ -1157,10 +1157,8 @@ | |||
612 | 1157 | this.$('.oe_form_dropdown_section').each(function() { | 1157 | this.$('.oe_form_dropdown_section').each(function() { |
613 | 1158 | $(this).toggle(!!$(this).find('li').length); | 1158 | $(this).toggle(!!$(this).find('li').length); |
614 | 1159 | }); | 1159 | }); |
619 | 1160 | 1160 | self.$("[title]").tooltip({ | |
620 | 1161 | self.$("[title]").tipsy({ | 1161 | delay: { show: 500, hide: 0} |
617 | 1162 | 'html': true, | ||
618 | 1163 | 'delayIn': 500, | ||
621 | 1164 | }); | 1162 | }); |
622 | 1165 | }, | 1163 | }, |
623 | 1166 | /** | 1164 | /** |
624 | 1167 | 1165 | ||
625 | === modified file 'addons/web/static/src/xml/base.xml' | |||
626 | --- addons/web/static/src/xml/base.xml 2014-04-15 13:39:14 +0000 | |||
627 | +++ addons/web/static/src/xml/base.xml 2014-04-17 14:05:17 +0000 | |||
628 | @@ -943,7 +943,6 @@ | |||
629 | 943 | </t> | 943 | </t> |
630 | 944 | <t t-name="FormRenderingLabel"> | 944 | <t t-name="FormRenderingLabel"> |
631 | 945 | <label t-att-for="_for" | 945 | <label t-att-for="_for" |
632 | 946 | t-att-title="help" | ||
633 | 947 | t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}"> | 946 | t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}"> |
634 | 948 | <t t-esc="string"/> | 947 | <t t-esc="string"/> |
635 | 949 | </label> | 948 | </label> |
636 | @@ -1005,7 +1004,7 @@ | |||
637 | 1005 | </li> | 1004 | </li> |
638 | 1006 | <li t-if="widget.field and widget.field.selection" data-item="selection"> | 1005 | <li t-if="widget.field and widget.field.selection" data-item="selection"> |
639 | 1007 | <span class="oe_tooltip_technical_title">Selection:</span> | 1006 | <span class="oe_tooltip_technical_title">Selection:</span> |
641 | 1008 | <ul> | 1007 | <ul class="oe_tooltip_technical"> |
642 | 1009 | <li t-foreach="widget.field.selection" t-as="option"> | 1008 | <li t-foreach="widget.field.selection" t-as="option"> |
643 | 1010 | [<t t-esc="option[0]"/>] | 1009 | [<t t-esc="option[0]"/>] |
644 | 1011 | <t t-if="option[1]"> - </t> | 1010 | <t t-if="option[1]"> - </t> |
645 | 1012 | 1011 | ||
646 | === modified file 'addons/web_kanban/static/src/js/kanban.js' | |||
647 | --- addons/web_kanban/static/src/js/kanban.js 2014-03-05 11:33:07 +0000 | |||
648 | +++ addons/web_kanban/static/src/js/kanban.js 2014-04-17 14:05:17 +0000 | |||
649 | @@ -441,7 +441,7 @@ | |||
650 | 441 | }, | 441 | }, |
651 | 442 | on_record_moved : function(record, old_group, old_index, new_group, new_index) { | 442 | on_record_moved : function(record, old_group, old_index, new_group, new_index) { |
652 | 443 | var self = this; | 443 | var self = this; |
654 | 444 | $.fn.tipsy.clear(); | 444 | record.$el.find('[title]').tooltip('destroy'); |
655 | 445 | $(old_group.$el).add(new_group.$el).find('.oe_kanban_aggregates, .oe_kanban_group_length').hide(); | 445 | $(old_group.$el).add(new_group.$el).find('.oe_kanban_aggregates, .oe_kanban_group_length').hide(); |
656 | 446 | if (old_group === new_group) { | 446 | if (old_group === new_group) { |
657 | 447 | new_group.records.splice(old_index, 1); | 447 | new_group.records.splice(old_index, 1); |
658 | @@ -648,7 +648,7 @@ | |||
659 | 648 | this.$records.data('widget', this); | 648 | this.$records.data('widget', this); |
660 | 649 | this.$has_been_started.resolve(); | 649 | this.$has_been_started.resolve(); |
661 | 650 | var add_btn = this.$el.find('.oe_kanban_add'); | 650 | var add_btn = this.$el.find('.oe_kanban_add'); |
663 | 651 | add_btn.tipsy({delayIn: 500, delayOut: 1000}); | 651 | add_btn.tooltip({delay: { show: 500, hide:1000 }}); |
664 | 652 | this.$records.find(".oe_kanban_column_cards").click(function (ev) { | 652 | this.$records.find(".oe_kanban_column_cards").click(function (ev) { |
665 | 653 | if (ev.target == ev.currentTarget) { | 653 | if (ev.target == ev.currentTarget) { |
666 | 654 | if (!self.state.folded) { | 654 | if (!self.state.folded) { |
667 | @@ -688,7 +688,7 @@ | |||
668 | 688 | return (new instance.web.Model(field.relation)).query([options.tooltip_on_group_by]) | 688 | return (new instance.web.Model(field.relation)).query([options.tooltip_on_group_by]) |
669 | 689 | .filter([["id", "=", this.value]]).first().then(function(res) { | 689 | .filter([["id", "=", this.value]]).first().then(function(res) { |
670 | 690 | self.tooltip = res[options.tooltip_on_group_by]; | 690 | self.tooltip = res[options.tooltip_on_group_by]; |
672 | 691 | self.$(".oe_kanban_group_title_text").attr("title", self.tooltip || self.title || "").tipsy({html: true}); | 691 | self.$(".oe_kanban_group_title_text").attr("title", self.tooltip || self.title || "").tooltip(); |
673 | 692 | }); | 692 | }); |
674 | 693 | } | 693 | } |
675 | 694 | }, | 694 | }, |
676 | @@ -925,10 +925,8 @@ | |||
677 | 925 | bind_events: function() { | 925 | bind_events: function() { |
678 | 926 | var self = this; | 926 | var self = this; |
679 | 927 | this.setup_color_picker(); | 927 | this.setup_color_picker(); |
684 | 928 | this.$el.find('[tooltip]').tipsy({ | 928 | this.$el.find('[title]').tooltip({ |
685 | 929 | delayIn: 500, | 929 | delay: { show: 500, hide: 0}, |
682 | 930 | delayOut: 0, | ||
683 | 931 | fade: true, | ||
686 | 932 | title: function() { | 930 | title: function() { |
687 | 933 | var template = $(this).attr('tooltip'); | 931 | var template = $(this).attr('tooltip'); |
688 | 934 | if (!self.view.qweb.has_template(template)) { | 932 | if (!self.view.qweb.has_template(template)) { |
689 | @@ -936,10 +934,6 @@ | |||
690 | 936 | } | 934 | } |
691 | 937 | return self.view.qweb.render(template, self.qweb_context); | 935 | return self.view.qweb.render(template, self.qweb_context); |
692 | 938 | }, | 936 | }, |
693 | 939 | gravity: 's', | ||
694 | 940 | html: true, | ||
695 | 941 | opacity: 0.8, | ||
696 | 942 | trigger: 'hover' | ||
697 | 943 | }); | 937 | }); |
698 | 944 | 938 | ||
699 | 945 | // If no draghandle is found, make the whole card as draghandle (provided one can edit) | 939 | // If no draghandle is found, make the whole card as draghandle (provided one can edit) |
700 | 946 | 940 | ||
701 | === modified file 'addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js' | |||
702 | --- addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js 2014-01-06 13:16:05 +0000 | |||
703 | +++ addons/web_kanban_sparkline/static/src/js/kanban_sparkline.js 2014-04-17 14:05:17 +0000 | |||
704 | @@ -29,7 +29,7 @@ | |||
705 | 29 | } | 29 | } |
706 | 30 | }, self.options); | 30 | }, self.options); |
707 | 31 | self.$el.sparkline(value, sparkline_options); | 31 | self.$el.sparkline(value, sparkline_options); |
709 | 32 | self.$el.tipsy({'delayIn': self.options.delayIn || 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'}); | 32 | self.$el.tooltip({delay: {show: self.options.delayIn || 0, hide: 0}, title: function(){return title}}); |
710 | 33 | }, 0); | 33 | }, 0); |
711 | 34 | }, | 34 | }, |
712 | 35 | }); | 35 | }); |
Since we're using the same options over and over (I see at least 4 calls with {placement: bottom, html: true}), maybe we should override bootstrap's defaults directly? http:// jsfiddle. net/vHQr6/
Or at least split out some sort of centrally overridable default?
> record. $el.children( ).find( '[title] ').tooltip( 'destroy' );
Is there a specific reason for the children() call?