summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-26 14:38:38 +0100
committerPhil Hughes <me@iamphill.com>2017-05-26 14:38:38 +0100
commit5227ea5bc483359bb8a9a40057587651ecb850c2 (patch)
treeae130526886154458899b886952d948841d0b33d
parent7f34b7cb16d7e42d7099712d8ce657e6e395913b (diff)
downloadgitlab-ce-5227ea5bc483359bb8a9a40057587651ecb850c2.tar.gz
fixed up weird karma specs with tooltip
the tooltip mixin was changed because of a weird bug where the tooltip wouldn't show. This was wrong as the bug was actually caused by the text utility method
-rw-r--r--app/assets/javascripts/issue_show/components/edit_actions.vue2
-rw-r--r--app/assets/javascripts/lib/utils/text_utility.js2
-rw-r--r--app/assets/javascripts/vue_shared/mixins/tooltip.js8
3 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/issue_show/components/edit_actions.vue b/app/assets/javascripts/issue_show/components/edit_actions.vue
index 3fe0bfdb751..0750d21c15d 100644
--- a/app/assets/javascripts/issue_show/components/edit_actions.vue
+++ b/app/assets/javascripts/issue_show/components/edit_actions.vue
@@ -48,7 +48,7 @@
class="btn btn-save pull-left"
:class="{ disabled: formState.updateLoading || !isSubmitEnabled }"
type="submit"
- :disabled="updateLoading || !isSubmitEnabled"
+ :disabled="formState.updateLoading || !isSubmitEnabled"
@click.prevent="updateIssuable">
Save changes
<i
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js
index b43c1c3aac6..601d01e1be1 100644
--- a/app/assets/javascripts/lib/utils/text_utility.js
+++ b/app/assets/javascripts/lib/utils/text_utility.js
@@ -170,7 +170,7 @@ gl.text.init = function(form) {
});
};
gl.text.removeListeners = function(form) {
- return $('.js-md', form).off();
+ return $('.js-md', form).off('click');
};
gl.text.humanize = function(string) {
return string.charAt(0).toUpperCase() + string.replace(/_/g, ' ').slice(1);
diff --git a/app/assets/javascripts/vue_shared/mixins/tooltip.js b/app/assets/javascripts/vue_shared/mixins/tooltip.js
index 2e3b716a36c..995c0c98505 100644
--- a/app/assets/javascripts/vue_shared/mixins/tooltip.js
+++ b/app/assets/javascripts/vue_shared/mixins/tooltip.js
@@ -1,14 +1,10 @@
export default {
mounted() {
- this.$nextTick(() => {
- $(this.$refs.tooltip).tooltip();
- });
+ $(this.$refs.tooltip).tooltip();
},
updated() {
- this.$nextTick(() => {
- $(this.$refs.tooltip).tooltip('fixTitle');
- });
+ $(this.$refs.tooltip).tooltip('fixTitle');
},
beforeDestroy() {