summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/wikis.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-11-14 15:33:21 -0600
committerMike Greiling <mike@pixelcog.com>2016-11-30 15:22:43 -0600
commita167897bed66ed2b9aafad7020d75334e2badf32 (patch)
treefc5b111f2a9d84185cb764ca37b1f29e3621fdf2 /app/assets/javascripts/wikis.js
parent24e5a1e8db943be346b4f7f4fb49326ad0e5eb9e (diff)
downloadgitlab-ce-a167897bed66ed2b9aafad7020d75334e2badf32.tar.gz
move wiki navbar content to right sidebar
Diffstat (limited to 'app/assets/javascripts/wikis.js')
-rw-r--r--app/assets/javascripts/wikis.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/assets/javascripts/wikis.js b/app/assets/javascripts/wikis.js
deleted file mode 100644
index 5dd853389c2..00000000000
--- a/app/assets/javascripts/wikis.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, consistent-return, one-var, one-var-declaration-per-line, no-undef, prefer-template, padded-blocks, max-len */
-
-/*= require latinise */
-
-(function() {
- var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
-
- this.Wikis = (function() {
- function Wikis() {
- this.slugify = bind(this.slugify, this);
- $('.new-wiki-page').on('submit', (function(_this) {
- return function(e) {
- var field, path, slug;
- $('[data-error~=slug]').addClass('hidden');
- field = $('#new_wiki_path');
- slug = _this.slugify(field.val());
- if (slug.length > 0) {
- path = field.attr('data-wikis-path');
- location.href = path + '/' + slug;
- return e.preventDefault();
- }
- };
- })(this));
- }
-
- Wikis.prototype.dasherize = function(value) {
- return value.replace(/[_\s]+/g, '-');
- };
-
- Wikis.prototype.slugify = function(value) {
- return this.dasherize(value.trim().toLowerCase().latinise());
- };
-
- return Wikis;
-
- })();
-
-}).call(this);