feat: #8734, jquery-ui, jquery-form, timeago (#8748)

* feat: #8734, jquery-ui, jquery-form, timeago

get rid of forum/footer.js move that code to app.js & wait for app to load before calling ajaxify.end
make sockets.js a requirejs module
move jquery-ui to node_modules and load via requirejs
move jquery-form to node_modules and load via requirejs
move timeago to node_modules and load via requirejs
only include the css for needed jquery-ui widgets

* feat: keep socket/io global for backwards compat

* refactor: move socket listener to chat
v1.18.x
Barış Soner Uşaklı 4 years ago committed by GitHub
parent 666064bf46
commit fda2aedfd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -64,6 +64,8 @@
"html-to-text": "^5.1.1",
"ipaddr.js": "^2.0.0",
"jquery": "3.5.1",
"jquery-form": "4.3.0",
"jquery-ui": "1.12.1",
"jsesc": "3.0.1",
"json2csv": "5.0.3",
"jsonwebtoken": "^8.5.1",
@ -128,6 +130,7 @@
"spider-detector": "2.0.0",
"textcomplete": "^0.17.1",
"textcomplete.contenteditable": "^0.1.1",
"timeago": "^1.6.7",
"tinycon": "0.6.8",
"toobusy-js": "^0.5.1",
"uglify-es": "^3.3.9",

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@ -0,0 +1,9 @@
@import (inline) 'jquery-ui/themes/base/core.css';
@import (inline) 'jquery-ui/themes/base/menu.css';
@import (inline) 'jquery-ui/themes/base/button.css';
@import (inline) 'jquery-ui/themes/base/datepicker.css';
@import (inline) 'jquery-ui/themes/base/autocomplete.css';
@import (inline) 'jquery-ui/themes/base/resizable.css';
@import (inline) 'jquery-ui/themes/base/draggable.css';
@import (inline) 'jquery-ui/themes/base/sortable.css';
@import (inline) 'jquery-ui/themes/base/theme.css';

