summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-04-27 18:04:35 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-04-27 18:04:35 +0100
commit9345103351b905e4bf78f454e22978e8c3319ee4 (patch)
treeabea7fbe3b096794ebae3ecf36e19a624d67cc01
parent99ea730015e1454cefc6f7422981dee7353964a8 (diff)
downloadgitlab-ce-9345103351b905e4bf78f454e22978e8c3319ee4.tar.gz
Revert changes made on dasherize function
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js4
-rw-r--r--app/assets/javascripts/lib/utils/text_utility.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
index 97d3ec0e600..1be405946ee 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
@@ -1,6 +1,6 @@
/* eslint-disable no-param-reassign */
-import { dasherize } from '../lib/utils/text_utility';
+require('../lib/utils/text_utility')
const DEFAULT_EVENT_OBJECTS = require('./default_event_objects');
@@ -39,7 +39,7 @@ global.cycleAnalytics.CycleAnalyticsStore = {
});
newData.stages.forEach((item) => {
- const stageSlug = dasherize(item.title.toLowerCase());
+ const stageSlug = gl.text.dasherize(item.title.toLowerCase());
item.active = false;
item.isUserAllowed = data.permissions[stageSlug];
item.emptyStageText = EMPTY_STAGE_TEXTS[stageSlug];
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js
index 2cdeb0723b9..fecd531328d 100644
--- a/app/assets/javascripts/lib/utils/text_utility.js
+++ b/app/assets/javascripts/lib/utils/text_utility.js
@@ -1,4 +1,4 @@
-/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, quotes, one-var, one-var-declaration-per-line, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, no-empty, max-len, consistent-return, no-unused-vars, no-return-assign, max-len, vars-on-top, import/prefer-default-export */
+/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, quotes, one-var, one-var-declaration-per-line, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, no-empty, max-len, consistent-return, no-unused-vars, no-return-assign, max-len, vars-on-top */
require('vendor/latinise');
var base;
@@ -180,7 +180,7 @@ gl.text.pluralize = function(str, count) {
gl.text.truncate = function(string, maxLength) {
return string.substr(0, (maxLength - 3)) + '...';
};
-export function dasherize (str) {
+gl.text.dasherize = function(str) {
return str.replace(/[_\s]+/g, '-');
};
gl.text.slugify = function(str) {