Commit 7100b769 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'move-timeago-to-vendor-dir' into 'master'

move timeago.js to vendor directory

## What does this MR do?

moves timeago.js into `/vendor/assets/javascripts` for consistency with other external javascript libraries.

## Are there points in the code the reviewer needs to double check?

make sure timeago still works as it should...?  I don't see how this could have broken anything.

## Why was this MR needed?

consistency with our guidelines

## Does this MR meet the acceptance criteria?

- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See discussion in [!6274](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6274#note_18625583)

See merge request !7590
parents 92f9f0ea 8ede8603
/*= require lib/utils/timeago */ /* global Vue */
/* global timeago */
/*= require timeago */
/*= require lib/utils/text_utility */ /*= require lib/utils/text_utility */
/*= require vue_common_component/commit */ /*= require vue_common_component/commit */
/*= require ./environment_actions */ /*= require ./environment_actions */
...@@ -6,9 +9,6 @@ ...@@ -6,9 +9,6 @@
/*= require ./environment_stop */ /*= require ./environment_stop */
/*= require ./environment_rollback */ /*= require ./environment_rollback */
/* global Vue */
/* global timeago */
(() => { (() => {
/** /**
* Envrionment Item Component * Envrionment Item Component
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, no-undef, comma-dangle, no-unused-expressions, prefer-template, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, comma-dangle, no-unused-expressions, prefer-template, padded-blocks, max-len */
/* global timeago */
/* global dateFormat */
/*= require timeago */
/*= require date.format */
(function() { (function() {
(function(w) { (function(w) {
var base; var base;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global Build */ /* global Build */
/* global Turbolinks */ /* global Turbolinks */
//= require lib/utils/timeago
//= require lib/utils/datetime_utility //= require lib/utils/datetime_utility
//= require build //= require build
//= require breakpoints //= require breakpoints
......
/* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */
/*= require merge_request_widget */ /*= require merge_request_widget */
/*= require lib/utils/timeago */
/*= require lib/utils/datetime_utility */ /*= require lib/utils/datetime_utility */
(function() { (function() {
......
/* eslint-disable no-unused-expressions, wrap-iife, func-names, curly, no-param-reassign, no-trailing-spaces, prefer-arrow-callback, no-var, one-var, quote-props, space-before-function-paren, vars-on-top, radix, prefer-template, space-infix-ops, no-use-before-define, newline-per-chained-call, no-useless-escape, no-nested-ternary, indent, no-undef, no-plusplus, one-var-declaration-per-line, operator-assignment, consistent-return, keyword-spacing, max-len, space-unary-ops, no-shadow, no-restricted-syntax, guard-for-in, eol-last, max-len */
/** /**
* Copyright (c) 2016 hustcc * Copyright (c) 2016 hustcc
* License: MIT * License: MIT
...@@ -14,7 +12,7 @@ ...@@ -14,7 +12,7 @@
module.exports = factory(root); module.exports = factory(root);
else else
root.timeago = factory(root); root.timeago = factory(root);
}(typeof window !== 'undefined' ? window : this, }(typeof window !== 'undefined' ? window : this,
function () { function () {
var cnt = 0, // the timer counter, for timer key var cnt = 0, // the timer counter, for timer key
indexMapEn = 'second_minute_hour_day_week_month_year'.split('_'), indexMapEn = 'second_minute_hour_day_week_month_year'.split('_'),
...@@ -32,7 +30,7 @@ function () { ...@@ -32,7 +30,7 @@ function () {
SEC_ARRAY = [60, 60, 24, 7, 365/7/12, 12], SEC_ARRAY = [60, 60, 24, 7, 365/7/12, 12],
SEC_ARRAY_LEN = 6, SEC_ARRAY_LEN = 6,
ATTR_DATETIME = 'datetime'; ATTR_DATETIME = 'datetime';
// format Date / string / timestamp to Date instance. // format Date / string / timestamp to Date instance.
function toDate(input) { function toDate(input) {
if (input instanceof Date) return input; if (input instanceof Date) return input;
...@@ -236,4 +234,4 @@ function () { ...@@ -236,4 +234,4 @@ function () {
}; };
return timeagoFactory; return timeagoFactory;
}); });
\ No newline at end of file
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