@ -10,6 +10,7 @@ app.flags = {};
app.cacheBuster = null;
(function () {
var appLoaded = false;
var params = utils.params();
var showWelcomeMessage = !!params.loggedin;
var registerMessage = params.register;
@ -26,6 +27,16 @@ app.cacheBuster = null;
app.load();
});
app.coldLoad = function () {
if (appLoaded) {
ajaxify.coldLoad();
} else {
$(window).on('action:app.load', function () {
ajaxify.coldLoad();
});
}
};
app.handleEarlyClicks = function () {
/**
* Occasionally, a button or anchor (not meant to be ajaxified) is clicked before
@ -61,8 +72,6 @@ app.cacheBuster = null;
app.handleEarlyClicks();
app.load = function () {
overrides.overrideTimeago();
handleStatusChange();
if (config.searchEnabled) {
@ -88,14 +97,38 @@ app.cacheBuster = null;
app.showCookieWarning();
registerServiceWorker();
require(['taskbar', 'helpers', 'forum/pagination'], function (taskbar, helpers, pagination) {
require([
'taskbar',
'helpers',
'forum/pagination',
'translator',
'forum/unread',
'forum/header/notifications',
'forum/header/chat',
'timeago/jquery.timeago',
'jquery-form',
], function (taskbar, helpers, pagination, translator, unread, notifications, chat) {
notifications.prepareDOM();
chat.prepareDOM();
translator.prepareDOM();
taskbar.init();
helpers.register();
pagination.init();
$(window).trigger('action:app.load');
if (app.user.uid > 0) {
unread.initUnreadTopics();
}
overrides.overrideTimeago();
if (app.user.timeagoCode && app.user.timeagoCode !== 'en') {
require(['timeago/locales/jquery.timeago.' + app.user.timeagoCode], function () {
$(window).trigger('action:app.load');
appLoaded = true;
});
} else {
$(window).trigger('action:app.load');
appLoaded = true;
}
});
};
@ -657,12 +690,15 @@ app.cacheBuster = null;
if (typeof $().autocomplete === 'function') {
return callback();
}
var scriptEl = document.createElement('script');
scriptEl.type = 'text/javascript';
scriptEl.src = config.relative_path + '/assets/vendor/jquery/js/jquery-ui.js?' + config['cache-buster'];
scriptEl.onload = callback;
document.head.appendChild(scriptEl);
require([
'jquery-ui/widgets/datepicker',
'jquery-ui/widgets/autocomplete',
'jquery-ui/widgets/sortable',
'jquery-ui/widgets/resizable',
'jquery-ui/widgets/draggable',
], function () {
callback();
});
};
app.showEmailConfirmWarning = function (err) {

@ -91,7 +91,11 @@ define('forum/account/settings', ['forum/account/header', 'components', 'transla
htmlEl.attr('data-dir', translated);
htmlEl.css('direction', translated);
});
$.getScript(config.relative_path + '/assets/vendor/jquery/timeago/locales/jquery.timeago.' + utils.userLangToTimeagoCode(config.userLang) + '.js', function () {
var stringsModule = 'timeago/locales/jquery.timeago.' + utils.userLangToTimeagoCode(config.userLang);
// without undef, requirejs won't load the strings a second time
require.undef(stringsModule);
require([stringsModule], function () {
overrides.overrideTimeago();
ajaxify.refresh();
});

@ -1,24 +0,0 @@
'use strict';
define('forum/footer', [
'components',
'translator',
'forum/unread',
'forum/header/notifications',
'forum/header/chat',
], function (components, translator, Unread, Notifications, Chat) {
Notifications.prepareDOM();
Chat.prepareDOM();
translator.prepareDOM();
socket.on('event:unread.updateChatCount', function (count) {
components.get('chat/icon')
.toggleClass('unread-count', count > 0)
.attr('data-content', count > 99 ? '99+' : count);
});
if (app.user.uid > 0) {
Unread.initUnreadTopics();
}
});

@ -26,6 +26,12 @@ define('forum/header/chat', ['components'], function (components) {
socket.removeListener('event:chats.roomRename', onRoomRename);
socket.on('event:chats.roomRename', onRoomRename);
socket.on('event:unread.updateChatCount', function (count) {
components.get('chat/icon')
.toggleClass('unread-count', count > 0)
.attr('data-content', count > 99 ? '99+' : count);
});
};
function onChatMessageReceived(data) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

@ -1,845 +0,0 @@
/*! jQuery UI - v1.12.0 - 2016-08-26
* http://jqueryui.com
* Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, autocomplete.css, menu.css, datepicker.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=smoothness&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cd0a0a&fcError=cd0a0a&borderColorError=cd0a0a&bgImgOpacityError=95&bgTextureError=glass&bgColorError=fef1ec&iconColorHighlight=2e83ff&fcHighlight=363636&borderColorHighlight=fcefa1&bgImgOpacityHighlight=55&bgTextureHighlight=glass&bgColorHighlight=fbf9ee&iconColorActive=454545&fcActive=212121&borderColorActive=aaaaaa&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=glass&bgColorHover=dadada&iconColorDefault=888888&fcDefault=555555&borderColorDefault=d3d3d3&bgImgOpacityDefault=75&bgTextureDefault=glass&bgColorDefault=e6e6e6&iconColorContent=222222&fcContent=222222&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=222222&fcHeader=222222&borderColorHeader=aaaaaa&bgImgOpacityHeader=75&bgTextureHeader=highlight_soft&bgColorHeader=cccccc&cornerRadius=4px&fsDefault=1.1em&fwDefault=normal&ffDefault=Verdana%2CArial%2Csans-serif
* Copyright jQuery Foundation and other contributors; Licensed MIT */
.ui-draggable-handle {
-ms-touch-action: none;
touch-action: none;
}
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
pointer-events: none;
}
/* Icons
----------------------------------*/
.ui-icon {
display: inline-block;
vertical-align: middle;
margin-top: -.25em;
position: relative;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
.ui-widget-icon-block {
left: 50%;
margin-left: -8px;
display: block;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
-ms-touch-action: none;
touch-action: none;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0;
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: sw-resize;
width: 9px;
height: 9px;
left: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
.ui-selectable {
-ms-touch-action: none;
touch-action: none;
}
.ui-selectable-helper {
position: absolute;
z-index: 100;
border: 1px dotted black;
}
.ui-sortable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: 0;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
margin: 0;
cursor: pointer;
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-item-wrapper {
position: relative;
padding: 3px 1em 3px .4em;
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item-wrapper {
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
display: none;
}
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
position: absolute;
top: 2px;
width: 1.8em;
height: 1.8em;
}
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
top: 1px;
}
.ui-datepicker .ui-datepicker-prev {
left: 2px;
}
.ui-datepicker .ui-datepicker-next {
right: 2px;
}
.ui-datepicker .ui-datepicker-prev-hover {
left: 1px;
}
.ui-datepicker .ui-datepicker-next-hover {
right: 1px;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
display: block;
position: absolute;
left: 50%;
margin-left: -8px;
top: 50%;
margin-top: -8px;
}
.ui-datepicker .ui-datepicker-title {
margin: 0 2.3em;
line-height: 1.8em;
text-align: center;
}
.ui-datepicker .ui-datepicker-title select {
font-size: 1em;
margin: 1px 0;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
width: 45%;
}
.ui-datepicker table {
width: 100%;
font-size: .9em;
border-collapse: collapse;
margin: 0 0 .4em;
}
.ui-datepicker th {
padding: .7em .3em;
text-align: center;
font-weight: bold;
border: 0;
}
.ui-datepicker td {
border: 0;
padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
display: block;
padding: .2em;
text-align: right;
text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
background-image: none;
margin: .7em 0 0 0;
padding: 0 .2em;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
float: right;
margin: .5em .2em .4em;
cursor: pointer;
padding: .2em .6em .3em .6em;
width: auto;
overflow: visible;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
float: left;
}
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi {
width: auto;
}
.ui-datepicker-multi .ui-datepicker-group {
float: left;
}
.ui-datepicker-multi .ui-datepicker-group table {
width: 95%;
margin: 0 auto .4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
width: 50%;
}
.ui-datepicker-multi-3 .ui-datepicker-group {
width: 33.3%;
}
.ui-datepicker-multi-4 .ui-datepicker-group {
width: 25%;
}
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
border-left-width: 0;
}
.ui-datepicker-multi .ui-datepicker-buttonpane {
clear: left;
}
.ui-datepicker-row-break {
clear: both;
width: 100%;
font-size: 0;
}
/* RTL support */
.ui-datepicker-rtl {
direction: rtl;
}
.ui-datepicker-rtl .ui-datepicker-prev {
right: 2px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next {
left: 2px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-prev:hover {
right: 1px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next:hover {
left: 1px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane {
clear: right;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
float: left;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
.ui-datepicker-rtl .ui-datepicker-group {
float: right;
}
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
border-right-width: 0;
border-left-width: 1px;
}
/* Icons */
.ui-datepicker .ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
left: .5em;
top: .3em;
}
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Verdana,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Verdana,Arial,sans-serif;
font-size: 1em;
}
.ui-widget.ui-widget-content {
border: 1px solid #d3d3d3;
}
.ui-widget-content {
border: 1px solid #aaaaaa;
background: #ffffff;
color: #222222;
}
.ui-widget-content a {
color: #222222;
}
.ui-widget-header {
border: 1px solid #aaaaaa;
background: #cccccc url("./vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
color: #222222;
font-weight: bold;
}
.ui-widget-header a {
color: #222222;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
/* We use html here because we need a greater specificity to make sure disabled
works properly when clicked or hovered */
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border: 1px solid #d3d3d3;
background: #e6e6e6 url("./vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
font-weight: normal;
color: #555555;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
color: #555555;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
border: 1px solid #999999;
background: #dadada url("./vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
font-weight: normal;
color: #212121;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
color: #212121;
text-decoration: none;
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px rgb(94, 158, 214);
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border: 1px solid #aaaaaa;
background: #ffffff url("./vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
font-weight: normal;
color: #212121;
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
border: #aaaaaa;
background-color: #212121;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #212121;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fcefa1;
background: #fbf9ee url("./vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
color: #363636;
}
.ui-state-checked {
border: 1px solid #fcefa1;
background: #fbf9ee;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #fef1ec url("./vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
color: #cd0a0a;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #cd0a0a;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #cd0a0a;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png");
}
.ui-button .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon,
.ui-button:hover .ui-icon,
.ui-button:focus .ui-icon,
.ui-state-default .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png");
}
.ui-state-active .ui-icon,
.ui-button:active .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png");
}
.ui-state-highlight .ui-icon,
.ui-button .ui-state-highlight.ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("./vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-caret-1-n { background-position: 0 0; }
.ui-icon-caret-1-ne { background-position: -16px 0; }
.ui-icon-caret-1-e { background-position: -32px 0; }
.ui-icon-caret-1-se { background-position: -48px 0; }
.ui-icon-caret-1-s { background-position: -65px 0; }
.ui-icon-caret-1-sw { background-position: -80px 0; }
.ui-icon-caret-1-w { background-position: -96px 0; }
.ui-icon-caret-1-nw { background-position: -112px 0; }
.ui-icon-caret-2-n-s { background-position: -128px 0; }
.ui-icon-caret-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -65px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -65px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa;
opacity: .3;
filter: Alpha(Opacity=30); /* support: IE8 */
}
.ui-widget-shadow {
-webkit-box-shadow: -8px -8px 8px #aaaaaa;
box-shadow: -8px -8px 8px #aaaaaa;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,229 +0,0 @@
/**
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
*
* @name timeago
* @version 1.5.3
* @requires jQuery v1.2.3+
* @author Ryan McGeary
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
*
* For usage and examples, visit:
* http://timeago.yarp.com/
*
* Copyright (c) 2008-2015, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
$.timeago = function(timestamp) {
if (timestamp instanceof Date) {
return inWords(timestamp);
} else if (typeof timestamp === "string") {
return inWords($.timeago.parse(timestamp));
} else if (typeof timestamp === "number") {
return inWords(new Date(timestamp));
} else {
return inWords($.timeago.datetime(timestamp));
}
};
var $t = $.timeago;
$.extend($.timeago, {
settings: {
refreshMillis: 60000,
allowPast: true,
allowFuture: false,
localeTitle: false,
cutoff: 0,
autoDispose: true,
strings: {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ago",
suffixFromNow: "from now",
inPast: 'any moment now',
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
hours: "about %d hours",
day: "a day",
days: "%d days",
month: "about a month",
months: "%d months",
year: "about a year",
years: "%d years",
wordSeparator: " ",
numbers: []
}
},
inWords: function(distanceMillis) {
if (!this.settings.allowPast && ! this.settings.allowFuture) {
throw 'timeago allowPast and allowFuture settings can not both be set to false.';
}
var $l = this.settings.strings;
var prefix = $l.prefixAgo;
var suffix = $l.suffixAgo;
if (this.settings.allowFuture) {
if (distanceMillis < 0) {
prefix = $l.prefixFromNow;
suffix = $l.suffixFromNow;
}
}
if (!this.settings.allowPast && distanceMillis >= 0) {
return this.settings.strings.inPast;
}
var seconds = Math.abs(distanceMillis) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
var years = days / 365;
function substitute(stringOrFunction, number) {
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
var value = ($l.numbers && $l.numbers[number]) || number;
return string.replace(/%d/i, value);
}
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
seconds < 90 && substitute($l.minute, 1) ||
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
minutes < 90 && substitute($l.hour, 1) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 42 && substitute($l.day, 1) ||
days < 30 && substitute($l.days, Math.round(days)) ||
days < 45 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.round(days / 30)) ||
years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years));
var separator = $l.wordSeparator || "";
if ($l.wordSeparator === undefined) { separator = " "; }
return $.trim([prefix, words, suffix].join(separator));
},
parse: function(iso8601) {
var s = $.trim(iso8601);
s = s.replace(/\.\d+/,""); // remove milliseconds
s = s.replace(/-/,"/").replace(/-/,"/");
s = s.replace(/T/," ").replace(/Z/," UTC");
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
return new Date(s);
},
datetime: function(elem) {
var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
return $t.parse(iso8601);
},
isTime: function(elem) {
// jQuery's `is()` doesn't play well with HTML5 in IE
return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
}
});
// functions that can be called via $(el).timeago('action')
// init is default when no action is given
// functions are called with context of a single element
var functions = {
init: function() {
var refresh_el = $.proxy(refresh, this);
refresh_el();
var $s = $t.settings;
if ($s.refreshMillis > 0) {
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
}
},
update: function(timestamp) {
var date = (timestamp instanceof Date) ? timestamp : $t.parse(timestamp);
$(this).data('timeago', { datetime: date });
if ($t.settings.localeTitle) $(this).attr("title", date.toLocaleString());
refresh.apply(this);
},
updateFromDOM: function() {
$(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
refresh.apply(this);
},
dispose: function () {
if (this._timeagoInterval) {
window.clearInterval(this._timeagoInterval);
this._timeagoInterval = null;
}
}
};
$.fn.timeago = function(action, options) {
var fn = action ? functions[action] : functions.init;
if (!fn) {
throw new Error("Unknown function name '"+ action +"' for timeago");
}
// each over objects here and call the requested function
this.each(function() {
fn.call(this, options);
});
return this;
};
function refresh() {
var $s = $t.settings;
//check if it's still visible
if ($s.autoDispose && !$.contains(document.documentElement,this)) {
//stop if it has been removed
$(this).timeago("dispose");
return this;
}
var data = prepareData(this);
if (!isNaN(data.datetime)) {
if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
$(this).text(inWords(data.datetime));
} else {
if ($(this).attr('title').length > 0) {
$(this).text($(this).attr('title'));
}
}
}
return this;
}
function prepareData(element) {
element = $(element);
if (!element.data("timeago")) {
element.data("timeago", { datetime: $t.datetime(element) });
var text = $.trim(element.text());
if ($t.settings.localeTitle) {
element.attr("title", element.data('timeago').datetime.toLocaleString());
} else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
element.attr("title", text);
}
}
return element.data("timeago");
}
function inWords(date) {
return $t.inWords(distance(date));
}
function distance(date) {
return (new Date().getTime() - date.getTime());
}
// fix for IE6 suckage
document.createElement("abbr");
document.createElement("time");
}));

@ -1,27 +0,0 @@
# Locale override examples for timeago
You can represent time statements in most western languages where
a prefix and/or suffix is used.
The default case is to use suffix only (as in English), which you
do by providing the `suffixAgo` and `suffixFromNow` settings in
the strings hash (earlier versions of timeago used the deprecated
`ago` and `fromNow` options). If present, they are used.
2 minutes [suffixAgo]
2 minutes [suffixFromNow]
In case you want to use prefix only instead of
suffix (e.g. Greek), you provide the `prefixAgo` and
`prefixFromNow` options in the strings hash and leave `suffixAgo`
and `suffixFromNow` empty or null.
[prefixAgo] 2 minutes
[prefixFromNow] 2 minutes
For languages where you want to use a prefix only for future
tense and prefix/suffix for past tense (for example swedish), you
can combine the prefix and suffixes as needed.
[prefixAgo] 2 minutes [suffixAgo]
[prefixFromNow] 2 minutes

@ -1,20 +0,0 @@
// Afrikaans
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "gelede",
suffixFromNow: "van nou af",
seconds: "%d sekondes",
minute: "1 minuut",
minutes: "%d minute",
hour: "1 uur",
hours: "%d ure",
day: "1 dag",
days: "%d dae",
month: "1 maand",
months: "%d maande",
year: "1 jaar",
years: "%d jaar",
wordSeparator: " ",
numbers: []
};

@ -1,96 +0,0 @@
(function() {
function numpf(n, a) {
return a[plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5];
}
jQuery.timeago.settings.strings = {
prefixAgo: "منذ",
prefixFromNow: "بعد",
suffixAgo: null,
suffixFromNow: null, // null OR "من الآن"
second: function(value) { return numpf(value, [
'أقل من ثانية',
'ثانية واحدة',
'ثانيتين',
'%d ثوانٍ',
'%d ثانية',
'%d ثانية']); },
seconds: function(value) { return numpf(value, [
'أقل من ثانية',
'ثانية واحدة',
'ثانيتين',
'%d ثوانٍ',
'%d ثانية',
'%d ثانية']); },
minute: function(value) { return numpf(value, [
'أقل من دقيقة',
'دقيقة واحدة',
'دقيقتين',
'%d دقائق',
'%d دقيقة',
'دقيقة']); },
minutes: function(value) { return numpf(value, [
'أقل من دقيقة',
'دقيقة واحدة',
'دقيقتين',
'%d دقائق',
'%d دقيقة',
'دقيقة']); },
hour: function(value) { return numpf(value, [
'أقل من ساعة',
'ساعة واحدة',
'ساعتين',
'%d ساعات',
'%d ساعة',
'%d ساعة']); },
hours: function(value) { return numpf(value, [
'أقل من ساعة',
'ساعة واحدة',
'ساعتين',
'%d ساعات',
'%d ساعة',
'%d ساعة']); },
day: function(value) { return numpf(value, [
'أقل من يوم',
'يوم واحد',
'يومين',
'%d أيام',
'%d يومًا',
'%d يوم']); },
days: function(value) { return numpf(value, [
'أقل من يوم',
'يوم واحد',
'يومين',
'%d أيام',
'%d يومًا',
'%d يوم']); },
month: function(value) { return numpf(value, [
'أقل من شهر',
'شهر واحد',
'شهرين',
'%d أشهر',
'%d شهرًا',
'%d شهر']); },
months: function(value) { return numpf(value, [
'أقل من شهر',
'شهر واحد',
'شهرين',
'%d أشهر',
'%d شهرًا',
'%d شهر']); },
year: function(value) { return numpf(value, [
'أقل من عام',
'عام واحد',
'%d عامين',
'%d أعوام',
'%d عامًا']);
},
years: function(value) { return numpf(value, [
'أقل من عام',
'عام واحد',
'عامين',
'%d أعوام',
'%d عامًا',
'%d عام']);}
};
})();

@ -1,20 +0,0 @@
// Azerbaijani shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: '1 dəq',
minute: '1 dəq',
minutes: '%d dəq',
hour: '1 saat',
hours: '%d saat',
day: '1 gün',
days: '%d gün',
month: '1 ay',
months: '%d ay',
year: '1 il',
years: '%d il',
wordSeparator: '',
numbers: []
};

@ -1,20 +0,0 @@
// Azerbaijani
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'əvvəl',
suffixFromNow: 'sonra',
seconds: 'saniyələr',
minute: '1 dəqiqə',
minutes: '%d dəqiqə',
hour: '1 saat',
hours: '%d saat',
day: '1 gün',
days: '%d gün',
month: '1 ay',
months: '%d ay',
year: '1 il',
years: '%d il',
wordSeparator: '',
numbers: []
};

@ -1,18 +0,0 @@
// Bulgarian
jQuery.timeago.settings.strings = {
prefixAgo: "преди",
prefixFromNow: "след",
suffixAgo: null,
suffixFromNow: null,
seconds: "по-малко от минута",
minute: "една минута",
minutes: "%d минути",
hour: "един час",
hours: "%d часа",
day: "един ден",
days: "%d дни",
month: "един месец",
months: "%d месеца",
year: "една година",
years: "%d години"
};

@ -1,49 +0,0 @@
// Bosnian
(function() {
var numpf;
numpf = function(n, f, s, t) {
var n10;
n10 = n % 10;
if (n10 === 1 && (n === 1 || n > 20)) {
return f;
} else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
return s;
} else {
return t;
}
};
jQuery.timeago.settings.strings = {
prefixAgo: "prije",
prefixFromNow: "za",
suffixAgo: null,
suffixFromNow: null,
second: "sekund",
seconds: function(value) {
return numpf(value, "%d sekund", "%d sekunde", "%d sekundi");
},
minute: "oko minut",
minutes: function(value) {
return numpf(value, "%d minut", "%d minute", "%d minuta");
},
hour: "oko sat",
hours: function(value) {
return numpf(value, "%d sat", "%d sata", "%d sati");
},
day: "oko jednog dana",
days: function(value) {
return numpf(value, "%d dan", "%d dana", "%d dana");
},
month: "mjesec dana",
months: function(value) {
return numpf(value, "%d mjesec", "%d mjeseca", "%d mjeseci");
},
year: "prije godinu dana ",
years: function(value) {
return numpf(value, "%d godinu", "%d godine", "%d godina");
},
wordSeparator: " "
};
}).call(this);

@ -1,18 +0,0 @@
// Catalan
jQuery.timeago.settings.strings = {
prefixAgo: "fa",
prefixFromNow: "d'aqui a",
suffixAgo: null,
suffixFromNow: null,
seconds: "menys d'1 minut",
minute: "1 minut",
minutes: "uns %d minuts",
hour: "1 hora",
hours: "unes %d hores",
day: "1 dia",
days: "%d dies",
month: "aproximadament un mes",
months: "%d mesos",
year: "aproximadament un any",
years: "%d anys"
};

@ -1,24 +0,0 @@
// Czech
(function() {
function f(n, d, a) {
return a[d>=0 ? 0 : a.length==2 || n<5 ? 1 : 2];
}
jQuery.timeago.settings.strings = {
prefixAgo: 'před',
prefixFromNow: 'za',
suffixAgo: null,
suffixFromNow: null,
seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu']);},
minute: function(n, d) {return f(n, d, ['minutou', 'minutu']);},
minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut']);},
hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu']);},
hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin']);},
day: function(n, d) {return f(n, d, ['%d dnem', '%d den']);},
days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní']);},
month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc']);},
months: function(n, d) {return f(n, d, ['%d měsíci', '%d měsíce', '%d měsíců']);},
year: function(n, d) {return f(n, d, ['%d rokem', '%d rok']);},
years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let']);}
};
})();

@ -1,20 +0,0 @@
// Welsh
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "yn ôl",
suffixFromNow: "o hyn",
seconds: "llai na munud",
minute: "am funud",
minutes: "%d munud",
hour: "tua awr",
hours: "am %d awr",
day: "y dydd",
days: "%d diwrnod",
month: "tua mis",
months: "%d mis",
year: "am y flwyddyn",
years: "%d blynedd",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Danish
jQuery.timeago.settings.strings = {
prefixAgo: "for",
prefixFromNow: "om",
suffixAgo: "siden",
suffixFromNow: "",
seconds: "mindre end et minut",
minute: "ca. et minut",
minutes: "%d minutter",
hour: "ca. en time",
hours: "ca. %d timer",
day: "en dag",
days: "%d dage",
month: "ca. en måned",
months: "%d måneder",
year: "ca. et år",
years: "%d år"
};

@ -1,20 +0,0 @@
// German shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "s",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1T.",
days: "%dT.",
month: "1Mt.",
months: "%dMt.",
year: "1J.",
years: "%dJ.",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// German
jQuery.timeago.settings.strings = {
prefixAgo: "vor",
prefixFromNow: "in",
suffixAgo: "",
suffixFromNow: "",
seconds: "wenigen Sekunden",
minute: "etwa einer Minute",
minutes: "%d Minuten",
hour: "etwa einer Stunde",
hours: "%d Stunden",
day: "etwa einem Tag",
days: "%d Tagen",
month: "etwa einem Monat",
months: "%d Monaten",
year: "etwa einem Jahr",
years: "%d Jahren"
};

@ -1,22 +0,0 @@
/**
* Dhivehi time in Thaana for timeago.js
**/
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ކުރިން",
suffixFromNow: "ފަހުން",
seconds: "ސިކުންތުކޮޅެއް",
minute: "މިނިޓެއްވަރު",
minutes: "%d މިނިޓު",
hour: "ގަޑިއެއްވަރު",
hours: "ގާތްގަނޑަކަށް %d ގަޑިއިރު",
day: "އެއް ދުވަސް",
days: "މީގެ %d ދުވަސް",
month: "މަހެއްވަރު",
months: "މީގެ %d މަސް",
year: "އަހަރެއްވަރު",
years: "މީގެ %d އަހަރު",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Greek
jQuery.timeago.settings.strings = {
prefixAgo: "πριν",
prefixFromNow: "σε",
suffixAgo: "",
suffixFromNow: "",
seconds: "λιγότερο από ένα λεπτό",
minute: "περίπου ένα λεπτό",
minutes: "%d λεπτά",
hour: "περίπου μία ώρα",
hours: "περίπου %d ώρες",
day: "μία μέρα",
days: "%d μέρες",
month: "περίπου ένα μήνα",
months: "%d μήνες",
year: "περίπου ένα χρόνο",
years: "%d χρόνια"
};

@ -1,20 +0,0 @@
// English shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1d",
days: "%dd",
month: "1mo",
months: "%dmo",
year: "1yr",
years: "%dyr",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
// English (Template)
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ago",
suffixFromNow: "from now",
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
hours: "about %d hours",
day: "a day",
days: "%d days",
month: "about a month",
months: "%d months",
year: "about a year",
years: "%d years",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
// Spanish shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1d",
days: "%dd",
month: "1me",
months: "%dme",
year: "1a",
years: "%da",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Spanish
jQuery.timeago.settings.strings = {
prefixAgo: "hace",
prefixFromNow: "dentro de",
suffixAgo: "",
suffixFromNow: "",
seconds: "menos de un minuto",
minute: "un minuto",
minutes: "unos %d minutos",
hour: "una hora",
hours: "%d horas",
day: "un día",
days: "%d días",
month: "un mes",
months: "%d meses",
year: "un año",
years: "%d años"
};

@ -1,18 +0,0 @@
// Estonian
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "tagasi",
suffixFromNow: "pärast",
seconds: function(n, d) { return d < 0 ? "vähem kui minuti aja" : "vähem kui minut aega"; },
minute: function(n, d) { return d < 0 ? "umbes minuti aja" : "umbes minut aega"; },
minutes: function(n, d) { return d < 0 ? "%d minuti" : "%d minutit"; },
hour: function(n, d) { return d < 0 ? "umbes tunni aja" : "umbes tund aega"; },
hours: function(n, d) { return d < 0 ? "%d tunni" : "%d tundi"; },
day: function(n, d) { return d < 0 ? "umbes päeva" : "umbes päev"; },
days: function(n, d) { return d < 0 ? "%d päeva" : "%d päeva"; },
month: function(n, d) { return d < 0 ? "umbes kuu aja" : "umbes kuu aega"; },
months: function(n, d) { return d < 0 ? "%d kuu" : "%d kuud"; },
year: function(n, d) { return d < 0 ? "umbes aasta aja" : "umbes aasta aega"; },
years: function(n, d) { return d < 0 ? "%d aasta" : "%d aastat"; }
};

@ -1,17 +0,0 @@
jQuery.timeago.settings.strings = {
prefixAgo: "duela",
prefixFromNow: "hemendik",
suffixAgo: "",
suffixFromNow: "barru",
seconds: "minutu bat bainu gutxiago",
minute: "minutu bat",
minutes: "%d minutu inguru",
hour: "ordu bat",
hours: "%d ordu",
day: "egun bat",
days: "%d egun",
month: "hilabete bat",
months: "%d hilabete",
year: "urte bat",
years: "%d urte"
};

@ -1,20 +0,0 @@
// persion shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1دقیقه",
minute: "1دقیقه",
minutes: "%dدقیقه",
hour: "1ساعت",
hours: "%dساعت",
day: "1روز",
days: "%dروز",
month: "1ماه",
months: "%dماه",
year: "1سال",
years: "%dسال",
wordSeparator: " ",
numbers: []
};

@ -1,22 +0,0 @@

// Persian
// Use DIR attribute for RTL text in Persian Language for ABBR tag .
// By MB.seifollahi@gmail.com
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "پیش",
suffixFromNow: "از حال",
seconds: "کمتر از یک دقیقه",
minute: "حدود یک دقیقه",
minutes: "%d دقیقه",
hour: "حدود یک ساعت",
hours: "حدود %d ساعت",
day: "یک روز",
days: "%d روز",
month: "حدود یک ماه",
months: "%d ماه",
year: "حدود یک سال",
years: "%d سال",
wordSeparator: " "
};

@ -1,28 +0,0 @@
// Finnish
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "sitten",
suffixFromNow: "tulevaisuudessa",
seconds: "alle minuutti",
minute: "minuutti",
minutes: "%d minuuttia",
hour: "tunti",
hours: "%d tuntia",
day: "päivä",
days: "%d päivää",
month: "kuukausi",
months: "%d kuukautta",
year: "vuosi",
years: "%d vuotta"
};
// The above is not a great localization because one would usually
// write "2 days ago" in Finnish as "2 päivää sitten", however
// one would write "2 days into the future" as "2:n päivän päästä"
// which cannot be achieved with localization support this simple.
// This is because Finnish has word suffixes (attached directly
// to the end of the word). The word "day" is "päivä" in Finnish.
// As workaround, the above localizations will say
// "2 päivää tulevaisuudessa" which is understandable but
// not as fluent.

@ -1,16 +0,0 @@
// French shortened
jQuery.timeago.settings.strings = {
prefixAgo: "il y a",
prefixFromNow: "d'ici",
seconds: "moins d'une minute",
minute: "une minute",
minutes: "%d minutes",
hour: "une heure",
hours: "%d heures",
day: "un jour",
days: "%d jours",
month: "un mois",
months: "%d mois",
year: "un an",
years: "%d ans"
};

@ -1,17 +0,0 @@
// French
jQuery.timeago.settings.strings = {
// environ ~= about, it's optional
prefixAgo: "il y a",
prefixFromNow: "d'ici",
seconds: "moins d'une minute",
minute: "environ une minute",
minutes: "environ %d minutes",
hour: "environ une heure",
hours: "environ %d heures",
day: "environ un jour",
days: "environ %d jours",
month: "environ un mois",
months: "environ %d mois",
year: "un an",
years: "%d ans"
};

@ -1,18 +0,0 @@
// Galician
jQuery.timeago.settings.strings = {
prefixAgo: "hai",
prefixFromNow: "dentro de",
suffixAgo: "",
suffixFromNow: "",
seconds: "menos dun minuto",
minute: "un minuto",
minutes: "uns %d minutos",
hour: "unha hora",
hours: "%d horas",
day: "un día",
days: "%d días",
month: "un mes",
months: "%d meses",
year: "un ano",
years: "%d anos"
};

@ -1,16 +0,0 @@
// Hebrew
jQuery.timeago.settings.strings = {
prefixAgo: "לפני",
prefixFromNow: "עוד",
seconds: "פחות מדקה",
minute: "דקה",
minutes: "%d דקות",
hour: "שעה",
hours: function(number){return (number==2) ? "שעתיים" : "%d שעות";},
day: "יום",
days: function(number){return (number==2) ? "יומיים" : "%d ימים";},
month: "חודש",
months: function(number){return (number==2) ? "חודשיים" : "%d חודשים";},
year: "שנה",
years: function(number){return (number==2) ? "שנתיים" : "%d שנים";}
};

@ -1,49 +0,0 @@
// Croatian
(function () {
var numpf;
numpf = function (n, f, s, t) {
var n10;
n10 = n % 10;
if (n10 === 1 && (n === 1 || n > 20)) {
return f;
} else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
return s;
} else {
return t;
}
};
jQuery.timeago.settings.strings = {
prefixAgo: "prije",
prefixFromNow: "za",
suffixAgo: null,
suffixFromNow: null,
second: "sekundu",
seconds: function (value) {
return numpf(value, "%d sekundu", "%d sekunde", "%d sekundi");
},
minute: "oko minutu",
minutes: function (value) {
return numpf(value, "%d minutu", "%d minute", "%d minuta");
},
hour: "oko jedan sat",
hours: function (value) {
return numpf(value, "%d sat", "%d sata", "%d sati");
},
day: "jedan dan",
days: function (value) {
return numpf(value, "%d dan", "%d dana", "%d dana");
},
month: "mjesec dana",
months: function (value) {
return numpf(value, "%d mjesec", "%d mjeseca", "%d mjeseci");
},
year: "prije godinu dana",
years: function (value) {
return numpf(value, "%d godinu", "%d godine", "%d godina");
},
wordSeparator: " "
};
}).call(this);

@ -1,18 +0,0 @@
// Hungarian
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: null,
seconds: "kevesebb mint egy perce",
minute: "körülbelül egy perce",
minutes: "%d perce",
hour: "körülbelül egy órája",
hours: "körülbelül %d órája",
day: "körülbelül egy napja",
days: "%d napja",
month: "körülbelül egy hónapja",
months: "%d hónapja",
year: "körülbelül egy éve",
years: "%d éve"
};

@ -1,18 +0,0 @@
// Armenian
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "առաջ",
suffixFromNow: "հետո",
seconds: "վայրկյաններ",
minute: "մեկ րոպե",
minutes: "%d րոպե",
hour: "մեկ ժամ",
hours: "%d ժամ",
day: "մեկ օր",
days: "%d օր",
month: "մեկ ամիս",
months: "%d ամիս",
year: "մեկ տարի",
years: "%d տարի"
};

@ -1,18 +0,0 @@
// Indonesian
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "yang lalu",
suffixFromNow: "dari sekarang",
seconds: "kurang dari semenit",
minute: "sekitar satu menit",
minutes: "%d menit",
hour: "sekitar sejam",
hours: "sekitar %d jam",
day: "sehari",
days: "%d hari",
month: "sekitar sebulan",
months: "%d bulan",
year: "sekitar setahun",
years: "%d tahun"
};

@ -1,19 +0,0 @@
jQuery.timeago.settings.strings = {
prefixAgo: "fyrir",
prefixFromNow: "eftir",
suffixAgo: "síðan",
suffixFromNow: null,
seconds: "minna en mínútu",
minute: "mínútu",
minutes: "%d mínútum",
hour: "klukkutíma",
hours: "um %d klukkutímum",
day: "degi",
days: "%d dögum",
month: "mánuði",
months: "%d mánuðum",
year: "ári",
years: "%d árum",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
// Italian shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1g",
days: "%dg",
month: "1me",
months: "%dme",
year: "1a",
years: "%da",
wordSeparator: " ",
numbers: []
};

@ -1,16 +0,0 @@
// Italian
jQuery.timeago.settings.strings = {
suffixAgo: "fa",
suffixFromNow: "da ora",
seconds: "meno di un minuto",
minute: "circa un minuto",
minutes: "%d minuti",
hour: "circa un'ora",
hours: "circa %d ore",
day: "un giorno",
days: "%d giorni",
month: "circa un mese",
months: "%d mesi",
year: "circa un anno",
years: "%d anni"
};

@ -1,19 +0,0 @@
// Japanese
jQuery.timeago.settings.strings = {
prefixAgo: "",
prefixFromNow: "今から",
suffixAgo: "前",
suffixFromNow: "後",
seconds: "1 分未満",
minute: "約 1 分",
minutes: "%d 分",
hour: "約 1 時間",
hours: "約 %d 時間",
day: "約 1 日",
days: "約 %d 日",
month: "約 1 ヶ月",
months: "約 %d ヶ月",
year: "約 1 年",
years: "約 %d 年",
wordSeparator: ""
};

@ -1,18 +0,0 @@
// Javanesse (Boso Jowo)
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "kepungkur",
suffixFromNow: "seko saiki",
seconds: "kurang seko sakmenit",
minute: "kurang luwih sakmenit",
minutes: "%d menit",
hour: "kurang luwih sakjam",
hours: "kurang luwih %d jam",
day: "sedina",
days: "%d dina",
month: "kurang luwih sewulan",
months: "%d wulan",
year: "kurang luwih setahun",
years: "%d tahun"
};

@ -1,20 +0,0 @@
// Korean
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "전",
suffixFromNow: "후",
seconds: "1분",
minute: "약 1분",
minutes: "%d분",
hour: "약 1시간",
hours: "약 %d시간",
day: "하루",
days: "%d일",
month: "약 1개월",
months: "%d개월",
year: "약 1년",
years: "%d년",
wordSeparator: " ",
numbers: []
};

@ -1,34 +0,0 @@
// Russian
(function() {
function numpf(n, f, s, t) {
// f - 1, 21, 31, ...
// s - 2-4, 22-24, 32-34 ...
// t - 5-20, 25-30, ...
var n10 = n % 10;
if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
return f;
} else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
return s;
} else {
return t;
}
}
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "через",
suffixAgo: "мурун",
suffixFromNow: null,
seconds: "1 минуттан аз",
minute: "минута",
minutes: function(value) { return numpf(value, "%d минута", "%d минута", "%d минут"); },
hour: "саат",
hours: function(value) { return numpf(value, "%d саат", "%d саат", "%d саат"); },
day: "күн",
days: function(value) { return numpf(value, "%d күн", "%d күн", "%d күн"); },
month: "ай",
months: function(value) { return numpf(value, "%d ай", "%d ай", "%d ай"); },
year: "жыл",
years: function(value) { return numpf(value, "%d жыл", "%d жыл", "%d жыл"); }
};
})();

@ -1,20 +0,0 @@
//Lithuanian
jQuery.timeago.settings.strings = {
prefixAgo: "prieš",
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: "nuo dabar",
seconds: "%d sek.",
minute: "min.",
minutes: "%d min.",
hour: "val.",
hours: "%d val.",
day: "1 d.",
days: "%d d.",
month: "mėn.",
months: "%d mėn.",
year: "metus",
years: "%d metus",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
//Latvian
jQuery.timeago.settings.strings = {
prefixAgo: "pirms",
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: "no šī brīža",
seconds: "%d sek.",
minute: "min.",
minutes: "%d min.",
hour: "st.",
hours: "%d st.",
day: "1 d.",
days: "%d d.",
month: "mēnesis.",
months: "%d mēnesis.",
year: "gads",
years: "%d gads",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
// Macedonian
(function() {
jQuery.timeago.settings.strings={
prefixAgo: "пред",
prefixFromNow: "за",
suffixAgo: null,
suffixFromNow: null,
seconds: "%d секунди",
minute: "%d минута",
minutes: "%d минути",
hour: "%d час",
hours: "%d часа",
day: "%d ден",
days: "%d денови" ,
month: "%d месец",
months: "%d месеци",
year: "%d година",
years: "%d години"
};
})();

@ -1,20 +0,0 @@
// Dutch
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "over",
suffixAgo: "geleden",
suffixFromNow: null,
seconds: "minder dan een minuut",
minute: "ongeveer een minuut",
minutes: "%d minuten",
hour: "ongeveer een uur",
hours: "ongeveer %d uur",
day: "een dag",
days: "%d dagen",
month: "ongeveer een maand",
months: "%d maanden",
year: "ongeveer een jaar",
years: "%d jaar",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Norwegian
jQuery.timeago.settings.strings = {
prefixAgo: "for",
prefixFromNow: "om",
suffixAgo: "siden",
suffixFromNow: "",
seconds: "mindre enn et minutt",
minute: "ca. et minutt",
minutes: "%d minutter",
hour: "ca. en time",
hours: "ca. %d timer",
day: "en dag",
days: "%d dager",
month: "ca. en måned",
months: "%d måneder",
year: "ca. et år",
years: "%d år"
};

@ -1,31 +0,0 @@
// Polish
(function() {
function numpf(n, s, t) {
// s - 2-4, 22-24, 32-34 ...
// t - 5-21, 25-31, ...
var n10 = n % 10;
if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
return s;
} else {
return t;
}
}
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "za",
suffixAgo: "temu",
suffixFromNow: null,
seconds: "mniej niż minutę",
minute: "minutę",
minutes: function(value) { return numpf(value, "%d minuty", "%d minut"); },
hour: "godzinę",
hours: function(value) { return numpf(value, "%d godziny", "%d godzin"); },
day: "dzień",
days: "%d dni",
month: "miesiąc",
months: function(value) { return numpf(value, "%d miesiące", "%d miesięcy"); },
year: "rok",
years: function(value) { return numpf(value, "%d lata", "%d lat"); }
};
})();

@ -1,20 +0,0 @@
// Portuguese Brasil shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1d",
days: "%dd",
month: "1M",
months: "%dM",
year: "1a",
years: "%da",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Brazilian Portuguese
jQuery.timeago.settings.strings = {
prefixAgo: "há",
prefixFromNow: "em",
suffixAgo: null,
suffixFromNow: null,
seconds: "alguns segundos",
minute: "um minuto",
minutes: "%d minutos",
hour: "uma hora",
hours: "%d horas",
day: "um dia",
days: "%d dias",
month: "um mês",
months: "%d meses",
year: "um ano",
years: "%d anos"
};

@ -1,20 +0,0 @@
// Portuguese shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1m",
minute: "1m",
minutes: "%dm",
hour: "1h",
hours: "%dh",
day: "1d",
days: "%dd",
month: "1M",
months: "%dM",
year: "1a",
years: "%da",
wordSeparator: " ",
numbers: []
};

@ -1,16 +0,0 @@
// Portuguese
jQuery.timeago.settings.strings = {
suffixAgo: "atrás",
suffixFromNow: "a partir de agora",
seconds: "menos de um minuto",
minute: "cerca de um minuto",
minutes: "%d minutos",
hour: "cerca de uma hora",
hours: "cerca de %d horas",
day: "um dia",
days: "%d dias",
month: "cerca de um mês",
months: "%d meses",
year: "cerca de um ano",
years: "%d anos"
};

@ -1,18 +0,0 @@
// Romanian
jQuery.timeago.settings.strings = {
prefixAgo: "acum",
prefixFromNow: "in timp de",
suffixAgo: "",
suffixFromNow: "",
seconds: "mai putin de un minut",
minute: "un minut",
minutes: "%d minute",
hour: "o ora",
hours: "%d ore",
day: "o zi",
days: "%d zile",
month: "o luna",
months: "%d luni",
year: "un an",
years: "%d ani"
};

@ -1,49 +0,0 @@
// Serbian
(function () {
var numpf;
numpf = function (n, f, s, t) {
var n10;
n10 = n % 10;
if (n10 === 1 && (n === 1 || n > 20)) {
return f;
} else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
return s;
} else {
return t;
}
};
jQuery.timeago.settings.strings = {
prefixAgo: "pre",
prefixFromNow: "za",
suffixAgo: null,
suffixFromNow: null,
second: "sekund",
seconds: function (value) {
return numpf(value, "%d sekund", "%d sekunde", "%d sekundi");
},
minute: "oko minut",
minutes: function (value) {
return numpf(value, "%d minut", "%d minuta", "%d minuta");
},
hour: "oko jedan sat",
hours: function (value) {
return numpf(value, "%d sat", "%d sata", "%d sati");
},
day: "jedan dan",
days: function (value) {
return numpf(value, "%d dan", "%d dana", "%d dana");
},
month: "mesec dana",
months: function (value) {
return numpf(value, "%d mesec", "%d meseca", "%d meseci");
},
year: "godinu dana",
years: function (value) {
return numpf(value, "%d godinu", "%d godine", "%d godina");
},
wordSeparator: " "
};
}).call(this);

@ -1,34 +0,0 @@
// Russian
(function() {
function numpf(n, f, s, t) {
// f - 1, 21, 31, ...
// s - 2-4, 22-24, 32-34 ...
// t - 5-20, 25-30, ...
var n10 = n % 10;
if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
return f;
} else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
return s;
} else {
return t;
}
}
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "через",
suffixAgo: "назад",
suffixFromNow: null,
seconds: "меньше минуты",
minute: "минуту",
minutes: function(value) { return numpf(value, "%d минута", "%d минуты", "%d минут"); },
hour: "час",
hours: function(value) { return numpf(value, "%d час", "%d часа", "%d часов"); },
day: "день",
days: function(value) { return numpf(value, "%d день", "%d дня", "%d дней"); },
month: "месяц",
months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); },
year: "год",
years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); }
};
})();

@ -1,20 +0,0 @@
// Kinyarwanda
jQuery.timeago.settings.strings = {
prefixAgo: "hashize",
prefixFromNow: "mu",
suffixAgo: null,
suffixFromNow: null,
seconds: "amasegonda macye",
minute: "umunota",
minutes: "iminota %d",
hour: "isaha",
hours: "amasaha %d",
day: "umunsi",
days: "iminsi %d",
month: "ukwezi",
months: "amezi %d",
year: "umwaka",
years: "imyaka %d",
wordSeparator: " ",
numbers: []
};

@ -1,18 +0,0 @@
// Sinhalese (SI)
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "පෙර",
suffixFromNow: "පසුව",
seconds: "තත්පර කිහිපයකට",
minute: "මිනිත්තුවකට පමණ",
minutes: "මිනිත්තු %d කට",
hour: "පැයක් පමණ ",
hours: "පැය %d කට පමණ",
day: "දවසක ට",
days: "දවස් %d කට ",
month: "මාසයක් පමණ",
months: "මාස %d කට",
year: "වසරක් පමණ",
years: "වසරක් %d කට පමණ"
};

@ -1,18 +0,0 @@
// Slovak
jQuery.timeago.settings.strings = {
prefixAgo: "pred",
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: null,
seconds: "menej než minútou",
minute: "minútou",
minutes: "%d minútami",
hour: "hodinou",
hours: "%d hodinami",
day: "1 dňom",
days: "%d dňami",
month: "1 mesiacom",
months: "%d mesiacmi",
year: "1 rokom",
years: "%d rokmi"
};

@ -1,40 +0,0 @@
// Slovenian with support for dual
(function () {
var numpf;
numpf = function (n, a) {
return a[n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0];
};
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "čez",
suffixAgo: "nazaj",
suffixFromNow: null,
second: "sekundo",
seconds: function (value) {
return numpf(value, ["%d sekund", "%d sekundo", "%d sekundi", "%d sekunde"]);
},
minute: "minuto",
minutes: function (value) {
return numpf(value, ["%d minut", "%d minuto", "%d minuti", "%d minute"]);
},
hour: "eno uro",
hours: function (value) {
return numpf(value, ["%d ur", "%d uro", "%d uri", "%d ure"]);
},
day: "en dan",
days: function (value) {
return numpf(value, ["%d dni", "%d dan", "%d dneva", "%d dni"]);
},
month: "en mesec",
months: function (value) {
return numpf(value, ["%d mesecev", "%d mesec", "%d meseca", "%d mesece"]);
},
year: "eno leto",
years: function (value) {
return numpf(value, ["%d let", "%d leto", "%d leti", "%d leta"]);
},
wordSeparator: " "
};
}).call(this);

@ -1,49 +0,0 @@
// Serbian
(function () {
var numpf;
numpf = function (n, f, s, t) {
var n10;
n10 = n % 10;
if (n10 === 1 && (n === 1 || n > 20)) {
return f;
} else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
return s;
} else {
return t;
}
};
jQuery.timeago.settings.strings = {
prefixAgo: "пре",
prefixFromNow: "за",
suffixAgo: null,
suffixFromNow: null,
second: "секунд",
seconds: function (value) {
return numpf(value, "%d секунд", "%d секунде", "%d секунди");
},
minute: "један минут",
minutes: function (value) {
return numpf(value, "%d минут", "%d минута", "%d минута");
},
hour: "један сат",
hours: function (value) {
return numpf(value, "%d сат", "%d сата", "%d сати");
},
day: "један дан",
days: function (value) {
return numpf(value, "%d дан", "%d дана", "%d дана");
},
month: "месец дана",
months: function (value) {
return numpf(value, "%d месец", "%d месеца", "%d месеци");
},
year: "годину дана",
years: function (value) {
return numpf(value, "%d годину", "%d године", "%d година");
},
wordSeparator: " "
};
}).call(this);

@ -1,18 +0,0 @@
// Swedish
jQuery.timeago.settings.strings = {
prefixAgo: "för",
prefixFromNow: "om",
suffixAgo: "sedan",
suffixFromNow: "",
seconds: "mindre än en minut",
minute: "ungefär en minut",
minutes: "%d minuter",
hour: "ungefär en timme",
hours: "ungefär %d timmar",
day: "en dag",
days: "%d dagar",
month: "ungefär en månad",
months: "%d månader",
year: "ungefär ett år",
years: "%d år"
};

@ -1,20 +0,0 @@
// Thai
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ที่แล้ว",
suffixFromNow: "จากตอนนี้",
seconds: "น้อยกว่าหนึ่งนาที",
minute: "ประมาณหนึ่งนาที",
minutes: "%d นาที",
hour: "ประมาณหนึ่งชั่วโมง",
hours: "ประมาณ %d ชั่วโมง",
day: "หนึ่งวัน",
days: "%d วัน",
month: "ประมาณหนึ่งเดือน",
months: "%d เดือน",
year: "ประมาณหนึ่งปี",
years: "%d ปี",
wordSeparator: "",
numbers: []
};

@ -1,20 +0,0 @@
// Turkish shortened
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "",
suffixFromNow: "",
seconds: "1sn",
minute: "1d",
minutes: "%dd",
hour: "1s",
hours: "%ds",
day: "1g",
days: "%dg",
month: "1ay",
months: "%day",
year: "1y",
years: "%dy",
wordSeparator: " ",
numbers: []
};

@ -1,16 +0,0 @@
// Turkish
jQuery.timeago.settings.strings = {
suffixAgo: 'önce',
suffixFromNow: null,
seconds: '1 dakikadan',
minute: '1 dakika',
minutes: '%d dakika',
hour: '1 saat',
hours: '%d saat',
day: '1 gün',
days: '%d gün',
month: '1 ay',
months: '%d ay',
year: '1 yıl',
years: '%d yıl'
};

@ -1,34 +0,0 @@
// Ukrainian
(function() {
function numpf(n, f, s, t) {
// f - 1, 21, 31, ...
// s - 2-4, 22-24, 32-34 ...
// t - 5-20, 25-30, ...
var n10 = n % 10;
if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
return f;
} else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
return s;
} else {
return t;
}
}
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "через",
suffixAgo: "тому",
suffixFromNow: null,
seconds: "менше хвилини",
minute: "хвилина",
minutes: function(value) { return numpf(value, "%d хвилина", "%d хвилини", "%d хвилин"); },
hour: "година",
hours: function(value) { return numpf(value, "%d година", "%d години", "%d годин"); },
day: "день",
days: function(value) { return numpf(value, "%d день", "%d дні", "%d днів"); },
month: "місяць",
months: function(value) { return numpf(value, "%d місяць", "%d місяці", "%d місяців"); },
year: "рік",
years: function(value) { return numpf(value, "%d рік", "%d роки", "%d років"); }
};
})();

@ -1,19 +0,0 @@
//Uzbek
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "keyin",
suffixAgo: "avval",
suffixFromNow: null,
seconds: "bir necha soniya",
minute: "1 daqiqa",
minutes: function(value) { return "%d daqiqa"; },
hour: "1 soat",
hours: function(value) { return "%d soat"; },
day: "1 kun",
days: function(value) { return "%d kun"; },
month: "1 oy",
months: function(value) { return "%d oy"; },
year: "1 yil",
years: function(value) { return "%d yil"; },
wordSeparator: " "
};

@ -1,20 +0,0 @@
// Vietnamese
jQuery.timeago.settings.strings = {
prefixAgo: 'cách đây',
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: "trước",
seconds: "chưa đến một phút",
minute: "khoảng một phút",
minutes: "%d phút",
hour: "khoảng một tiếng",
hours: "khoảng %d tiếng",
day: "một ngày",
days: "%d ngày",
month: "khoảng một tháng",
months: "%d tháng",
year: "khoảng một năm",
years: "%d năm",
wordSeparator: " ",
numbers: []
};

@ -1,20 +0,0 @@
// Simplified Chinese
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "从现在开始",
suffixAgo: "之前",
suffixFromNow: null,
seconds: "不到1分钟",
minute: "大约1分钟",
minutes: "%d分钟",
hour: "大约1小时",
hours: "大约%d小时",
day: "1天",
days: "%d天",
month: "大约1个月",
months: "%d月",
year: "大约1年",
years: "%d年",
numbers: [],
wordSeparator: ""
};

@ -1,20 +0,0 @@
// Traditional Chinese, zh-tw
jQuery.timeago.settings.strings = {
prefixAgo: null,
prefixFromNow: "從現在開始",
suffixAgo: "之前",
suffixFromNow: null,
seconds: "不到1分鐘",
minute: "大約1分鐘",
minutes: "%d分鐘",
hour: "大約1小時",
hours: "%d小時",
day: "大約1天",
days: "%d天",
month: "大約1個月",
months: "%d個月",
year: "大約1年",
years: "%d年",
numbers: [],
wordSeparator: ""
};

@ -2,11 +2,13 @@
const fs = require('fs');
const path = require('path');
const utils = require('./utils');
const paths = require('./constants').paths;
const Languages = module.exports;
const languagesPath = path.join(__dirname, '../build/public/language');
const files = fs.readdirSync(path.join(__dirname, '../public/vendor/jquery/timeago/locales'));
const files = fs.readdirSync(path.join(paths.nodeModules, '/timeago/locales'));
Languages.timeagoCodes = files.filter(f => f.startsWith('jquery.timeago')).map(f => f.split('.')[2]);
Languages.get = async function (language, namespace) {
@ -62,4 +64,13 @@ Languages.list = async function () {
return languages;
};
Languages.userTimeagoCode = async function (userLang) {
const languageCodes = await Languages.listCodes();
const timeagoCode = utils.userLangToTimeagoCode(userLang);
if (languageCodes.includes(userLang) && Languages.timeagoCodes.includes(timeagoCode)) {
return timeagoCode;
}
return '';
};
require('./promisify')(Languages);

@ -24,7 +24,7 @@ var buildImports = {
client: function (source) {
return '@import "./theme";\n' + source + '\n' + [
'@import "font-awesome";',
'@import (inline) "../public/vendor/jquery/css/smoothness/jquery-ui.css";',
'@import "../../public/less/jquery-ui.less";',
'@import (inline) "../public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.css";',
'@import (inline) "../public/vendor/colorpicker/colorpicker.css";',
'@import (inline) "../node_modules/cropperjs/dist/cropper.css";',
@ -43,7 +43,7 @@ var buildImports = {
'@import "../public/less/admin/admin";',
'@import "../public/less/generics.less";',
'@import (inline) "../public/vendor/colorpicker/colorpicker.css";',
'@import (inline) "../public/vendor/jquery/css/smoothness/jquery-ui.css";',
'@import "../../public/less/jquery-ui.less";',
'@import (inline) "../public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.css";',
'@import (inline) "../public/vendor/mdl/material.css";',
].map(function (str) {

@ -24,17 +24,15 @@ var JS = module.exports;
JS.scripts = {
base: [
'node_modules/promise-polyfill/dist/polyfill.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/socket.io-client/dist/socket.io.js',
'node_modules/requirejs/require.js',
'public/src/require-config.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/textcomplete/dist/textcomplete.min.js',
'node_modules/textcomplete.contenteditable/dist/textcomplete.codemirror.min.js',
'public/vendor/jquery/timeago/jquery.timeago.js',
'public/vendor/jquery/js/jquery.form.min.js',
'node_modules/visibilityjs/lib/visibility.core.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.min.js',
'node_modules/requirejs/require.js',
'public/src/require-config.js',
'public/vendor/bootbox/bootbox.js',
'public/vendor/bootbox/wrapper.js',
'public/vendor/xregexp/xregexp.js',
@ -50,7 +48,6 @@ JS.scripts = {
// files listed below are only available client-side, or are bundled in to reduce # of network requests on cold load
rjs: [
'public/src/client/footer.js',
'public/src/client/header/chat.js',
'public/src/client/header/notifications.js',
'public/src/client/infinitescroll.js',
@ -74,6 +71,7 @@ JS.scripts = {
'public/src/modules/navigator.js',
'public/src/modules/topicSelect.js',
'public/src/modules/topicList.js',
'public/src/modules/categoryFilter.js',
'public/src/modules/categorySelector.js',
'public/src/modules/categorySearch.js',
'public/src/modules/share.js',
@ -98,7 +96,7 @@ JS.scripts = {
'Chart.js': 'node_modules/chart.js/dist/Chart.min.js',
'mousetrap.js': 'node_modules/mousetrap/mousetrap.min.js',
'cropper.js': 'node_modules/cropperjs/dist/cropper.min.js',
'jqueryui.js': 'public/vendor/jquery/js/jquery-ui.js',
'jquery-ui': 'node_modules/jquery-ui/ui',
'zxcvbn.js': 'node_modules/zxcvbn/dist/zxcvbn.js',
ace: 'node_modules/ace-builds/src-min',
'clipboard.js': 'node_modules/clipboard/dist/clipboard.min.js',
@ -106,6 +104,8 @@ JS.scripts = {
'tinycon.js': 'node_modules/tinycon/tinycon.js',
'slideout.js': 'node_modules/slideout/dist/slideout.min.js',
'compare-versions.js': 'node_modules/compare-versions/index.js',
timeago: 'node_modules/timeago',
'jquery-form.js': 'node_modules/jquery-form/dist/jquery.form.min.js',
},
};

@ -68,6 +68,7 @@ async function generateHeader(req, res, data) {
user: user.getUserData(req.uid),
isEmailConfirmSent: (!meta.config.requireEmailConfirmation || req.uid <= 0) ? false : await db.get('uid:' + req.uid + ':confirm:email:sent'),
languageDirection: translator.translate('[[language:dir]]', res.locals.config.userLang),
timeagoCode: languages.userTimeagoCode(res.locals.config.userLang),
browserTitle: translator.translate(controllers.helpers.buildTitle(translator.unescape(data.title))),
navigation: navigation.get(req.uid),
banned: user.bans.isBanned(req.uid),
@ -95,6 +96,7 @@ async function generateHeader(req, res, data) {
results.user.isGlobalMod = results.isGlobalMod;
results.user.isMod = !!results.isModerator;
results.user.privileges = results.privileges;
results.user.timeagoCode = results.timeagoCode;
results.user[results.user.status] = true;
results.user.email = String(results.user.email);
@ -189,25 +191,9 @@ middleware.renderFooter = async function renderFooter(req, res, templateValues)
templateValues: templateValues,
});
const results = await utils.promiseParallel({
scripts: plugins.fireHook('filter:scripts.get', []),
timeagoLocale: (async () => {
const languageCodes = await languages.listCodes();
const userLang = res.locals.config.userLang;
const timeagoCode = utils.userLangToTimeagoCode(userLang);
if (languageCodes.includes(userLang) && languages.timeagoCodes.includes(timeagoCode)) {
const pathToLocaleFile = '/vendor/jquery/timeago/locales/jquery.timeago.' + timeagoCode + '.js';
return res.locals.config.assetBaseUrl + pathToLocaleFile;
}
return false;
})(),
});
const scripts = await plugins.fireHook('filter:scripts.get', []);
if (results.timeagoLocale) {
results.scripts.push(results.timeagoLocale);
}
data.templateValues.scripts = results.scripts.map(function (script) {
data.templateValues.scripts = scripts.map(function (script) {
return { src: script };
});

@ -11,7 +11,7 @@
<script>
window.addEventListener('DOMContentLoaded', function () {
$(document).ready(function () {
ajaxify.coldLoad();
app.coldLoad();
});
});
</script>

@ -12,13 +12,12 @@
}
function prepareFooter() {
require(['forum/footer']);
<!-- IF useCustomJS -->
{{customJS}}
<!-- ENDIF useCustomJS -->
$(document).ready(function () {
ajaxify.coldLoad();
app.coldLoad();
});
}
</script>
Loading…
Cancel
Save