Commit 309c7cbf authored by Jean du Plessis's avatar Jean du Plessis

Replace BS Tooltips with tooltips facade

Replace all jQuery tooltip API calls with the
tooltips facade API in right_sidebar.js
parent 47195fd4
...@@ -5,6 +5,7 @@ import Cookies from 'js-cookie'; ...@@ -5,6 +5,7 @@ import Cookies from 'js-cookie';
import { deprecatedCreateFlash as flash } from './flash'; import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import { sprintf, s__, __ } from './locale'; import { sprintf, s__, __ } from './locale';
import { fixTitle, hide } from '~/tooltips';
function Sidebar() { function Sidebar() {
this.toggleTodo = this.toggleTodo.bind(this); this.toggleTodo = this.toggleTodo.bind(this);
...@@ -77,7 +78,7 @@ Sidebar.prototype.toggleTodo = function(e) { ...@@ -77,7 +78,7 @@ Sidebar.prototype.toggleTodo = function(e) {
const ajaxType = $this.data('deletePath') ? 'delete' : 'post'; const ajaxType = $this.data('deletePath') ? 'delete' : 'post';
const url = String($this.data('deletePath') || $this.data('createPath')); const url = String($this.data('deletePath') || $this.data('createPath'));
$this.tooltip('hide'); hide($this);
$('.js-issuable-todo') $('.js-issuable-todo')
.disable() .disable()
...@@ -119,7 +120,7 @@ Sidebar.prototype.todoUpdateDone = function(data) { ...@@ -119,7 +120,7 @@ Sidebar.prototype.todoUpdateDone = function(data) {
.data('deletePath', deletePath); .data('deletePath', deletePath);
if ($el.hasClass('has-tooltip')) { if ($el.hasClass('has-tooltip')) {
$el.tooltip('_fixTitle'); fixTitle($el);
} }
if (typeof $el.data('isCollapsed') !== 'undefined') { if (typeof $el.data('isCollapsed') !== 'undefined') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment