feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run

- Base: wintercms/winter branch 1.2 (full framework)
- Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS
- Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication
- Partials: hero (offline-first), features, modes (offline/nube toggle),
  screenshots, pricing (3 planes), comparison, FAQ, CTA
- Plugin VivesPOS.Site with ContactForm
- Dockerfile: PHP 8.2 Apache, port 80, healthcheck
- Added winter/wn-pages, blog, sitemap, seo plugins
- Active theme set to vivespos
This commit is contained in:
2026-08-21 19:29:00 -06:00
commit 1f72193a64
3266 changed files with 531480 additions and 0 deletions

View File

@@ -0,0 +1 @@
!function(){"use strict";var r,n={},e={};function t(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return n[r](i,i.exports,t),i.exports}t.m=n,r=[],t.O=function(n,e,o,i){if(!e){var u=1/0;for(a=0;a<r.length;a++){e=r[a][0],o=r[a][1],i=r[a][2];for(var f=!0,c=0;c<e.length;c++)(!1&i||u>=i)&&Object.keys(t.O).every(function(r){return t.O[r](e[c])})?e.splice(c--,1):(f=!1,i<u&&(u=i));if(f){r.splice(a--,1);var s=o();void 0!==s&&(n=s)}}return n}i=i||0;for(var a=r.length;a>0&&r[a-1][2]>i;a--)r[a]=r[a-1];r[a]=[e,o,i]},t.d=function(r,n){for(var e in n)t.o(n,e)&&!t.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:n[e]})},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},function(){var r={21:0,778:0,321:0,955:0,71:0,261:0,214:0};t.O.j=function(n){return 0===r[n]};var n=function(n,e){var o,i,u=e[0],f=e[1],c=e[2],s=0;if(u.some(function(n){return 0!==r[n]})){for(o in f)t.o(f,o)&&(t.m[o]=f[o]);if(c)var a=c(t)}for(n&&n(e);s<u.length;s++)i=u[s],t.o(r,i)&&r[i]&&r[i][0](),r[i]=0;return t.O(a)},e=self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}()}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,393 @@
/*
* Exception Beautifier plugin
*/
+function ($) {
"use strict";
var ExceptionBeautifier = function (el, options) {
var self = this
self.$el = $(el)
self.options = options || {}
// Init
self.init()
}
ExceptionBeautifier.DEFAULTS = {}
ExceptionBeautifier.REGEX = {
phpline: /^(#[0-9]+)\s+(.+\.php)(?:\(([0-9]+)\))?\s*:(.*)/,
artisan: /^(#[0-9]+)\s+(.+artisan)(?:\(([0-9]+)\))?\s*:(.*)/,
internalLine: /^(#[0-9]+)\s+(\[internal function\]\s*:)(.*)/,
defaultLine: /^(#[0-9]+)\s*(.*)/,
className: /([a-z0-9]+\\[a-z0-9\\]+(?:\.\.\.)?)/gi,
filePath: /((?:[A-Z]:)?(?:[\\\/][\w\.-_~@%]+)\.(?:php|js|css|less|yaml|txt|ini))(\(([0-9]+)\)|:([0-9]+)|\s|$)/gi,
staticCall: /::([^( ]+)\(([^()]*|(?:[^(]*\(.+\)[^)]*))\)/,
functionCall: /->([^(]+)\(([^()]*|(?:[^(]*\(.+\)[^)]*))\)/,
closureCall: /\{closure\}\(([^()]*|(?:[^(]*\(.+\)[^)]*))\)/
}
ExceptionBeautifier.extensions = []
ExceptionBeautifier.prototype.init = function () {
var self = this,
markup
ExceptionBeautifier.extensions.forEach(function (extension) {
if (typeof extension.onInit === 'function') {
extension.onInit(self)
}
})
markup = self.parseSource(self.$el.html())
self.$el
.addClass('plugin-exception-beautifier')
.empty()
.append(markup)
}
ExceptionBeautifier.prototype.parseSource = function (raw) {
var self = this,
source = raw,
markup = {lines: []},
start = 0,
end
/*
* We only heavily parse stacktrace messages.
* Standard messages are only applied a simple transform : newline to <br> and tab/spaces indentation to &nbsp;
*/
if (source.indexOf('Stack trace:') < 0) {
source = '{exception-beautifier-message-container}{exception-beautifier-message}' + self.formatMessage(source) + '{/exception-beautifier-message}{/exception-beautifier-message-container}'
}
else {
end = source.indexOf('Stack trace:', start)
markup.message = source.substring(start, end)
start = source.indexOf('#', end)
while ((end = source.indexOf('#', start + 1)) > 0) {
markup.lines.push(self.parseLine(source.substring(start, end)))
start = end
}
markup.lines.push(self.parseLine(source.substring(start)))
source = '{exception-beautifier-message-container}' +
'{exception-beautifier-message}' + self.formatMessage(markup.message) + '{/exception-beautifier-message}' +
'{/exception-beautifier-message-container}' +
'{exception-beautifier-stacktrace#div}'
markup.lines.forEach(function (line) {
source += '{exception-beautifier-stacktrace-line}' + self.formatStackTraceLine(line) + '{/exception-beautifier-stacktrace-line}'
})
source += '{/exception-beautifier-stacktrace#div}'
ExceptionBeautifier.extensions.forEach(function (extension) {
if (typeof extension.onParse === 'function') {
extension.onParse(self)
}
})
}
markup = $(self.buildMarkup('{exception-beautifier-container}' + source + '{/exception-beautifier-container}'))
return self.finalizeMarkup(markup, raw)
}
ExceptionBeautifier.prototype.parseLine = function (str) {
var line = {},
matches
if ((matches = str.match(ExceptionBeautifier.REGEX.phpline)) || (matches = str.match(ExceptionBeautifier.REGEX.artisan))) {
line.type = 'phpline'
line.number = $.trim(matches[1])
line.file = $.trim(matches[2])
line.lineNumber = $.trim(matches[3])
line.function = $.trim(matches[4])
}
else if (matches = str.match(ExceptionBeautifier.REGEX.internalLine)) {
line.type = 'internal'
line.number = $.trim(matches[1])
line.internal = $.trim(matches[2])
line.function = $.trim(matches[3])
}
else if (matches = str.match(ExceptionBeautifier.REGEX.defaultLine)) {
line.type = 'default'
line.number = $.trim(matches[1])
line.function = $.trim(matches[2])
}
return line
}
ExceptionBeautifier.prototype.formatMessage = function (str) {
var self = this
return self.formatLineCode(
str
.replace(/^\s+/, '')
.replace(/\r\n|\r|\n/g, '{x-newline}')
.replace(/\t| {2}/g, '{x-tabulation}')
)
}
ExceptionBeautifier.prototype.formatFilePath = function (path, line) {
return '{exception-beautifier-file}' + path + '{/exception-beautifier-file}'
}
ExceptionBeautifier.prototype.formatStackTraceLine = function (line) {
var self = this
if (line.function) {
line.function = self.formatLineCode(line.function)
}
switch (line.type) {
case 'phpline':
return '{exception-beautifier-stacktrace-line-number}' + line.number + '{/exception-beautifier-stacktrace-line-number}' +
self.formatFilePath(line.file, line.lineNumber) +
'{exception-beautifier-line-number}(' + line.lineNumber + '):{/exception-beautifier-line-number} ' +
'{exception-beautifier-stacktrace-line-function}' + line.function + '{/exception-beautifier-stacktrace-line-function}'
case 'internal':
return '{exception-beautifier-stacktrace-line-number}' + line.number + '{/exception-beautifier-stacktrace-line-number}' +
'{exception-beautifier-stacktrace-line-internal}' + line.internal + '{/exception-beautifier-stacktrace-line-internal}' +
'{exception-beautifier-stacktrace-line-function}' + line.function + '{/exception-beautifier-stacktrace-line-function}'
case 'default':
return '{exception-beautifier-stacktrace-line-number}' + line.number + '{/exception-beautifier-stacktrace-line-number}' +
'{exception-beautifier-stacktrace-line-function}' + line.function + '{/exception-beautifier-stacktrace-line-function}'
}
return ''
}
ExceptionBeautifier.prototype.formatLineCode = function (str) {
var self = this
if (str.match(/^\s*(call_user_func|spl_autoload_call)/)) {
str = str.replace(/^\s*(?:call_user_func|spl_autoload_call)([^(]*)\((.*)\)/, function (str, suffix, parameters) {
return '{exception-beautifier-system-function}call_user_func' + suffix + '({/exception-beautifier-system-function}' +
self.formatFunctionParameters(parameters) +
'{exception-beautifier-system-function}){/exception-beautifier-system-function}'
})
}
else if (str.match(ExceptionBeautifier.REGEX.closureCall)) {
str = str.replace(ExceptionBeautifier.REGEX.closureCall, function (str, parameters) {
return '{exception-beautifier-function}{closure}({/exception-beautifier-function}' +
self.formatFunctionParameters(parameters) +
'{exception-beautifier-function}){/exception-beautifier-function}'
})
}
else if (str.match(ExceptionBeautifier.REGEX.functionCall)) {
str = str.replace(ExceptionBeautifier.REGEX.functionCall, function (str, functionName, parameters) {
return '{exception-beautifier-function}→' + functionName + '({/exception-beautifier-function}' +
self.formatFunctionParameters(parameters) +
'{exception-beautifier-function}){/exception-beautifier-function}'
})
}
else if (str.match(ExceptionBeautifier.REGEX.staticCall)) {
str = str.replace(ExceptionBeautifier.REGEX.staticCall, function (str, functionName, parameters) {
return '{exception-beautifier-function}::' + functionName + '({/exception-beautifier-function}' +
self.formatFunctionParameters(parameters) +
'{exception-beautifier-function}){/exception-beautifier-function}'
})
}
str = str.replace(ExceptionBeautifier.REGEX.filePath, function (str, path, line, lineNumber, altLineNumber) {
return self.formatFilePath(path, (lineNumber || '') + (altLineNumber || '')) +
($.trim(line).length > 0 ? ('{exception-beautifier-line-number}' + line + '{/exception-beautifier-line-number}') : ' ')
})
str = str.replace(ExceptionBeautifier.REGEX.className, function (str, name) {
return '{exception-beautifier-class}' + name + '{/exception-beautifier-class}'
})
return str
}
ExceptionBeautifier.prototype.formatFunctionParameters = function (parameters) {
return parameters
.replace(/^([0-9]+)|([^a-z\\])([0-9]+)$|^([0-9]+)([^a-z\\])|([^a-z\\])([0-9]+)([^a-z\\])/g, '$2$6{exception-beautifier-number}$1$3$4$7{/exception-beautifier-number}$5$8')
.replace(/^Array$|([^a-z\\])Array$|^Array([^a-z\\])|([^a-z\\])Array([^a-z\\])/g, '$1$3{exception-beautifier-code}Array{/exception-beautifier-code}$2$4')
.replace(/^Closure$|(\()Closure(\))/g, '$1{exception-beautifier-code}Closure{/exception-beautifier-code}$2')
.replace(/Object\(([^)]+)\)/g, '{exception-beautifier-code}Object({/exception-beautifier-code}$1{exception-beautifier-code}){/exception-beautifier-code}')
.replace(/"((?:\\.|[^"])*)"/g, '{exception-beautifier-string}"$1"{/exception-beautifier-string}')
.replace(/'((?:\\.|[^'])*)'/g, '{exception-beautifier-string}\'$1\'{/exception-beautifier-string}')
}
ExceptionBeautifier.prototype.buildMarkup = function (str) {
var self = this,
start = str.indexOf('{exception-beautifier-'),
cssOffset = 'exception-beautifier-'.length,
end, endtag, tmp, matches, tag, html, css, attrs, markup = ''
if (start >= 0) {
if (start > 0) {
markup += self.buildMarkup(str.substring(0, start))
}
while (start >= 0) {
end = endtag = str.indexOf('}', start)
if ((tmp = str.indexOf(' ', start)) >= 0) {
end = Math.min(end, tmp)
}
tag = str.substring(start + 1, end)
end = str.indexOf('{/' + tag + '}', start)
start = str.indexOf('}', start)
if (end < 0) {
throw 'Markup error tag {' + tag + '} not closed'
}
html = 'span'
attrs = ''
css = tag
if (matches = tag.match(/(.+)#([a-z]+)$/)) {
css = matches[1]
html = matches[2]
}
css = 'beautifier-' + css.substr(cssOffset)
if (tmp >= 0 && tmp < endtag) {
attrs = str.substring(tmp, endtag)
}
markup += '<' + html + ' class="' + css + '"' + attrs + '>'
markup += self.buildMarkup(str.substring(start + 1, end))
markup += '</' + html + '>'
end = end + ('{/' + tag + '}').length
start = str.indexOf('{exception-beautifier-', end)
if (start > end || start < 0) {
markup += self.buildMarkup(str.substring(end, start < 0 ? undefined : start))
}
}
}
else {
// Allow HTML entities
str = str.replace(/&amp;([^\s&;]+?);/g, '&$1;')
markup += str
.replace(/\{x-newline\}/g, '<br>')
.replace(/\{x-tabulation\}/g, '&nbsp;&nbsp;')
}
return markup
}
ExceptionBeautifier.prototype.finalizeMarkup = function (markup, source) {
var stacktrace,
messageContainer,
tabs,
iframe
markup.find('.beautifier-file').each(function () {
$(this).find('.beautifier-class').each(function () {
var $el = $(this)
$el.replaceWith($el.text())
})
})
markup.find('.beautifier-file+.beautifier-line-number').each(function () {
var $el = $(this)
$el.appendTo($el.prev())
})
messageContainer = markup.find('.beautifier-message-container')
stacktrace = markup.find('.beautifier-stacktrace').addClass('hidden')
if (!!stacktrace.length) {
$('<a class="beautifier-toggle-stacktrace" href="javascript:;"><span>' + $.wn.lang.get('eventlog.show_stacktrace') + '</span></a>')
.appendTo(messageContainer)
.on('click', function (event) {
event.preventDefault()
event.stopPropagation()
var $el = $(this)
$('.beautifier-stacktrace', markup).toggleClass('hidden')
$el.hide()
})
}
tabs = $('<div class="control-tabs content-tabs tabs-inset">' +
'<ul class="nav nav-tabs">' +
'<li class="active"><a href="#beautifier-tab-formatted">' + $.wn.lang.get('eventlog.tabs.formatted') + '</a></li>' +
'<li><a href="#beautifier-tab-raw">' + $.wn.lang.get('eventlog.tabs.raw') + '</a></li>' +
'</ul><div class="tab-content">' +
'<div class="tab-pane pane-inset active" id="beautifier-tab-formatted"></div>' +
'<div class="tab-pane pane-inset" id="beautifier-tab-raw"></div>' +
'</div></div>')
if (source.indexOf('Message-ID:') > 0) {
markup = source.trim().replace(/(?:^|<\/html>)[^]*?(?:<html|$)/g, function(m) {
return m.replace(/\r\n|\r|\n/g, '<br>').replace(/ {2}/g, '&nbsp;&nbsp;')
})
iframe = $('<iframe id="#beautifier-tab-formatted-iframe" style="width: 100%; height: 500px; padding: 0" frameborder="0"></iframe>')
}
/*
* Build tab content
*/
if (iframe) {
tabs.find('#beautifier-tab-formatted').append(iframe)
iframe.wrap('<div class="beautifier-formatted-content" />')
iframe.on('load', function() {
var $html = iframe.contents().find('html')
$html.html(markup)
$html.css({
'font-family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',
'font-size': '14px',
'color': '#74787e'
})
iframe.height($html.height() + 1)
})
}
else {
tabs.find('#beautifier-tab-formatted').append(markup)
}
tabs.find('#beautifier-tab-raw').append('<div class="beautifier-raw-content">' + source.trim().replace(/\r\n|\r|\n/g, '<br>').replace(/ {2}/g, '&nbsp;&nbsp;') + '</div>')
tabs.ocTab({
closable: false
})
return tabs
}
// EXCEPTION BEAUTIFIER PLUGIN DEFINITION
// ============================
$.fn.exceptionBeautifier = function (option) {
var args = arguments,
result
this.each(function () {
var $this = $(this)
var data = $this.data('oc.exceptionBeautifier')
var options = $.extend({}, ExceptionBeautifier.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('oc.exceptionBeautifier', (data = new ExceptionBeautifier(this, options)))
if (typeof option == 'string') result = data[option].call($this)
if (typeof result != 'undefined') return false
})
return result ? result : this
}
$.fn.exceptionBeautifier.Constructor = ExceptionBeautifier
$(document).render(function () {
$('[data-plugin="exception-beautifier"]').exceptionBeautifier()
})
}(window.jQuery)

View File

@@ -0,0 +1,137 @@
/*
* Exception Beautifier plugin - Links extension
*/
+function ($) {
"use strict";
var ExceptionBeautifier = $.fn.exceptionBeautifier.Constructor
ExceptionBeautifier.EDITORS = {
vscode: {scheme: 'vscode://file/%file:%line', name: 'VS Code (vscode://)'},
phpstorm: {scheme: 'phpstorm://open?file=%file&line=%line', name: 'PhpStorm (phpstorm://)'},
subl: {scheme: 'subl://open?url=file://%file&line=%line', name: 'Sublime (subl://)'},
txmt: {scheme: 'txmt://open/?url=file://%file&line=%line', name: 'TextMate (txmt://)'},
mvim: {scheme: 'mvim://open/?url=file://%file&line=%line', name: 'MacVim (mvim://)'},
editor: {scheme: 'editor://open/?file=%file&line=%line', name: 'Custom (editor://)'}
}
ExceptionBeautifier.REGEX.editor = /idelink:\/\/([^#]+)&([0-9]+)?/
ExceptionBeautifier.LINKER_POPUP_CONTENT = null
ExceptionBeautifier.extensions.push({
onInit: function (exceptionBeautfier) {
exceptionBeautfier.initEditorPopup()
},
onParse: function (exceptionBeautfier) {
exceptionBeautfier.$el.on('click', 'a[data-href]', function () {
exceptionBeautfier.openWithEditor($(this).data('href'))
})
}
})
ExceptionBeautifier.prototype.initEditorPopup = function () {
if (!ExceptionBeautifier.LINKER_POPUP_CONTENT) {
var title = $.wn.lang.get('eventlog.editor.title'),
description = $.wn.lang.get('eventlog.editor.description'),
openWith = $.wn.lang.get('eventlog.editor.openWith'),
rememberChoice = $.wn.lang.get('eventlog.editor.remember_choice'),
open = $.wn.lang.get('eventlog.editor.open'),
cancel = $.wn.lang.get('eventlog.editor.cancel'),
popup = $(' \
<div> \
<div class="modal-header"> \
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> \
<h4 class="modal-title">' + title + '</h4> \
</div> \
<div class="modal-body"> \
<p>' + description + '</p> \
<div class="form-group"> \
<label class="control-label">' + openWith + ':</label> \
<select class="form-control" name="select-exception-link-editor"></select> \
</div> \
<div class="checkbox custom-checkbox"> \
<input name="checkbox" value="1" type="checkbox" id="editor-remember-choice" /> \
<label for="editor-remember-choice">' + rememberChoice + '</label> \
</div> \
</div> \
<div class="modal-footer"> \
<button type="button" class="btn btn-primary" data-action="submit" data-dismiss="modal">' + open + '</button> \
<button type="button" class="btn btn-default" data-dismiss="popup">' + cancel + '</button> \
</div> \
</div>'
),
select = $('select', popup)
for (var key in ExceptionBeautifier.EDITORS) {
if (ExceptionBeautifier.EDITORS.hasOwnProperty(key)) {
select.append('<option value="' + key + '">' + $.wn.escapeHtmlString(ExceptionBeautifier.EDITORS[key].name) + '</option>')
}
}
ExceptionBeautifier.LINKER_POPUP_CONTENT = popup.html()
}
}
ExceptionBeautifier.prototype.openWithEditor = function (link) {
var self = this,
matches,
open = function (value) {
window.open(link.replace(
ExceptionBeautifier.REGEX.editor,
ExceptionBeautifier.EDITORS[value].scheme
.replace(/%file/, matches[1])
.replace(/%line/, matches[2])
), '_self')
}
if (matches = link.match(ExceptionBeautifier.REGEX.editor)) {
if (window.sessionStorage && window.sessionStorage['wn-exception-beautifier-editor']) {
open(window.sessionStorage['wn-exception-beautifier-editor'])
} else {
$.popup({content: ExceptionBeautifier.LINKER_POPUP_CONTENT})
.on('shown.oc.popup', function (event, source, popup) {
var select = $('select', popup)
self.initCustomSelect(select)
$('[data-action="submit"]', popup).on('click', function () {
if ($('#editor-remember-choice').prop('checked') && window.sessionStorage) {
window.sessionStorage['wn-exception-beautifier-editor'] = select.val()
}
open(select.val())
})
})
.on('hide.oc.popup', function (event, source, popup) {
$('[data-action]', popup).off('click')
})
}
}
}
ExceptionBeautifier.prototype.formatFilePath = function (path, line) {
var self = this
return '{exception-beautifier-file#a href="javascript:" data-href="idelink://' + encodeURIComponent(self.rewritePath(path)) + '&' + line + '"}' + path + '{/exception-beautifier-file#a}'
}
ExceptionBeautifier.prototype.rewritePath = function (path) {
return path.replace(/\\/g, '/')
}
ExceptionBeautifier.prototype.initCustomSelect = function (select) {
if (Modernizr.touchevents) {
return
}
var options = {
minimumResultsForSearch: Infinity,
escapeMarkup: function (m) {
return m
}
}
select.select2(options)
}
}(window.jQuery)

View File

@@ -0,0 +1,115 @@
if(window.jQuery===undefined){throw new Error('The jQuery library is not loaded. The Winter CMS framework cannot be initialized.');}if(window.jQuery.request!==undefined){throw new Error('The Winter CMS framework is already loaded.');}+function($){"use strict";var Request=function(element,handler,options){var $el=this.$el=$(element);this.options=options||{};if(handler===undefined){throw new Error('The request handler name is not specified.')}if(!handler.match(/^(?:\w+\:{2})?on*/)){throw new Error('Invalid handler name. The correct handler name format is: "onEvent".')}var $form=options.form?$(options.form):$el.closest('form'),$triggerEl=!!$form.length?$form:$el,context={handler:handler,options:options}
if((options.browserValidate!==undefined)&&typeof document.createElement('input').reportValidity=='function'&&$form&&$form[0]&&!$form[0].checkValidity()){$form[0].reportValidity();return false;}$el.trigger('ajaxSetup',[context])
var _event=jQuery.Event('oc.beforeRequest')
$triggerEl.trigger(_event,context)
if(_event.isDefaultPrevented())return
var loading=options.loading!==undefined?options.loading:null,url=options.url!==undefined?options.url:window.location.href,isRedirect=options.redirect!==undefined&&options.redirect.length,useFlash=options.flash!==undefined,useFiles=options.files!==undefined
if(useFiles&&typeof FormData==='undefined'){console.warn('This browser does not support file uploads via FormData')
useFiles=false}if($.type(loading)=='string'){loading=$(loading)}var requestHeaders={'X-WINTER-REQUEST-HANDLER':handler,'X-WINTER-REQUEST-PARTIALS':this.extractPartials(options.update)}
if(useFlash){requestHeaders['X-WINTER-REQUEST-FLASH']=1}var csrfToken=getXSRFToken()
if(csrfToken){requestHeaders['X-XSRF-TOKEN']=csrfToken}var requestData,inputName,data={}
$.each($el.parents('[data-request-data]').toArray().reverse(),function extendRequest(){$.extend(data,paramToObj('data-request-data',$(this).data('request-data')))})
if($el.is(':input')&&!$form.length){inputName=$el.attr('name')
if(inputName!==undefined&&options.data[inputName]===undefined){options.data[inputName]=$el.val()}}if(options.data!==undefined&&!$.isEmptyObject(options.data)){$.extend(data,options.data)}var requestParentData=$form.getRequestParentData()
if(useFiles){requestData=new FormData()
$.each(requestParentData,function(key){if(Array.isArray(this)){for(let i=0;i<this.length;i++){requestData.append(key,this[i])}}else{requestData.append(key,this)}})
if($el.is(':file')&&inputName){$.each($el.prop('files'),function(){requestData.append(inputName,this)})
delete data[inputName]}$.each(data,function(key){if(typeof Blob!=="undefined"&&this instanceof Blob&&this.filename){requestData.append(key,this,this.filename)}else{requestData.append(key,this)}})}else{requestData=[$.param(requestParentData),$.param(data)].filter(Boolean).join('&')}var requestOptions={url:url,crossDomain:false,global:options.ajaxGlobal,context:context,headers:requestHeaders,success:function(data,textStatus,jqXHR){if(this.options.beforeUpdate.apply(this,[data,textStatus,jqXHR])===false)return
if(options.evalBeforeUpdate&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalBeforeUpdate+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')===false)return
var _event=jQuery.Event('ajaxBeforeUpdate')
$triggerEl.trigger(_event,[context,data,textStatus,jqXHR])
if(_event.isDefaultPrevented())return
if(useFlash&&data['X_WINTER_FLASH_MESSAGES']){$.each(data['X_WINTER_FLASH_MESSAGES'],function(type,message){requestOptions.handleFlashMessage(message,type)})}var updatePromise=requestOptions.handleUpdateResponse(data,textStatus,jqXHR)
updatePromise.done(function(){$triggerEl.trigger('ajaxSuccess',[context,data,textStatus,jqXHR])
options.evalSuccess&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalSuccess+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')})
return updatePromise},error:function(jqXHR,textStatus,errorThrown){var errorMsg,updatePromise=$.Deferred()
if((window.ocUnloading!==undefined&&window.ocUnloading)||errorThrown=='abort')return
isRedirect=false
options.redirect=null
if(jqXHR.status==406&&jqXHR.responseJSON){errorMsg=jqXHR.responseJSON['X_WINTER_ERROR_MESSAGE']
updatePromise=requestOptions.handleUpdateResponse(jqXHR.responseJSON,textStatus,jqXHR)}else{errorMsg=jqXHR.responseText?jqXHR.responseText:jqXHR.statusText
updatePromise.resolve()}updatePromise.done(function(){$el.data('error-message',errorMsg)
var _event=jQuery.Event('ajaxError')
$triggerEl.trigger(_event,[context,errorMsg,textStatus,jqXHR])
if(_event.isDefaultPrevented())return
if(options.evalError&&eval('(function($el, context, errorMsg, textStatus, jqXHR) {'+options.evalError+'}.call($el.get(0), $el, context, errorMsg, textStatus, jqXHR))')===false)return
requestOptions.handleErrorMessage(errorMsg)})
return updatePromise},complete:function(data,textStatus,jqXHR){$triggerEl.trigger('ajaxComplete',[context,data,textStatus,jqXHR])
options.evalComplete&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalComplete+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')},handleConfirmMessage:function(message){var _event=jQuery.Event('ajaxConfirmMessage')
_event.promise=$.Deferred()
if($(window).triggerHandler(_event,[message])!==undefined){_event.promise.done(function(){options.confirm=null
new Request(element,handler,options)})
return false}if(_event.isDefaultPrevented())return
if(message)return confirm(message)},handleErrorMessage:function(message){var _event=jQuery.Event('ajaxErrorMessage')
$(window).trigger(_event,[message])
if(_event.isDefaultPrevented())return
if(message)alert(message)},handleValidationMessage:function(message,fields){$triggerEl.trigger('ajaxValidation',[context,message,fields])
var isFirstInvalidField=true
$.each(fields,function focusErrorField(fieldName,fieldMessages){fieldName=fieldName.replace(/\.(\w+)/g,'[$1]')
var fieldElement=$form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [name$="['+fieldName+']"], [name$="['+fieldName+'][]"]').filter(':enabled').first()
if(fieldElement.length>0){var _event=jQuery.Event('ajaxInvalidField')
$(window).trigger(_event,[fieldElement.get(0),fieldName,fieldMessages,isFirstInvalidField])
if(isFirstInvalidField){if(!_event.isDefaultPrevented())fieldElement.focus()
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){$el.trigger('ajaxRedirected')
window.location.assign(url)},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
if($.type(selector)=='string'&&selector.charAt(0)=='@'){$(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}else if($.type(selector)=='string'&&selector.charAt(0)=='^'){$(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}else if($.type(selector)=='string'&&(selector.charAt(0)=='#'||selector.charAt(0)=='.')){$(selector).trigger('ajaxBeforeReplace')
$(selector).html(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}}setTimeout(function(){$(window).trigger('ajaxUpdateComplete',[context,data,textStatus,jqXHR]).trigger('resize')},0)})
if(data['X_WINTER_REDIRECT']){options.redirect=data['X_WINTER_REDIRECT']
isRedirect=true}if(isRedirect){requestOptions.handleRedirectResponse(options.redirect)}if(data['X_WINTER_ERROR_FIELDS']){requestOptions.handleValidationMessage(data['X_WINTER_ERROR_MESSAGE'],data['X_WINTER_ERROR_FIELDS'])}if(data['X_WINTER_ASSETS']){assetManager.load(data['X_WINTER_ASSETS'],$.proxy(updatePromise.resolve,updatePromise))}else{updatePromise.resolve()}return updatePromise}}
if(useFiles){requestOptions.processData=requestOptions.contentType=false}context.success=requestOptions.success
context.error=requestOptions.error
context.complete=requestOptions.complete
requestOptions=$.extend(requestOptions,options)
requestOptions.data=requestData
if(options.confirm&&!requestOptions.handleConfirmMessage(options.confirm)){return}if(loading)loading.show()
$(window).trigger('ajaxBeforeSend',[context])
$el.trigger('ajaxPromise',[context])
return $.ajax(requestOptions).fail(function(jqXHR,textStatus,errorThrown){if(!isRedirect){$el.trigger('ajaxFail',[context,textStatus,jqXHR])}if(loading)loading.hide()}).done(function(data,textStatus,jqXHR){if(!isRedirect){$el.trigger('ajaxDone',[context,data,textStatus,jqXHR])}if(loading)loading.hide()}).always(function(dataOrXhr,textStatus,xhrOrError){$el.trigger('ajaxAlways',[context,dataOrXhr,textStatus,xhrOrError])})}
Request.DEFAULTS={update:{},type:'POST',beforeUpdate:function(data,textStatus,jqXHR){},evalBeforeUpdate:null,evalSuccess:null,evalError:null,evalComplete:null,ajaxGlobal:false}
Request.prototype.extractPartials=function(update){var result=[]
for(var partial in update)result.push(partial)
return result.join('&')}
var old=$.fn.request
$.fn.request=function(handler,option){var $this=$(this).first()
var data={evalBeforeUpdate:$this.data('request-before-update'),evalSuccess:$this.data('request-success'),evalError:$this.data('request-error'),evalComplete:$this.data('request-complete'),ajaxGlobal:$this.data('request-ajax-global'),confirm:$this.data('request-confirm'),redirect:$this.data('request-redirect'),loading:$this.data('request-loading'),flash:$this.data('request-flash'),files:$this.data('request-files'),browserValidate:$this.data('browser-validate'),form:$this.data('request-form'),url:$this.data('request-url'),update:paramToObj('data-request-update',$this.data('request-update')),data:paramToObj('data-request-data',$this.data('request-data'))}
if(!handler)handler=$this.data('request')
var options=$.extend(true,{},Request.DEFAULTS,data,typeof option=='object'&&option)
return new Request($this,handler,options)}
$.fn.request.Constructor=Request
$.request=function(handler,option){return $(document).request(handler,option)}
$.fn.request.noConflict=function(){$.fn.request=old
return this}
$.fn.getRequestParentData=function(){var $form=$(this).first(),parentDataObjects=[formDataToObj(new FormData($form.get(0)))],parentFormData={};var findParentForms=function($form){if($form.length&&$form.data('request-parent')){var $parentEl=$($form.data('request-parent'));if($parentEl.length){var parentEmbeddedData={};$.each($parentEl.parents('[data-request-data]').toArray().reverse(),function extendRequest(){$.extend(parentEmbeddedData,paramToObj('data-request-data',$(this).data('request-data')));});if($parentEl.is('[data-request-data]')){$.extend(parentEmbeddedData,paramToObj('data-request-data',$parentEl.data('request-data')));}var $parentForm=$parentEl.closest('form');if($parentForm.length){parentDataObjects.push($.extend(formDataToObj(new FormData($parentForm.get(0))),parentEmbeddedData));findParentForms($parentForm);}}}};findParentForms($form);parentDataObjects.reverse().forEach(function(data){$.extend(parentFormData,data);});return parentFormData;}
function paramToObj(name,value){if(value===undefined)value=''
if(typeof value=='object')return value
try{return ocJSON("{"+value+"}")}catch(e){throw new Error('Error parsing the '+name+' attribute value. '+e)}}function formDataToObj(formDataInstance){var objectData={};for(const pair of formDataInstance.entries()){const key=pair[0];const value=pair[1];if(!Reflect.has(objectData,key)||!key.includes('[]')){objectData[key]=value;continue;}if(!Array.isArray(objectData[key])){objectData[key]=[objectData[key]];}objectData[key].push(value);}return objectData;}function getXSRFToken(){var cookieValue=null
if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';')
for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i])
if(cookie.substring(0,11)==('XSRF-TOKEN'+'=')){cookieValue=decodeURIComponent(cookie.substring(11))
break}}}return cookieValue}$(document).on('change','select[data-request], input[type=radio][data-request], input[type=checkbox][data-request], input[type=file][data-request]',function documentOnChange(){$(this).request()})
$(document).on('click','a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]',function documentOnClick(e){e.preventDefault()
$(this).request()
if($(this).is('[type=submit]'))return false})
$(document).on('keydown','input[type=text][data-request], input[type=submit][data-request], input[type=password][data-request]',function documentOnKeydown(e){if(e.key==='Enter'){if(this.dataTrackInputTimer!==undefined)window.clearTimeout(this.dataTrackInputTimer)
$(this).request()
return false}})
$(document).on('input','input[data-request][data-track-input]',function documentOnKeyup(e){var $el=$(this),lastValue=$el.data('oc.lastvalue')
if(!$el.is('[type=email],[type=number],[type=password],[type=search],[type=text]'))return
if(lastValue!==undefined&&lastValue==this.value)return
$el.data('oc.lastvalue',this.value)
if(this.dataTrackInputTimer!==undefined)window.clearTimeout(this.dataTrackInputTimer)
var interval=$(this).data('track-input')
if(!interval)interval=300
var self=this
this.dataTrackInputTimer=window.setTimeout(function(){if(self.lastDataTrackInputRequest){self.lastDataTrackInputRequest.abort();}self.lastDataTrackInputRequest=$(self).request();},interval)})
$(document).on('submit','[data-request]',function documentOnSubmit(){$(this).request()
return false})
$(window).on('beforeunload',function documentOnBeforeUnload(){window.ocUnloading=true})
$(document).ready(function triggerRenderOnReady(){$(document).trigger('render')})
$(window).on('ajaxUpdateComplete',function triggerRenderOnAjaxUpdateComplete(){$(document).trigger('render')})
$.fn.render=function(callback){$(document).on('render',callback)}}(window.jQuery);+function(window){"use strict";function parseKey(str,pos,quote){var key="";for(var i=pos;i<str.length;i++){if(quote&&quote===str[i]){return key;}else if(!quote&&(str[i]===" "||str[i]===":")){return key;}key+=str[i];if(str[i]==="\\"&&i+1<str.length){key+=str[i+1];i++;}}throw new Error("Broken JSON syntax near "+key);}function getBody(str,pos){if(str[pos]==="\""||str[pos]==="'"){var body=str[pos];for(var i=pos+1;i<str.length;i++){if(str[i]==="\\"){body+=str[i];if(i+1<str.length)body+=str[i+1];i++;}else if(str[i]===str[pos]){body+=str[pos];return{originLength:body.length,body:body};}else body+=str[i];}throw new Error("Broken JSON string body near "+body);}if(str[pos]==="t"){if(str.indexOf("true",pos)===pos){return{originLength:"true".length,body:"true"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="f"){if(str.indexOf("f",pos)===pos){return{originLength:"false".length,
body:"false"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="n"){if(str.indexOf("null",pos)===pos){return{originLength:"null".length,body:"null"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="-"||str[pos]==="+"||str[pos]==="."||(str[pos]>="0"&&str[pos]<="9")){var body="";for(var i=pos;i<str.length;i++){if(str[i]==="-"||str[i]==="+"||str[i]==="."||(str[i]>="0"&&str[i]<="9")){body+=str[i];}else{return{originLength:body.length,body:body};}}throw new Error("Broken JSON number body near "+body);}if(str[pos]==="{"||str[pos]==="["){var stack=[str[pos]];var body=str[pos];for(var i=pos+1;i<str.length;i++){body+=str[i];if(str[i]==="\\"){if(i+1<str.length)body+=str[i+1];i++;}else if(str[i]==="\""){if(stack[stack.length-1]==="\""){stack.pop();}else if(stack[stack.length-1]!=="'"){stack.push(str[i]);}}else if(str[i]==="'"){if(stack[stack.length-1]==="'"){stack.pop();}else if(stack[stack.length-1]!=="\""){stack.push(str[i]);
}}else if(stack[stack.length-1]!=="\""&&stack[stack.length-1]!=="'"){if(str[i]==="{"){stack.push("{");}else if(str[i]==="}"){if(stack[stack.length-1]==="{"){stack.pop();}else{throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}}else if(str[i]==="["){stack.push("[");}else if(str[i]==="]"){if(stack[stack.length-1]==="["){stack.pop();}else{throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}}}if(!stack.length){return{originLength:i-pos,body:body};}}throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}throw new Error("Broken JSON body near "+str.substr((pos-5>=0)?pos-5:0,50));}function canBeKeyHead(ch){if(ch[0]==="\\")return false;if((ch[0]>='a'&&ch[0]<='z')||(ch[0]>='A'&&ch[0]<='Z')||ch[0]==='_')return true;if(ch[0]>='0'&&ch[0]<='9')return true;if(ch[0]==='$')return true;if(ch.charCodeAt(0)>255)return true;return false;}function isBlankChar(ch){return ch===" "||ch==="\n"||ch==="\t";}
function parse(str){str=str.trim();if(!str.length)throw new Error("Broken JSON object.");var result="";while(str&&str[0]===","){str=str.substr(1);}if(str[0]==="\""||str[0]==="'"){if(str[str.length-1]!==str[0]){throw new Error("Invalid string JSON object.");}var body="\"";for(var i=1;i<str.length;i++){if(str[i]==="\\"){if(str[i+1]==="'"){body+=str[i+1]}else{body+=str[i];body+=str[i+1];}i++;}else if(str[i]===str[0]){body+="\"";return body}else if(str[i]==="\""){body+="\\\""}else body+=str[i];}throw new Error("Invalid string JSON object.");}if(str==="true"||str==="false"){return str;}if(str==="null"){return"null";}var num=parseFloat(str);if(!isNaN(num)){return num.toString();}if(str[0]==="{"){var type="needKey";var result="{";for(var i=1;i<str.length;i++){if(isBlankChar(str[i])){continue;}else if(type==="needKey"&&(str[i]==="\""||str[i]==="'")){var key=parseKey(str,i+1,str[i]);result+="\""+key+"\"";i+=key.length;i+=1;type="afterKey";}else if(type==="needKey"&&canBeKeyHead(str[i])){var key=parseKey(str,i);
result+="\"";result+=key;result+="\"";i+=key.length-1;type="afterKey";}else if(type==="afterKey"&&str[i]===":"){result+=":";type=":";}else if(type===":"){var body=getBody(str,i);i=i+body.originLength-1;result+=parse(body.body);type="afterBody";}else if(type==="afterBody"||type==="needKey"){var last=i;while(str[last]===","||isBlankChar(str[last])){last++;}if(str[last]==="}"&&last===str.length-1){while(result[result.length-1]===","){result=result.substr(0,result.length-1);}result+="}";return result;}else if(last!==i&&result!=="{"){result+=",";type="needKey";i=last-1;}}}throw new Error("Broken JSON object near "+result);}if(str[0]==="["){var result="[";var type="needBody";for(var i=1;i<str.length;i++){if(" "===str[i]||"\n"===str[i]||"\t"===str[i]){continue;}else if(type==="needBody"){if(str[i]===","){result+="null,";continue;}if(str[i]==="]"&&i===str.length-1){if(result[result.length-1]===",")result=result.substr(0,result.length-1);result+="]";return result;}var body=getBody(str,i);i=i+body.originLength-1;
result+=parse(body.body);type="afterBody";}else if(type==="afterBody"){if(str[i]===","){result+=",";type="needBody";while(str[i+1]===","||isBlankChar(str[i+1])){if(str[i+1]===",")result+="null,";i++;}}else if(str[i]==="]"&&i===str.length-1){result+="]";return result;}}}throw new Error("Broken JSON array near "+result);}}window.ocJSON=function(json){var jsonString=parse(json);return JSON.parse(jsonString);};}(window);+function(window){"use strict";function trimAttributes(node){$.each(node.attributes,function(){var attrName=this.name;var attrValue=this.value;if(attrName.indexOf('on')==0||attrValue.indexOf('javascript:')==0){$(node).removeAttr(attrName);}});}function sanitize(html){var output=$($.parseHTML('<div>'+html+'</div>',null,false));output.find('*').each(function(){trimAttributes(this);});return output.html();}window.ocSanitize=function(html){return sanitize(html)};}(window);

View File

@@ -0,0 +1,165 @@
if(window.jQuery===undefined){throw new Error('The jQuery library is not loaded. The Winter CMS framework cannot be initialized.');}if(window.jQuery.request!==undefined){throw new Error('The Winter CMS framework is already loaded.');}+function($){"use strict";var Request=function(element,handler,options){var $el=this.$el=$(element);this.options=options||{};if(handler===undefined){throw new Error('The request handler name is not specified.')}if(!handler.match(/^(?:\w+\:{2})?on*/)){throw new Error('Invalid handler name. The correct handler name format is: "onEvent".')}var $form=options.form?$(options.form):$el.closest('form'),$triggerEl=!!$form.length?$form:$el,context={handler:handler,options:options}
if((options.browserValidate!==undefined)&&typeof document.createElement('input').reportValidity=='function'&&$form&&$form[0]&&!$form[0].checkValidity()){$form[0].reportValidity();return false;}$el.trigger('ajaxSetup',[context])
var _event=jQuery.Event('oc.beforeRequest')
$triggerEl.trigger(_event,context)
if(_event.isDefaultPrevented())return
var loading=options.loading!==undefined?options.loading:null,url=options.url!==undefined?options.url:window.location.href,isRedirect=options.redirect!==undefined&&options.redirect.length,useFlash=options.flash!==undefined,useFiles=options.files!==undefined
if(useFiles&&typeof FormData==='undefined'){console.warn('This browser does not support file uploads via FormData')
useFiles=false}if($.type(loading)=='string'){loading=$(loading)}var requestHeaders={'X-WINTER-REQUEST-HANDLER':handler,'X-WINTER-REQUEST-PARTIALS':this.extractPartials(options.update)}
if(useFlash){requestHeaders['X-WINTER-REQUEST-FLASH']=1}var csrfToken=getXSRFToken()
if(csrfToken){requestHeaders['X-XSRF-TOKEN']=csrfToken}var requestData,inputName,data={}
$.each($el.parents('[data-request-data]').toArray().reverse(),function extendRequest(){$.extend(data,paramToObj('data-request-data',$(this).data('request-data')))})
if($el.is(':input')&&!$form.length){inputName=$el.attr('name')
if(inputName!==undefined&&options.data[inputName]===undefined){options.data[inputName]=$el.val()}}if(options.data!==undefined&&!$.isEmptyObject(options.data)){$.extend(data,options.data)}var requestParentData=$form.getRequestParentData()
if(useFiles){requestData=new FormData()
$.each(requestParentData,function(key){if(Array.isArray(this)){for(let i=0;i<this.length;i++){requestData.append(key,this[i])}}else{requestData.append(key,this)}})
if($el.is(':file')&&inputName){$.each($el.prop('files'),function(){requestData.append(inputName,this)})
delete data[inputName]}$.each(data,function(key){if(typeof Blob!=="undefined"&&this instanceof Blob&&this.filename){requestData.append(key,this,this.filename)}else{requestData.append(key,this)}})}else{requestData=[$.param(requestParentData),$.param(data)].filter(Boolean).join('&')}var requestOptions={url:url,crossDomain:false,global:options.ajaxGlobal,context:context,headers:requestHeaders,success:function(data,textStatus,jqXHR){if(this.options.beforeUpdate.apply(this,[data,textStatus,jqXHR])===false)return
if(options.evalBeforeUpdate&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalBeforeUpdate+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')===false)return
var _event=jQuery.Event('ajaxBeforeUpdate')
$triggerEl.trigger(_event,[context,data,textStatus,jqXHR])
if(_event.isDefaultPrevented())return
if(useFlash&&data['X_WINTER_FLASH_MESSAGES']){$.each(data['X_WINTER_FLASH_MESSAGES'],function(type,message){requestOptions.handleFlashMessage(message,type)})}var updatePromise=requestOptions.handleUpdateResponse(data,textStatus,jqXHR)
updatePromise.done(function(){$triggerEl.trigger('ajaxSuccess',[context,data,textStatus,jqXHR])
options.evalSuccess&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalSuccess+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')})
return updatePromise},error:function(jqXHR,textStatus,errorThrown){var errorMsg,updatePromise=$.Deferred()
if((window.ocUnloading!==undefined&&window.ocUnloading)||errorThrown=='abort')return
isRedirect=false
options.redirect=null
if(jqXHR.status==406&&jqXHR.responseJSON){errorMsg=jqXHR.responseJSON['X_WINTER_ERROR_MESSAGE']
updatePromise=requestOptions.handleUpdateResponse(jqXHR.responseJSON,textStatus,jqXHR)}else{errorMsg=jqXHR.responseText?jqXHR.responseText:jqXHR.statusText
updatePromise.resolve()}updatePromise.done(function(){$el.data('error-message',errorMsg)
var _event=jQuery.Event('ajaxError')
$triggerEl.trigger(_event,[context,errorMsg,textStatus,jqXHR])
if(_event.isDefaultPrevented())return
if(options.evalError&&eval('(function($el, context, errorMsg, textStatus, jqXHR) {'+options.evalError+'}.call($el.get(0), $el, context, errorMsg, textStatus, jqXHR))')===false)return
requestOptions.handleErrorMessage(errorMsg)})
return updatePromise},complete:function(data,textStatus,jqXHR){$triggerEl.trigger('ajaxComplete',[context,data,textStatus,jqXHR])
options.evalComplete&&eval('(function($el, context, data, textStatus, jqXHR) {'+options.evalComplete+'}.call($el.get(0), $el, context, data, textStatus, jqXHR))')},handleConfirmMessage:function(message){var _event=jQuery.Event('ajaxConfirmMessage')
_event.promise=$.Deferred()
if($(window).triggerHandler(_event,[message])!==undefined){_event.promise.done(function(){options.confirm=null
new Request(element,handler,options)})
return false}if(_event.isDefaultPrevented())return
if(message)return confirm(message)},handleErrorMessage:function(message){var _event=jQuery.Event('ajaxErrorMessage')
$(window).trigger(_event,[message])
if(_event.isDefaultPrevented())return
if(message)alert(message)},handleValidationMessage:function(message,fields){$triggerEl.trigger('ajaxValidation',[context,message,fields])
var isFirstInvalidField=true
$.each(fields,function focusErrorField(fieldName,fieldMessages){fieldName=fieldName.replace(/\.(\w+)/g,'[$1]')
var fieldElement=$form.find('[name="'+fieldName+'"], [name="'+fieldName+'[]"], [name$="['+fieldName+']"], [name$="['+fieldName+'][]"]').filter(':enabled').first()
if(fieldElement.length>0){var _event=jQuery.Event('ajaxInvalidField')
$(window).trigger(_event,[fieldElement.get(0),fieldName,fieldMessages,isFirstInvalidField])
if(isFirstInvalidField){if(!_event.isDefaultPrevented())fieldElement.focus()
isFirstInvalidField=false}}})},handleFlashMessage:function(message,type){},handleRedirectResponse:function(url){$el.trigger('ajaxRedirected')
window.location.assign(url)},handleUpdateResponse:function(data,textStatus,jqXHR){var updatePromise=$.Deferred().done(function(){for(var partial in data){var selector=(options.update[partial])?options.update[partial]:partial
if($.type(selector)=='string'&&selector.charAt(0)=='@'){$(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}else if($.type(selector)=='string'&&selector.charAt(0)=='^'){$(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}else if($.type(selector)=='string'&&(selector.charAt(0)=='#'||selector.charAt(0)=='.')){$(selector).trigger('ajaxBeforeReplace')
$(selector).html(data[partial]).trigger('ajaxUpdate',[context,data,textStatus,jqXHR])}}setTimeout(function(){$(window).trigger('ajaxUpdateComplete',[context,data,textStatus,jqXHR]).trigger('resize')},0)})
if(data['X_WINTER_REDIRECT']){options.redirect=data['X_WINTER_REDIRECT']
isRedirect=true}if(isRedirect){requestOptions.handleRedirectResponse(options.redirect)}if(data['X_WINTER_ERROR_FIELDS']){requestOptions.handleValidationMessage(data['X_WINTER_ERROR_MESSAGE'],data['X_WINTER_ERROR_FIELDS'])}if(data['X_WINTER_ASSETS']){assetManager.load(data['X_WINTER_ASSETS'],$.proxy(updatePromise.resolve,updatePromise))}else{updatePromise.resolve()}return updatePromise}}
if(useFiles){requestOptions.processData=requestOptions.contentType=false}context.success=requestOptions.success
context.error=requestOptions.error
context.complete=requestOptions.complete
requestOptions=$.extend(requestOptions,options)
requestOptions.data=requestData
if(options.confirm&&!requestOptions.handleConfirmMessage(options.confirm)){return}if(loading)loading.show()
$(window).trigger('ajaxBeforeSend',[context])
$el.trigger('ajaxPromise',[context])
return $.ajax(requestOptions).fail(function(jqXHR,textStatus,errorThrown){if(!isRedirect){$el.trigger('ajaxFail',[context,textStatus,jqXHR])}if(loading)loading.hide()}).done(function(data,textStatus,jqXHR){if(!isRedirect){$el.trigger('ajaxDone',[context,data,textStatus,jqXHR])}if(loading)loading.hide()}).always(function(dataOrXhr,textStatus,xhrOrError){$el.trigger('ajaxAlways',[context,dataOrXhr,textStatus,xhrOrError])})}
Request.DEFAULTS={update:{},type:'POST',beforeUpdate:function(data,textStatus,jqXHR){},evalBeforeUpdate:null,evalSuccess:null,evalError:null,evalComplete:null,ajaxGlobal:false}
Request.prototype.extractPartials=function(update){var result=[]
for(var partial in update)result.push(partial)
return result.join('&')}
var old=$.fn.request
$.fn.request=function(handler,option){var $this=$(this).first()
var data={evalBeforeUpdate:$this.data('request-before-update'),evalSuccess:$this.data('request-success'),evalError:$this.data('request-error'),evalComplete:$this.data('request-complete'),ajaxGlobal:$this.data('request-ajax-global'),confirm:$this.data('request-confirm'),redirect:$this.data('request-redirect'),loading:$this.data('request-loading'),flash:$this.data('request-flash'),files:$this.data('request-files'),browserValidate:$this.data('browser-validate'),form:$this.data('request-form'),url:$this.data('request-url'),update:paramToObj('data-request-update',$this.data('request-update')),data:paramToObj('data-request-data',$this.data('request-data'))}
if(!handler)handler=$this.data('request')
var options=$.extend(true,{},Request.DEFAULTS,data,typeof option=='object'&&option)
return new Request($this,handler,options)}
$.fn.request.Constructor=Request
$.request=function(handler,option){return $(document).request(handler,option)}
$.fn.request.noConflict=function(){$.fn.request=old
return this}
$.fn.getRequestParentData=function(){var $form=$(this).first(),parentDataObjects=[formDataToObj(new FormData($form.get(0)))],parentFormData={};var findParentForms=function($form){if($form.length&&$form.data('request-parent')){var $parentEl=$($form.data('request-parent'));if($parentEl.length){var parentEmbeddedData={};$.each($parentEl.parents('[data-request-data]').toArray().reverse(),function extendRequest(){$.extend(parentEmbeddedData,paramToObj('data-request-data',$(this).data('request-data')));});if($parentEl.is('[data-request-data]')){$.extend(parentEmbeddedData,paramToObj('data-request-data',$parentEl.data('request-data')));}var $parentForm=$parentEl.closest('form');if($parentForm.length){parentDataObjects.push($.extend(formDataToObj(new FormData($parentForm.get(0))),parentEmbeddedData));findParentForms($parentForm);}}}};findParentForms($form);parentDataObjects.reverse().forEach(function(data){$.extend(parentFormData,data);});return parentFormData;}
function paramToObj(name,value){if(value===undefined)value=''
if(typeof value=='object')return value
try{return ocJSON("{"+value+"}")}catch(e){throw new Error('Error parsing the '+name+' attribute value. '+e)}}function formDataToObj(formDataInstance){var objectData={};for(const pair of formDataInstance.entries()){const key=pair[0];const value=pair[1];if(!Reflect.has(objectData,key)||!key.includes('[]')){objectData[key]=value;continue;}if(!Array.isArray(objectData[key])){objectData[key]=[objectData[key]];}objectData[key].push(value);}return objectData;}function getXSRFToken(){var cookieValue=null
if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';')
for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i])
if(cookie.substring(0,11)==('XSRF-TOKEN'+'=')){cookieValue=decodeURIComponent(cookie.substring(11))
break}}}return cookieValue}$(document).on('change','select[data-request], input[type=radio][data-request], input[type=checkbox][data-request], input[type=file][data-request]',function documentOnChange(){$(this).request()})
$(document).on('click','a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]',function documentOnClick(e){e.preventDefault()
$(this).request()
if($(this).is('[type=submit]'))return false})
$(document).on('keydown','input[type=text][data-request], input[type=submit][data-request], input[type=password][data-request]',function documentOnKeydown(e){if(e.key==='Enter'){if(this.dataTrackInputTimer!==undefined)window.clearTimeout(this.dataTrackInputTimer)
$(this).request()
return false}})
$(document).on('input','input[data-request][data-track-input]',function documentOnKeyup(e){var $el=$(this),lastValue=$el.data('oc.lastvalue')
if(!$el.is('[type=email],[type=number],[type=password],[type=search],[type=text]'))return
if(lastValue!==undefined&&lastValue==this.value)return
$el.data('oc.lastvalue',this.value)
if(this.dataTrackInputTimer!==undefined)window.clearTimeout(this.dataTrackInputTimer)
var interval=$(this).data('track-input')
if(!interval)interval=300
var self=this
this.dataTrackInputTimer=window.setTimeout(function(){if(self.lastDataTrackInputRequest){self.lastDataTrackInputRequest.abort();}self.lastDataTrackInputRequest=$(self).request();},interval)})
$(document).on('submit','[data-request]',function documentOnSubmit(){$(this).request()
return false})
$(window).on('beforeunload',function documentOnBeforeUnload(){window.ocUnloading=true})
$(document).ready(function triggerRenderOnReady(){$(document).trigger('render')})
$(window).on('ajaxUpdateComplete',function triggerRenderOnAjaxUpdateComplete(){$(document).trigger('render')})
$.fn.render=function(callback){$(document).on('render',callback)}}(window.jQuery);+function(window){"use strict";function parseKey(str,pos,quote){var key="";for(var i=pos;i<str.length;i++){if(quote&&quote===str[i]){return key;}else if(!quote&&(str[i]===" "||str[i]===":")){return key;}key+=str[i];if(str[i]==="\\"&&i+1<str.length){key+=str[i+1];i++;}}throw new Error("Broken JSON syntax near "+key);}function getBody(str,pos){if(str[pos]==="\""||str[pos]==="'"){var body=str[pos];for(var i=pos+1;i<str.length;i++){if(str[i]==="\\"){body+=str[i];if(i+1<str.length)body+=str[i+1];i++;}else if(str[i]===str[pos]){body+=str[pos];return{originLength:body.length,body:body};}else body+=str[i];}throw new Error("Broken JSON string body near "+body);}if(str[pos]==="t"){if(str.indexOf("true",pos)===pos){return{originLength:"true".length,body:"true"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="f"){if(str.indexOf("f",pos)===pos){return{originLength:"false".length,
body:"false"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="n"){if(str.indexOf("null",pos)===pos){return{originLength:"null".length,body:"null"};}throw new Error("Broken JSON boolean body near "+str.substr(0,pos+10));}if(str[pos]==="-"||str[pos]==="+"||str[pos]==="."||(str[pos]>="0"&&str[pos]<="9")){var body="";for(var i=pos;i<str.length;i++){if(str[i]==="-"||str[i]==="+"||str[i]==="."||(str[i]>="0"&&str[i]<="9")){body+=str[i];}else{return{originLength:body.length,body:body};}}throw new Error("Broken JSON number body near "+body);}if(str[pos]==="{"||str[pos]==="["){var stack=[str[pos]];var body=str[pos];for(var i=pos+1;i<str.length;i++){body+=str[i];if(str[i]==="\\"){if(i+1<str.length)body+=str[i+1];i++;}else if(str[i]==="\""){if(stack[stack.length-1]==="\""){stack.pop();}else if(stack[stack.length-1]!=="'"){stack.push(str[i]);}}else if(str[i]==="'"){if(stack[stack.length-1]==="'"){stack.pop();}else if(stack[stack.length-1]!=="\""){stack.push(str[i]);
}}else if(stack[stack.length-1]!=="\""&&stack[stack.length-1]!=="'"){if(str[i]==="{"){stack.push("{");}else if(str[i]==="}"){if(stack[stack.length-1]==="{"){stack.pop();}else{throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}}else if(str[i]==="["){stack.push("[");}else if(str[i]==="]"){if(stack[stack.length-1]==="["){stack.pop();}else{throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}}}if(!stack.length){return{originLength:i-pos,body:body};}}throw new Error("Broken JSON "+(str[pos]==="{"?"object":"array")+" body near "+body);}throw new Error("Broken JSON body near "+str.substr((pos-5>=0)?pos-5:0,50));}function canBeKeyHead(ch){if(ch[0]==="\\")return false;if((ch[0]>='a'&&ch[0]<='z')||(ch[0]>='A'&&ch[0]<='Z')||ch[0]==='_')return true;if(ch[0]>='0'&&ch[0]<='9')return true;if(ch[0]==='$')return true;if(ch.charCodeAt(0)>255)return true;return false;}function isBlankChar(ch){return ch===" "||ch==="\n"||ch==="\t";}
function parse(str){str=str.trim();if(!str.length)throw new Error("Broken JSON object.");var result="";while(str&&str[0]===","){str=str.substr(1);}if(str[0]==="\""||str[0]==="'"){if(str[str.length-1]!==str[0]){throw new Error("Invalid string JSON object.");}var body="\"";for(var i=1;i<str.length;i++){if(str[i]==="\\"){if(str[i+1]==="'"){body+=str[i+1]}else{body+=str[i];body+=str[i+1];}i++;}else if(str[i]===str[0]){body+="\"";return body}else if(str[i]==="\""){body+="\\\""}else body+=str[i];}throw new Error("Invalid string JSON object.");}if(str==="true"||str==="false"){return str;}if(str==="null"){return"null";}var num=parseFloat(str);if(!isNaN(num)){return num.toString();}if(str[0]==="{"){var type="needKey";var result="{";for(var i=1;i<str.length;i++){if(isBlankChar(str[i])){continue;}else if(type==="needKey"&&(str[i]==="\""||str[i]==="'")){var key=parseKey(str,i+1,str[i]);result+="\""+key+"\"";i+=key.length;i+=1;type="afterKey";}else if(type==="needKey"&&canBeKeyHead(str[i])){var key=parseKey(str,i);
result+="\"";result+=key;result+="\"";i+=key.length-1;type="afterKey";}else if(type==="afterKey"&&str[i]===":"){result+=":";type=":";}else if(type===":"){var body=getBody(str,i);i=i+body.originLength-1;result+=parse(body.body);type="afterBody";}else if(type==="afterBody"||type==="needKey"){var last=i;while(str[last]===","||isBlankChar(str[last])){last++;}if(str[last]==="}"&&last===str.length-1){while(result[result.length-1]===","){result=result.substr(0,result.length-1);}result+="}";return result;}else if(last!==i&&result!=="{"){result+=",";type="needKey";i=last-1;}}}throw new Error("Broken JSON object near "+result);}if(str[0]==="["){var result="[";var type="needBody";for(var i=1;i<str.length;i++){if(" "===str[i]||"\n"===str[i]||"\t"===str[i]){continue;}else if(type==="needBody"){if(str[i]===","){result+="null,";continue;}if(str[i]==="]"&&i===str.length-1){if(result[result.length-1]===",")result=result.substr(0,result.length-1);result+="]";return result;}var body=getBody(str,i);i=i+body.originLength-1;
result+=parse(body.body);type="afterBody";}else if(type==="afterBody"){if(str[i]===","){result+=",";type="needBody";while(str[i+1]===","||isBlankChar(str[i+1])){if(str[i+1]===",")result+="null,";i++;}}else if(str[i]==="]"&&i===str.length-1){result+="]";return result;}}}throw new Error("Broken JSON array near "+result);}}window.ocJSON=function(json){var jsonString=parse(json);return JSON.parse(jsonString);};}(window);+function(window){"use strict";function trimAttributes(node){$.each(node.attributes,function(){var attrName=this.name;var attrValue=this.value;if(attrName.indexOf('on')==0||attrValue.indexOf('javascript:')==0){$(node).removeAttr(attrName);}});}function sanitize(html){var output=$($.parseHTML('<div>'+html+'</div>',null,false));output.find('*').each(function(){trimAttributes(this);});return output.html();}window.ocSanitize=function(html){return sanitize(html)};}(window);+function($){"use strict";if($.wn===undefined)$.wn={}
if($.oc===undefined)$.oc=$.wn
var LOADER_CLASS='wn-loading';$(document).on('ajaxSetup','[data-request][data-request-flash]',function(event,context){context.options.handleErrorMessage=function(message){$.wn.flashMsg({text:message,class:'error'})}
context.options.handleFlashMessage=function(message,type){$.wn.flashMsg({text:message,class:type})}})
$(document).on('ajaxValidation','[data-request][data-request-validate]',function(event,context,errorMsg,fields){var $this=$(this).closest('form'),$container=$('[data-validate-error]',$this),messages=[],$field
$.each(fields,function(fieldName,fieldMessages){$field=$('[data-validate-for="'+fieldName+'"]',$this)
messages=$.merge(messages,fieldMessages)
if(!!$field.length){if(!$field.text().length||$field.data('emptyMode')==true){$field.data('emptyMode',true).text(fieldMessages.join(', '))}$field.addClass('visible')}})
if(!!$container.length){$container=$('[data-validate-error]',$this)}if(!!$container.length){var $oldMessages=$('[data-message]',$container)
$container.addClass('visible')
if(!!$oldMessages.length){var $clone=$oldMessages.first()
$.each(messages,function(key,message){$clone.clone().text(message).insertAfter($clone)})
$oldMessages.remove()}else{$container.text(errorMsg)}}$this.one('ajaxError',function(event){event.preventDefault()})})
$(document).on('ajaxPromise','[data-request][data-request-validate]',function(){var $this=$(this).closest('form')
$('[data-validate-for]',$this).removeClass('visible')
$('[data-validate-error]',$this).removeClass('visible')})
$(document).on('ajaxPromise','[data-request]',function(){var $target=$(this)
if($target.data('attach-loading')!==undefined){$target.addClass(LOADER_CLASS).prop('disabled',true)}if($target.is('form')){$('[data-attach-loading]',$target).addClass(LOADER_CLASS).prop('disabled',true)}}).on('ajaxFail ajaxDone ajaxRedirected','[data-request]',function(){var $target=$(this)
if($target.data('attach-loading')!==undefined){$target.removeClass(LOADER_CLASS).prop('disabled',false)}if($target.is('form')){$('[data-attach-loading]',$target).removeClass(LOADER_CLASS).prop('disabled',false)}})
var StripeLoadIndicator=function(){var self=this
this.counter=0
this.indicator=$('<div/>').addClass('stripe-loading-indicator loaded').append($('<div />').addClass('stripe')).append($('<div />').addClass('stripe-loaded'))
this.stripe=this.indicator.find('.stripe')
$(document).ready(function(){$(document.body).append(self.indicator)})}
StripeLoadIndicator.prototype.show=function(){this.counter++
this.stripe.after(this.stripe=this.stripe.clone()).remove()
if(this.counter>1){return}this.indicator.removeClass('loaded')
$(document.body).addClass('wn-loading')}
StripeLoadIndicator.prototype.hide=function(force){this.counter--
if(force!==undefined&&force){this.counter=0}if(this.counter<=0){this.indicator.addClass('loaded')
$(document.body).removeClass('wn-loading')}}
$.wn.stripeLoadIndicator=new StripeLoadIndicator()
$(document).on('ajaxPromise','[data-request]',function(event){event.stopPropagation()
$.wn.stripeLoadIndicator.show()
var $el=$(this)
$(window).one('ajaxUpdateComplete',function(){if($el.closest('html').length===0)$.wn.stripeLoadIndicator.hide()})}).on('ajaxFail ajaxDone ajaxRedirected','[data-request]',function(event){event.stopPropagation()
$.wn.stripeLoadIndicator.hide()})
var FlashMessage=function(options,el){var options=$.extend({},FlashMessage.DEFAULTS,options),$element=$(el)
$('body > p.flash-message').remove()
if($element.length==0){$element=$('<p />').addClass(options.class).html(options.text)}$element.addClass('flash-message fade').attr('data-control',null).on('click','button',remove).on('click',remove).append('<button type="button" class="close" aria-hidden="true">&times;</button>')
$(document.body).append($element)
setTimeout(function(){$element.addClass('in')},100)
var timer=window.setTimeout(remove,options.interval*1000)
function removeElement(){$element.remove()}function remove(){window.clearInterval(timer)
$element.removeClass('in')
$.support.transition&&$element.hasClass('fade')?$element.one($.support.transition.end,removeElement).emulateTransitionEnd(500):removeElement()}}
FlashMessage.DEFAULTS={class:'success',text:'Default text',interval:5}
if($.wn===undefined)$.wn={}
if($.oc===undefined)$.oc=$.wn
$.wn.flashMsg=FlashMessage
$(document).render(function(){$('[data-control=flash-message]').each(function(){$.wn.flashMsg($(this).data(),this)})})}(window.jQuery);

View File

@@ -0,0 +1,4 @@
/*
=require framework.js
=require framework.extras.js
*/

View File

@@ -0,0 +1,260 @@
/* ========================================================================
* Winter CMS: front-end JavaScript extras
* https://wintercms.com
* ========================================================================
* Copyright 2016-2020 Alexey Bobkov, Samuel Georges
* ======================================================================== */
+function ($) { "use strict";
if ($.wn === undefined)
$.wn = {}
if ($.oc === undefined)
$.oc = $.wn
// @todo Provide an interface for configuration
// - Custom loader CSS class
// - Custom stripe loader color
// - Flash message interval
var LOADER_CLASS = 'wn-loading';
// FLASH HANDLING
// ============================
$(document).on('ajaxSetup', '[data-request][data-request-flash]', function(event, context) {
context.options.handleErrorMessage = function(message) {
$.wn.flashMsg({ text: message, class: 'error' })
}
context.options.handleFlashMessage = function(message, type) {
$.wn.flashMsg({ text: message, class: type })
}
})
// FORM VALIDATION
// ============================
$(document).on('ajaxValidation', '[data-request][data-request-validate]', function(event, context, errorMsg, fields) {
var $this = $(this).closest('form'),
$container = $('[data-validate-error]', $this),
messages = [],
$field
$.each(fields, function(fieldName, fieldMessages) {
$field = $('[data-validate-for="'+fieldName+'"]', $this)
messages = $.merge(messages, fieldMessages)
if (!!$field.length) {
if (!$field.text().length || $field.data('emptyMode') == true) {
$field
.data('emptyMode', true)
.text(fieldMessages.join(', '))
}
$field.addClass('visible')
}
})
if (!!$container.length) {
$container = $('[data-validate-error]', $this)
}
if (!!$container.length) {
var $oldMessages = $('[data-message]', $container)
$container.addClass('visible')
if (!!$oldMessages.length) {
var $clone = $oldMessages.first()
$.each(messages, function(key, message) {
$clone.clone().text(message).insertAfter($clone)
})
$oldMessages.remove()
}
else {
$container.text(errorMsg)
}
}
$this.one('ajaxError', function(event){
event.preventDefault()
})
})
$(document).on('ajaxPromise', '[data-request][data-request-validate]', function() {
var $this = $(this).closest('form')
$('[data-validate-for]', $this).removeClass('visible')
$('[data-validate-error]', $this).removeClass('visible')
})
// LOADING BUTTONS
// ============================
$(document)
.on('ajaxPromise', '[data-request]', function() {
var $target = $(this)
if ($target.data('attach-loading') !== undefined) {
$target
.addClass(LOADER_CLASS)
.prop('disabled', true)
}
if ($target.is('form')) {
$('[data-attach-loading]', $target)
.addClass(LOADER_CLASS)
.prop('disabled', true)
}
})
.on('ajaxFail ajaxDone ajaxRedirected', '[data-request]', function() {
var $target = $(this)
if ($target.data('attach-loading') !== undefined) {
$target
.removeClass(LOADER_CLASS)
.prop('disabled', false)
}
if ($target.is('form')) {
$('[data-attach-loading]', $target)
.removeClass(LOADER_CLASS)
.prop('disabled', false)
}
})
// STRIPE LOAD INDICATOR
// ============================
var StripeLoadIndicator = function() {
var self = this
this.counter = 0
this.indicator = $('<div/>').addClass('stripe-loading-indicator loaded')
.append($('<div />').addClass('stripe'))
.append($('<div />').addClass('stripe-loaded'))
this.stripe = this.indicator.find('.stripe')
$(document).ready(function() {
$(document.body).append(self.indicator)
})
}
StripeLoadIndicator.prototype.show = function() {
this.counter++
// Restart the animation
this.stripe.after(this.stripe = this.stripe.clone()).remove()
if (this.counter > 1) {
return
}
this.indicator.removeClass('loaded')
$(document.body).addClass('wn-loading')
}
StripeLoadIndicator.prototype.hide = function(force) {
this.counter--
if (force !== undefined && force) {
this.counter = 0
}
if (this.counter <= 0) {
this.indicator.addClass('loaded')
$(document.body).removeClass('wn-loading')
}
}
$.wn.stripeLoadIndicator = new StripeLoadIndicator()
// STRIPE LOAD INDICATOR DATA-API
// ============================
$(document)
.on('ajaxPromise', '[data-request]', function(event) {
// Prevent this event from bubbling up to a non-related data-request
// element, for example a <form> tag wrapping a <button> tag
event.stopPropagation()
$.wn.stripeLoadIndicator.show()
// This code will cover instances where the element has been removed
// from the DOM, making the resolution event below an orphan.
var $el = $(this)
$(window).one('ajaxUpdateComplete', function() {
if ($el.closest('html').length === 0)
$.wn.stripeLoadIndicator.hide()
})
})
.on('ajaxFail ajaxDone ajaxRedirected', '[data-request]', function(event) {
event.stopPropagation()
$.wn.stripeLoadIndicator.hide()
})
// FLASH MESSAGE
// ============================
var FlashMessage = function (options, el) {
var
options = $.extend({}, FlashMessage.DEFAULTS, options),
$element = $(el)
$('body > p.flash-message').remove()
if ($element.length == 0) {
$element = $('<p />').addClass(options.class).html(options.text)
}
$element
.addClass('flash-message fade')
.attr('data-control', null)
.on('click', 'button', remove)
.on('click', remove)
.append('<button type="button" class="close" aria-hidden="true">&times;</button>')
$(document.body).append($element)
setTimeout(function() {
$element.addClass('in')
}, 100)
var timer = window.setTimeout(remove, options.interval * 1000)
function removeElement() {
$element.remove()
}
function remove() {
window.clearInterval(timer)
$element.removeClass('in')
$.support.transition && $element.hasClass('fade')
? $element
.one($.support.transition.end, removeElement)
.emulateTransitionEnd(500)
: removeElement()
}
}
FlashMessage.DEFAULTS = {
class: 'success',
text: 'Default text',
interval: 5
}
if ($.wn === undefined)
$.wn = {}
if ($.oc === undefined)
$.oc = $.wn
$.wn.flashMsg = FlashMessage
// FLASH MESSAGE DATA-API
// ===============
$(document).render(function(){
$('[data-control=flash-message]').each(function(){
$.wn.flashMsg($(this).data(), this)
})
})
}(window.jQuery);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,134 @@
/*
* This file has been compiled from: /modules/system/lang/ar/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['ar'] = $.extend(
$.wn.langMessages['ar'] || {},
{"markdowneditor":{"formatting":"\u0627\u0644\u062a\u0646\u0633\u064a\u0642","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
//!!! IMPORTANT - modified from default - see https://github.com/octobercms/october/issues/5213
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var symbolMap = {
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'0': '0'
}, pluralForm = function (n) {
return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
}, plurals = {
s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
}, pluralize = function (u) {
return function (number, withoutSuffix, string, isFuture) {
var f = pluralForm(number),
str = plurals[u][pluralForm(number)];
if (f === 2) {
str = str[withoutSuffix ? 0 : 1];
}
return str.replace(/%d/i, number);
};
}, months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر'
];
var ar = moment.defineLocale('ar', {
months : months,
monthsShort : months,
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'D/\u200FM/\u200FYYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
meridiemParse: /ص|م/,
isPM : function (input) {
return 'م' === input;
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return 'ص';
} else {
return 'م';
}
},
calendar : {
sameDay: '[اليوم عند الساعة] LT',
nextDay: '[غدًا عند الساعة] LT',
nextWeek: 'dddd [عند الساعة] LT',
lastDay: '[أمس عند الساعة] LT',
lastWeek: 'dddd [عند الساعة] LT',
sameElse: 'L'
},
relativeTime : {
future : 'بعد %s',
past : 'منذ %s',
s : pluralize('s'),
ss : pluralize('s'),
m : pluralize('m'),
mm : pluralize('m'),
h : pluralize('h'),
hh : pluralize('h'),
d : pluralize('d'),
dd : pluralize('d'),
M : pluralize('M'),
MM : pluralize('M'),
y : pluralize('y'),
yy : pluralize('y')
},
preparse: function (string) {
return string.replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
}).replace(/,/g, '،');
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
return ar;
})));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,101 @@
/*
* This file has been compiled from: /modules/system/lang/bg/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['bg'] = $.extend(
$.wn.langMessages['bg'] || {},
{"markdowneditor":{"formatting":"\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d\u0435","quote":"\u0426\u0438\u0442\u0430\u0442","code":"\u041a\u043e\u0434","header1":"\u0425\u0435\u0434\u044a\u0440 1","header2":"\u0425\u0435\u0434\u044a\u0440 2","header3":"\u0425\u0435\u0434\u044a\u0440 3","header4":"\u0425\u0435\u0434\u044a\u0440 4","header5":"\u0425\u0435\u0434\u044a\u0440 5","header6":"\u0425\u0435\u0434\u044a\u0440 6","bold":"\u041f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d","italic":"\u041d\u0430\u043a\u043b\u043e\u043d\u0435\u043d","unorderedlist":"\u041d\u0435\u043f\u043e\u0434\u0440\u0435\u0434\u0435\u043d \u0421\u043f\u0438\u0441\u044a\u043a","orderedlist":"\u041f\u043e\u0434\u0440\u0435\u0434\u0435\u043d \u0421\u043f\u0438\u0441\u044a\u043a","video":"\u0412\u0438\u0434\u0435\u043e","image":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","link":"\u0412\u0440\u044a\u0437\u043a\u0430","horizontalrule":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435 \u043d\u0430 \u0445\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","fullscreen":"\u041d\u0430 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d","preview":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u0435\u043d \u043f\u0440\u0435\u0433\u043b\u0435\u0434"},"mediamanager":{"insert_link":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435 \u043d\u0430 \u043b\u0438\u043d\u043a","insert_image":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","insert_video":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b","insert_audio":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435 \u043d\u0430 \u0437\u0432\u0443\u043a\u043e\u0432 \u0444\u0430\u0439\u043b","invalid_file_empty_insert":"\u041c\u043e\u043b\u044f, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0444\u0430\u0439\u043b \u0437\u0430 \u0434\u0430 \u0433\u043e \u0432\u043c\u044a\u043a\u043d\u0435\u0442\u0435 \u043a\u0430\u0442\u043e \u043b\u0438\u043d\u043a.","invalid_file_single_insert":"\u041c\u043e\u043b\u044f, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0435\u0434\u0438\u043d \u0444\u0430\u0439\u043b.","invalid_image_empty_insert":"\u041c\u043e\u043b\u044f, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435(\u044f) \u0437\u0430 \u0434\u0430 \u0432\u043c\u044a\u043a\u043d\u0435\u0442\u0435.","invalid_video_empty_insert":"\u041c\u043e\u043b\u044f, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b \u0437\u0430 \u0432\u043c\u044a\u043a\u0432\u0430\u043d\u0435.","invalid_audio_empty_insert":"\u041c\u043e\u043b\u044f, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u0432\u0443\u043a\u043e\u0432 \u0444\u0430\u0439\u043b \u0437\u0430 \u0432\u043c\u044a\u043a\u0432\u0430\u043d\u0435."},"alert":{"confirm_button_text":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0438","cancel_button_text":"\u041e\u0442\u043a\u0430\u0436\u0438","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var bg = moment.defineLocale('bg', {
months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
monthsShort : 'янрев_мар_апрай_юни_юли_авг_сеп_окт_ноеек'.split('_'),
weekdays : еделя_понеделник_вторник_срядаетвъртък_петък_събота'.split('_'),
weekdaysShort : ед_пон_вто_сря_чет_пет_съб'.split('_'),
weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'D.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY H:mm',
LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Днес в] LT',
nextDay : '[Утре в] LT',
nextWeek : 'dddd [в] LT',
lastDay : '[Вчера в] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[В изминалата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[В изминалия] dddd [в] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : 'след %s',
past : 'преди %s',
s : 'няколко секунди',
ss : '%d секунди',
m : 'минута',
mm : '%d минути',
h : 'час',
hh : '%d часа',
d : 'ден',
dd : '%d дни',
M : 'месец',
MM : '%d месеца',
y : 'година',
yy : '%d години'
},
dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return bg;
})));

View File

@@ -0,0 +1,99 @@
/*
* This file has been compiled from: /modules/system/lang/ca/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['ca'] = $.extend(
$.wn.langMessages['ca'] || {},
{"markdowneditor":{"formatting":"Formatar","quote":"Quota","code":"Codi","header1":"T\u00edtol 1","header2":"T\u00edtol 2","header3":"T\u00edtol 3","header4":"T\u00edtol 4","header5":"T\u00edtol 5","header6":"T\u00edtol 6","bold":"Negreta","italic":"Cursiva","unorderedlist":"Llista desordenada","orderedlist":"Llista ordenada","video":"V\u00eddeo","image":"Imatge","link":"Enlla\u00e7","horizontalrule":"Inserir l\u00ednia horitzontal","fullscreen":"Pantalla completa","preview":"Previsualitzar"},"mediamanager":{"insert_link":"Inserir enlla\u00e7 a m\u00e8dia","insert_image":"Inserir imatge de m\u00e8dia","insert_video":"Inserir v\u00eddeo de m\u00e8dia","insert_audio":"Inserir \u00e0udio de m\u00e8dia","invalid_file_empty_insert":"Si us plau selecciona l'arxiu a enlla\u00e7ar.","invalid_file_single_insert":"Si us plau selecciona un sol arxiu.","invalid_image_empty_insert":"Si us plau selecciona imatge(s) per inserir.","invalid_video_empty_insert":"Si us plau selecciona un arxiu de v\u00eddeo per inserir.","invalid_audio_empty_insert":"Si us plau selecciona un arxiu d'\u00e0udio per inserir."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel\u00b7lar","widget_remove_confirm":"Eliminar aquest widget?"},"datepicker":{"previousMonth":"Mes anterior","nextMonth":"Mes seg\u00fcent","months":["Gener","Febrer","Mar\u00e7","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],"weekdays":["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],"weekdaysShort":["Dg","Dl","Dm","Dx","Dj","Dv","Ds"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"tots"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"tots","filter_button_text":"Filtrar","reset_button_text":"Reiniciar","date_placeholder":"Data","after_placeholder":"Despr\u00e9s","before_placeholder":"Abans"},"numbers":{"all":"tots","filter_button_text":"Filtrar","reset_button_text":"Reiniciar","min_placeholder":"M\u00edn","max_placeholder":"M\u00e0x"}},"eventlog":{"show_stacktrace":"Mostrar l'stacktrace","hide_stacktrace":"Ocultar l'stacktrace","tabs":{"formatted":"Formatat","raw":"Cru"},"editor":{"title":"Editor de codi font","description":"El teu sistema operatiu hauria d'estar configurat per escoltar un d'aquests esquemes d'URL.","openWith":"Obrir amb","remember_choice":"Recordar l'opci\u00f3 seleccionada durant aquesta sessi\u00f3","open":"Obrir","cancel":"Cancel\u00b7lar"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var ca = moment.defineLocale('ca', {
months : {
standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
isFormat: /D[oD]?(\s)+MMMM/
},
monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
monthsParseExact : true,
weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM [de] YYYY',
ll : 'D MMM YYYY',
LLL : 'D MMMM [de] YYYY [a les] H:mm',
lll : 'D MMM YYYY, H:mm',
LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm',
llll : 'ddd D MMM YYYY, H:mm'
},
calendar : {
sameDay : function () {
return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextDay : function () {
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextWeek : function () {
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastDay : function () {
return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastWeek : function () {
return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : 'd\'aquí %s',
past : 'fa %s',
s : 'uns segons',
ss : '%d segons',
m : 'un minut',
mm : '%d minuts',
h : 'una hora',
hh : '%d hores',
d : 'un dia',
dd : '%d dies',
M : 'un mes',
MM : '%d mesos',
y : 'un any',
yy : '%d anys'
},
dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
ordinal : function (number, period) {
var output = (number === 1) ? 'r' :
(number === 2) ? 'n' :
(number === 3) ? 'r' :
(number === 4) ? 't' : 'è';
if (period === 'w' || period === 'W') {
output = 'a';
}
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return ca;
})));

View File

@@ -0,0 +1,190 @@
/*
* This file has been compiled from: /modules/system/lang/cs/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['cs'] = $.extend(
$.wn.langMessages['cs'] || {},
{"markdowneditor":{"formatting":"Form\u00e1tov\u00e1n\u00ed","quote":"Citace","code":"K\u00f3d","header1":"Nadpis 1","header2":"Nadpis 2","header3":"Nadpis 3","header4":"Nadpis 4","header5":"Nadpis 5","header6":"Nadpis 6","bold":"Tu\u010dn\u011b","italic":"Kurz\u00edvou","unorderedlist":"Ne\u010d\u00edslovan\u00fd seznam","orderedlist":"\u010c\u00edslovan\u00fd seznam","video":"Video","image":"Obr\u00e1zek","link":"Odkaz","horizontalrule":"Vlo\u017eit horizont\u00e1ln\u00ed linku","fullscreen":"Cel\u00e1 obrazovka","preview":"N\u00e1hled"},"mediamanager":{"insert_link":"Vlo\u017eit odkaz","insert_image":"Vlo\u017eit obr\u00e1zek","insert_video":"Vlo\u017eit video","insert_audio":"Vlo\u017eit zvuk","invalid_file_empty_insert":"Pros\u00edm vyberte soubor, na kter\u00fd se vlo\u017e\u00ed odkaz.","invalid_file_single_insert":"Vyberte jeden soubor.","invalid_image_empty_insert":"Vyberte soubor(y) pro vlo\u017een\u00ed.","invalid_video_empty_insert":"Vyberte video soubor pro vlo\u017een\u00ed.","invalid_audio_empty_insert":"Vyberte audio soubor pro vlo\u017een\u00ed."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Zru\u0161it","widget_remove_confirm":"Odstranit widget?"},"datepicker":{"previousMonth":"P\u0159edchoz\u00ed m\u011bs\u00edc","nextMonth":"N\u00e1sleduj\u00edc\u00ed m\u011bs\u00edc","months":["Leden","\u00danor","B\u0159ezen","Duben","Kv\u011bten","\u010cerven","\u010cervenec","Srpen","Z\u00e1\u0159\u00ed","\u0158\u00edjen","Listopad","Prosinec"],"weekdays":["Ned\u011ble","Pond\u011bl\u00ed","\u00dater\u00fd","St\u0159eda","\u010ctvrtek","P\u00e1tek","Sobota"],"weekdaysShort":["Ne","Po","\u00dat","St","\u010ct","P\u00e1","So"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"V\u0161e"},"scopes":{"apply_button_text":"Filtrovat","clear_button_text":"Zru\u0161it"},"dates":{"all":"V\u0161e","filter_button_text":"Filtrovat","reset_button_text":"Zru\u0161it","date_placeholder":"Datum","after_placeholder":"Po","before_placeholder":"P\u0159ed"},"numbers":{"all":"V\u0161e","filter_button_text":"Filtrovat","reset_button_text":"Zru\u0161it","min_placeholder":"Minimum","max_placeholder":"Maximum"}},"eventlog":{"show_stacktrace":"Zobrazit stacktrace","hide_stacktrace":"Skr\u00fdt stacktrace","tabs":{"formatted":"Form\u00e1tov\u00e1no","raw":"P\u016fvodn\u00ed (raw)"},"editor":{"title":"Editor zdrojov\u00e9ho k\u00f3du","description":"V\u00e1\u0161 opera\u010dn\u00ed syst\u00e9m by m\u011bl b\u00fdt konfigurov\u00e1n tak, aby naslouchal jednomu z t\u011bchto sch\u00e9mat adres URL.","openWith":"Otev\u0159\u00edt v","remember_choice":"Zapamatovat si vybranou volbu pro tuto relaci","open":"Otev\u0159\u00edt","cancel":"Zru\u0161it"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
function plural(n) {
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'sekundy' : 'sekund');
} else {
return result + 'sekundami';
}
break;
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
} else {
return result + 'minutami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'den' : 'dnem';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
} else {
return result + 'dny';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
} else {
return result + 'měsíci';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
} else {
return result + 'lety';
}
break;
}
}
var cs = moment.defineLocale('cs', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
shortMonthsParse : (function (monthsShort) {
var i, _shortMonthsParse = [];
for (i = 0; i < 12; i++) {
_shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
}
return _shortMonthsParse;
}(monthsShort)),
longMonthsParse : (function (months) {
var i, _longMonthsParse = [];
for (i = 0; i < 12; i++) {
_longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
}
return _longMonthsParse;
}(months)),
weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
longDateFormat : {
LT: 'H:mm',
LTS : 'H:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY H:mm',
LLLL : 'dddd D. MMMM YYYY H:mm',
l : 'D. M. YYYY'
},
calendar : {
sameDay: '[dnes v] LT',
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v neděli v] LT';
case 1:
case 2:
return '[v] dddd [v] LT';
case 3:
return '[ve středu v] LT';
case 4:
return '[ve čtvrtek v] LT';
case 5:
return '[v pátek v] LT';
case 6:
return '[v sobotu v] LT';
}
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulou neděli v] LT';
case 1:
case 2:
return '[minulé] dddd [v] LT';
case 3:
return '[minulou středu v] LT';
case 4:
case 5:
return '[minulý] dddd [v] LT';
case 6:
return '[minulou sobotu v] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : 'za %s',
past : 'před %s',
s : translate,
ss : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
dayOfMonthOrdinalParse : /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return cs;
})));

View File

@@ -0,0 +1,71 @@
/*
* This file has been compiled from: /modules/system/lang/da/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['da'] = $.extend(
$.wn.langMessages['da'] || {},
{"markdowneditor":{"formatting":"Formatering","quote":"Citat","code":"Kode","header1":"Overskrift 1","header2":"Overskrift 2","header3":"Overskrift 3","header4":"Overskrift 4","header5":"Overskrift 5","header6":"Overskrift 6","bold":"Fed","italic":"Skr\u00e5","unorderedlist":"Usorteret Liste","orderedlist":"Nummereret Liste","video":"Video","image":"Billede","link":"Link","horizontalrule":"Inds\u00e6t horisontal streg","fullscreen":"Fuld sk\u00e6rm","preview":"Forh\u00e5ndsvisning"},"mediamanager":{"insert_link":"Inds\u00e6t Link","insert_image":"Inds\u00e6t Billede","insert_video":"Inds\u00e6t Video","insert_audio":"Inds\u00e6t Lyd","invalid_file_empty_insert":"V\u00e6lg venligst en fil, at inds\u00e6tte et link til.","invalid_file_single_insert":"V\u00e6lg venligst en enkel fil.","invalid_image_empty_insert":"V\u00e6lg venligst et eller flere billeder, at inds\u00e6tte.","invalid_video_empty_insert":"V\u00e6lg venligst en videofil, at inds\u00e6tte.","invalid_audio_empty_insert":"V\u00e6lg venligst en lydfil, at inds\u00e6tte."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Fortryd","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Sidste M\u00e5ned","nextMonth":"N\u00e6ste M\u00e5ned","months":["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],"weekdays":["S\u00f8ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L\u00f8rdag"],"weekdaysShort":["S\u00f8n","Man","Tir","Ons","Tor","Fre","L\u00f8r"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"Alle"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"alle","filter_button_text":"Filter","reset_button_text":"Nulstil","date_placeholder":"Dato","after_placeholder":"Efter","before_placeholder":"F\u00f8r"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Vis stacktracen","hide_stacktrace":"Skjul stacktracen","tabs":{"formatted":"Formateret","raw":"R\u00e5"},"editor":{"title":"Kildekode redigeringsv\u00e6rkt\u00f8j","description":"Dit operativsystem b\u00f8r konfigureres til at lytte til et af disse URL-skemaer.","openWith":"\u00c5ben med","remember_choice":"Husk valgte mulighed for denne session","open":"\u00c5ben","cancel":"Fortryd"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var da = moment.defineLocale('da', {
months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY HH:mm',
LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
},
calendar : {
sameDay : '[i dag kl.] LT',
nextDay : '[i morgen kl.] LT',
nextWeek : 'på dddd [kl.] LT',
lastDay : '[i går kl.] LT',
lastWeek : '[i] dddd[s kl.] LT',
sameElse : 'L'
},
relativeTime : {
future : 'om %s',
past : '%s siden',
s : 'få sekunder',
ss : '%d sekunder',
m : 'et minut',
mm : '%d minutter',
h : 'en time',
hh : '%d timer',
d : 'en dag',
dd : '%d dage',
M : 'en måned',
MM : '%d måneder',
y : 'et år',
yy : '%d år'
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return da;
})));

View File

@@ -0,0 +1,87 @@
/*
* This file has been compiled from: /modules/system/lang/de/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['de'] = $.extend(
$.wn.langMessages['de'] || {},
{"markdowneditor":{"formatting":"Formatierung","quote":"Zitat","code":"Code","header1":"\u00dcberschrift 1","header2":"\u00dcberschrift 2","header3":"\u00dcberschrift 3","header4":"\u00dcberschrift 4","header5":"\u00dcberschrift 5","header6":"\u00dcberschrift 6","bold":"Fett","italic":"Kursiv","unorderedlist":"Normale Liste","orderedlist":"Nummerierte Liste","video":"Video","image":"Bild","link":"Link","horizontalrule":"Horizontale Linie","fullscreen":"Vollbild","preview":"Vorschau"},"mediamanager":{"insert_link":"Link aus Medienbibliothek","insert_image":"Bild aus Medienbibliothek","insert_video":"Video aus Medienbibliothek","insert_audio":"Audio aus Medienbibliothek","invalid_file_empty_insert":"Bitte Datei ausw\u00e4hlen.","invalid_file_single_insert":"Bitte nur eine Datei w\u00e4hlen.","invalid_image_empty_insert":"Bitte ein Bilddatei ausw\u00e4hlen.","invalid_video_empty_insert":"Bitte ein Videodatei ausw\u00e4hlen.","invalid_audio_empty_insert":"Bitte eine Audiodatei ausw\u00e4hlen."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Abbrechen","widget_remove_confirm":"Dieses Widget entfernen?"},"datepicker":{"previousMonth":"Vorheriger Monat","nextMonth":"N\u00e4chsten Monat","months":["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"weekdays":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"weekdaysShort":["So","Mo","Di","Mi","Do","Fr","Sa"]},"colorpicker":{"last_color":"Benutze die zuletzt ausgew\u00e4hlte Farbe","aria_palette":"Farbauswahl-Palette","aria_hue":"Farbtonwahl-Regler","aria_opacity":"Transparenz-Regler"},"filter":{"group":{"all":"Alle"},"scopes":{"apply_button_text":"Anwenden","clear_button_text":"L\u00f6schen"},"dates":{"all":"Alle","filter_button_text":"Filter","reset_button_text":"Zur\u00fccksetzen","date_placeholder":"Datum","after_placeholder":"Nach","before_placeholder":"Vor"},"numbers":{"all":"Alle","filter_button_text":"Filter","reset_button_text":"Zur\u00fccksetzen","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Stacktrace anzeigen","hide_stacktrace":"Stacktrace ausblenden","tabs":{"formatted":"Formatiert","raw":"Raw"},"editor":{"title":"Quellcode-Editor","description":"Das Betriebssystem sollte so konfiguriert sein, dass es auf eines dieser URL-Schemas h\u00f6rt.","openWith":"\u00d6ffnen mit","remember_choice":"Ausgew\u00e4hlte Option f\u00fcr diese Session merken","open":"\u00d6ffnen","cancel":"Abbrechen"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
'h': ['eine Stunde', 'einer Stunde'],
'd': ['ein Tag', 'einem Tag'],
'dd': [number + ' Tage', number + ' Tagen'],
'M': ['ein Monat', 'einem Monat'],
'MM': [number + ' Monate', number + ' Monaten'],
'y': ['ein Jahr', 'einem Jahr'],
'yy': [number + ' Jahre', number + ' Jahren']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
var de = moment.defineLocale('de', {
months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
monthsParseExact : true,
weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY HH:mm',
LLLL : 'dddd, D. MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[heute um] LT [Uhr]',
sameElse: 'L',
nextDay: '[morgen um] LT [Uhr]',
nextWeek: 'dddd [um] LT [Uhr]',
lastDay: '[gestern um] LT [Uhr]',
lastWeek: '[letzten] dddd [um] LT [Uhr]'
},
relativeTime : {
future : 'in %s',
past : 'vor %s',
s : 'ein paar Sekunden',
ss : '%d Sekunden',
m : processRelativeTime,
mm : '%d Minuten',
h : processRelativeTime,
hh : '%d Stunden',
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return de;
})));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,78 @@
/*
* This file has been compiled from: /modules/system/lang/en-au/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['en-au'] = $.extend(
$.wn.langMessages['en-au'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var enAu = moment.defineLocale('en-au', {
months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
LT : 'h:mm A',
LTS : 'h:mm:ss A',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY h:mm A',
LLLL : 'dddd, D MMMM YYYY h:mm A'
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
ss : '%d seconds',
m : 'a minute',
mm : '%d minutes',
h : 'an hour',
hh : '%d hours',
d : 'a day',
dd : '%d days',
M : 'a month',
MM : '%d months',
y : 'a year',
yy : '%d years'
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return enAu;
})));

View File

@@ -0,0 +1,74 @@
/*
* This file has been compiled from: /modules/system/lang/en-ca/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['en-ca'] = $.extend(
$.wn.langMessages['en-ca'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var enCa = moment.defineLocale('en-ca', {
months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
LT : 'h:mm A',
LTS : 'h:mm:ss A',
L : 'YYYY-MM-DD',
LL : 'MMMM D, YYYY',
LLL : 'MMMM D, YYYY h:mm A',
LLLL : 'dddd, MMMM D, YYYY h:mm A'
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
ss : '%d seconds',
m : 'a minute',
mm : '%d minutes',
h : 'an hour',
hh : '%d hours',
d : 'a day',
dd : '%d days',
M : 'a month',
MM : '%d months',
y : 'a year',
yy : '%d years'
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
return enCa;
})));

View File

@@ -0,0 +1,78 @@
/*
* This file has been compiled from: /modules/system/lang/en-gb/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['en-gb'] = $.extend(
$.wn.langMessages['en-gb'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var enGb = moment.defineLocale('en-gb', {
months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
ss : '%d seconds',
m : 'a minute',
mm : '%d minutes',
h : 'an hour',
hh : '%d hours',
d : 'a day',
dd : '%d days',
M : 'a month',
MM : '%d months',
y : 'a year',
yy : '%d years'
},
dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
ordinal : function (number) {
var b = number % 10,
output = (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return enGb;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/en/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['en'] = $.extend(
$.wn.langMessages['en'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/es-ar/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['es-ar'] = $.extend(
$.wn.langMessages['es-ar'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);

View File

@@ -0,0 +1,103 @@
/*
* This file has been compiled from: /modules/system/lang/es/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['es'] = $.extend(
$.wn.langMessages['es'] || {},
{"markdowneditor":{"formatting":"Formateo","quote":"Cita","code":"C\u00f3digo","header1":"Encabezado 1","header2":"Encabezado 2","header3":"Encabezado 3","header4":"Encabezado 4","header5":"Encabezado 5","header6":"Encabezado 6","bold":"Negrita","italic":"Cursiva","unorderedlist":"Lista Desordenada","orderedlist":"Lista Ordenada","video":"Video","image":"Imagen","link":"V\u00ednculo","horizontalrule":"Insertar Regla Horizontal","fullscreen":"Pantalla completa","preview":"Previsualizar"},"mediamanager":{"insert_link":"Insertar Media V\u00ednculo","insert_image":"Insertar Media Imagen","insert_video":"Insertar Media Video","insert_audio":"Insertar Media Audio","invalid_file_empty_insert":"Por favor seleccione archivo para insertar v\u00ednculo.","invalid_file_single_insert":"Por favor seleccione un solo archivo.","invalid_image_empty_insert":"Por favor seleccione una imagen(es) para insertar.","invalid_video_empty_insert":"Por favor seleccione un archivo de video para insertar.","invalid_audio_empty_insert":"Por favor seleccione un archivo de audio para insertar."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancelar","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Mes Anterior","nextMonth":"Mes Siguiente","months":["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],"weekdays":["Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"],"weekdaysShort":["Dom","Lun","Mar","Mie","Jue","Vie","Sab"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"todos"},"scopes":{"apply_button_text":"Aplicar","clear_button_text":"Limpiar"},"dates":{"all":"todas","filter_button_text":"Filtrar","reset_button_text":"Restablecer","date_placeholder":"Fecha","after_placeholder":"Desde","before_placeholder":"Hasta"},"numbers":{"all":"todos","filter_button_text":"Filtrar","reset_button_text":"Restablecer","min_placeholder":"M\u00ednimo","max_placeholder":"M\u00e1ximo","number_placeholder":"N\u00famero"}},"eventlog":{"show_stacktrace":"Mostrar el seguimiento de la pila","hide_stacktrace":"Ocultar el seguimiento de la pila","tabs":{"formatted":"Formateado","raw":"Sin formato"},"editor":{"title":"Seleccione el editor de c\u00f3digo fuente a usar","description":"Su entorno de sistema operativo debe estar configurado para escuchar a uno de estos esquemas de URL.","openWith":"Abrir con","remember_choice":"Remember selected option for this session","open":"Abrir","cancel":"Cancelar","rememberChoice":"Recuerde la opci\u00f3n seleccionada para esta sesi\u00f3n del navegador"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
var es = moment.defineLocale('es', {
months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort : function (m, format) {
if (!m) {
return monthsShortDot;
} else if (/-MMM-/.test(format)) {
return monthsShort[m.month()];
} else {
return monthsShortDot[m.month()];
}
},
monthsRegex : monthsRegex,
monthsShortRegex : monthsRegex,
monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
monthsParse : monthsParse,
longMonthsParse : monthsParse,
shortMonthsParse : monthsParse,
weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D [de] MMMM [de] YYYY',
LLL : 'D [de] MMMM [de] YYYY H:mm',
LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
},
calendar : {
sameDay : function () {
return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextDay : function () {
return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextWeek : function () {
return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastDay : function () {
return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastWeek : function () {
return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : 'en %s',
past : 'hace %s',
s : 'unos segundos',
ss : '%d segundos',
m : 'un minuto',
mm : '%d minutos',
h : 'una hora',
hh : '%d horas',
d : 'un día',
dd : '%d días',
M : 'un mes',
MM : '%d meses',
y : 'un año',
yy : '%d años'
},
dayOfMonthOrdinalParse : /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return es;
})));

View File

@@ -0,0 +1,89 @@
/*
* This file has been compiled from: /modules/system/lang/et/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['et'] = $.extend(
$.wn.langMessages['et'] || {},
{"markdowneditor":{"formatting":"Vorming","quote":"Tsitaat","code":"Kood","header1":"Pealkiri 1","header2":"Pealkiri 2","header3":"Pealkiri 3","header4":"Pealkiri 4","header5":"Pealkiri 5","header6":"Pealkiri 6","bold":"Paks","italic":"Kursiiv","unorderedlist":"J\u00e4rjestamata nimekiri","orderedlist":"J\u00e4rjestatud nimekiri","video":"Video","image":"Pilt","link":"Link","horizontalrule":"Sisesta horisontaaljoon","fullscreen":"T\u00e4isekraan","preview":"Eelvaade"},"mediamanager":{"insert_link":"Sisesta link","insert_image":"Siseta pilt","insert_video":"Sisesta video","insert_audio":"Sisesta heliklipp","invalid_file_empty_insert":"Palun vali fail, millele link lisada.","invalid_file_single_insert":"Palun vali \u00fcks fail.","invalid_image_empty_insert":"Palun vali pildid, mida lisada.","invalid_video_empty_insert":"Palun vali videoklipp, mida lisada.","invalid_audio_empty_insert":"Palun vali heliklipp, mida lisada."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Loobu","widget_remove_confirm":"Eemalda see widget?"},"datepicker":{"previousMonth":"Eelmine kuu","nextMonth":"J\u00e4rgmine kuu","months":["Jaanuar","Veebruar","M\u00e4rts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],"weekdays":["P\u00fchap\u00e4ev","Esmasp\u00e4ev","Teisip\u00e4ev","Kolmap\u00e4ev","Neljap\u00e4ev","Reede","Laup\u00e4ev"],"weekdaysShort":["P","E","T","K","N","R","L"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"k\u00f5ik"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"k\u00f5ik","filter_button_text":"Filtreeri","reset_button_text":"L\u00e4htesta","date_placeholder":"Kuup\u00e4ev","after_placeholder":"Hiljem kui","before_placeholder":"Varem kui"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"N\u00e4ita stacktrace","hide_stacktrace":"Peida stacktrace","tabs":{"formatted":"Kujundatud","raw":"Algne"},"editor":{"title":"L\u00e4htekoodi redaktor","description":"Sinu operatsioonis\u00fcsteem peaks olema sedistatud \u00fche URL skeemi jaoks.","openWith":"Ava programmiga","remember_choice":"J\u00e4ta valik selleks sessiooniks meelde","open":"Ava","cancel":"Loobu"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
'm' : ['ühe minuti', 'üks minut'],
'mm': [number + ' minuti', number + ' minutit'],
'h' : ['ühe tunni', 'tund aega', 'üks tund'],
'hh': [number + ' tunni', number + ' tundi'],
'd' : ['ühe päeva', 'üks päev'],
'M' : ['kuu aja', 'kuu aega', 'üks kuu'],
'MM': [number + ' kuu', number + ' kuud'],
'y' : ['ühe aasta', 'aasta', 'üks aasta'],
'yy': [number + ' aasta', number + ' aastat']
};
if (withoutSuffix) {
return format[key][2] ? format[key][2] : format[key][1];
}
return isFuture ? format[key][0] : format[key][1];
}
var et = moment.defineLocale('et', {
months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),
weekdaysMin : 'P_E_T_K_N_R_L'.split('_'),
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY H:mm',
LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Täna,] LT',
nextDay : '[Homme,] LT',
nextWeek : '[Järgmine] dddd LT',
lastDay : '[Eile,] LT',
lastWeek : '[Eelmine] dddd LT',
sameElse : 'L'
},
relativeTime : {
future : '%s pärast',
past : '%s tagasi',
s : processRelativeTime,
m : processRelativeTime,
mm : processRelativeTime,
h : processRelativeTime,
hh : processRelativeTime,
d : processRelativeTime,
dd : '%d päeva',
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return et;
}));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,120 @@
/*
* This file has been compiled from: /modules/system/lang/fi/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['fi'] = $.extend(
$.wn.langMessages['fi'] || {},
{"markdowneditor":{"formatting":"Muotoilu","quote":"Lainaus","code":"Koodi","header1":"Otsikko 1","header2":"Otsikko 2","header3":"Otsikko 3","header4":"Otsikko 4","header5":"Otsikko 5","header6":"Otsikko 6","bold":"Lihavointi","italic":"Kursivointi","unorderedlist":"J\u00e4rjest\u00e4m\u00e4t\u00f6n lista","orderedlist":"J\u00e4rjestetty lista","video":"Video","image":"Kuva","link":"Linkki","horizontalrule":"Lis\u00e4\u00e4 horisontaalinen jakaja","fullscreen":"Kokon\u00e4ytt\u00f6","preview":"Esikatsele"},"mediamanager":{"insert_link":"Lis\u00e4\u00e4 linkki Mediaan","insert_image":"Lis\u00e4\u00e4 kuva","insert_video":"Lis\u00e4\u00e4 video","insert_audio":"Lis\u00e4\u00e4 \u00e4\u00e4nitiedosto","invalid_file_empty_insert":"Valitse liitett\u00e4v\u00e4 tiedosto.","invalid_file_single_insert":"Valitse vain yksi tiedosto.","invalid_image_empty_insert":"Valitse linkitett\u00e4v\u00e4(t) kuva(t).","invalid_video_empty_insert":"Valitse linkitett\u00e4v\u00e4 videotiedosto.","invalid_audio_empty_insert":"Valitse linkitett\u00e4v\u00e4 \u00e4\u00e4nitiedosto."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Peruuta","widget_remove_confirm":"Poista t\u00e4m\u00e4 vimpain?"},"datepicker":{"previousMonth":"Edellinen kuukausi","nextMonth":"Seuraava kuukausi","months":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kes\u00e4kuu","hein\u00e4kuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],"weekdays":["sunnutai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"weekdaysShort":["su","ma","ti","ke","to","pe","la"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"kaikki"},"scopes":{"apply_button_text":"Ota k\u00e4ytt\u00f6\u00f6n","clear_button_text":"Tyhjenn\u00e4"},"dates":{"all":"kaikki","filter_button_text":"Suodata","reset_button_text":"Palauta","date_placeholder":"P\u00e4iv\u00e4","after_placeholder":"J\u00e4lkeen","before_placeholder":"Ennen"},"numbers":{"all":"kaikki","filter_button_text":"Suodata","reset_button_text":"Palauta","min_placeholder":"V\u00e4h.","max_placeholder":"Enint."}},"eventlog":{"show_stacktrace":"N\u00e4yt\u00e4 stacktrace","hide_stacktrace":"Piilota stacktrace","tabs":{"formatted":"Muotoiltu","raw":"Raaka"},"editor":{"title":"L\u00e4hdekoodieditori","description":"K\u00e4ytt\u00f6j\u00e4rjestelm\u00e4si pit\u00e4isi olla m\u00e4\u00e4ritetty kuuntelemaan jotain n\u00e4ist\u00e4 URL osoitteista.","openWith":"Avaa sovelluksessa","remember_choice":"Muista valittu vaihtoehto istunnon ajan","open":"Avaa","cancel":"Peruuta"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),
numbersFuture = [
'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
numbersPast[7], numbersPast[8], numbersPast[9]
];
function translate(number, withoutSuffix, key, isFuture) {
var result = '';
switch (key) {
case 's':
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
case 'ss':
return isFuture ? 'sekunnin' : 'sekuntia';
case 'm':
return isFuture ? 'minuutin' : 'minuutti';
case 'mm':
result = isFuture ? 'minuutin' : 'minuuttia';
break;
case 'h':
return isFuture ? 'tunnin' : 'tunti';
case 'hh':
result = isFuture ? 'tunnin' : 'tuntia';
break;
case 'd':
return isFuture ? 'päivän' : 'päivä';
case 'dd':
result = isFuture ? 'päivän' : 'päivää';
break;
case 'M':
return isFuture ? 'kuukauden' : 'kuukausi';
case 'MM':
result = isFuture ? 'kuukauden' : 'kuukautta';
break;
case 'y':
return isFuture ? 'vuoden' : 'vuosi';
case 'yy':
result = isFuture ? 'vuoden' : 'vuotta';
break;
}
result = verbalNumber(number, isFuture) + ' ' + result;
return result;
}
function verbalNumber(number, isFuture) {
return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
}
var fi = moment.defineLocale('fi', {
months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),
weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),
longDateFormat : {
LT : 'HH.mm',
LTS : 'HH.mm.ss',
L : 'DD.MM.YYYY',
LL : 'Do MMMM[ta] YYYY',
LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',
LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
l : 'D.M.YYYY',
ll : 'Do MMM YYYY',
lll : 'Do MMM YYYY, [klo] HH.mm',
llll : 'ddd, Do MMM YYYY, [klo] HH.mm'
},
calendar : {
sameDay : '[tänään] [klo] LT',
nextDay : '[huomenna] [klo] LT',
nextWeek : 'dddd [klo] LT',
lastDay : '[eilen] [klo] LT',
lastWeek : '[viime] dddd[na] [klo] LT',
sameElse : 'L'
},
relativeTime : {
future : '%s päästä',
past : '%s sitten',
s : translate,
ss : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return fi;
})));

View File

@@ -0,0 +1,85 @@
/*
* This file has been compiled from: /modules/system/lang/fr-ca/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['fr-ca'] = $.extend(
$.wn.langMessages['fr-ca'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var frCa = moment.defineLocale('fr-ca', {
months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
monthsParseExact : true,
weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY-MM-DD',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Aujourdhui à] LT',
nextDay : '[Demain à] LT',
nextWeek : 'dddd [à] LT',
lastDay : '[Hier à] LT',
lastWeek : 'dddd [dernier à] LT',
sameElse : 'L'
},
relativeTime : {
future : 'dans %s',
past : 'il y a %s',
s : 'quelques secondes',
ss : '%d secondes',
m : 'une minute',
mm : '%d minutes',
h : 'une heure',
hh : '%d heures',
d : 'un jour',
dd : '%d jours',
M : 'un mois',
MM : '%d mois',
y : 'un an',
yy : '%d ans'
},
dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
ordinal : function (number, period) {
switch (period) {
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
case 'Q':
case 'D':
case 'DDD':
case 'd':
return number + (number === 1 ? 'er' : 'e');
// Words with feminine grammatical gender: semaine
case 'w':
case 'W':
return number + (number === 1 ? 're' : 'e');
}
}
});
return frCa;
})));

View File

@@ -0,0 +1,94 @@
/*
* This file has been compiled from: /modules/system/lang/fr/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['fr'] = $.extend(
$.wn.langMessages['fr'] || {},
{"markdowneditor":{"formatting":"Formatage","quote":"Citation","code":"Code","header1":"Ent\u00eate 1","header2":"Ent\u00eate 2","header3":"Ent\u00eate 3","header4":"Ent\u00eate 4","header5":"Ent\u00eate 5","header6":"Ent\u00eate 6","bold":"Gras","italic":"Italique","unorderedlist":"Liste non ordonn\u00e9e","orderedlist":"Liste ordonn\u00e9e","video":"Vid\u00e9o","image":"Image","link":"Lien","horizontalrule":"Ins\u00e9rer la r\u00e8gle horizontalement","fullscreen":"Plein \u00e9cran","preview":"Aper\u00e7u"},"mediamanager":{"insert_link":"Ins\u00e9rer un lien vers un fichier du gestionnaire de m\u00e9dia","insert_image":"Ins\u00e9rer une image du gestionnaire de m\u00e9dia","insert_video":"Ins\u00e9rer une vid\u00e9o du gestionnaire de m\u00e9dia","insert_audio":"Ins\u00e9rer un document audio du gestionnaire de m\u00e9dia","invalid_file_empty_insert":"Veuillez s\u00e9lectionner un fichier \u00e0 lier.","invalid_file_single_insert":"Veuillez s\u00e9lectionner un seul fichier.","invalid_image_empty_insert":"Veuillez s\u00e9lectionner au moins une image \u00e0 ins\u00e9rer.","invalid_video_empty_insert":"Veuillez s\u00e9lectionner une vid\u00e9o \u00e0 ins\u00e9rer.","invalid_audio_empty_insert":"Veuillez s\u00e9lectionner un document audio \u00e0 ins\u00e9rer."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Annuler","widget_remove_confirm":"Retirer ce widget ?"},"datepicker":{"previousMonth":"Mois pr\u00e9c\u00e9dent","nextMonth":"Mois suivant","months":["Janvier","F\u00e9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\u00fbt","Septembre","Octobre","Novembre","D\u00e9cembre"],"weekdays":["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],"weekdaysShort":["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},"colorpicker":{"last_color":"Utiliser la couleur s\u00e9lectionn\u00e9e pr\u00e9c\u00e9demment","aria_palette":"Zone de s\u00e9lection des couleurs","aria_hue":"Curseur de s\u00e9lection de la teinte","aria_opacity":"Curseur de s\u00e9lection de l'opacit\u00e9"},"filter":{"group":{"all":"tous"},"scopes":{"apply_button_text":"Appliquer","clear_button_text":"Annuler"},"dates":{"all":"toute la p\u00e9riode","filter_button_text":"Filtrer","reset_button_text":"Effacer","date_placeholder":"Date","after_placeholder":"Apr\u00e8s le","before_placeholder":"Avant le"},"numbers":{"all":"tous","filter_button_text":"Filtres","reset_button_text":"R\u00e9initialiser","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Afficher la pile d'ex\u00e9cution","hide_stacktrace":"Masquer la pile d'ex\u00e9cution","tabs":{"formatted":"Message format\u00e9","raw":"Message brut"},"editor":{"title":"S\u00e9lectionnez l'\u00e9diteur de code source \u00e0 utiliser","description":"L'environnement de votre syst\u00e8me d'exploitation doit \u00eatre configur\u00e9 pour ouvrir l'un des sch\u00e9mas d'URL ci-dessous.","openWith":"Ouvrir avec","remember_choice":"Se souvenir de la s\u00e9lection pour la dur\u00e9e de la session dans ce navigateur","open":"Ouvrir","cancel":"Annuler"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var fr = moment.defineLocale('fr', {
months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
monthsParseExact : true,
weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[Aujourdhui à] LT',
nextDay : '[Demain à] LT',
nextWeek : 'dddd [à] LT',
lastDay : '[Hier à] LT',
lastWeek : 'dddd [dernier à] LT',
sameElse : 'L'
},
relativeTime : {
future : 'dans %s',
past : 'il y a %s',
s : 'quelques secondes',
ss : '%d secondes',
m : 'une minute',
mm : '%d minutes',
h : 'une heure',
hh : '%d heures',
d : 'un jour',
dd : '%d jours',
M : 'un mois',
MM : '%d mois',
y : 'un an',
yy : '%d ans'
},
dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
ordinal : function (number, period) {
switch (period) {
// TODO: Return 'e' when day of month > 1. Move this case inside
// block for masculine words below.
// See https://github.com/moment/moment/issues/3375
case 'D':
return number + (number === 1 ? 'er' : '');
// Words with masculine grammatical gender: mois, trimestre, jour
default:
case 'M':
case 'Q':
case 'DDD':
case 'd':
return number + (number === 1 ? 'er' : 'e');
// Words with feminine grammatical gender: semaine
case 'w':
case 'W':
return number + (number === 1 ? 're' : 'e');
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return fr;
})));

View File

@@ -0,0 +1,121 @@
/*
* This file has been compiled from: /modules/system/lang/hu/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['hu'] = $.extend(
$.wn.langMessages['hu'] || {},
{"markdowneditor":{"formatting":"Forr\u00e1sk\u00f3d","quote":"Id\u00e9zet","code":"K\u00f3d","header1":"C\u00edmsor 1","header2":"C\u00edmsor 2","header3":"C\u00edmsor 3","header4":"C\u00edmsor 4","header5":"C\u00edmsor 5","header6":"C\u00edmsor 6","bold":"F\u00e9lk\u00f6v\u00e9r","italic":"D\u00f6lt","unorderedlist":"Rendezett lista","orderedlist":"Sz\u00e1mozott lista","video":"Vide\u00f3","image":"K\u00e9p","link":"Hivatkoz\u00e1s","horizontalrule":"Vonal besz\u00far\u00e1sa","fullscreen":"Teljes k\u00e9perny\u0151","preview":"El\u0151n\u00e9zet"},"mediamanager":{"insert_link":"Hivatkoz\u00e1s besz\u00far\u00e1sa","insert_image":"K\u00e9p besz\u00far\u00e1sa","insert_video":"Vide\u00f3 besz\u00far\u00e1sa","insert_audio":"Audi\u00f3 besz\u00far\u00e1sa","invalid_file_empty_insert":"Hivatkoz\u00e1s k\u00e9sz\u00edt\u00e9s\u00e9hez jel\u00f6lj\u00f6n ki egy sz\u00f6vegr\u00e9szt.","invalid_file_single_insert":"K\u00e9rj\u00fck jel\u00f6lj\u00f6n ki egy f\u00e1jlt.","invalid_image_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy k\u00e9pet a besz\u00far\u00e1shoz.","invalid_video_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy vide\u00f3t a besz\u00far\u00e1shoz.","invalid_audio_empty_insert":"V\u00e1lasszon ki legal\u00e1bb egy audi\u00f3t a besz\u00far\u00e1shoz."},"alert":{"confirm_button_text":"Igen","cancel_button_text":"M\u00e9gsem","widget_remove_confirm":"Val\u00f3ban t\u00f6r\u00f6lni akarja?"},"datepicker":{"previousMonth":"El\u0151z\u0151 h\u00f3nap","nextMonth":"K\u00f6vetkez\u0151 h\u00f3nap","months":["janu\u00e1r","febru\u00e1r","m\u00e1rcius","\u00e1prilis","m\u00e1jus","j\u00fanius","j\u00falius","augusztus","szeptember","okt\u00f3ber","november","december"],"weekdays":["vas\u00e1rnap","h\u00e9tf\u0151","kedd","szerda","cs\u00fct\u00f6rt\u00f6k","p\u00e9ntek","szombat"],"weekdaysShort":["va","h\u00e9","ke","sze","cs","p\u00e9","szo"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ment\u00e9s"},"filter":{"group":{"all":"\u00f6sszes"},"scopes":{"apply_button_text":"Sz\u0171r\u00e9s","clear_button_text":"Alaphelyzet"},"dates":{"all":"\u00f6sszes","filter_button_text":"Sz\u0171r\u00e9s","reset_button_text":"Alaphelyzet","date_placeholder":"D\u00e1tum","after_placeholder":"Kezdete","before_placeholder":"V\u00e9ge"},"numbers":{"all":"\u00f6sszes","filter_button_text":"Sz\u0171r\u00e9s","reset_button_text":"Alaphelyzet","min_placeholder":"Minimum","max_placeholder":"Maximum"}},"eventlog":{"show_stacktrace":"R\u00e9szletek","hide_stacktrace":"Rejt\u00e9s","tabs":{"formatted":"Form\u00e1zott","raw":"T\u00f6m\u00f6r\u00edtett"},"editor":{"title":"Forr\u00e1sk\u00f3d szerkeszt\u0151","description":"Az oper\u00e1ci\u00f3s rendszert \u00fagy kell be\u00e1ll\u00edtani, hogy figyelembe vegye az URL s\u00e9m\u00e1t.","openWith":"Megnyit\u00e1s mint","remember_choice":"Kiv\u00e1lasztott be\u00e1ll\u00edt\u00e1sok megjegyz\u00e9se ebben a munkamenetben","open":"Megnyit\u00e1s","cancel":"M\u00e9gsem"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
function translate(number, withoutSuffix, key, isFuture) {
var num = number;
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
case 'ss':
return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce';
case 'm':
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'h':
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
}
return '';
}
function week(isFuture) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
}
var hu = moment.defineLocale('hu', {
months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'YYYY.MM.DD.',
LL : 'YYYY. MMMM D.',
LLL : 'YYYY. MMMM D. H:mm',
LLLL : 'YYYY. MMMM D., dddd H:mm'
},
meridiemParse: /de|du/i,
isPM: function (input) {
return input.charAt(1).toLowerCase() === 'u';
},
meridiem : function (hours, minutes, isLower) {
if (hours < 12) {
return isLower === true ? 'de' : 'DE';
} else {
return isLower === true ? 'du' : 'DU';
}
},
calendar : {
sameDay : '[ma] LT[-kor]',
nextDay : '[holnap] LT[-kor]',
nextWeek : function () {
return week.call(this, true);
},
lastDay : '[tegnap] LT[-kor]',
lastWeek : function () {
return week.call(this, false);
},
sameElse : 'L'
},
relativeTime : {
future : '%s múlva',
past : '%s',
s : translate,
ss : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return hu;
})));

View File

@@ -0,0 +1,93 @@
/*
* This file has been compiled from: /modules/system/lang/id/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['id'] = $.extend(
$.wn.langMessages['id'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var id = moment.defineLocale('id', {
months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat : {
LT : 'HH.mm',
LTS : 'HH.mm.ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY [pukul] HH.mm',
LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
},
meridiemParse: /pagi|siang|sore|malam/,
meridiemHour : function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'pagi') {
return hour;
} else if (meridiem === 'siang') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === 'sore' || meridiem === 'malam') {
return hour + 12;
}
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'siang';
} else if (hours < 19) {
return 'sore';
} else {
return 'malam';
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Besok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kemarin pukul] LT',
lastWeek : 'dddd [lalu pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : 'dalam %s',
past : '%s yang lalu',
s : 'beberapa detik',
ss : '%d detik',
m : 'semenit',
mm : '%d menit',
h : 'sejam',
hh : '%d jam',
d : 'sehari',
dd : '%d hari',
M : 'sebulan',
MM : '%d bulan',
y : 'setahun',
yy : '%d tahun'
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return id;
})));

View File

@@ -0,0 +1,80 @@
/*
* This file has been compiled from: /modules/system/lang/it/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['it'] = $.extend(
$.wn.langMessages['it'] || {},
{"markdowneditor":{"formatting":"Formattazione","quote":"Citazione","code":"Codice","header1":"Titolo 1","header2":"Titolo 2","header3":"Titolo 3","header4":"Titolo 4","header5":"Titolo 5","header6":"Titolo 6","bold":"Grassetto","italic":"Corsivo","unorderedlist":"Elenco puntato","orderedlist":"Elenco numerato","video":"Video","image":"Immagine","link":"Collegamento","horizontalrule":"Inserisci linea orizzontale","fullscreen":"Schermo intero","preview":"Anteprima"},"mediamanager":{"insert_link":"Inserisci collegamento elemento multimediale","insert_image":"Inserisci immagine","insert_video":"Inserisci video","insert_audio":"Inserisci audio","invalid_file_empty_insert":"Si prega di selezionare un file di cui inserire il collegamento.","invalid_file_single_insert":"Si prega di selezionare un singolo file.","invalid_image_empty_insert":"Si prega di selezionare l\\'immagine\/le immagini da inserire.","invalid_video_empty_insert":"Si prega di selezionare un file video da inserire.","invalid_audio_empty_insert":"Si prega di selezionare un file audio da inserire."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Annulla","widget_remove_confirm":"Rimuovere questo widget?"},"datepicker":{"previousMonth":"Mese precedente","nextMonth":"Mese successivo","months":["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],"weekdays":["Domenica","Luned\u00ec","Marted\u00ec","Mercoled\u00ec","Gioved\u00ec","Venerd\u00ec","Sabato"],"weekdaysShort":["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"OK"},"filter":{"group":{"all":"tutti"},"scopes":{"apply_button_text":"Applica","clear_button_text":"Rimuovi"},"dates":{"all":"tutte","filter_button_text":"Filtra","reset_button_text":"Reimposta","date_placeholder":"Data","after_placeholder":"Dopo","before_placeholder":"Prima"},"numbers":{"all":"tutti","filter_button_text":"Filtra","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Visualizza la traccia dello stack","hide_stacktrace":"Nascondi la traccia dello stack","tabs":{"formatted":"Formattato","raw":"Grezzo"},"editor":{"title":"Editor codice sorgente","description":"Il tuo sistema operativo deve essere configurato per ascoltare uno di questi schemi URL.","openWith":"Apri con","remember_choice":"Ricorda l'opzione selezionata per questa sessione","open":"Apri","cancel":"Annulla"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var it = moment.defineLocale('it', {
months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[la scorsa] dddd [alle] LT';
default:
return '[lo scorso] dddd [alle] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : function (s) {
return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
},
past : '%s fa',
s : 'alcuni secondi',
ss : '%d secondi',
m : 'un minuto',
mm : '%d minuti',
h : 'un\'ora',
hh : '%d ore',
d : 'un giorno',
dd : '%d giorni',
M : 'un mese',
MM : '%d mesi',
y : 'un anno',
yy : '%d anni'
},
dayOfMonthOrdinalParse : /\d{1,2}º/,
ordinal: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return it;
})));

View File

@@ -0,0 +1,103 @@
/*
* This file has been compiled from: /modules/system/lang/ja/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['ja'] = $.extend(
$.wn.langMessages['ja'] || {},
{"markdowneditor":{"formatting":"Formatting","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var ja = moment.defineLocale('ja', {
months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY/MM/DD',
LL : 'YYYY年M月D日',
LLL : 'YYYY年M月D日 HH:mm',
LLLL : 'YYYY年M月D日 dddd HH:mm',
l : 'YYYY/MM/DD',
ll : 'YYYY年M月D日',
lll : 'YYYY年M月D日 HH:mm',
llll : 'YYYY年M月D日(ddd) HH:mm'
},
meridiemParse: /午前|午後/i,
isPM : function (input) {
return input === '午後';
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return '午前';
} else {
return '午後';
}
},
calendar : {
sameDay : '[今日] LT',
nextDay : '[明日] LT',
nextWeek : function (now) {
if (now.week() < this.week()) {
return '[来週]dddd LT';
} else {
return 'dddd LT';
}
},
lastDay : '[昨日] LT',
lastWeek : function (now) {
if (this.week() < now.week()) {
return '[先週]dddd LT';
} else {
return 'dddd LT';
}
},
sameElse : 'L'
},
dayOfMonthOrdinalParse : /\d{1,2}日/,
ordinal : function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
default:
return number;
}
},
relativeTime : {
future : '%s後',
past : '%s前',
s : '数秒',
ss : '%d秒',
m : '1分',
mm : '%d分',
h : '1時間',
hh : '%d時間',
d : '1日',
dd : '%d日',
M : '1ヶ月',
MM : '%dヶ月',
y : '1年',
yy : '%d年'
}
});
return ja;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/kr/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['kr'] = $.extend(
$.wn.langMessages['kr'] || {},
{"markdowneditor":{"formatting":"\uc11c\uc2dd","quote":"\uc778\uc6a9","code":"\ucf54\ub3c4","header1":"\ud5e4\ub354 1","header2":"\ud5e4\ub354 2","header3":"\ud5e4\ub354 3","header4":"\ud5e4\ub354 4","header5":"\ud5e4\ub354 5","header6":"\ud5e4\ub354 6","bold":"\uc9c4\ud558\uac8c","italic":"\uc774\ud0e4\ub9ad","unorderedlist":"\ube44\uc21c\ucc28 \ubaa9\ub85d","orderedlist":"\uc21c\ucc28 \ubaa9\ub85d","video":"\ub3d9\uc601\uc0c1","image":"\uc774\ubbf8\uc9c0","link":"\ub9c1\ud06c","horizontalrule":"\uac00\ub85c\uc120 \uc0bd\uc785","fullscreen":"\uc804\uccb4\ud654\uba74","preview":"\ubbf8\ub9ac\ubcf4\uae30"},"mediamanager":{"insert_link":"\ubbf8\ub514\uc5b4 \ub9c1\ud06c \uc0bd\uc785","insert_image":"\uadf8\ub9bc \uc0bd\uc785","insert_video":"\ub3d9\uc601\uc0c1 \uc0bd\uc785","insert_audio":"\uc18c\ub9ac \uc0bd\uc785","invalid_file_empty_insert":"\ub9c1\ud06c\ub97c \uc0bd\uc785\ud560 \ud30c\uc77c\uc744 \uc120\ud0dd\ud574\uc8fc\uc138\uc694.","invalid_file_single_insert":"\ud55c\uac1c\uc758 \ud30c\uc77c\uc744 \uc120\ud0dd\ud574\uc8fc\uc138\uc694.","invalid_image_empty_insert":"\uc0bd\uc785\ud560 \uadf8\ub9bc\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694.","invalid_video_empty_insert":"\uc0bd\uc785\ud560 \ub3d9\uc601\uc0c1\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694.","invalid_audio_empty_insert":"\uc0bd\uc785\ud560 \uc18c\ub9ac\ud30c\uc77c\uc744 \uc120\ud0dd\ud574 \uc8fc\uc138\uc694."},"alert":{"confirm_button_text":"\ud655\uc778","cancel_button_text":"\ucde8\uc18c","widget_remove_confirm":"\uc774 \uc704\uc82f\uc744 \uc0ad\uc81c\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?"},"datepicker":{"previousMonth":"\uc9c0\ub09c \ub2ec","nextMonth":"\ub2e4\uc74c \ub2ec","months":["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],"weekdays":["\uc77c\uc694\uc77c","\uc6d4\uc694\uc77c","\ud654\uc694\uc77c","\uc218\uc694\uc77c","\ubaa9\uc694\uc77c","\uae08\uc694\uc77c","\ud1a0\uc694\uc77c"],"weekdaysShort":["\uc77c","\uc6d4","\ud654","\uc218","\ubaa9","\uae08","\ud1a0"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"\uc804\uccb4"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"\uc804\uccb4","filter_button_text":"\ud544\ud130","reset_button_text":"\uc7ac\uc124\uc815","date_placeholder":"\ub0a0\uc9dc","after_placeholder":"\uc774\ud6c4","before_placeholder":"\uc774\uc804"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"\uc2a4\ud0dd \ucd94\uc801 \ubcf4\uae30","hide_stacktrace":"\uc2a4\ud0dd \ucd94\uc801 \uac10\ucd94\uae30","tabs":{"formatted":"\uc815\ub9ac\ub41c\ub85c\uadf8","raw":"\ubcf8\ub798\ub85c\uadf8"},"editor":{"title":"\uc18c\uc2a4\ucf54\ub4dc \ud3b8\uc9d1\uae30","description":"\uc774\ub7f0 URL \uc2a4\ud0a4\ub9c8\ub97c \ubc1b\uc744 \uc218 \uc788\ub3c4\ub85d \ub2f9\uc2e0\uc758 \uc6b4\uc601\uccb4\uc81c\uac00 \uc124\uc815\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4.","openWith":"\uac19\uc774 \uc5f4\uae30","remember_choice":"\uc774 \uc138\uc158\uc758 \uc635\uc158\uc744 \uae30\uc5b5","open":"\uc5f4\uae30","cancel":"\ucde8\uc18c"}}}
);

View File

@@ -0,0 +1,129 @@
/*
* This file has been compiled from: /modules/system/lang/lt/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['lt'] = $.extend(
$.wn.langMessages['lt'] || {},
{"markdowneditor":{"formatting":"Formatavimas","quote":"Citata","code":"Kodas","header1":"Antra\u0161t\u0117 1","header2":"Antra\u0161t\u0117 2","header3":"Antra\u0161t\u0117 3","header4":"Antra\u0161t\u0117 4","header5":"Antra\u0161t\u0117 5","header6":"Antra\u0161t\u0117 6","bold":"Ry\u0161kus","italic":"Pasvir\u0119s","unorderedlist":"Ner\u016b\u0161iuotas S\u0105ra\u0161as","orderedlist":"R\u016b\u0161iuotas S\u0105ra\u0161as","video":"Video","image":"Paviksliukas","link":"Nuoroda","horizontalrule":"\u012eterpti Horizontali\u0105 Linij\u0105","fullscreen":"Visas Ekrano Dydis","preview":"Per\u017ei\u016br\u0117ti"},"mediamanager":{"insert_link":"\u012eterpti medijos nuorod\u0105","insert_image":"\u012eterpti Paveiksliuk\u0105","insert_video":"\u012eterpti Video","insert_audio":"\u012eterpti Audio","invalid_file_empty_insert":"Pasirinkite fail\u0105 \u012f kur\u012f norite \u012fterpti nuorod\u0105.","invalid_file_single_insert":"Pasirinkite vien\u0105 fail\u0105.","invalid_image_empty_insert":"Pasirinkite pavaiksliuk\u0105(us) \u012fterpimui.","invalid_video_empty_insert":"Pasirinkite video fail\u0105 \u012fterpimui.","invalid_audio_empty_insert":"Pasirinkite audio fail\u0105 \u012fterpimui."},"alert":{"confirm_button_text":"GERAI","cancel_button_text":"At\u0161aukti","widget_remove_confirm":"Pa\u0161alinti \u0161\u012f valdikl\u012f?"},"datepicker":{"previousMonth":"Ankstenis m\u0117nuo","nextMonth":"Sekantis M\u0117nuo","months":["Sausis","Vasaris","Kovas","Balandis","Gegu\u017e\u0117","Bir\u017eelis","Liepa","Rugpj\u016btis","Rugs\u0117jis","Spalis","Lapkritis","Gruodis"],"weekdays":["Sekmadienis","Pirmadienis","Antradienis","Tre\u010diadienis","Ketvirtadienis","Penktadienis","\u0160e\u0161tadienis"],"weekdaysShort":["Sek","Pir","Ant","Tre","Ket","Pen","\u0161e\u0161"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"visos"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"visos","filter_button_text":"Filtruoti","reset_button_text":"Atstatyti","date_placeholder":"Data","after_placeholder":"Po","before_placeholder":"Prie\u0161"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Rodyti i\u0161klotin\u0119","hide_stacktrace":"Sl\u0117pti i\u0161klotin\u0119","tabs":{"formatted":"Formatuota","raw":"Nepadorotas"},"editor":{"title":"\u0160altinio kodo redaktorius","description":"J\u016bs\u0173 operacin\u0117 sistema tur\u0117t\u0173 b\u016bti suderinta vienai i\u0161 \u0161i\u0173 URL schem\u0173 nuskaitymui.","openWith":"Atidaryti su","remember_choice":"Atsiminti pasirinkt\u0105 parinkt\u012f \u0161iai sesijai","open":"Atidaryti","cancel":"At\u0161aukti"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var units = {
'ss' : 'sekundė_sekundžių_sekundes',
'm' : 'minutė_minutės_minutę',
'mm': 'minutės_minučių_minutes',
'h' : 'valanda_valandos_valandą',
'hh': 'valandos_valandų_valandas',
'd' : 'diena_dienos_dieną',
'dd': 'dienos_dienų_dienas',
'M' : 'mėnuo_mėnesio_mėnesį',
'MM': 'mėnesiai_mėnesių_mėnesius',
'y' : 'metai_metų_metus',
'yy': 'metai_metų_metus'
};
function translateSeconds(number, withoutSuffix, key, isFuture) {
if (withoutSuffix) {
return 'kelios sekundės';
} else {
return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
}
}
function translateSingular(number, withoutSuffix, key, isFuture) {
return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
}
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
}
function forms(key) {
return units[key].split('_');
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
if (number === 1) {
return result + translateSingular(number, withoutSuffix, key[0], isFuture);
} else if (withoutSuffix) {
return result + (special(number) ? forms(key)[1] : forms(key)[0]);
} else {
if (isFuture) {
return result + forms(key)[1];
} else {
return result + (special(number) ? forms(key)[1] : forms(key)[2]);
}
}
}
var lt = moment.defineLocale('lt', {
months : {
format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
},
monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
weekdays : {
format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
isFormat: /dddd HH:mm/
},
weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY-MM-DD',
LL : 'YYYY [m.] MMMM D [d.]',
LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
l : 'YYYY-MM-DD',
ll : 'YYYY [m.] MMMM D [d.]',
lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
},
calendar : {
sameDay : '[Šiandien] LT',
nextDay : '[Rytoj] LT',
nextWeek : 'dddd LT',
lastDay : '[Vakar] LT',
lastWeek : '[Praėjusį] dddd LT',
sameElse : 'L'
},
relativeTime : {
future : 'po %s',
past : 'prieš %s',
s : translateSeconds,
ss : translate,
m : translateSingular,
mm : translate,
h : translateSingular,
hh : translate,
d : translateSingular,
dd : translate,
M : translateSingular,
MM : translate,
y : translateSingular,
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}-oji/,
ordinal : function (number) {
return number + '-oji';
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return lt;
})));

View File

@@ -0,0 +1,108 @@
/*
* This file has been compiled from: /modules/system/lang/lv/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['lv'] = $.extend(
$.wn.langMessages['lv'] || {},
{"markdowneditor":{"formatting":"Format\u0113jums","quote":"Cit\u0101ts","code":"Kods","header1":"Virsraksts 1","header2":"Virsraksts 2","header3":"Virsraksts 3","header4":"Virsraksts 4","header5":"Virsraksts 5","header6":"Virsraksts 6","bold":"Treknraksts","italic":"Kurs\u012bvraksts","unorderedlist":"Nesak\u0101rtots saraksts","orderedlist":"Sak\u0101rtots saraksts","video":"Video","image":"Att\u0113ls","link":"Saite","horizontalrule":"Ievietot horizont\u0101lu l\u012bniju","fullscreen":"Pilnekr\u0101na re\u017e\u012bms","preview":"Priek\u0161skat\u012bjums"},"mediamanager":{"insert_link":"Ievietot multivides saiti","insert_image":"Ievietot multivides att\u0113lu","insert_video":"Ievietot multivides video","insert_audio":"Ievietot multivides audio","invalid_file_empty_insert":"L\u016bdzu, izv\u0113lieties failu uz kuru ievietot saites.","invalid_file_single_insert":"L\u016bdzu, izv\u0113lieties vienu failu.","invalid_image_empty_insert":"L\u016bdzu, izv\u0113lieties ievietojamo(-os) att\u0113lu(-us).","invalid_video_empty_insert":"L\u016bdzu, izv\u0113lieties ievietojamo video failu.","invalid_audio_empty_insert":"L\u016bdzu, izv\u0113lieties ievietojamo audio failu."},"alert":{"confirm_button_text":"Labi","cancel_button_text":"Atcelt","widget_remove_confirm":"No\u0146emt \u0161o logr\u012bku?"},"datepicker":{"previousMonth":"Iepriek\u0161\u0113jais m\u0113nesis","nextMonth":"N\u0101kamais m\u0113nesis","months":["Janv\u0101ris","Febru\u0101ris","Marts","Apr\u012blis","Maijs","J\u016bnijs","J\u016blijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],"weekdays":["Sv\u0113tdiena","Pirmdiena","Otrdiena","Tre\u0161diena","Ceturtdiena","Piektdiena","Sestdiena"],"weekdaysShort":["Sv","P","O","T","C","Pk","S"]},"colorpicker":{"last_color":"Lietot iepriek\u0161 izv\u0113l\u0113to kr\u0101su","aria_palette":"Kr\u0101sas izv\u0113les laukums","aria_hue":"Nokr\u0101sas izv\u0113les sl\u012bdnis","aria_opacity":"Caursp\u012bd\u012bguma izv\u0113les sl\u012bdnis"},"filter":{"group":{"all":"visi"},"scopes":{"apply_button_text":"Piem\u0113rot","clear_button_text":"Not\u012br\u012bt"},"dates":{"all":"visi","filter_button_text":"Filtr\u0113t","reset_button_text":"Atiestat\u012bt","date_placeholder":"Datums","after_placeholder":"Pirms","before_placeholder":"P\u0113c"},"numbers":{"all":"visi","filter_button_text":"Filtr\u0113t","reset_button_text":"Atiestat\u012bt","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"R\u0101d\u012bt atseko\u0161anas inform\u0101ciju","hide_stacktrace":"Sl\u0113pt atseko\u0161anas inform\u0101ciju","tabs":{"formatted":"Format\u0113ts","raw":"Neapstr\u0101d\u0101ts"},"editor":{"title":"Pirmkoda redaktors","description":"J\u016bsu oper\u0113t\u0101jsist\u0113mai j\u0101b\u016bt konfigur\u0113tai t\u0101, lai t\u0101 sp\u0113tu klaus\u012bties uz vienu no \u0161\u012bm URL sh\u0113m\u0101m.","openWith":"Atv\u0113rt ar","remember_choice":"Atcer\u0113ties izv\u0113li \u0161\u012bs sesijas ietvaros","open":"Atv\u0113rt","cancel":"Atcelt"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var units = {
'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'h': 'stundas_stundām_stunda_stundas'.split('_'),
'hh': 'stundas_stundām_stunda_stundas'.split('_'),
'd': 'dienas_dienām_diena_dienas'.split('_'),
'dd': 'dienas_dienām_diena_dienas'.split('_'),
'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'y': 'gada_gadiem_gads_gadi'.split('_'),
'yy': 'gada_gadiem_gads_gadi'.split('_')
};
/**
* @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
*/
function format(forms, number, withoutSuffix) {
if (withoutSuffix) {
// E.g. "21 minūte", "3 minūtes".
return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
} else {
// E.g. "21 minūtes" as in "pēc 21 minūtes".
// E.g. "3 minūtēm" as in "pēc 3 minūtēm".
return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
function relativeTimeWithSingular(number, withoutSuffix, key) {
return format(units[key], number, withoutSuffix);
}
function relativeSeconds(number, withoutSuffix) {
return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
}
var lv = moment.defineLocale('lv', {
months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY.',
LL : 'YYYY. [gada] D. MMMM',
LLL : 'YYYY. [gada] D. MMMM, HH:mm',
LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
future : 'pēc %s',
past : 'pirms %s',
s : relativeSeconds,
ss : relativeTimeWithPlural,
m : relativeTimeWithSingular,
mm : relativeTimeWithPlural,
h : relativeTimeWithSingular,
hh : relativeTimeWithPlural,
d : relativeTimeWithSingular,
dd : relativeTimeWithPlural,
M : relativeTimeWithSingular,
MM : relativeTimeWithPlural,
y : relativeTimeWithSingular,
yy : relativeTimeWithPlural
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return lv;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/nb-no/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['nb-no'] = $.extend(
$.wn.langMessages['nb-no'] || {},
{"markdowneditor":{"formatting":"Formatering","quote":"Sitat","code":"Kode","header1":"Overskrift 1","header2":"Overskrift 2","header3":"Overskrift 3","header4":"Overskrift 4","header5":"Overskrift 5","header6":"Overskrift 6","bold":"Fet","italic":"Kursiv","unorderedlist":"Punktliste","orderedlist":"Nummerert liste","video":"Video","image":"Bilde","link":"Lenke","horizontalrule":"Sett inn horisontal linje","fullscreen":"Fullskjerm","preview":"Forh\u00e5ndsvisning"},"mediamanager":{"insert_link":"Sett inn Media lenke","insert_image":"Sett inn Media bilde","insert_video":"Sett inn Media video","insert_audio":"Sett inn Media lyd","invalid_file_empty_insert":"Velg fil \u00e5 sette lenken inn i.","invalid_file_single_insert":"Vennligst velg \u00e9n enkelt fil.","invalid_image_empty_insert":"Velg bilde(r) \u00e5 sette inn.","invalid_video_empty_insert":"Velg en video \u00e5 sette inn.","invalid_audio_empty_insert":"Velg lyd \u00e5 sette inn."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Avbryt","widget_remove_confirm":"Fjerne widget?"},"datepicker":{"previousMonth":"Forrige m\u00e5ned","nextMonth":"Neste m\u00e5ned","months":["januar","februar","mars","april","mai","juni","july","august","september","oktober","november","desember"],"weekdays":["s\u00f8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\u00f8rdag"],"weekdaysShort":["s\u00f8n","man","tir","ons","tor","fre","l\u00f8r"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"alle"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"alle","filter_button_text":"Filter","reset_button_text":"Tilbakestill","date_placeholder":"Dato","after_placeholder":"Etter","before_placeholder":"F\u00f8r"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Vis stacktrace","hide_stacktrace":"Skjul stacktrace","tabs":{"formatted":"Formattert","raw":"Raw"},"editor":{"title":"Kildekodeeditor","description":"Ditt operativsystem b\u00f8r v\u00e6re konfigurert for \u00e5 \u00e5pne ett av disse URL-schemaene.","openWith":"\u00c5pne med","remember_choice":"Husk valget for denne sesjonen","open":"\u00c5pne","cancel":"Avbryt"}}}
);

View File

@@ -0,0 +1,98 @@
/*
* This file has been compiled from: /modules/system/lang/nl/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['nl'] = $.extend(
$.wn.langMessages['nl'] || {},
{"markdowneditor":{"formatting":"Opmaak","quote":"Quote","code":"Code","header1":"Koptekst 1","header2":"Koptekst 2","header3":"Koptekst 3","header4":"Koptekst 4","header5":"Koptekst 5","header6":"Koptekst 6","bold":"Vet","italic":"Cursief","unorderedlist":"Ongeordende lijst","orderedlist":"Gerangschikte lijst","video":"Video","image":"Afbeelding","link":"Hyperlink","horizontalrule":"Invoegen horizontale lijn","fullscreen":"Volledig scherm","preview":"Voorbeeldweergave"},"mediamanager":{"insert_link":"Invoegen Media Link","insert_image":"Invoegen Media Afbeelding","insert_video":"Invoegen Media Video","insert_audio":"Invoegen Media Audio","invalid_file_empty_insert":"Selecteer bestand om een link naar te maken.","invalid_file_single_insert":"Selecteer \u00e9\u00e9n bestand.","invalid_image_empty_insert":"Selecteer afbeelding(en) om in te voegen.","invalid_video_empty_insert":"Selecteer een video bestand om in te voegen.","invalid_audio_empty_insert":"Selecteer een audio bestand om in te voegen."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Annuleren","widget_remove_confirm":"Deze widget verwijderen?"},"datepicker":{"previousMonth":"Vorige maand","nextMonth":"Volgende maan","months":["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],"weekdays":["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],"weekdaysShort":["Zo","Ma","Di","Wo","Do","Vr","Za"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"OK"},"filter":{"group":{"all":"alle"},"scopes":{"apply_button_text":"Toepassen","clear_button_text":"Resetten"},"dates":{"all":"alle","filter_button_text":"Filteren","reset_button_text":"Resetten","date_placeholder":"Datum","after_placeholder":"Na","before_placeholder":"Voor"},"numbers":{"all":"alle","filter_button_text":"Filteren","reset_button_text":"Resetten","min_placeholder":"Minimum","max_placeholder":"Maximum"}},"eventlog":{"show_stacktrace":"Toon stacktrace","hide_stacktrace":"Verberg stacktrace","tabs":{"formatted":"Geformatteerd","raw":"Bronversie"},"editor":{"title":"Broncode editor","description":"Je besturingssysteem moet in staat zijn om met deze URL-schema's om te kunnen gaan.","openWith":"Openen met","remember_choice":"Onthoudt de geselecteerde optie voor deze browser-sessie","open":"Openen","cancel":"Annuleren"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
var nl = moment.defineLocale('nl', {
months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort : function (m, format) {
if (!m) {
return monthsShortWithDots;
} else if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
monthsRegex: monthsRegex,
monthsShortRegex: monthsRegex,
monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
monthsParse : monthsParse,
longMonthsParse : monthsParse,
shortMonthsParse : monthsParse,
weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD-MM-YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[vandaag om] LT',
nextDay: '[morgen om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[gisteren om] LT',
lastWeek: '[afgelopen] dddd [om] LT',
sameElse: 'L'
},
relativeTime : {
future : 'over %s',
past : '%s geleden',
s : 'een paar seconden',
ss : '%d seconden',
m : 'één minuut',
mm : '%d minuten',
h : 'één uur',
hh : '%d uur',
d : 'één dag',
dd : '%d dagen',
M : 'één maand',
MM : '%d maanden',
y : 'één jaar',
yy : '%d jaar'
},
dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
ordinal : function (number) {
return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return nl;
})));

View File

@@ -0,0 +1,137 @@
/*
* This file has been compiled from: /modules/system/lang/pl/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['pl'] = $.extend(
$.wn.langMessages['pl'] || {},
{"markdowneditor":{"formatting":"Formaty","quote":"Cytat","code":"Widok kod","header1":"Nag\u0142\u00f3wek 1","header2":"Nag\u0142\u00f3wek 2","header3":"Nag\u0142\u00f3wek 3","header4":"Nag\u0142\u00f3wek 4","header5":"Nag\u0142\u00f3wek 5","header6":"Nag\u0142\u00f3wek 6","bold":"Pogrubienie","italic":"Kursywa","unorderedlist":"\"Lista nieuporz\u0105dkowana","orderedlist":"Uporz\u0105dkowana lista","video":"Wideo","image":"Obrazek","link":"Link","horizontalrule":"Wstaw lini\u0119 poziom\u0105","fullscreen":"Pe\u0142ny ekran","preview":"Podgl\u0105d"},"mediamanager":{"insert_link":"Wstaw Link","insert_image":"Wstaw Obraz","insert_video":"Wstaw Wideo","insert_audio":"Wstaw Audio","invalid_file_empty_insert":"Prosimy wybra\u0107 plik do podlinkowania.","invalid_file_single_insert":"Prosimy wybra\u0107 pojedynczy plik.","invalid_image_empty_insert":"Prosimy wybra\u0107 obrazy do wstawienia.","invalid_video_empty_insert":"Prosimy wybra\u0107 wideo do wstawienia.","invalid_audio_empty_insert":"Prosimy wybra\u0107 audio do wstawienia."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Anuluj","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Poprzedni miesi\u0105c","nextMonth":"Nast\u0119pny miesi\u0105c","months":["Stycze\u0144","Luty","Marzec","Kwiecie\u0144","Maj","Czerwiec","Lipiec","Sierpie\u0144","Wrzesie\u0144","Pa\u017adziernik","Listopad","Grudzie\u0144"],"weekdays":["Niedziela","Poniedzia\u0142ek","Wtorek","\u015aroda","Czwartek","Pi\u0105tek","Sobota"],"weekdaysShort":["Nie","Pn","Wt","\u015ar","Czw","Pt","So"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"wszystkie"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"wszystkie","filter_button_text":"Filtruj","reset_button_text":"Resetuj","date_placeholder":"Data","after_placeholder":"Po","before_placeholder":"Przed"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Poka\u017c stos wywo\u0142a\u0144","hide_stacktrace":"Ukryj stos wywo\u0142a\u0144","tabs":{"formatted":"Sformatowany","raw":"Nieprzetworzony"},"editor":{"title":"Edytor kodu \u017ar\u00f3d\u0142owego","description":"Tw\u00f3j system operacyjny powinien by\u0107 skonfigurowany aby nas\u0142uchiwa\u0107 na jednym z podanych schemat\u00f3w URL.","openWith":"Otw\u00f3rz za pomoc\u0105","remember_choice":"Zapami\u0119taj wybran\u0105 opcj\u0119 dla tej sesji","open":"Otw\u00f3rz","cancel":"Anuluj"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
function plural(n) {
return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
}
function translate(number, withoutSuffix, key) {
var result = number + ' ';
switch (key) {
case 'ss':
return result + (plural(number) ? 'sekundy' : 'sekund');
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
}
var pl = moment.defineLocale('pl', {
months : function (momentToFormat, format) {
if (!momentToFormat) {
return monthsNominative;
} else if (format === '') {
// Hack: if format empty we know this is used to generate
// RegExp by moment. Give then back both valid forms of months
// in RegExp ready format.
return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
} else if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[Dziś o] LT',
nextDay: '[Jutro o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[W niedzielę o] LT';
case 2:
return '[We wtorek o] LT';
case 3:
return '[W środę o] LT';
case 6:
return '[W sobotę o] LT';
default:
return '[W] dddd [o] LT';
}
},
lastDay: '[Wczoraj o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[W zeszły] dddd [o] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : 'za %s',
past : '%s temu',
s : 'kilka sekund',
ss : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : '1 dzień',
dd : '%d dni',
M : 'miesiąc',
MM : translate,
y : 'rok',
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return pl;
})));

View File

@@ -0,0 +1,72 @@
/*
* This file has been compiled from: /modules/system/lang/pt-br/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['pt-br'] = $.extend(
$.wn.langMessages['pt-br'] || {},
{"markdowneditor":{"formatting":"Formatando","quote":"Cita\u00e7\u00e3o","code":"C\u00f3digo","header1":"Cabe\u00e7alho 1","header2":"Cabe\u00e7alho 2","header3":"Cabe\u00e7alho 3","header4":"Cabe\u00e7alho 4","header5":"Cabe\u00e7alho 5","header6":"Cabe\u00e7alho 6","bold":"Negrito","italic":"It\u00e1lico","unorderedlist":"Lista n\u00e3o ordenada","orderedlist":"Lista ordenada","video":"V\u00eddeo","image":"Imagem","link":"Link","horizontalrule":"Inserir linha horizontal","fullscreen":"Tela cheia","preview":"Visualizar"},"mediamanager":{"insert_link":"Inserir link","insert_image":"Inserir imagem","insert_video":"Inserir v\u00eddeo","insert_audio":"Inserir \u00e1udio","invalid_file_empty_insert":"Por favor, selecione o arquivo para criar o link.","invalid_file_single_insert":"Por favor, selecione apenas um arquivo.","invalid_image_empty_insert":"Por favor, selecione as imagens que deseja inserir.","invalid_video_empty_insert":"Por favor, selecione os v\u00eddeos que deseja inserir.","invalid_audio_empty_insert":"Por favor, selecione os \u00e1udios que deseja inserir."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancelar","widget_remove_confirm":"Remover este widget?"},"datepicker":{"previousMonth":"M\u00eas anterior","nextMonth":"Pr\u00f3ximo m\u00eas","months":["Janeiro","Fevereiro","Mar\u00e7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],"weekdays":["Domingo","Segunda-feira","Ter\u00e7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\u00e1bado"],"weekdaysShort":["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"todos"},"scopes":{"apply_button_text":"Aplicar","clear_button_text":"Limpar"},"dates":{"all":"todas","filter_button_text":"Filtro","reset_button_text":"Reiniciar","date_placeholder":"Data","after_placeholder":"Ap\u00f3s","before_placeholder":"Antes"},"numbers":{"all":"todas","filter_button_text":"Filtar","reset_button_text":"Reiniciar","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Exibir o rastreamento","hide_stacktrace":"Ocultar o rastreamento","tabs":{"formatted":"Formatado","raw":"Bruto"},"editor":{"title":"Editor de c\u00f3digo fonte","description":"Seu sistema operacional deve ser configurado para ouvir um desses esquemas de URL.","openWith":"Abrir com","remember_choice":"Lembrar a op\u00e7\u00e3o selecionada nesta sess\u00e3o","open":"Abrir","cancel":"Cancelar"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var ptBr = moment.defineLocale('pt-br', {
months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D [de] MMMM [de] YYYY',
LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
},
calendar : {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return (this.day() === 0 || this.day() === 6) ?
'[Último] dddd [às] LT' : // Saturday + Sunday
'[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L'
},
relativeTime : {
future : 'em %s',
past : 'há %s',
s : 'poucos segundos',
ss : '%d segundos',
m : 'um minuto',
mm : '%d minutos',
h : 'uma hora',
hh : '%d horas',
d : 'um dia',
dd : '%d dias',
M : 'um mês',
MM : '%d meses',
y : 'um ano',
yy : '%d anos'
},
dayOfMonthOrdinalParse: /\d{1,2}º/,
ordinal : '%dº'
});
return ptBr;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/pt-pt/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['pt-pt'] = $.extend(
$.wn.langMessages['pt-pt'] || {},
{"markdowneditor":{"formatting":"Formatando","quote":"Cita\u00e7\u00e3o","code":"C\u00f3digo","header1":"Cabe\u00e7alho 1","header2":"Cabe\u00e7alho 2","header3":"Cabe\u00e7alho 3","header4":"Cabe\u00e7alho 4","header5":"Cabe\u00e7alho 5","header6":"Cabe\u00e7alho 6","bold":"Negrito","italic":"It\u00e1lico","unorderedlist":"Lista n\u00e3o ordenada","orderedlist":"Lista ordenada","video":"V\u00eddeo","image":"Imagem","link":"Liga\u00e7\u00e3o","horizontalrule":"Inserir linha horizontal","fullscreen":"Ecran cheio","preview":"Visualizar"},"mediamanager":{"insert_link":"Inserir liga\u00e7\u00e3o","insert_image":"Inserir imagem","insert_video":"Inserir v\u00eddeo","insert_audio":"Inserir \u00e1udio","invalid_file_empty_insert":"Por favor, selecione o ficheiro para criar a liga\u00e7\u00e3o.","invalid_file_single_insert":"Por favor, selecione apenas um ficheiro.","invalid_image_empty_insert":"Por favor, selecione as imagens que deseja inserir.","invalid_video_empty_insert":"Por favor, selecione os v\u00eddeos que deseja inserir.","invalid_audio_empty_insert":"Por favor, selecione os \u00e1udios que deseja inserir."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancelar","widget_remove_confirm":"Remover este widget?"},"datepicker":{"previousMonth":"M\u00eas anterior","nextMonth":"M\u00eas seguinte","months":["Janeiro","Fevereiro","Mar\u00e7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],"weekdays":["Domingo","Segunda-feira","Ter\u00e7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\u00e1bado"],"weekdaysShort":["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"todos"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"todas","filter_button_text":"Filtro","reset_button_text":"Reiniciar","date_placeholder":"Data","after_placeholder":"Ap\u00f3s","before_placeholder":"Antes"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Mostrar o rastreamento","hide_stacktrace":"Ocultar o rastreamento","tabs":{"formatted":"Formatado","raw":"Bruto"},"editor":{"title":"Editor de c\u00f3digo fonte","description":"O sistema operativo deve ser configurado para escutar um desses esquemas de URL.","openWith":"Abrir com","remember_choice":"Lembrar a op\u00e7\u00e3o selecionada nesta sess\u00e3o","open":"Abrir","cancel":"Cancelar"}}}
);

View File

@@ -0,0 +1,86 @@
/*
* This file has been compiled from: /modules/system/lang/ro/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['ro'] = $.extend(
$.wn.langMessages['ro'] || {},
{"markdowneditor":{"formatting":"Formatare","quote":"Citat","code":"Cod","header1":"Antet 1","header2":"Antet 2","header3":"Antet 3","header4":"Antet 4","header5":"Antet 5","header6":"Antet 6","bold":"\u00cengro\u0219at","italic":"Italic","unorderedlist":"List\u0103 neordonat\u0103","orderedlist":"List\u0103 ordonat\u0103","video":"Video","image":"Imagine","link":"Leg\u0103tur\u0103","horizontalrule":"Insereaz\u0103 linie orizontal\u0103","fullscreen":"Umple ecranul","preview":"Previzualizeaz\u0103"},"mediamanager":{"insert_link":"Insereaz\u0103 leg\u0103tur\u0103","insert_image":"Insereaz\u0103 imagine","insert_video":"Insereaz\u0103 fi\u0219ier video","insert_audio":"Insereaz\u0103 fi\u0219ier audio","invalid_file_empty_insert":"Selecteaz\u0103 un fi\u0219ier c\u0103tre care s\u0103 se fac\u0103 leg\u0103tura.","invalid_file_single_insert":"Selecteaz\u0103 un singur fi\u0219ier.","invalid_image_empty_insert":"Alege imaginile pentru a fi introduse.","invalid_video_empty_insert":"Alege un fi\u0219ier video pentru a fi introdus.","invalid_audio_empty_insert":"Alege un fi\u0219ier audio pentru a fi introdus."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Anuleaz\u0103","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'ss': 'secunde',
'mm': 'minute',
'hh': 'ore',
'dd': 'zile',
'MM': 'luni',
'yy': 'ani'
},
separator = ' ';
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
separator = ' de ';
}
return number + separator + format[key];
}
var ro = moment.defineLocale('ro', {
months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
monthsParseExact: true,
weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY H:mm',
LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
sameDay: '[azi la] LT',
nextDay: '[mâine la] LT',
nextWeek: 'dddd [la] LT',
lastDay: '[ieri la] LT',
lastWeek: '[fosta] dddd [la] LT',
sameElse: 'L'
},
relativeTime : {
future : 'peste %s',
past : '%s în urmă',
s : 'câteva secunde',
ss : relativeTimeWithPlural,
m : 'un minut',
mm : relativeTimeWithPlural,
h : 'o oră',
hh : relativeTimeWithPlural,
d : 'o zi',
dd : relativeTimeWithPlural,
M : 'o lună',
MM : relativeTimeWithPlural,
y : 'un an',
yy : relativeTimeWithPlural
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return ro;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/rs/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['rs'] = $.extend(
$.wn.langMessages['rs'] || {},
{"markdowneditor":{"formatting":"Formatiranje","quote":"Citat","code":"Kod","header1":"Zaglavlje 1","header2":"Zaglavlje 2","header3":"Zaglavlje 3","header4":"Zaglavlje 4","header5":"Zaglavlje 5","header6":"Zaglavlje 6","bold":"Podebljaj","italic":"Ukosi","unorderedlist":"Neure\u0111ena lista","orderedlist":"Ure\u0111ena lista","video":"Video","image":"Slika","link":"Link","horizontalrule":"Ubaci horizontalnu liniju","fullscreen":"Ceo ekran","preview":"Pregled"},"mediamanager":{"insert_link":"Ubaci link","insert_image":"Ubaci sliku","insert_video":"Ubaci video zapis","insert_audio":"Ubaci zvu\u010dni zapis","invalid_file_empty_insert":"Odaberi fajl za ubacivanje linkova.","invalid_file_single_insert":"Odaberi jedan fajl za ubacivanje.","invalid_image_empty_insert":"Odaberi sliku\/slike za ubacivanje.","invalid_video_empty_insert":"Odaberi video zapis za ubacivanje.","invalid_audio_empty_insert":"Odaberi audio zapis za ubacivanje."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Otka\u017ei","widget_remove_confirm":"Otkloni ovaj posredni\u010dki element?"},"datepicker":{"previousMonth":"Prethodni mesec","nextMonth":"Slede\u0107i mesec","months":["Januar","Februar","Mart","April","Maj","Juni","Juli","Avgust","Septembar","Oktobar","Novembar","Decembar"],"weekdays":["Nedelja","Ponedeljak","Utorak","Sreda","\u010cetvrtak","Petak","Subota"],"weekdaysShort":["Ned","Pon","Uto","Sre","\u010cet","Pet","Sub"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"sve"},"scopes":{"apply_button_text":"Primeni","clear_button_text":"O\u010disti"},"dates":{"all":"svi","filter_button_text":"Filtriraj","reset_button_text":"Resetuj","date_placeholder":"Datum","after_placeholder":"Pre","before_placeholder":"Posle"},"numbers":{"all":"svi","filter_button_text":"Filtriraj","reset_button_text":"Resetuj","min_placeholder":"Minimum","max_placeholder":"Maksimum"}},"eventlog":{"show_stacktrace":"Prika\u017ei trag","hide_stacktrace":"Sakrij trag","tabs":{"formatted":"Formatiraj","raw":"Izvorno"},"editor":{"title":"Izvorni kod editora","description":"Va\u0161 operativni sistem treba da bude konfigurisan za oslu\u0161kivanje ovih URL \u0161ema.","openWith":"Otvori sa","remember_choice":"Zapamti izabranu opciju za ovu sesiju","open":"Otvori","cancel":"Otka\u017ei"}}}
);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,167 @@
/*
* This file has been compiled from: /modules/system/lang/sk/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['sk'] = $.extend(
$.wn.langMessages['sk'] || {},
{"markdowneditor":{"formatting":"Form\u00e1tovanie","quote":"Cit\u00e1t","code":"K\u00f3d","header1":"Nadpis 1","header2":"Nadpis 2","header3":"Nadpis 3","header4":"Nadpis 4","header5":"Nadpis 5","header6":"Nadpis 6","bold":"Tu\u010dn\u00e9","italic":"Kurz\u00edva","unorderedlist":"Ne\u010d\u00edslovan\u00fd zoznam","orderedlist":"\u010c\u00edslovan\u00fd zoznam","video":"Video","image":"Obr\u00e1zok","link":"Odkaz","horizontalrule":"Vlo\u017ei\u0165 horizont\u00e1lnu linku","fullscreen":"Cel\u00e1 obrazovka","preview":"N\u00e1h\u013ead"},"mediamanager":{"insert_link":"Vlo\u017ei\u0165 odkaz","insert_image":"Vlo\u017ei\u0165 obr\u00e1zok","insert_video":"Vlo\u017ei\u0165 video","insert_audio":"Vlo\u017ei\u0165 audio","invalid_file_empty_insert":"Pros\u00edm vyberte s\u00fabor, na ktor\u00fd sa vlo\u017e\u00ed odkaz.","invalid_file_single_insert":"Pros\u00edm vyberte jeden s\u00fabor.","invalid_image_empty_insert":"Pros\u00edm vyberte obr\u00e1zky na vlo\u017eenie.","invalid_video_empty_insert":"Pros\u00edm vyberte video na vlo\u017eenie.","invalid_audio_empty_insert":"Pros\u00edm vyberte audio s\u00fabor na vlo\u017eenie."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Zru\u0161i\u0165","widget_remove_confirm":"Skuto\u010dne zmaza\u0165 tento widget?"},"datepicker":{"previousMonth":"Predch\u00e1dzaj\u00faci mesiac","nextMonth":"Nasleduj\u00faci mesiac","months":["Janu\u00e1r","Febru\u00e1r","Marec","Apr\u00edl","M\u00e1j","J\u00fan","J\u00fal","August","September","Okt\u00f3ber","November","December"],"weekdays":["Nede\u013ea","Pondelok","Utorok","Streda","\u0160tvrtok","Piatok","Sobota"],"weekdaysShort":["Ne","Po","Ut","St","\u0160t","Pi","So"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"v\u0161etko"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"v\u0161etko","filter_button_text":"Filtrova\u0165","reset_button_text":"Zru\u0161i\u0165","date_placeholder":"D\u00e1tum","after_placeholder":"Po","before_placeholder":"Pred"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Zru\u0161i\u0165","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Zobrazi\u0165 stacktrace","hide_stacktrace":"Skry\u0165 stacktrace","tabs":{"formatted":"Form\u00e1tovan\u00e9","raw":"P\u00f4vodn\u00e9 (raw)"},"editor":{"title":"Editor zdrojov\u00e9ho k\u00f3du","description":"V\u00e1\u0161 opera\u010dn\u00fd syst\u00e9m by mal by\u0165 konfigurovan\u00fd tak, aby po\u010d\u00faval jednu z t\u00fdchto URL sh\u00e9m.","openWith":"Otvori\u0165 v","remember_choice":"Zapam\u00e4ta\u0165 si vybran\u00fa vo\u013ebu pre t\u00fato rel\u00e1ciu","open":"Otvori\u0165","cancel":"Zru\u0161i\u0165"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),
monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
function plural(n) {
return (n > 1) && (n < 5);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'sekundy' : 'sekúnd');
} else {
return result + 'sekundami';
}
break;
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minúty' : 'minút');
} else {
return result + 'minútami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodín');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dni' : 'dní');
} else {
return result + 'dňami';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'mesiace' : 'mesiacov');
} else {
return result + 'mesiacmi';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'rokov');
} else {
return result + 'rokmi';
}
break;
}
}
var sk = moment.defineLocale('sk', {
months : months,
monthsShort : monthsShort,
weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),
weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),
longDateFormat : {
LT: 'H:mm',
LTS : 'H:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY H:mm',
LLLL : 'dddd D. MMMM YYYY H:mm'
},
calendar : {
sameDay: '[dnes o] LT',
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v nedeľu o] LT';
case 1:
case 2:
return '[v] dddd [o] LT';
case 3:
return '[v stredu o] LT';
case 4:
return '[vo štvrtok o] LT';
case 5:
return '[v piatok o] LT';
case 6:
return '[v sobotu o] LT';
}
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulú nedeľu o] LT';
case 1:
case 2:
return '[minulý] dddd [o] LT';
case 3:
return '[minulú stredu o] LT';
case 4:
case 5:
return '[minulý] dddd [o] LT';
case 6:
return '[minulú sobotu o] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : 'za %s',
past : 'pred %s',
s : translate,
ss : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return sk;
})));

View File

@@ -0,0 +1,184 @@
/*
* This file has been compiled from: /modules/system/lang/sl/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['sl'] = $.extend(
$.wn.langMessages['sl'] || {},
{"markdowneditor":{"formatting":"Oblikovanje","quote":"Citat","code":"Koda","header1":"Naslov 1","header2":"Naslov 2","header3":"Naslov 3","header4":"Naslov 4","header5":"Naslov 5","header6":"Naslov 6","bold":"Krepko","italic":"Le\u017ee\u010de","unorderedlist":"Neo\u0161tevil\u010deni seznam","orderedlist":"\u0160tevil\u010dni seznam","video":"Video","image":"Slika","link":"Povezava","horizontalrule":"Vstavi vodoravno \u010drto","fullscreen":"Celozaslonski na\u010din","preview":"Predogled"},"mediamanager":{"insert_link":"Vstavi povezavo","insert_image":"Vstavi sliko","insert_video":"Vstavi video posnetek","insert_audio":"Vstavi zvo\u010dni posnetek","invalid_file_empty_insert":"Izberite datoteko, do katere \u017eelite vstaviti povezavo.","invalid_file_single_insert":"Izberite eno samo datoteko.","invalid_image_empty_insert":"Izberite slike za vstavljanje.","invalid_video_empty_insert":"Izberite video posnetek za vstavljanje.","invalid_audio_empty_insert":"Izberite zvo\u010dni posnetek za vstavljanje."},"alert":{"confirm_button_text":"V redu","cancel_button_text":"Prekli\u010di","widget_remove_confirm":"Odstrani ta vti\u010dnik?"},"datepicker":{"previousMonth":"Prej\u0161nji mesec","nextMonth":"Naslednji mesec","months":["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],"weekdays":["Nedelja","Ponedeljek","Torek","Sreda","\u010cetrtek","Petek","Sobota"],"weekdaysShort":["Ned","Pon","Tor","Sre","\u010cet","Pet","Sob"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ok"},"filter":{"group":{"all":"vsi"},"scopes":{"apply_button_text":"Uporabi","clear_button_text":"Po\u010disti"},"dates":{"all":"vsi","filter_button_text":"Filtriraj","reset_button_text":"Ponastavi","date_placeholder":"Datum","after_placeholder":"Po","before_placeholder":"Pred"},"numbers":{"all":"vsi","filter_button_text":"Filtriraj","reset_button_text":"Ponastavi","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Prika\u017ei sled dogodkov","hide_stacktrace":"Skrij sled dogodkov","tabs":{"formatted":"Oblikovano","raw":"Brez oblikovanja"},"editor":{"title":"Urejevalnik izvorne kode","description":"Va\u0161 operacijski sistem mora biti nastavljen tako, da upo\u0161teva eno od teh URL shem.","openWith":"Za odpiranje uporabi","remember_choice":"Zapomni si izbrane nastavitve za to sejo","open":"Odpri","cancel":"Prekli\u010di"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var result = number + ' ';
switch (key) {
case 's':
return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
case 'ss':
if (number === 1) {
result += withoutSuffix ? 'sekundo' : 'sekundi';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
} else {
result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
}
return result;
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
result += withoutSuffix ? 'minuta' : 'minuto';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'minute' : 'minutami';
} else {
result += withoutSuffix || isFuture ? 'minut' : 'minutami';
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
result += withoutSuffix ? 'ura' : 'uro';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'uri' : 'urama';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'ure' : 'urami';
} else {
result += withoutSuffix || isFuture ? 'ur' : 'urami';
}
return result;
case 'd':
return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
case 'dd':
if (number === 1) {
result += withoutSuffix || isFuture ? 'dan' : 'dnem';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
} else {
result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
}
return result;
case 'M':
return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
case 'MM':
if (number === 1) {
result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
} else {
result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
}
return result;
case 'y':
return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
case 'yy':
if (number === 1) {
result += withoutSuffix || isFuture ? 'leto' : 'letom';
} else if (number === 2) {
result += withoutSuffix || isFuture ? 'leti' : 'letoma';
} else if (number < 5) {
result += withoutSuffix || isFuture ? 'leta' : 'leti';
} else {
result += withoutSuffix || isFuture ? 'let' : 'leti';
}
return result;
}
}
var sl = moment.defineLocale('sl', {
months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
monthsParseExact: true,
weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY H:mm',
LLLL : 'dddd, D. MMMM YYYY H:mm'
},
calendar : {
sameDay : '[danes ob] LT',
nextDay : '[jutri ob] LT',
nextWeek : function () {
switch (this.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
},
lastDay : '[včeraj ob] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
return '[prejšnjo] [nedeljo] [ob] LT';
case 3:
return '[prejšnjo] [sredo] [ob] LT';
case 6:
return '[prejšnjo] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : 'čez %s',
past : 'pred %s',
s : processRelativeTime,
ss : processRelativeTime,
m : processRelativeTime,
mm : processRelativeTime,
h : processRelativeTime,
hh : processRelativeTime,
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return sl;
})));

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/{{locale}}/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['{{locale}}'] = $.extend(
$.wn.langMessages['{{locale}}'] || {},
{{messages}}
);

View File

@@ -0,0 +1,80 @@
/*
* This file has been compiled from: /modules/system/lang/sv/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['sv'] = $.extend(
$.wn.langMessages['sv'] || {},
{"markdowneditor":{"formatting":"Formatering","quote":"Citat","code":"Kod","header1":"Rubrik 1","header2":"Rubrik 2","header3":"Rubrik 3","header4":"Rubrik 4","header5":"Rubrik 5","header6":"Rubrik 6","bold":"Fet","italic":"Kursiv","unorderedlist":"Oordnad lista","orderedlist":"Ordnad lista","video":"Video","image":"Bild","link":"L\u00e4nk","horizontalrule":"Infoga horisontiell linje","fullscreen":"Fullsk\u00e4rm","preview":"F\u00f6rhandsgranska"},"mediamanager":{"insert_link":"Infoga medial\u00e4nk","insert_image":"Infoga bild","insert_video":"Infoga video","insert_audio":"Infoga ljud","invalid_file_empty_insert":"V\u00e4nligen v\u00e4lj en fil att infoga till l\u00e4nken.","invalid_file_single_insert":"V\u00e4nligen v\u00e4lj en enskild fil.","invalid_image_empty_insert":"V\u00e4nligen v\u00e4lj bild(er) att infoga.","invalid_video_empty_insert":"V\u00e4nligen v\u00e4lj en video att infoga.","invalid_audio_empty_insert":"V\u00e4nligen v\u00e4lj en ljudfil att infoga."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Avbryt","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var sv = moment.defineLocale('sv', {
months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY-MM-DD',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY [kl.] HH:mm',
LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',
lll : 'D MMM YYYY HH:mm',
llll : 'ddd D MMM YYYY HH:mm'
},
calendar : {
sameDay: '[Idag] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
nextWeek: '[På] dddd LT',
lastWeek: '[I] dddd[s] LT',
sameElse: 'L'
},
relativeTime : {
future : 'om %s',
past : 'för %s sedan',
s : 'några sekunder',
ss : '%d sekunder',
m : 'en minut',
mm : '%d minuter',
h : 'en timme',
hh : '%d timmar',
d : 'en dag',
dd : '%d dagar',
M : 'en månad',
MM : '%d månader',
y : 'ett år',
yy : '%d år'
},
dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
ordinal : function (number) {
var b = number % 10,
output = (~~(number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return sv;
})));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,106 @@
/*
* This file has been compiled from: /modules/system/lang/tr/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['tr'] = $.extend(
$.wn.langMessages['tr'] || {},
{"markdowneditor":{"formatting":"Formatlama","quote":"Al\u0131nt\u0131","code":"Kod","header1":"Ba\u015fl\u0131k 1","header2":"Ba\u015fl\u0131k 2","header3":"Ba\u015fl\u0131k 3","header4":"Ba\u015fl\u0131k 4","header5":"Ba\u015fl\u0131k 5","header6":"Ba\u015fl\u0131k 6","bold":"Kal\u0131n","italic":"\u0130talik","unorderedlist":"S\u0131ras\u0131z Liste","orderedlist":"S\u0131ral\u0131 Liste","video":"Video","image":"G\u00f6rsel\/Resim","link":"Link","horizontalrule":"Yatay \u00c7izgi Ekle","fullscreen":"Tam Ekran","preview":"\u00d6nizleme"},"mediamanager":{"insert_link":"Medya Linki Ekle","insert_image":"Medya Resim Ekle","insert_video":"Medya Video Ekle","insert_audio":"Medya Ses Ekle","invalid_file_empty_insert":"L\u00fctfen link verilecek dosyay\u0131 se\u00e7in.","invalid_file_single_insert":"L\u00fctfen tek bir dosya se\u00e7in.","invalid_image_empty_insert":"L\u00fctfen eklenecek resim(ler)i se\u00e7in.","invalid_video_empty_insert":"L\u00fctfen eklenecek video dosyas\u0131n\u0131 se\u00e7in.","invalid_audio_empty_insert":"L\u00fctfen eklenecek ses dosyas\u0131n\u0131 se\u00e7in."},"alert":{"confirm_button_text":"Evet","cancel_button_text":"\u0130ptal","widget_remove_confirm":"Bu eklentiyi kald\u0131rma istedi\u011finize emin misiniz?"},"datepicker":{"previousMonth":"\u00d6nceki Ay","nextMonth":"Sonraki Ay","months":["Ocak","\u015eubat","Mart","Nisan","May\u0131s","Haziran","Temmuz","A\u011fustos","Eyl\u00fcl","Ekim","Kas\u0131m","Aral\u0131k"],"weekdays":["Pazar","Pazartesi","Sal\u0131","\u00c7ar\u015famba","Per\u015fembe","Cuma","Cumartesi"],"weekdaysShort":["Paz","Pzt","Sal","\u00c7ar","Per","Cum","Cmt"]},"colorpicker":{"last_color":"\u00d6nceden se\u00e7ilen rengi kullan","aria_palette":"Renk se\u00e7im alan\u0131","aria_hue":"Renk tonu se\u00e7imi","aria_opacity":"Opakl\u0131k se\u00e7imi"},"filter":{"group":{"all":"t\u00fcm\u00fc"},"scopes":{"apply_button_text":"Uygula","clear_button_text":"Temizle"},"dates":{"all":"t\u00fcm\u00fc","filter_button_text":"Filtrele","reset_button_text":"S\u0131f\u0131rla","date_placeholder":"Tarih","after_placeholder":"Sonra","before_placeholder":"\u00d6nce"},"numbers":{"all":"all","filter_button_text":"Filtrele","reset_button_text":"S\u0131f\u0131rla","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Veri y\u0131\u011f\u0131n\u0131n\u0131 g\u00f6ster","hide_stacktrace":"Veri y\u0131\u011f\u0131n\u0131n\u0131 gizle","tabs":{"formatted":"Formatl\u0131","raw":"Ham Veri"},"editor":{"title":"Kaynak kod edit\u00f6r\u00fc","description":"\u0130\u015fletim sisteminiz URL \u015femalar\u0131na yan\u0131t verecek \u015fekilde yap\u0131land\u0131r\u0131lmal\u0131d\u0131r.","openWith":"Birlikte a\u00e7","remember_choice":"Bu oturum i\u00e7in se\u00e7enekleri hat\u0131rla","open":"A\u00e7","cancel":"\u0130ptal"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var suffixes = {
1: '\'inci',
5: '\'inci',
8: '\'inci',
70: '\'inci',
80: '\'inci',
2: '\'nci',
7: '\'nci',
20: '\'nci',
50: '\'nci',
3: '\'üncü',
4: '\'üncü',
100: '\'üncü',
6: '\'ncı',
9: '\'uncu',
10: '\'uncu',
30: '\'uncu',
60: '\'ıncı',
90: '\'ıncı'
};
var tr = moment.defineLocale('tr', {
months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[bugün saat] LT',
nextDay : '[yarın saat] LT',
nextWeek : '[gelecek] dddd [saat] LT',
lastDay : '[dün] LT',
lastWeek : '[geçen] dddd [saat] LT',
sameElse : 'L'
},
relativeTime : {
future : '%s sonra',
past : '%s önce',
s : 'birkaç saniye',
ss : '%d saniye',
m : 'bir dakika',
mm : '%d dakika',
h : 'bir saat',
hh : '%d saat',
d : 'bir gün',
dd : '%d gün',
M : 'bir ay',
MM : '%d ay',
y : 'bir yıl',
yy : '%d yıl'
},
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'Do':
case 'DD':
return number;
default:
if (number === 0) { // special case for zero
return number + '\'ıncı';
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return tr;
})));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
/*
* This file has been compiled from: /modules/system/lang/vn/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['vn'] = $.extend(
$.wn.langMessages['vn'] || {},
{"markdowneditor":{"formatting":"\u0110\u1ecbnh d\u1ea1ng","quote":"\u0110o\u1ea1n tr\u00edch d\u1eabn","code":"Code","header1":"Ti\u00eau \u0111\u1ec1 1","header2":"Ti\u00eau \u0111\u1ec1 2","header3":"Ti\u00eau \u0111\u1ec1 3","header4":"Ti\u00eau \u0111\u1ec1 4","header5":"Ti\u00eau \u0111\u1ec1 5","header6":"Ti\u00eau \u0111\u1ec1 6","bold":"Ch\u1eef \u0111\u1eadm","italic":"Ch\u1eef nghi\u00eang","unorderedlist":"Danh s\u00e1ch kh\u00f4ng th\u1ee9 t\u1ef1","orderedlist":"Danh s\u00e1ch c\u00f3 th\u1ee9 t\u1ef1","video":"Video","image":"H\u00ecnh \u1ea3nh","link":"Link","horizontalrule":"Ch\u00e8n d\u00f2ng k\u1ebb ngang","fullscreen":"To\u00e0n m\u00e0n h\u00ecnh","preview":"Xem tr\u01b0\u1edbc"},"mediamanager":{"insert_link":"Ch\u00e8n Link","insert_image":"Ch\u00e8n h\u00ecnh \u1ea3nh","insert_video":"Ch\u00e8n Video","insert_audio":"Ch\u00e8n t\u1ec7p \u00e2m thanh","invalid_file_empty_insert":"Vui l\u00f2ng ch\u1ecdn file \u0111\u1ec3 ch\u00e8n v\u00e0o link.","invalid_file_single_insert":"Ch\u1ecdn m\u1ed9t file duy nh\u1ea5t.","invalid_image_empty_insert":"Ch\u1ecdn m\u1ed9t ho\u1eb7c nhi\u1ec1u \u1ea3nh \u0111\u1ec3 ch\u00e8n v\u00e0o.","invalid_video_empty_insert":"Ch\u1ecdn video \u0111\u1ec3 ch\u00e8n v\u00e0o.","invalid_audio_empty_insert":"Ch\u1ecdn t\u1ec7p tin audio \u0111\u1ec3 ch\u00e8n v\u00e0o."},"alert":{"confirm_button_text":"\u0110\u1ed3ng \u00fd","cancel_button_text":"B\u1ecf qua","widget_remove_confirm":"\u0110\u1ed3ng \u00fd x\u00f3a widget n\u00e0y?"},"datepicker":{"previousMonth":"Th\u00e1ng tr\u01b0\u1edbc","nextMonth":"Th\u00e1ng ti\u1ebfp theo","months":["Th\u00e1ng gi\u00eang","Th\u00e1ng 2","Th\u00e1ng 3","Th\u00e1ng 4","Th\u00e1ng 5","Th\u00e1ng 6","Th\u00e1ng 7","Th\u00e1ng 8","Th\u00e1ng 9","Th\u00e1ng 10","Th\u00e1ng 11","Th\u00e1ng 12"],"weekdays":["Ch\u1ee7 nh\u1eadt","Th\u1ee9 2","Th\u1ee9 3","Th\u1ee9 4","Th\u1ee9 5","Th\u1ee9 6","Th\u1ee9 7"],"weekdaysShort":["CN","T2","T3","T4","T5","T6","T7"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"Ch\u1ecdn"},"filter":{"group":{"all":"t\u1ea5t c\u1ea3"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"t\u1ea5t c\u1ea3","filter_button_text":"L\u1ecdc","reset_button_text":"Reset","date_placeholder":"Ng\u00e0y","after_placeholder":"Sau ng\u00e0y","before_placeholder":"Tr\u01b0\u1edbc ng\u00e0y"},"numbers":{"all":"all","filter_button_text":"L\u1ecdc","reset_button_text":"Reset","min_placeholder":"Nh\u1ecf nh\u1ea5t","max_placeholder":"L\u1edbn nh\u1ea5t"}},"eventlog":{"show_stacktrace":"Hi\u1ec3n th\u1ecb ng\u0103n x\u1ebfp","hide_stacktrace":"\u1ea8n ng\u0103n x\u1ebfp","tabs":{"formatted":"\u0110\u00e3 \u0111\u1ecbnh d\u1ea1ng","raw":"Raw"},"editor":{"title":"Tr\u00ecnh so\u1ea1n th\u1ea3o code","description":"H\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n c\u1ea7n \u0111\u01b0\u1ee3c c\u1ea5u h\u00ecnh \u0111\u1ec3 hi\u1ec3u \u0111\u01b0\u1ee3c m\u1ed9t trong nh\u1eefng c\u1ea5u tr\u00fac URL n\u00e0y","openWith":"M\u1edf b\u1eb1ng","remember_choice":"Nh\u1edb l\u1ef1a ch\u1ecdn n\u00e0y cho c\u00e1c l\u1ea7n ti\u1ebfp theo","open":"M\u1edf ra","cancel":"B\u1ecf qua"}}}
);

View File

@@ -0,0 +1,121 @@
/*
* This file has been compiled from: /modules/system/lang/zh-cn/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['zh-cn'] = $.extend(
$.wn.langMessages['zh-cn'] || {},
{"markdowneditor":{"formatting":"\u683c\u5f0f\u5316","quote":"\u5f15\u7528","code":"\u4ee3\u7801","header1":"\u6807\u9898 1","header2":"\u6807\u9898 2","header3":"\u6807\u9898 3","header4":"\u6807\u9898 4","header5":"\u6807\u9898 5","header6":"\u6807\u9898 6","bold":"\u7c97\u4f53","italic":"\u659c\u4f53","unorderedlist":"\u65e0\u5e8f\u5217\u8868","orderedlist":"\u6709\u5e8f\u5217\u8868","video":"\u89c6\u9891","image":"\u56fe\u7247","link":"\u94fe\u63a5","horizontalrule":"\u63d2\u5165\u5206\u5272\u7ebf","fullscreen":"\u5168\u5c4f","preview":"\u9884\u89c8"},"mediamanager":{"insert_link":"\u63d2\u5165\u94fe\u63a5","insert_image":"\u63d2\u5165\u56fe\u7247","insert_video":"\u63d2\u5165\u89c6\u9891","insert_audio":"\u63d2\u5165\u97f3\u9891","invalid_file_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u6587\u4ef6\u3002","invalid_file_single_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u6587\u4ef6\u3002","invalid_image_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u56fe\u7247\u6587\u4ef6\u3002","invalid_video_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u89c6\u9891\u6587\u4ef6\u3002","invalid_audio_empty_insert":"\u8bf7\u9009\u62e9\u8981\u63d2\u5165\u7684\u97f3\u9891\u6587\u4ef6\u3002"},"alert":{"confirm_button_text":"\u786e\u5b9a","cancel_button_text":"\u53d6\u6d88","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"\u4e0a\u4e00\u4e2a\u6708","nextMonth":"\u4e0b\u4e00\u4e2a\u6708","months":["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],"weekdays":["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],"weekdaysShort":["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"\u5168\u90e8"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"\u5168\u90e8","filter_button_text":"\u7b5b\u9009","reset_button_text":"\u91cd\u7f6e","date_placeholder":"\u65e5\u671f","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"\u663e\u793a\u5806\u6808","hide_stacktrace":"\u9690\u85cf\u5806\u6808","tabs":{"formatted":"\u683c\u5f0f\u5316\u7684","raw":"\u539f\u59cb"},"editor":{"title":"\u6e90\u4ee3\u7801\u7f16\u8f91\u5668","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"\u8bb0\u4f4f\u9009\u62e9","open":"\u6253\u5f00","cancel":"\u53d6\u6d88"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var zhCn = moment.defineLocale('zh-cn', {
months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY/MM/DD',
LL : 'YYYY年M月D日',
LLL : 'YYYY年M月D日Ah点mm分',
LLLL : 'YYYY年M月D日ddddAh点mm分',
l : 'YYYY/M/D',
ll : 'YYYY年M月D日',
lll : 'YYYY年M月D日 HH:mm',
llll : 'YYYY年M月D日dddd HH:mm'
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' ||
meridiem === '上午') {
return hour;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
} else {
// '中午'
return hour >= 11 ? hour : hour + 12;
}
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
ordinal : function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '周';
default:
return number;
}
},
relativeTime : {
future : '%s内',
past : '%s前',
s : '几秒',
ss : '%d 秒',
m : '1 分钟',
mm : '%d 分钟',
h : '1 小时',
hh : '%d 小时',
d : '1 天',
dd : '%d 天',
M : '1 个月',
MM : '%d 个月',
y : '1 年',
yy : '%d 年'
},
week : {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return zhCn;
})));

View File

@@ -0,0 +1,114 @@
/*
* This file has been compiled from: /modules/system/lang/zh-tw/client.php
*/
if ($.wn === undefined) $.wn = {}
if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['zh-tw'] = $.extend(
$.wn.langMessages['zh-tw'] || {},
{"markdowneditor":{"formatting":"\u683c\u5f0f","quote":"\u5f15\u7528","code":"\u7a0b\u5f0f\u78bc","header1":"\u6a19\u984c\u4e00","header2":"\u6a19\u984c\u4e8c","header3":"\u6a19\u984c\u4e09","header4":"\u6a19\u984c\u56db","header5":"\u6a19\u984c\u4e94","header6":"\u6a19\u984c\u516d","bold":"\u7c97\u9ad4","italic":"\u659c\u9ad4","unorderedlist":"\u9805\u76ee\u6e05\u55ae","orderedlist":"\u6578\u5b57\u6e05\u55ae","video":"\u5f71\u7247","image":"\u5716\u7247","link":"\u9023\u7d50","horizontalrule":"\u63d2\u5165\u6c34\u5e73\u7dda","fullscreen":"\u5168\u87a2\u5e55","preview":"\u9810\u89bd"},"mediamanager":{"insert_link":"\u63d2\u5165\u5a92\u9ad4\u6ac3\u9023\u7d50","insert_image":"\u63d2\u5165\u5a92\u9ad4\u6ac3\u5716\u7247","insert_video":"\u63d2\u5165\u5a92\u9ad4\u6ac3\u5f71\u7247","insert_audio":"\u63d2\u5165\u5a92\u9ad4\u6ac3\u97f3\u8a0a","invalid_file_empty_insert":"\u8acb\u9078\u64c7\u6a94\u6848\u4ee5\u63d2\u5165\u9023\u7d50\u3002","invalid_file_single_insert":"\u8acb\u9078\u64c7\u4e00\u500b\u6a94\u6848\u3002","invalid_image_empty_insert":"\u8acb\u9078\u64c7\u63d2\u5165\u7684\u5716\u7247\u3002","invalid_video_empty_insert":"\u8acb\u9078\u64c7\u63d2\u5165\u7684\u5f71\u7247\u3002","invalid_audio_empty_insert":"\u8acb\u9078\u64c7\u63d2\u5165\u7684\u97f3\u8a0a\u3002"},"alert":{"confirm_button_text":"\u78ba\u8a8d","cancel_button_text":"\u53d6\u6d88","widget_remove_confirm":"\u78ba\u5b9a\u79fb\u9664\u6b64\u5143\u4ef6\uff1f"},"datepicker":{"previousMonth":"\u4e0a\u500b\u6708","nextMonth":"\u4e0b\u500b\u6708","months":["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],"weekdays":["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],"weekdaysShort":["\u9031\u65e5","\u9031\u4e00","\u9031\u4e8c","\u9031\u4e09","\u9031\u56db","\u9031\u4e94","\u9031\u516d"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider","choose":"\u78ba\u5b9a"},"filter":{"group":{"all":"\u5168\u90e8"},"scopes":{"apply_button_text":"\u78ba\u5b9a","clear_button_text":"\u6e05\u9664"},"dates":{"all":"\u5168\u90e8","filter_button_text":"\u7be9\u9078","reset_button_text":"\u91cd\u7f6e","date_placeholder":"\u65e5\u671f","after_placeholder":"\u5728\u6b64\u4e4b\u5f8c","before_placeholder":"\u5728\u6b64\u4e4b\u524d"},"numbers":{"all":"\u5168\u90e8","filter_button_text":"\u7be9\u9078","reset_button_text":"\u91cd\u7f6e","min_placeholder":"\u6700\u5c0f\u503c","max_placeholder":"\u6700\u5927\u503c"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);
//! moment.js locale configuration v2.22.2
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var zhTw = moment.defineLocale('zh-tw', {
months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'YYYY/MM/DD',
LL : 'YYYY年M月D日',
LLL : 'YYYY年M月D日 HH:mm',
LLLL : 'YYYY年M月D日dddd HH:mm',
l : 'YYYY/M/D',
ll : 'YYYY年M月D日',
lll : 'YYYY年M月D日 HH:mm',
llll : 'YYYY年M月D日dddd HH:mm'
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour : function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '中午') {
return hour >= 11 ? hour : hour + 12;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
}
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar : {
sameDay : '[今天] LT',
nextDay : '[明天] LT',
nextWeek : '[下]dddd LT',
lastDay : '[昨天] LT',
lastWeek : '[上]dddd LT',
sameElse : 'L'
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
ordinal : function (number, period) {
switch (period) {
case 'd' :
case 'D' :
case 'DDD' :
return number + '日';
case 'M' :
return number + '月';
case 'w' :
case 'W' :
return number + '週';
default :
return number;
}
},
relativeTime : {
future : '%s內',
past : '%s前',
s : '幾秒',
ss : '%d 秒',
m : '1 分鐘',
mm : '%d 分鐘',
h : '1 小時',
hh : '%d 小時',
d : '1 天',
dd : '%d 天',
M : '1 個月',
MM : '%d 個月',
y : '1 年',
yy : '%d 年'
}
});
return zhTw;
})));

View File

@@ -0,0 +1,37 @@
var previewIframe
$(document).on('change', '.field-colorpicker', function() {
$('#brandSettingsForm').request('onUpdateSampleMessage').done(function(data) {
updatePreviewContent(data.previewHtml)
})
})
function updatePreviewContent(content) {
'srcdoc' in previewIframe
? previewIframe.srcdoc = content
: previewIframe.src = 'data:text/html;charset=UTF-8,' + content
}
function adjustPreviewHeight() {
previewIframe.style.height = (previewIframe.contentWindow.document.getElementsByTagName('body')[0].scrollHeight) +'px'
}
function createPreviewContainer(el, content) {
previewIframe = document.createElement('iframe')
updatePreviewContent(content)
previewIframe.style.width = '100%'
previewIframe.setAttribute('frameborder', 0)
previewIframe.setAttribute('id', el.id)
previewIframe.onload = adjustPreviewHeight
var parent = el.parentNode
parent.replaceChild(previewIframe, el)
/*
* Auto adjust height
*/
$(document).render(adjustPreviewHeight)
$(window).resize(adjustPreviewHeight)
}

View File

@@ -0,0 +1,68 @@
/**
* Plugin base abstract.
*
* This class provides the base functionality for all plugins.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class PluginBase {
/**
* Constructor.
*
* The constructor is provided the Snowboard framework instance, and should not be overwritten
* unless you absolutely know what you're doing.
*
* @param {Snowboard} snowboard
*/
constructor(snowboard) {
this.snowboard = snowboard;
}
/**
* Plugin constructor.
*
* This method should be treated as the true constructor of a plugin, and can be overwritten.
* It will be called straight after construction.
*/
construct() {
}
/**
* Defines the required plugins for this specific module to work.
*
* @returns {string[]} An array of plugins required for this module to work, as strings.
*/
dependencies() {
return [];
}
/**
* Defines the listener methods for global events.
*
* @returns {Object}
*/
listens() {
return {};
}
/**
* Plugin destructor.
*
* Fired when this plugin is removed. Can be manually called if you have another scenario for
* destruction, ie. the element attached to the plugin is removed or changed.
*/
destruct() {
this.detach();
delete this.snowboard;
}
/**
* Plugin destructor (old method name).
*
* Allows previous usage of the "destructor" method to still work.
*/
destructor() {
this.destruct();
}
}

View File

@@ -0,0 +1,15 @@
import PluginBase from './PluginBase';
/**
* Singleton plugin abstract.
*
* This is a special definition class that the Snowboard framework will use to interpret the current plugin as a
* "singleton". This will ensure that only one instance of the plugin class is used across the board.
*
* Singletons are initialised on the "domReady" event by default.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Singleton extends PluginBase {
}

View File

@@ -0,0 +1,889 @@
import PluginBase from '../abstracts/PluginBase';
/**
* Request plugin.
*
* This is the default AJAX handler which will run using the `fetch()` method that is default in modern browsers.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Request extends PluginBase {
/**
* Constructor.
*
* The constructor accepts 2 or 3 parameters.
*
* If 2 parameters are provided, the first parameter is the handler name and the second
* parameter is the options. This assumes that this is a detached AJAX request not connected to
* an element.
*
* If 3 parameters are provided, the first parameter is an element or a selector, and the second
* and third parameters are the handler and options, respectively.
*
* @param {HTMLElement|string} element
* @param {string|Object} handler
* @param {Object} options
*/
construct(element, handler, options) {
if (typeof element === 'string') {
// Allow the element to be a handler name.
// This assumes the request is being made against no element, and the handler parameter
// will contain options.
if (this.isHandlerName(element)) {
this.element = null;
this.handler = element;
this.options = handler || {};
} else {
const matchedElement = document.querySelector(element);
if (matchedElement === null) {
throw new Error(`No element was found with the given selector: ${element}`);
}
this.element = matchedElement;
this.handler = handler;
this.options = options || {};
}
} else {
this.element = element;
this.handler = handler;
this.options = options || {};
}
this.fetchOptions = {};
this.responseData = null;
this.responseError = null;
this.cancelled = false;
this.checkRequest();
if (!this.snowboard.globalEvent('ajaxSetup', this)) {
this.cancelled = true;
return;
}
if (this.element) {
const event = new Event('ajaxSetup', { cancelable: true });
event.request = this;
this.element.dispatchEvent(event);
if (event.defaultPrevented) {
this.cancelled = true;
return;
}
}
if (!this.doClientValidation()) {
this.cancelled = true;
return;
}
if (this.confirm) {
this.doConfirm().then((confirmed) => {
if (confirmed) {
this.doAjax().then(
(response) => {
if (response.cancelled) {
this.cancelled = true;
this.complete();
return;
}
this.responseData = response;
this.processUpdate(response).then(
() => {
if (response.X_WINTER_SUCCESS === false) {
this.processError(response);
} else {
this.processResponse(response);
}
},
);
},
(error) => {
this.responseError = error;
this.processError(error);
},
);
}
});
} else {
this.doAjax().then(
(response) => {
if (response.cancelled) {
this.cancelled = true;
this.complete();
return;
}
this.responseData = response;
this.processUpdate(response).then(
() => {
if (response.X_WINTER_SUCCESS === false) {
this.processError(response);
} else {
this.processResponse(response);
}
},
);
},
(error) => {
this.responseError = error;
this.processError(error);
},
);
}
}
/**
* Dependencies for this plugin.
*
* @returns {string[]}
*/
dependencies() {
return ['cookie', 'jsonParser'];
}
/**
* Validates the element and handler given in the request.
*/
checkRequest() {
if (this.element && this.element instanceof Element === false) {
throw new Error('The element provided must be an Element instance');
}
if (this.handler === undefined) {
throw new Error('The AJAX handler name is not specified.');
}
if (!this.isHandlerName(this.handler)) {
throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".');
}
}
/**
* Creates a Fetch request.
*
* This method is made available for plugins to extend or override the default fetch() settings with their own.
*
* @returns {Promise}
*/
getFetch() {
this.fetchOptions = (this.options.fetchOptions !== undefined && typeof this.options.fetchOptions === 'object')
? this.options.fetchOptions
: {
method: 'POST',
headers: this.headers,
body: this.data,
redirect: 'follow',
mode: 'same-origin',
};
this.snowboard.globalEvent('ajaxFetchOptions', this.fetchOptions, this);
return fetch(this.url, this.fetchOptions);
}
/**
* Run client-side validation on the form, if available.
*
* @returns {boolean}
*/
doClientValidation() {
if (this.options.browserValidate === true && this.form) {
if (this.form.checkValidity() === false) {
this.form.reportValidity();
return false;
}
}
return true;
}
/**
* Executes the AJAX query.
*
* Returns a Promise object for when the AJAX request is completed.
*
* @returns {Promise}
*/
doAjax() {
// Allow plugins to cancel the AJAX request before sending
if (this.snowboard.globalEvent('ajaxBeforeSend', this) === false) {
return Promise.resolve({
cancelled: true,
});
}
const ajaxPromise = new Promise((resolve, reject) => {
this.getFetch().then(
(response) => {
if (!response.ok && response.status !== 406) {
if (response.headers.has('Content-Type') && response.headers.get('Content-Type').includes('/json')) {
response.json().then(
(responseData) => {
if (responseData.message && responseData.exception) {
reject(this.renderError(
responseData.message,
responseData.exception,
responseData.file,
responseData.line,
responseData.trace,
));
} else {
reject(responseData);
}
},
(error) => {
reject(this.renderError(`Unable to parse JSON response: ${error}`));
},
);
} else {
response.text().then(
(responseText) => {
reject(this.renderError(responseText));
},
(error) => {
reject(this.renderError(`Unable to process response: ${error}`));
},
);
}
return;
}
if (response.headers.has('Content-Type') && response.headers.get('Content-Type').includes('/json')) {
response.json().then(
(responseData) => {
resolve({
...responseData,
X_WINTER_SUCCESS: response.status !== 406,
X_WINTER_RESPONSE_CODE: response.status,
});
},
(error) => {
reject(this.renderError(`Unable to parse JSON response: ${error}`));
},
);
} else {
response.text().then(
(responseData) => {
resolve(responseData);
},
(error) => {
reject(this.renderError(`Unable to process response: ${error}`));
},
);
}
},
(responseError) => {
reject(this.renderError(`Unable to retrieve a response from the server: ${responseError}`));
},
);
});
this.snowboard.globalEvent('ajaxStart', ajaxPromise, this);
if (this.element) {
const event = new Event('ajaxPromise');
event.promise = ajaxPromise;
this.element.dispatchEvent(event);
}
return ajaxPromise;
}
/**
* Prepares for updating the partials from the AJAX response.
*
* If any partials are returned from the AJAX response, this method will also action the partial updates.
*
* Returns a Promise object which tracks when the partial update is complete.
*
* @param {Object} response
* @returns {Promise}
*/
processUpdate(response) {
return new Promise((resolve, reject) => {
if (typeof this.options.beforeUpdate === 'function') {
if (this.options.beforeUpdate.apply(this, [response]) === false) {
resolve();
return;
}
}
// Extract partial information
const partials = {};
Object.entries(response).forEach((entry) => {
const [key, value] = entry;
if (key.substr(0, 8) !== 'X_WINTER') {
partials[key] = value;
}
});
if (Object.keys(partials).length === 0) {
if (response.X_WINTER_ASSETS) {
this.processAssets(response.X_WINTER_ASSETS).then(
() => {
resolve();
},
() => {
reject();
},
);
} else {
resolve();
}
return;
}
const promises = this.snowboard.globalPromiseEvent('ajaxBeforeUpdate', response, this);
promises.then(
async () => {
if (response.X_WINTER_ASSETS) {
await this.processAssets(response.X_WINTER_ASSETS);
}
this.doUpdate(partials).then(
() => {
// Allow for HTML redraw
window.requestAnimationFrame(() => resolve());
},
() => {
reject();
},
);
},
() => {
resolve();
},
);
});
}
/**
* Updates the partials with the given content.
*
* @param {Object} partials
* @returns {Promise}
*/
doUpdate(partials) {
return new Promise((resolve) => {
const affected = [];
Object.entries(partials).forEach((entry) => {
const [partial, content] = entry;
let selector = (this.options.update && this.options.update[partial])
? this.options.update[partial]
: partial;
let mode = 'replace';
if (selector.substr(0, 1) === '@') {
mode = 'append';
selector = selector.substr(1);
} else if (selector.substr(0, 1) === '^') {
mode = 'prepend';
selector = selector.substr(1);
} else if (selector.substr(0, 1) !== '#' && selector.substr(0, 1) !== '.') {
mode = 'noop';
}
const elements = document.querySelectorAll(selector);
if (elements.length > 0) {
elements.forEach((element) => {
switch (mode) {
case 'append':
element.innerHTML += content;
break;
case 'prepend':
element.innerHTML = content + element.innerHTML;
break;
case 'noop':
break;
case 'replace':
default:
element.innerHTML = content;
break;
}
affected.push(element);
// Fire update event for each element that is updated
this.snowboard.globalEvent('ajaxUpdate', element, content, this);
const event = new Event('ajaxUpdate');
event.content = content;
element.dispatchEvent(event);
});
}
});
this.snowboard.globalEvent('ajaxUpdateComplete', affected, this);
resolve();
});
}
/**
* Processes the response data.
*
* This fires off all necessary processing functions depending on the response, ie. if there's any flash
* messages to handle, or any redirects to be undertaken.
*
* @param {Object} response
* @returns {void}
*/
processResponse(response) {
if (this.options.success && typeof this.options.success === 'function') {
if (this.options.success(this.responseData, this) === false) {
return;
}
}
// Allow plugins to cancel any further response handling
if (this.snowboard.globalEvent('ajaxSuccess', this.responseData, this) === false) {
return;
}
// Allow the element to cancel any further response handling
if (this.element) {
const event = new Event('ajaxDone', { cancelable: true });
event.responseData = this.responseData;
event.request = this;
this.element.dispatchEvent(event);
if (event.defaultPrevented) {
return;
}
}
if (this.flash && response.X_WINTER_FLASH_MESSAGES) {
this.processFlashMessages(response.X_WINTER_FLASH_MESSAGES);
}
// Check for a redirect from the response, or use the redirect as specified in the options.
if (this.redirect || response.X_WINTER_REDIRECT) {
this.processRedirect(this.redirect || response.X_WINTER_REDIRECT);
return;
}
this.complete();
}
/**
* Processes an error response from the AJAX request.
*
* This fires off all necessary processing functions depending on the error response, ie. if there's any error or
* validation messages to handle.
*
* @param {Object|Error} error
*/
processError(error) {
if (this.options.error && typeof this.options.error === 'function') {
if (this.options.error(this.responseError, this) === false) {
return;
}
}
// Allow plugins to cancel any further error handling
if (this.snowboard.globalEvent('ajaxError', this.responseError, this) === false) {
return;
}
// Allow the element to cancel any further error handling
if (this.element) {
const event = new Event('ajaxFail', { cancelable: true });
event.responseError = this.responseError;
event.request = this;
this.element.dispatchEvent(event);
if (event.defaultPrevented) {
return;
}
}
if (error instanceof Error) {
this.processErrorMessage(error.message);
} else {
let skipError = false;
// Process validation errors
if (error.X_WINTER_ERROR_FIELDS) {
skipError = this.processValidationErrors(error.X_WINTER_ERROR_FIELDS);
}
if (error.X_WINTER_ERROR_MESSAGE && !skipError) {
this.processErrorMessage(error.X_WINTER_ERROR_MESSAGE);
}
}
this.complete();
}
/**
* Processes a redirect response.
*
* By default, this processor will simply redirect the user in their browser.
*
* Plugins can augment this functionality from the `ajaxRedirect` event. You may also override this functionality on
* a per-request basis through the `handleRedirectResponse` callback option. If a `false` is returned from either, the
* redirect will be cancelled.
*
* @param {string} url
* @returns {void}
*/
processRedirect(url) {
// Run a custom per-request redirect handler. If false is returned, don't run the redirect.
if (typeof this.options.handleRedirectResponse === 'function') {
if (this.options.handleRedirectResponse.apply(this, [url]) === false) {
return;
}
}
// Allow plugins to cancel the redirect
if (this.snowboard.globalEvent('ajaxRedirect', url, this) === false) {
return;
}
// Indicate that the AJAX request is finished if we're still on the current page
// so that the loading indicator for redirects that just change the hash value of
// the URL instead of leaving the page will properly stop.
// @see https://github.com/octobercms/october/issues/2780
window.addEventListener('popstate', () => {
if (this.element) {
const event = document.createEvent('CustomEvent');
event.eventName = 'ajaxRedirected';
this.element.dispatchEvent(event);
}
}, {
once: true,
});
window.location.assign(url);
}
/**
* Processes an error message.
*
* By default, this processor will simply alert the user through a simple `alert()` call.
*
* Plugins can augment this functionality from the `ajaxErrorMessage` event. You may also override this functionality
* on a per-request basis through the `handleErrorMessage` callback option. If a `false` is returned from either, the
* error message handling will be cancelled.
*
* @param {string} message
* @returns {void}
*/
processErrorMessage(message) {
// Run a custom per-request handler for error messages. If false is returned, do not process the error messages
// any further.
if (typeof this.options.handleErrorMessage === 'function') {
if (this.options.handleErrorMessage.apply(this, [message]) === false) {
return;
}
}
// Allow plugins to cancel the error message being shown
if (this.snowboard.globalEvent('ajaxErrorMessage', message, this) === false) {
return;
}
// By default, show a browser error message
window.alert(message);
}
/**
* Processes flash messages from the response.
*
* By default, no flash message handling will occur.
*
* Plugins can augment this functionality from the `ajaxFlashMessages` event. You may also override this functionality
* on a per-request basis through the `handleFlashMessages` callback option. If a `false` is returned from either, the
* flash message handling will be cancelled.
*
* @param {Object} messages
* @returns
*/
processFlashMessages(messages) {
// Run a custom per-request flash handler. If false is returned, don't show the flash message
if (typeof this.options.handleFlashMessages === 'function') {
if (this.options.handleFlashMessages.apply(this, [messages]) === false) {
return;
}
}
this.snowboard.globalEvent('ajaxFlashMessages', messages, this);
}
/**
* Processes validation errors for fields.
*
* By default, no validation error handling will occur.
*
* Plugins can augment this functionality from the `ajaxValidationErrors` event. You may also override this functionality
* on a per-request basis through the `handleValidationErrors` callback option. If a `false` is returned from either, the
* validation error handling will be cancelled.
*
* @param {Object} fields
* @returns
*/
processValidationErrors(fields) {
if (typeof this.options.handleValidationErrors === 'function') {
if (this.options.handleValidationErrors.apply(this, [this.form, fields]) === false) {
return true;
}
}
// Allow plugins to cancel the validation errors being handled
if (this.snowboard.globalEvent('ajaxValidationErrors', this.form, fields, this) === false) {
return true;
}
return false;
}
/**
* Processes assets returned by an AJAX request.
*
* By default, no asset processing will occur and this will return a resolved Promise.
*
* Plugins can augment this functionality from the `ajaxLoadAssets` event. This event is considered blocking, and
* allows assets to be loaded or processed before continuing with any additional functionality.
*
* @param {Object} assets
* @returns {Promise}
*/
processAssets(assets) {
return this.snowboard.globalPromiseEvent('ajaxLoadAssets', assets);
}
/**
* Confirms the request with the user before proceeding.
*
* This is an asynchronous method. By default, it will use the browser's `confirm()` method to query the user to
* confirm the action. This method will return a Promise with a boolean value depending on whether the user confirmed
* or not.
*
* Plugins can augment this functionality from the `ajaxConfirmMessage` event. You may also override this functionality
* on a per-request basis through the `handleConfirmMessage` callback option. If a `false` is returned from either,
* the confirmation is assumed to have been denied.
*
* @returns {Promise}
*/
async doConfirm() {
// Allow for a custom handler for the confirmation, per request.
if (typeof this.options.handleConfirmMessage === 'function') {
if (this.options.handleConfirmMessage.apply(this, [this.confirm]) === false) {
return false;
}
return true;
}
// If no plugins have customised the confirmation, use a simple browser confirmation.
if (this.snowboard.listensToEvent('ajaxConfirmMessage').length === 0) {
return window.confirm(this.confirm);
}
// Run custom plugin confirmations
const promises = this.snowboard.globalPromiseEvent('ajaxConfirmMessage', this.confirm, this);
try {
const fulfilled = await promises;
if (fulfilled) {
return true;
}
} catch (e) {
return false;
}
return false;
}
/**
* Fires off completion events for the Request.
*/
complete() {
if (this.options.complete && typeof this.options.complete === 'function') {
this.options.complete(this.responseData, this);
}
this.snowboard.globalEvent('ajaxDone', this.responseData, this);
if (this.element) {
const event = new Event('ajaxAlways');
event.request = this;
event.responseData = this.responseData;
event.responseError = this.responseError;
this.element.dispatchEvent(event);
}
// Fire off the destructor
this.destruct();
}
get form() {
if (this.options.form) {
if (typeof this.options.form === 'string') {
return document.querySelector(this.options.form);
}
return this.options.form;
}
if (!this.element) {
return null;
}
if (this.element.tagName === 'FORM') {
return this.element;
}
return this.element.closest('form');
}
get context() {
return {
handler: this.handler,
options: this.options,
};
}
get headers() {
const headers = {
'X-Requested-With': 'XMLHttpRequest', // Keeps compatibility with jQuery AJAX
'X-WINTER-REQUEST-HANDLER': this.handler,
'X-WINTER-REQUEST-PARTIALS': this.extractPartials(this.options.update || []),
};
if (this.flash) {
headers['X-WINTER-REQUEST-FLASH'] = 1;
}
if (this.xsrfToken) {
headers['X-XSRF-TOKEN'] = this.xsrfToken;
}
return headers;
}
get loading() {
return this.options.loading || false;
}
get url() {
return this.options.url || window.location.href;
}
get redirect() {
return (this.options.redirect && this.options.redirect.length) ? this.options.redirect : null;
}
get flash() {
return this.options.flash || false;
}
get files() {
if (this.options.files === true) {
if (FormData === undefined) {
this.snowboard.debug('This browser does not support file uploads');
return false;
}
return true;
}
return false;
}
get xsrfToken() {
return this.snowboard.cookie().get('XSRF-TOKEN');
}
get data() {
const data = (typeof this.options.data === 'object') ? this.options.data : {};
const formData = new FormData(this.form || undefined);
if (Object.keys(data).length > 0) {
this.createFormData(formData, data);
}
return formData;
}
/**
* Recursively adds data to a FormData object.
*
* This method is used internally to recursively add data to a FormData object, ensuring that
* objects and arrays are correctly prefixed and added as POST data.
*
* @param {FormData} formData
* @param {Object} data
* @param {string} prefix
* @returns {void}
*/
createFormData(formData, data, prefix = '') {
if (data === null || data === undefined) {
return;
}
if (typeof data !== 'object') {
formData.append(prefix, data);
return;
}
if (Array.isArray(data) && prefix !== '') {
data.forEach((item, index) => {
this.createFormData(formData, item, `${prefix}[${index}]`);
});
return;
}
Object.entries(data).forEach((entry) => {
const [key, value] = entry;
this.createFormData(
formData,
value,
(prefix !== '') ? `${prefix}[${key}]` : key,
);
});
}
get confirm() {
return this.options.confirm || false;
}
/**
* Extracts partials.
*
* @param {Object} update
* @returns {string}
*/
extractPartials(update) {
return Object.keys(update).join('&');
}
/**
* Renders an error with useful debug information.
*
* This method is used internally when the AJAX request could not be completed or processed correctly due to an error.
*
* @param {string} message
* @param {string} exception
* @param {string} file
* @param {Number} line
* @param {string[]} trace
* @returns {Error}
*/
renderError(message, exception, file, line, trace) {
const error = new Error(message);
error.exception = exception || null;
error.file = file || null;
error.line = line || null;
error.trace = trace || [];
return error;
}
/**
* Checks a given string to see if it is a valid AJAX handler name.
*
* @param {String} name
* @returns {Boolean}
*/
isHandlerName(name) {
return /^(?:\w+:{2})?on[A-Z0-9]/.test(name);
}
}

View File

@@ -0,0 +1,332 @@
import Singleton from '../../abstracts/Singleton';
/**
* Enable Data Attributes API for AJAX requests.
*
* This is an extension of the base AJAX functionality that includes handling of HTML data attributes for processing
* AJAX requests. It is separated from the base AJAX functionality to allow developers to opt-out of data attribute
* requests if they do not intend to use them.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class AttributeRequest extends Singleton {
/**
* Listeners.
*
* @returns {Object}
*/
listens() {
return {
ready: 'ready',
ajaxSetup: 'onAjaxSetup',
};
}
/**
* Ready event callback.
*
* Attaches handlers to the window to listen for all request interactions.
*/
ready() {
this.attachHandlers();
this.disableDefaultFormValidation();
}
/**
* Dependencies.
*
* @returns {string[]}
*/
dependencies() {
return ['request', 'jsonParser'];
}
/**
* Destructor.
*
* Detaches all handlers.
*/
destruct() {
this.detachHandlers();
super.destruct();
}
/**
* Attaches the necessary handlers for all request interactions.
*/
attachHandlers() {
window.addEventListener('change', (event) => this.changeHandler(event));
window.addEventListener('click', (event) => this.clickHandler(event));
window.addEventListener('keydown', (event) => this.keyDownHandler(event));
window.addEventListener('submit', (event) => this.submitHandler(event));
}
/**
* Disables default form validation for AJAX forms.
*
* A form that contains a `data-request` attribute to specify an AJAX call without including a `data-browser-validate`
* attribute means that the AJAX callback function will likely be handling the validation instead.
*/
disableDefaultFormValidation() {
document.querySelectorAll('form[data-request]:not([data-browser-validate])').forEach((form) => {
form.setAttribute('novalidate', true);
});
}
/**
* Detaches the necessary handlers for all request interactions.
*/
detachHandlers() {
window.removeEventListener('change', (event) => this.changeHandler(event));
window.removeEventListener('click', (event) => this.clickHandler(event));
window.removeEventListener('keydown', (event) => this.keyDownHandler(event));
window.removeEventListener('submit', (event) => this.submitHandler(event));
}
/**
* Handles changes to select, radio, checkbox and file inputs.
*
* @param {Event} event
*/
changeHandler(event) {
// Check that we are changing a valid element
if (!event.target.matches(
'select[data-request], input[type=radio][data-request], input[type=checkbox][data-request], input[type=file][data-request]',
)) {
return;
}
this.processRequestOnElement(event.target);
}
/**
* Handles clicks on hyperlinks and buttons.
*
* This event can bubble up the hierarchy to find a suitable request element.
*
* @param {Event} event
*/
clickHandler(event) {
let currentElement = event.target;
while (currentElement && currentElement.tagName !== 'HTML') {
if (!currentElement.matches(
'a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]',
)) {
currentElement = currentElement.parentElement;
} else {
event.preventDefault();
this.processRequestOnElement(currentElement);
break;
}
}
}
/**
* Handles key presses on inputs
*
* @param {Event} event
*/
keyDownHandler(event) {
// Check that we are inputting into a valid element
if (!event.target.matches(
'input',
)) {
return;
}
// Check that the input type is valid
const validTypes = [
'checkbox',
'color',
'date',
'datetime',
'datetime-local',
'email',
'image',
'month',
'number',
'password',
'radio',
'range',
'search',
'tel',
'text',
'time',
'url',
'week',
];
if (validTypes.indexOf(event.target.getAttribute('type')) === -1) {
return;
}
if (event.key === 'Enter' && event.target.matches('*[data-request]')) {
this.processRequestOnElement(event.target);
event.preventDefault();
event.stopImmediatePropagation();
} else if (event.target.matches('*[data-track-input]')) {
this.trackInput(event.target);
}
}
/**
* Handles form submissions.
*
* @param {Event} event
*/
submitHandler(event) {
// Check that we are submitting a valid form
if (!event.target.matches(
'form[data-request]',
)) {
return;
}
event.preventDefault();
this.processRequestOnElement(event.target);
}
/**
* Processes a request on a given element, using its data attributes.
*
* @param {HTMLElement} element
*/
processRequestOnElement(element) {
const data = element.dataset;
const handler = String(data.request);
const options = {
confirm: ('requestConfirm' in data) ? String(data.requestConfirm) : null,
redirect: ('requestRedirect' in data) ? String(data.requestRedirect) : null,
loading: ('requestLoading' in data) ? String(data.requestLoading) : null,
stripe: ('requestStripe' in data) ? data.requestStripe === 'true' : true,
flash: ('requestFlash' in data),
files: ('requestFiles' in data),
browserValidate: ('requestBrowserValidate' in data),
form: ('requestForm' in data) ? String(data.requestForm) : null,
url: ('requestUrl' in data) ? String(data.requestUrl) : null,
update: ('requestUpdate' in data) ? this.parseData(String(data.requestUpdate)) : [],
data: ('requestData' in data) ? this.parseData(String(data.requestData)) : [],
};
this.snowboard.request(element, handler, options);
}
/**
* Sets up an AJAX request via HTML attributes.
*
* @param {Request} request
*/
onAjaxSetup(request) {
if (!request.element) {
return;
}
const fieldName = request.element.getAttribute('name');
const data = {
...this.getParentRequestData(request.element),
...request.options.data,
};
if (request.element && request.element.matches('input, textarea, select, button') && !request.form && fieldName && !request.options.data[fieldName]) {
data[fieldName] = request.element.value;
}
request.options.data = data;
}
/**
* Parses and collates all data from elements up the DOM hierarchy.
*
* @param {Element} target
* @returns {Object}
*/
getParentRequestData(target) {
const elements = [];
let data = {};
let currentElement = target;
while (currentElement.parentElement && currentElement.parentElement.tagName !== 'HTML') {
elements.push(currentElement.parentElement);
currentElement = currentElement.parentElement;
}
elements.reverse();
elements.forEach((element) => {
const elementData = element.dataset;
if ('requestData' in elementData) {
data = {
...data,
...this.parseData(elementData.requestData),
};
}
});
return data;
}
/**
* Parses data in the Winter/October JSON format.
*
* @param {String} data
* @returns {Object}
*/
parseData(data) {
let value;
if (data === undefined) {
value = '';
}
if (typeof value === 'object') {
return value;
}
try {
return this.snowboard.jsonparser().parse(`{${data}}`);
} catch (e) {
throw new Error(`Error parsing the data attribute on element: ${e.message}`);
}
}
trackInput(element) {
const { lastValue } = element.dataset;
const interval = element.dataset.trackInput || 300;
if (lastValue !== undefined && lastValue === element.value) {
return;
}
this.resetTrackInputTimer(element);
element.dataset.inputTimer = window.setTimeout(() => {
if (element.dataset.request) {
this.processRequestOnElement(element);
return;
}
// Traverse up the hierarchy and find a form that sends an AJAX query
let currentElement = element;
while (currentElement.parentElement && currentElement.parentElement.tagName !== 'HTML') {
currentElement = currentElement.parentElement;
if (currentElement.tagName === 'FORM' && currentElement.dataset.request) {
this.processRequestOnElement(currentElement);
break;
}
}
}, interval);
}
resetTrackInputTimer(element) {
if (element.dataset.inputTimer) {
window.clearTimeout(element.dataset.inputTimer);
element.dataset.inputTimer = null;
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[969],{478:function(e,t,n){
/*! js-cookie v3.0.5 | MIT */
function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n.d(t,{A:function(){return o}});var o=function e(t,n){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=r({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(r[u]=t.read(c,u),e===u)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){o(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}}]);

View File

@@ -0,0 +1,196 @@
import Singleton from '../abstracts/Singleton';
/**
* Asset Loader.
*
* Provides simple asset loading functionality for Snowboard, making it easy to pre-load images or
* include JavaScript or CSS assets on the fly.
*
* By default, this loader will listen to any assets that have been requested to load in an AJAX
* response, such as responses from a component.
*
* You can also load assets manually by calling the following:
*
* ```js
* Snowboard.addPlugin('assetLoader', AssetLoader);
* Snowboard.assetLoader().processAssets(assets);
* ```
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class AssetLoader extends Singleton {
/**
* Event listeners.
*
* @returns {Object}
*/
listens() {
return {
ajaxLoadAssets: 'load',
};
}
/**
* Dependencies.
*
* @returns {Array}
*/
dependencies() {
return [
'url',
];
}
/**
* Process and load assets.
*
* The `assets` property of this method requires an object with any of the following keys and an
* array of paths:
*
* - `js`: An array of JavaScript URLs to load
* - `css`: An array of CSS stylesheet URLs to load
* - `img`: An array of image URLs to pre-load
*
* Both `js` and `css` files will be automatically injected, however `img` files will not.
*
* This method will return a Promise that resolves when all required assets are loaded. If an
* asset fails to load, this Promise will be rejected.
*
* ESLint *REALLY* doesn't like this code, but ignore it. It's the only way it works.
*
* @param {Object} assets
* @returns {Promise}
*/
async load(assets) {
if (assets.js && assets.js.length > 0) {
for (const script of assets.js) {
try {
await this.loadScript(script);
} catch (error) {
return Promise.reject(error);
}
}
}
if (assets.css && assets.css.length > 0) {
for (const style of assets.css) {
try {
await this.loadStyle(style);
} catch (error) {
return Promise.reject(error);
}
}
}
if (assets.img && assets.img.length > 0) {
for (const image of assets.img) {
try {
await this.loadImage(image);
} catch (error) {
return Promise.reject(error);
}
}
}
return Promise.resolve();
}
/**
* Injects and loads a JavaScript URL into the DOM.
*
* The script will be appended before the closing `</body>` tag.
*
* @param {String} script
* @returns {Promise}
*/
loadScript(script) {
return new Promise((resolve, reject) => {
// Resolve script URL
script = this.snowboard.url().asset(script);
// Check that script is not already loaded
const loaded = document.querySelector(`script[src="${script}"]`);
if (loaded) {
resolve();
return;
}
// Create script
const domScript = document.createElement('script');
domScript.setAttribute('type', 'text/javascript');
domScript.setAttribute('src', script);
domScript.addEventListener('load', () => {
this.snowboard.globalEvent('assetLoader.loaded', 'script', script, domScript);
resolve();
});
domScript.addEventListener('error', () => {
this.snowboard.globalEvent('assetLoader.error', 'script', script, domScript);
reject(new Error(`Unable to load script file: "${script}"`));
});
document.body.append(domScript);
});
}
/**
* Injects and loads a CSS stylesheet into the DOM.
*
* The stylesheet will be appended before the closing `</head>` tag.
*
* @param {String} style
* @returns {Promise}
*/
loadStyle(style) {
return new Promise((resolve, reject) => {
// Resolve style URL
style = this.snowboard.url().asset(style);
// Check that stylesheet is not already loaded
const loaded = document.querySelector(`link[rel="stylesheet"][href="${style}"]`);
if (loaded) {
resolve();
return;
}
// Create stylesheet
const domCss = document.createElement('link');
domCss.setAttribute('rel', 'stylesheet');
domCss.setAttribute('href', style);
domCss.addEventListener('load', () => {
this.snowboard.globalEvent('assetLoader.loaded', 'style', style, domCss);
resolve();
});
domCss.addEventListener('error', () => {
this.snowboard.globalEvent('assetLoader.error', 'style', style, domCss);
reject(new Error(`Unable to load stylesheet file: "${style}"`));
});
document.head.append(domCss);
});
}
/**
* Pre-loads an image.
*
* The image will not be injected into the DOM.
*
* @param {String} image
* @returns {Promise}
*/
loadImage(image) {
return new Promise((resolve, reject) => {
// Resolve script URL
image = this.snowboard.url().asset(image);
const img = new Image();
img.addEventListener('load', () => {
this.snowboard.globalEvent('assetLoader.loaded', 'image', image, img);
resolve();
});
img.addEventListener('error', () => {
this.snowboard.globalEvent('assetLoader.error', 'image', image, img);
reject(new Error(`Unable to load image file: "${image}"`));
});
img.src = image;
});
}
}

View File

@@ -0,0 +1,70 @@
import Singleton from '../abstracts/Singleton';
/**
* Allows attaching a loading class on elements that an AJAX request is targeting.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class AttachLoading extends Singleton {
/**
* Defines dependenices.
*
* @returns {string[]}
*/
dependencies() {
return ['request'];
}
/**
* Defines listeners.
*
* @returns {Object}
*/
listens() {
return {
ajaxStart: 'ajaxStart',
ajaxDone: 'ajaxDone',
};
}
ajaxStart(promise, request) {
if (!request.element) {
return;
}
if (request.element.tagName === 'FORM') {
const loadElements = request.element.querySelectorAll('[data-attach-loading]');
if (loadElements.length > 0) {
loadElements.forEach((element) => {
element.classList.add(this.getLoadingClass(element));
});
}
} else if (request.element.dataset.attachLoading !== undefined) {
request.element.classList.add(this.getLoadingClass(request.element));
}
}
ajaxDone(data, request) {
if (!request.element) {
return;
}
if (request.element.tagName === 'FORM') {
const loadElements = request.element.querySelectorAll('[data-attach-loading]');
if (loadElements.length > 0) {
loadElements.forEach((element) => {
element.classList.remove(this.getLoadingClass(element));
});
}
} else if (request.element.dataset.attachLoading !== undefined) {
request.element.classList.remove(this.getLoadingClass(request.element));
}
}
getLoadingClass(element) {
return (element.dataset.attachLoading !== undefined && element.dataset.attachLoading !== '')
? element.dataset.attachLoading
: 'wn-loading';
}
}

View File

@@ -0,0 +1,222 @@
import PluginBase from '../abstracts/PluginBase';
/**
* Data configuration provider.
*
* Provides a mechanism for passing configuration data through an element's data attributes. This
* is generally used for widgets or UI interactions to configure them.
*
* @copyright 2022 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class DataConfig extends PluginBase {
/**
* Constructor.
*
* @param {PluginBase} instance
* @param {HTMLElement} element
* @param {Object} localConfig
*/
construct(instance, element, localConfig) {
if (instance instanceof PluginBase === false) {
throw new Error('You must provide a Snowboard plugin to enable data configuration');
}
if (element instanceof HTMLElement === false) {
throw new Error('Data configuration can only be extracted from HTML elements');
}
this.instance = instance;
this.element = element;
this.localConfig = localConfig || {};
this.instanceConfig = {};
this.acceptedConfigs = {};
this.refresh();
}
/**
* Gets the config for this instance.
*
* If the `config` parameter is unspecified, returns the entire configuration.
*
* @param {string} config
*/
get(config) {
if (config === undefined) {
return this.instanceConfig;
}
if (this.instanceConfig[config] !== undefined) {
return this.instanceConfig[config];
}
return undefined;
}
/**
* Sets the config for this instance.
*
* This allows you to override, at runtime, any configuration value as necessary.
*
* @param {string} config
* @param {any} value
* @param {boolean} persist
*/
set(config, value, persist) {
if (config === undefined) {
throw new Error('You must provide a configuration key to set');
}
this.instanceConfig[config] = value;
if (persist === true) {
this.element.dataset[config] = value;
this.localConfig[config] = value;
}
}
/**
* Refreshes the configuration from the element.
*
* This will allow you to make changes to the data config on a DOM level and re-apply them
* to the config on the JavaScript side.
*/
refresh() {
this.acceptedConfigs = this.getAcceptedConfigs();
this.instanceConfig = this.processConfig();
}
/**
* Determines the available configurations that can be set through the data config.
*
* If an instance has an `acceptAllDataConfigs` property, set to `true`, then all data
* attributes will be available as configuration values. This can be a security concern, so
* tread carefully.
*
* Otherwise, available configurations will be determined by the keys available in an object
* returned by a `defaults()` method in the instance.
*
* @returns {string[]|boolean}
*/
getAcceptedConfigs() {
if (
this.instance.acceptAllDataConfigs !== undefined
&& this.instance.acceptAllDataConfigs === true
) {
return true;
}
if (
this.instance.defaults !== undefined
&& typeof this.instance.defaults === 'function'
&& typeof this.instance.defaults() === 'object'
) {
return Object.keys(this.instance.defaults());
}
return false;
}
/**
* Returns the default values for the instance.
*
* This will be an empty object if the instance either does not have a `defaults()` method, or
* the method itself does not return an object.
*
* @returns {object}
*/
getDefaults() {
if (
this.instance.defaults !== undefined
&& typeof this.instance.defaults === 'function'
&& typeof this.instance.defaults() === 'object'
) {
return this.instance.defaults();
}
return {};
}
/**
* Processes the configuration.
*
* Loads up the defaults, then populates it with any configuration values provided by the data
* attributes, based on the rules of the accepted configurations.
*
* This configuration object is then cached and available through `config.get()` calls.
*
* @returns {object}
*/
processConfig() {
const config = this.getDefaults();
if (this.acceptedConfigs === false) {
return config;
}
/* eslint-disable */
for (const key in this.element.dataset) {
if (this.acceptedConfigs === true || this.acceptedConfigs.includes(key)) {
config[key] = this.coerceValue(this.element.dataset[key]);
}
}
for (const key in this.localConfig) {
if (this.acceptedConfigs === true || this.acceptedConfigs.includes(key)) {
config[key] = this.localConfig[key];
}
}
/* eslint-enable */
return config;
}
/**
* Coerces configuration values for JavaScript.
*
* Takes the string value returned from the data attribute and coerces it into a more suitable
* type for JavaScript processing.
*
* @param {*} value
* @returns {*}
*/
coerceValue(value) {
const stringValue = String(value);
// Null value
if (stringValue === 'null') {
return null;
}
// Undefined value
if (stringValue === 'undefined') {
return undefined;
}
// Base64 value
if (stringValue.startsWith('base64:')) {
const base64str = stringValue.replace(/^base64:/, '');
const decoded = atob(base64str);
return this.coerceValue(decoded);
}
// Boolean value
if (['true', 'yes'].includes(stringValue.toLowerCase())) {
return true;
}
if (['false', 'no'].includes(stringValue.toLowerCase())) {
return false;
}
// Numeric value
if (/^[-+]?[0-9]+(\.[0-9]+)?$/.test(stringValue)) {
return Number(stringValue);
}
// JSON value
try {
return this.snowboard.jsonParser().parse(stringValue);
} catch (e) {
return (stringValue === '') ? true : stringValue;
}
}
}

View File

@@ -0,0 +1,150 @@
import PluginBase from '../abstracts/PluginBase';
/**
* Provides flash messages for the CMS.
*
* Flash messages will pop up at the top center of the page and will remain for 7 seconds by default. Hovering over
* the message will reset and pause the timer. Clicking on the flash message will dismiss it.
*
* Arguments:
* - "message": The content of the flash message. HTML is accepted.
* - "type": The type of flash message. This is appended as a class to the flash message itself.
* - "duration": How long the flash message will stay visible for, in seconds. Default: 7 seconds.
*
* Usage:
* Snowboard.flash('This is a flash message', 'info', 8);
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Flash extends PluginBase {
/**
* Constructor.
*
* @param {string} message
* @param {string} type
* @param {Number} duration
*/
construct(message, type, duration) {
this.message = message;
this.type = type || 'default';
this.duration = Number(duration || 7);
if (this.duration < 0) {
throw new Error('Flash duration must be a positive number, or zero');
}
this.clear();
this.timer = null;
this.flashTimer = null;
this.create();
}
/**
* Defines dependencies.
*
* @returns {string[]}
*/
dependencies() {
return ['transition'];
}
/**
* Destructor.
*
* This will ensure the flash message is removed and timeout is cleared if the module is removed.
*/
destruct() {
if (this.timer !== null) {
window.clearTimeout(this.timer);
}
if (this.flashTimer) {
this.flashTimer.remove();
}
if (this.flash) {
this.flash.remove();
this.flash = null;
this.flashTimer = null;
}
super.destruct();
}
/**
* Creates the flash message.
*/
create() {
this.snowboard.globalEvent('flash.create', this);
this.flash = document.createElement('DIV');
this.flash.innerHTML = this.message;
this.flash.classList.add('flash-message', this.type);
this.flash.removeAttribute('data-control');
this.flash.addEventListener('click', () => this.remove());
this.flash.addEventListener('mouseover', () => this.stopTimer());
this.flash.addEventListener('mouseout', () => this.startTimer());
if (this.duration > 0) {
this.flashTimer = document.createElement('DIV');
this.flashTimer.classList.add('flash-timer');
this.flash.appendChild(this.flashTimer);
} else {
this.flash.classList.add('no-timer');
}
// Add to body
document.body.appendChild(this.flash);
this.snowboard.transition(this.flash, 'show', () => {
this.startTimer();
});
}
/**
* Removes the flash message.
*/
remove() {
this.snowboard.globalEvent('flash.remove', this);
this.stopTimer();
this.snowboard.transition(this.flash, 'hide', () => {
this.flash.remove();
this.flash = null;
this.destruct();
});
}
/**
* Clears all flash messages available on the page.
*/
clear() {
document.querySelectorAll('body > div.flash-message').forEach((element) => element.remove());
}
/**
* Starts the timer for this flash message.
*/
startTimer() {
if (this.duration === 0) {
return;
}
this.timerTrans = this.snowboard.transition(this.flashTimer, 'timeout', null, `${this.duration}.0s`, true);
this.timer = window.setTimeout(() => this.remove(), this.duration * 1000);
}
/**
* Resets the timer for this flash message.
*/
stopTimer() {
if (this.timerTrans) {
this.timerTrans.cancel();
}
if (this.timer) {
window.clearTimeout(this.timer);
}
}
}

View File

@@ -0,0 +1,72 @@
import Singleton from '../abstracts/Singleton';
/**
* Defines a default listener for flash events.
*
* Connects the Flash plugin to various events that use flash messages.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class FlashListener extends Singleton {
/**
* Defines dependenices.
*
* @returns {string[]}
*/
dependencies() {
return ['flash'];
}
/**
* Defines listeners.
*
* @returns {Object}
*/
listens() {
return {
ready: 'ready',
ajaxErrorMessage: 'ajaxErrorMessage',
ajaxFlashMessages: 'ajaxFlashMessages',
};
}
/**
* Do flash messages for PHP flash responses.
*/
ready() {
document.querySelectorAll('[data-control="flash-message"]').forEach((element) => {
this.snowboard.flash(
element.innerHTML,
element.dataset.flashType,
element.dataset.flashDuration,
);
element.remove();
});
}
/**
* Shows a flash message for AJAX errors.
*
* @param {string} message
* @returns {Boolean}
*/
ajaxErrorMessage(message) {
this.snowboard.flash(message, 'error');
return false;
}
/**
* Shows flash messages returned directly from AJAX functionality.
*
* @param {Object} messages
*/
ajaxFlashMessages(messages) {
Object.entries(messages).forEach((entry) => {
const [cssClass, message] = entry;
this.snowboard.flash(message, cssClass);
});
return false;
}
}

View File

@@ -0,0 +1,215 @@
import Singleton from '../abstracts/Singleton';
/**
* Adds AJAX-driven form validation to Snowboard requests.
*
* Documentation for this feature can be found here:
* https://wintercms.com/docs/snowboard/extras#ajax-validation
*
* @copyright 2022 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class FormValidation extends Singleton {
/**
* Constructor.
*/
construct() {
this.errorBags = [];
}
/**
* Defines listeners.
*
* @returns {Object}
*/
listens() {
return {
ready: 'ready',
ajaxStart: 'clearValidation',
ajaxValidationErrors: 'doValidation',
};
}
/**
* Ready event handler.
*/
ready() {
this.collectErrorBags(document);
}
/**
* Retrieves validation errors from an AJAX response and passes them through to the error bags.
*
* This handler returns false to cancel any further validation handling, and prevents the flash
* message that is displayed by default for field errors in AJAX requests from showing.
*
* @param {HTMLFormElement} form
* @param {Object} invalidFields
* @param {Request} request
* @returns {Boolean}
*/
doValidation(form, invalidFields, request) {
if (request.element && request.element.dataset.requestValidate === undefined) {
return null;
}
if (!form) {
return null;
}
const errorBags = this.errorBags.filter((errorBag) => errorBag.form === form);
errorBags.forEach((errorBag) => {
this.showErrorBag(errorBag, invalidFields);
});
return false;
}
/**
* Clears any validation errors in the given form.
*
* @param {Promise} promise
* @param {Request} request
* @returns {void}
*/
clearValidation(promise, request) {
if (request.element && request.element.dataset.requestValidate === undefined) {
return;
}
if (!request.form) {
return;
}
const errorBags = this.errorBags.filter((errorBag) => errorBag.form === request.form);
errorBags.forEach((errorBag) => {
this.hideErrorBag(errorBag);
});
}
/**
* Collects error bags (elements with "data-validate-error" attribute) and links them to a
* placeholder and form.
*
* The error bags will be initially hidden, and will only show when validation errors occur.
*
* @param {HTMLElement} rootNode
*/
collectErrorBags(rootNode) {
rootNode.querySelectorAll('[data-validate-error], [data-validate-for]').forEach((errorBag) => {
const form = errorBag.closest('form[data-request-validate]');
// If this error bag does not reside within a validating form, remove it
if (!form) {
errorBag.parentNode.removeChild(errorBag);
return;
}
// Find message list node, if available
let messageListElement = null;
if (errorBag.matches('[data-validate-error]')) {
messageListElement = errorBag.querySelector('[data-message]');
}
// Create a placeholder node
const placeholder = document.createComment('');
// Register error bag and replace with placeholder
const errorBagData = {
element: errorBag,
form,
validateFor: (errorBag.dataset.validateFor)
? errorBag.dataset.validateFor.split(/\s*,\s*/)
: '*',
placeholder,
messageListElement: (messageListElement)
? messageListElement.cloneNode(true)
: null,
messageListAnchor: null,
customMessage: (errorBag.dataset.validateFor)
? (errorBag.textContent !== '' || errorBag.childNodes.length > 0)
: false,
};
// If an message list element exists, create another placeholder to act as an anchor point
if (messageListElement) {
const messageListAnchor = document.createComment('');
messageListElement.parentNode.replaceChild(messageListAnchor, messageListElement);
errorBagData.messageListAnchor = messageListAnchor;
}
errorBag.parentNode.replaceChild(placeholder, errorBag);
this.errorBags.push(errorBagData);
});
}
/**
* Hides an error bag, replacing the error messages with a placeholder node.
*
* @param {Object} errorBag
*/
hideErrorBag(errorBag) {
if (errorBag.element.isConnected) {
errorBag.element.parentNode.replaceChild(errorBag.placeholder, errorBag.element);
}
}
/**
* Shows an error bag with the given invalid fields.
*
* @param {Object} errorBag
* @param {Object} invalidFields
*/
showErrorBag(errorBag, invalidFields) {
if (!this.errorBagValidatesField(errorBag, invalidFields)) {
return;
}
if (!errorBag.element.isConnected) {
errorBag.placeholder.parentNode.replaceChild(errorBag.element, errorBag.placeholder);
}
if (errorBag.validateFor !== '*') {
if (!errorBag.customMessage) {
const firstField = Object.keys(invalidFields)
.filter((field) => errorBag.validateFor.includes(field))
.shift();
[errorBag.element.innerHTML] = invalidFields[firstField];
}
} else if (errorBag.messageListElement) {
// Remove previous error messages
errorBag.element.querySelectorAll('[data-validation-message]').forEach((message) => {
message.parentNode.removeChild(message);
});
Object.entries(invalidFields).forEach((entry) => {
const [, errors] = entry;
errors.forEach((error) => {
const messageElement = errorBag.messageListElement.cloneNode(true);
messageElement.dataset.validationMessage = '';
messageElement.innerHTML = error;
errorBag.messageListAnchor.after(messageElement);
});
});
} else {
[errorBag.element.innerHTML] = invalidFields[Object.keys(invalidFields).shift()];
}
}
/**
* Determines if a given error bag applies for the given invalid fields.
*
* @param {Object} errorBag
* @param {Object} invalidFields
* @returns {Boolean}
*/
errorBagValidatesField(errorBag, invalidFields) {
if (errorBag.validateFor === '*') {
return true;
}
return Object.keys(invalidFields)
.filter((field) => errorBag.validateFor.includes(field))
.length > 0;
}
}

View File

@@ -0,0 +1,94 @@
import Singleton from '../abstracts/Singleton';
/**
* Displays a stripe at the top of the page that indicates loading.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class StripeLoader extends Singleton {
/**
* Defines dependenices.
*
* @returns {string[]}
*/
dependencies() {
return ['request'];
}
/**
* Defines listeners.
*
* @returns {Object}
*/
listens() {
return {
ready: 'ready',
ajaxStart: 'ajaxStart',
};
}
ready() {
this.counter = 0;
this.createStripe();
}
ajaxStart(promise, request) {
if (request.loading === false || request.options.stripe === false) {
return;
}
this.show();
promise.then(() => {
this.hide();
}).catch(() => {
this.hide();
});
}
createStripe() {
this.indicator = document.createElement('DIV');
this.stripe = document.createElement('DIV');
this.stripeLoaded = document.createElement('DIV');
this.indicator.classList.add('stripe-loading-indicator', 'loaded');
this.stripe.classList.add('stripe');
this.stripeLoaded.classList.add('stripe-loaded');
this.indicator.appendChild(this.stripe);
this.indicator.appendChild(this.stripeLoaded);
document.body.appendChild(this.indicator);
}
show() {
this.counter += 1;
const newStripe = this.stripe.cloneNode(true);
this.indicator.appendChild(newStripe);
this.stripe.remove();
this.stripe = newStripe;
if (this.counter > 1) {
return;
}
this.indicator.classList.remove('loaded');
document.body.classList.add('wn-loading');
}
hide(force) {
this.counter -= 1;
if (force === true) {
this.counter = 0;
}
if (this.counter <= 0) {
this.indicator.classList.add('loaded');
document.body.classList.remove('wn-loading');
}
}
}

View File

@@ -0,0 +1,38 @@
import Singleton from '../abstracts/Singleton';
/**
* Embeds the "extras" stylesheet into the page, if it is not loaded through the theme.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class StylesheetLoader extends Singleton {
/**
* Defines listeners.
*
* @returns {Object}
*/
listens() {
return {
ready: 'ready',
};
}
ready() {
let stylesLoaded = false;
// Determine if stylesheet is already loaded
document.querySelectorAll('link[rel="stylesheet"]').forEach((css) => {
if (css.href.endsWith('/modules/system/assets/css/snowboard.extras.css')) {
stylesLoaded = true;
}
});
if (!stylesLoaded) {
const stylesheet = document.createElement('link');
stylesheet.setAttribute('rel', 'stylesheet');
stylesheet.setAttribute('href', this.snowboard.url().asset('/modules/system/assets/css/snowboard.extras.css'));
document.head.appendChild(stylesheet);
}
}
}

View File

@@ -0,0 +1,206 @@
import PluginBase from '../abstracts/PluginBase';
/**
* Provides transition support for elements.
*
* Transition allows CSS transitions to be controlled and callbacks to be run once completed. It works similar to Vue
* transitions with 3 stages of transition, and classes assigned to the element with the transition name suffixed with
* the stage of transition:
*
* - `in`: A class assigned to the element for the first frame of the transition, removed afterwards. This should be
* used to define the initial state of the transition.
* - `active`: A class assigned to the element for the duration of the transition. This should be used to define the
* transition itself.
* - `out`: A class assigned to the element after the first frame of the transition and kept to the end of the
* transition. This should define the end state of the transition.
*
* Usage:
* Snowboard.transition(document.element, 'transition', () => {
* console.log('Remove element after 7 seconds');
* this.remove();
* }, '7s');
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Transition extends PluginBase {
/**
* Constructor.
*
* @param {HTMLElement} element The element to transition
* @param {string} transition The name of the transition, this prefixes the stages of transition.
* @param {Function} callback An optional callback to call when the transition ends.
* @param {Number} duration An optional override on the transition duration. Must be specified as 's' (secs) or 'ms' (msecs).
* @param {Boolean} trailTo If true, the "out" class will remain after the end of the transition.
*/
construct(element, transition, callback, duration, trailTo) {
if (element instanceof HTMLElement === false) {
throw new Error('A HTMLElement must be provided for transitioning');
}
this.element = element;
if (typeof transition !== 'string') {
throw new Error('Transition name must be specified as a string');
}
this.transition = transition;
if (callback && typeof callback !== 'function') {
throw new Error('Callback must be a valid function');
}
this.callback = callback;
if (duration) {
this.duration = this.parseDuration(duration);
} else {
this.duration = null;
}
this.trailTo = (trailTo === true);
this.doTransition();
}
/**
* Maps event classes to the given transition state.
*
* @param {...any} args
* @returns {Array}
*/
eventClasses(...args) {
const eventClasses = {
in: `${this.transition}-in`,
active: `${this.transition}-active`,
out: `${this.transition}-out`,
};
if (args.length === 0) {
return Object.values(eventClasses);
}
const returnClasses = [];
Object.entries(eventClasses).forEach((entry) => {
const [key, value] = entry;
if (args.indexOf(key) !== -1) {
returnClasses.push(value);
}
});
return returnClasses;
}
/**
* Executes the transition.
*
* @returns {void}
*/
doTransition() {
// Add duration override
if (this.duration !== null) {
this.element.style.transitionDuration = this.duration;
}
this.resetClasses();
// Start transition - show "in" and "active" classes
this.eventClasses('in', 'active').forEach((eventClass) => {
this.element.classList.add(eventClass);
});
window.requestAnimationFrame(() => {
// Ensure a transition exists
if (window.getComputedStyle(this.element)['transition-duration'] !== '0s') {
// Listen for the transition to end
this.element.addEventListener('transitionend', () => this.onTransitionEnd(), {
once: true,
});
window.requestAnimationFrame(() => {
this.element.classList.remove(this.eventClasses('in')[0]);
this.element.classList.add(this.eventClasses('out')[0]);
});
} else {
this.resetClasses();
if (this.callback) {
this.callback.apply(this.element);
}
this.destruct();
}
});
}
/**
* Callback function when the transition ends.
*
* When a transition ends, the instance of the transition is automatically destructed.
*
* @returns {void}
*/
onTransitionEnd() {
this.eventClasses('active', (!this.trailTo) ? 'out' : '').forEach((eventClass) => {
this.element.classList.remove(eventClass);
});
if (this.callback) {
this.callback.apply(this.element);
}
// Remove duration override
if (this.duration !== null) {
this.element.style.transitionDuration = null;
}
this.destruct();
}
/**
* Cancels a transition.
*
* @returns {void}
*/
cancel() {
this.element.removeEventListener('transitionend', () => this.onTransitionEnd, {
once: true,
});
this.resetClasses();
// Remove duration override
if (this.duration !== null) {
this.element.style.transitionDuration = null;
}
// Call destructor
this.destruct();
}
/**
* Resets the classes, removing any transition classes.
*
* @returns {void}
*/
resetClasses() {
this.eventClasses().forEach((eventClass) => {
this.element.classList.remove(eventClass);
});
}
/**
* Parses a given duration and converts it to a "ms" value.
*
* @param {String} duration
* @returns {String}
*/
parseDuration(duration) {
const parsed = /^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(duration);
const amount = Number(parsed[1]);
const unit = (parsed[3] === 's')
? 'sec'
: 'msec';
return (unit === 'sec')
? `${amount * 1000}ms`
: `${Math.floor(amount)}ms`;
}
}

View File

@@ -0,0 +1,43 @@
/**
* Internal proxy for Snowboard.
*
* This handler wraps the Snowboard instance that is passed to the constructor of plugin instances.
* It prevents access to the following methods:
* - `attachAbstracts`: No need to attach abstracts again.
* - `loadUtilties`: No need to load utilities again.
* - `initialise`: Snowboard is already initialised.
* - `initialiseSingletons`: Singletons are already initialised.
*/
export default {
get(target, prop, receiver) {
if (typeof prop === 'string') {
const propLower = prop.toLowerCase();
if (['attachAbstracts', 'loadUtilities', 'initialise', 'initialiseSingletons'].includes(prop)) {
throw new Error(`You cannot use the "${prop}" Snowboard method within a plugin.`);
}
if (target.hasPlugin(propLower)) {
return (...params) => Reflect.get(target, 'plugins')[propLower].getInstance(...params);
}
}
return Reflect.get(target, prop, receiver);
},
has(target, prop) {
if (typeof prop === 'string') {
const propLower = prop.toLowerCase();
if (['attachAbstracts', 'loadUtilities', 'initialise', 'initialiseSingletons'].includes(prop)) {
return false;
}
if (target.hasPlugin(propLower)) {
return true;
}
}
return Reflect.has(target, prop);
},
};

View File

@@ -0,0 +1,293 @@
import PluginBase from '../abstracts/PluginBase';
import Singleton from '../abstracts/Singleton';
import InnerProxyHandler from './InnerProxyHandler';
/**
* Plugin loader class.
*
* This is a provider (factory) class for a single plugin and provides the link between Snowboard framework functionality
* and the underlying plugin instances. It also provides some basic mocking of plugin methods for testing.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class PluginLoader {
/**
* Constructor.
*
* Binds the Winter framework to the instance.
*
* @param {string} name
* @param {Snowboard} snowboard
* @param {PluginBase} instance
*/
constructor(name, snowboard, instance) {
this.name = name;
this.snowboard = new Proxy(
snowboard,
InnerProxyHandler,
);
this.instance = instance;
// Freeze instance that has been inserted into this loader
Object.freeze(this.instance);
this.instances = [];
this.singleton = {
initialised: false,
};
// Prevent further extension of the singleton status object
Object.seal(this.singleton);
this.mocks = {};
this.originalFunctions = {};
// Freeze loader itself
Object.freeze(PluginLoader.prototype);
Object.freeze(this);
}
/**
* Determines if the current plugin has a specific method available.
*
* Returns false if the current plugin is a callback function.
*
* @param {string} methodName
* @returns {boolean}
*/
hasMethod(methodName) {
if (this.isFunction()) {
return false;
}
return (typeof this.instance.prototype[methodName] === 'function');
}
/**
* Calls a prototype method for a plugin. This should generally be used for "static" calls.
*
* @param {string} methodName
* @param {...} args
* @returns {any}
*/
callMethod(...parameters) {
if (this.isFunction()) {
return null;
}
const args = parameters;
const methodName = args.shift();
return this.instance.prototype[methodName](args);
}
/**
* Returns an instance of the current plugin.
*
* - If this is a callback function plugin, the function will be returned.
* - If this is a singleton, the single instance of the plugin will be returned.
*
* @returns {PluginBase|Function}
*/
getInstance(...parameters) {
if (this.isFunction()) {
return this.instance(...parameters);
}
if (!this.dependenciesFulfilled()) {
const unmet = this.getDependencies().filter((item) => !this.snowboard.getPluginNames().includes(item));
throw new Error(`The "${this.name}" plugin requires the following plugins: ${unmet.join(', ')}`);
}
if (this.isSingleton()) {
if (this.instances.length === 0) {
this.initialiseSingleton(...parameters);
}
// Apply mocked methods
if (Object.keys(this.mocks).length > 0) {
Object.entries(this.originalFunctions).forEach((entry) => {
const [methodName, callback] = entry;
this.instances[0][methodName] = callback;
});
Object.entries(this.mocks).forEach((entry) => {
const [methodName, callback] = entry;
this.instances[0][methodName] = (...params) => callback(this, ...params);
});
}
return this.instances[0];
}
// Apply mocked methods to prototype
if (Object.keys(this.mocks).length > 0) {
Object.entries(this.originalFunctions).forEach((entry) => {
const [methodName, callback] = entry;
this.instance.prototype[methodName] = callback;
});
Object.entries(this.mocks).forEach((entry) => {
const [methodName, callback] = entry;
this.instance.prototype[methodName] = (...params) => callback(this, ...params);
});
}
const newInstance = new this.instance(this.snowboard, ...parameters);
newInstance.detach = () => this.instances.splice(this.instances.indexOf(newInstance), 1);
newInstance.construct(...parameters);
this.instances.push(newInstance);
return newInstance;
}
/**
* Gets all instances of the current plugin.
*
* If this plugin is a callback function plugin, an empty array will be returned.
*
* @returns {PluginBase[]}
*/
getInstances() {
if (this.isFunction()) {
return [];
}
return this.instances;
}
/**
* Determines if the current plugin is a simple callback function.
*
* @returns {boolean}
*/
isFunction() {
return (typeof this.instance === 'function' && this.instance.prototype instanceof PluginBase === false);
}
/**
* Determines if the current plugin is a singleton.
*
* @returns {boolean}
*/
isSingleton() {
return this.instance.prototype instanceof Singleton === true;
}
/**
* Determines if a singleton has been initialised.
*
* Normal plugins will always return true.
*
* @returns {boolean}
*/
isInitialised() {
if (!this.isSingleton()) {
return true;
}
return this.singleton.initialised;
}
/**
* Initialises the singleton instance.
*
* @returns {void}
*/
initialiseSingleton(...parameters) {
if (!this.isSingleton()) {
return;
}
const newInstance = new this.instance(this.snowboard, ...parameters);
newInstance.detach = () => this.instances.splice(this.instances.indexOf(newInstance), 1);
newInstance.construct(...parameters);
this.instances.push(newInstance);
this.singleton.initialised = true;
}
/**
* Gets the dependencies of the current plugin.
*
* @returns {string[]}
*/
getDependencies() {
// Callback functions cannot have dependencies.
if (this.isFunction()) {
return [];
}
// No dependency method specified.
if (typeof this.instance.prototype.dependencies !== 'function') {
return [];
}
return this.instance.prototype.dependencies().map((item) => item.toLowerCase());
}
/**
* Determines if the current plugin has all its dependencies fulfilled.
*
* @returns {boolean}
*/
dependenciesFulfilled() {
const dependencies = this.getDependencies();
let fulfilled = true;
dependencies.forEach((plugin) => {
if (!this.snowboard.hasPlugin(plugin)) {
fulfilled = false;
}
});
return fulfilled;
}
/**
* Allows a method of an instance to be mocked for testing.
*
* This mock will be applied for the life of an instance. For singletons, the mock will be applied for the life
* of the page.
*
* Mocks cannot be applied to callback function plugins.
*
* @param {string} methodName
* @param {Function} callback
*/
mock(methodName, callback) {
if (this.isFunction()) {
return;
}
if (!this.instance.prototype[methodName]) {
throw new Error(`Function "${methodName}" does not exist and cannot be mocked`);
}
this.mocks[methodName] = callback;
this.originalFunctions[methodName] = this.instance.prototype[methodName];
if (this.isSingleton() && this.instances.length === 0) {
this.initialiseSingleton();
// Apply mocked method
this.instances[0][methodName] = (...parameters) => callback(this, ...parameters);
}
}
/**
* Removes a mock callback from future instances.
*
* @param {string} methodName
*/
unmock(methodName) {
if (this.isFunction()) {
return;
}
if (!this.mocks[methodName]) {
return;
}
if (this.isSingleton()) {
this.instances[0][methodName] = this.originalFunctions[methodName];
}
delete this.mocks[methodName];
delete this.originalFunctions[methodName];
}
}

View File

@@ -0,0 +1,25 @@
export default {
get(target, prop, receiver) {
if (typeof prop === 'string') {
const propLower = prop.toLowerCase();
if (target.hasPlugin(propLower)) {
return (...params) => Reflect.get(target, 'plugins')[propLower].getInstance(...params);
}
}
return Reflect.get(target, prop, receiver);
},
has(target, prop) {
if (typeof prop === 'string') {
const propLower = prop.toLowerCase();
if (target.hasPlugin(propLower)) {
return true;
}
}
return Reflect.has(target, prop);
},
};

View File

@@ -0,0 +1,595 @@
import PluginBase from '../abstracts/PluginBase';
import Singleton from '../abstracts/Singleton';
import PluginLoader from './PluginLoader';
import Cookie from '../utilities/Cookie';
import JsonParser from '../utilities/JsonParser';
import Sanitizer from '../utilities/Sanitizer';
import Url from '../utilities/Url';
/**
* Snowboard - the Winter JavaScript framework.
*
* This class represents the base of a modern take on the Winter JS framework, being fully extensible and taking advantage
* of modern JavaScript features by leveraging the Laravel Mix compilation framework. It also is coded up to remove the
* dependency of jQuery.
*
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
* @link https://wintercms.com/docs/snowboard/introduction
*/
export default class Snowboard {
/**
* Constructor.
*
* @param {boolean} autoSingletons Automatically load singletons when DOM is ready. Default: `true`.
* @param {boolean} debug Whether debugging logs should be shown. Default: `false`.
*/
constructor(autoSingletons, debug) {
this.debugEnabled = (typeof debug === 'boolean' && debug === true);
this.autoInitSingletons = (typeof autoSingletons === 'boolean' && autoSingletons === false);
this.plugins = {};
this.listeners = {};
this.foundBaseUrl = null;
this.readiness = {
dom: false,
};
// Seal readiness from being added to further, but allow the properties to be modified.
Object.seal(this.readiness);
this.attachAbstracts();
// Freeze the Snowboard class to prevent further modifications.
Object.freeze(Snowboard.prototype);
Object.freeze(this);
this.loadUtilities();
this.initialise();
this.debug('Snowboard framework initialised');
}
/**
* Attaches abstract classes as properties of the Snowboard class.
*
* This will allow Javascript functionality with no build process to still extend these abstracts by prefixing
* them with "Snowboard".
*
* ```
* class MyClass extends Snowboard.PluginBase {
* ...
* }
* ```
*/
attachAbstracts() {
this.PluginBase = PluginBase;
this.Singleton = Singleton;
Object.freeze(this.PluginBase.prototype);
Object.freeze(this.PluginBase);
Object.freeze(this.Singleton.prototype);
Object.freeze(this.Singleton);
}
/**
* Loads the default utilities.
*/
loadUtilities() {
this.addPlugin('cookie', Cookie);
this.addPlugin('jsonParser', JsonParser);
this.addPlugin('sanitizer', Sanitizer);
this.addPlugin('url', Url);
}
/**
* Initialises the framework.
*
* Attaches a listener for the DOM being ready and triggers a global "ready" event for plugins to begin attaching
* themselves to the DOM.
*/
initialise() {
window.addEventListener('DOMContentLoaded', () => {
if (this.autoInitSingletons) {
this.initialiseSingletons();
}
this.globalEvent('ready');
this.readiness.dom = true;
});
}
/**
* Initialises an instance of every singleton.
*/
initialiseSingletons() {
Object.values(this.plugins).forEach((plugin) => {
if (plugin.isSingleton() && plugin.dependenciesFulfilled()) {
plugin.initialiseSingleton();
}
});
}
/**
* Adds a plugin to the framework.
*
* Plugins are the cornerstone for additional functionality for Snowboard. A plugin must either be an ES2015 class
* that extends the PluginBase or Singleton abstract classes, or a simple callback function.
*
* When a plugin is added, it is automatically assigned as a new magic method in the Snowboard class using the name
* parameter, and can be called via this method. This method will always be the "lowercase" version of this name.
*
* For example, if a plugin is assigned to the name "myPlugin", it can be called via `Snowboard.myplugin()`.
*
* @param {string} name
* @param {PluginBase|Function} instance
*/
addPlugin(name, instance) {
const lowerName = name.toLowerCase();
if (this.hasPlugin(lowerName)) {
throw new Error(`A plugin called "${name}" is already registered.`);
}
if (typeof instance !== 'function' && instance instanceof PluginBase === false) {
throw new Error('The provided plugin must extend the PluginBase class, or must be a callback function.');
}
if (this[name] !== undefined || this[lowerName] !== undefined) {
throw new Error('The given name is already in use for a property or method of the Snowboard class.');
}
this.plugins[lowerName] = new PluginLoader(lowerName, this, instance);
this.debug(`Plugin "${name}" registered`);
// Check if any singletons now have their dependencies fulfilled, and fire their "ready" handler if we're
// in a ready state.
Object.values(this.getPlugins()).forEach((plugin) => {
if (
plugin.isSingleton()
&& !plugin.isInitialised()
&& plugin.dependenciesFulfilled()
&& plugin.hasMethod('listens')
&& Object.keys(plugin.callMethod('listens')).includes('ready')
&& this.readiness.dom
) {
const readyMethod = plugin.callMethod('listens').ready;
plugin.callMethod(readyMethod);
}
});
}
/**
* Removes a plugin.
*
* Removes a plugin from Snowboard, calling the destructor method for all active instances of the plugin.
*
* @param {string} name
* @returns {void}
*/
removePlugin(name) {
const lowerName = name.toLowerCase();
if (!this.hasPlugin(lowerName)) {
this.debug(`Plugin "${name}" already removed`);
return;
}
// Call destructors for all instances
this.plugins[lowerName].getInstances().forEach((instance) => {
instance.destruct();
});
delete this.plugins[lowerName];
delete this[lowerName];
delete this[name];
this.debug(`Plugin "${name}" removed`);
}
/**
* Determines if a plugin has been registered and is active.
*
* A plugin that is still waiting for dependencies to be registered will not be active.
*
* @param {string} name
* @returns {boolean}
*/
hasPlugin(name) {
const lowerName = name.toLowerCase();
return (this.plugins[lowerName] !== undefined);
}
/**
* Returns an array of registered plugins as PluginLoader objects.
*
* @returns {PluginLoader[]}
*/
getPlugins() {
return this.plugins;
}
/**
* Returns an array of registered plugins, by name.
*
* @returns {string[]}
*/
getPluginNames() {
return Object.keys(this.plugins);
}
/**
* Returns a PluginLoader object of a given plugin.
*
* @returns {PluginLoader}
*/
getPlugin(name) {
const lowerName = name.toLowerCase();
if (!this.hasPlugin(lowerName)) {
throw new Error(`No plugin called "${lowerName}" has been registered.`);
}
return this.plugins[lowerName];
}
/**
* Finds all plugins that listen to the given event.
*
* This works for both normal and promise events. It does NOT check that the plugin's listener actually exists.
*
* @param {string} eventName
* @returns {string[]} The name of the plugins that are listening to this event.
*/
listensToEvent(eventName) {
const plugins = [];
Object.entries(this.plugins).forEach((entry) => {
const [name, plugin] = entry;
if (plugin.isFunction()) {
return;
}
if (!plugin.dependenciesFulfilled()) {
return;
}
if (!plugin.hasMethod('listens')) {
return;
}
const listeners = plugin.callMethod('listens');
if (typeof listeners[eventName] === 'string' || typeof listeners[eventName] === 'function') {
plugins.push(name);
}
});
return plugins;
}
/**
* Add a simple ready listener.
*
* Synonymous with jQuery's "$(document).ready()" functionality, this allows inline scripts to
* attach themselves to Snowboard immediately but only fire when the DOM is ready.
*
* @param {Function} callback
*/
ready(callback) {
if (this.readiness.dom) {
callback();
}
this.on('ready', callback);
}
/**
* Adds a simple listener for an event.
*
* This can be used for ad-hoc scripts that don't need a full plugin. The given callback will be
* called when the event name provided fires. This works for both normal and Promise events. For
* a Promise event, your callback must return a Promise.
*
* @param {String} eventName
* @param {Function} callback
*/
on(eventName, callback) {
if (!this.listeners[eventName]) {
this.listeners[eventName] = [];
}
if (!this.listeners[eventName].includes(callback)) {
this.listeners[eventName].push(callback);
}
}
/**
* Removes a simple listener for an event.
*
* @param {String} eventName
* @param {Function} callback
*/
off(eventName, callback) {
if (!this.listeners[eventName]) {
return;
}
const index = this.listeners[eventName].indexOf(callback);
if (index === -1) {
return;
}
this.listeners[eventName].splice(index, 1);
}
/**
* Calls a global event to all registered plugins.
*
* If any plugin returns a `false`, the event is considered cancelled.
*
* @param {string} eventName
* @returns {boolean} If event was not cancelled
*/
globalEvent(eventName, ...parameters) {
this.debug(`Calling global event "${eventName}"`, ...parameters);
// Find plugins listening to the event.
const listeners = this.listensToEvent(eventName);
if (listeners.length === 0) {
this.debug(`No listeners found for global event "${eventName}"`);
}
this.debug(`Listeners found for global event "${eventName}": ${listeners.join(', ')}`);
let cancelled = false;
listeners.forEach((name) => {
const plugin = this.getPlugin(name);
if (plugin.isFunction()) {
return;
}
if (plugin.isSingleton() && plugin.getInstances().length === 0) {
plugin.initialiseSingleton();
}
const listenMethod = plugin.callMethod('listens')[eventName];
// Call event handler methods for all plugins, if they have a method specified for the event.
plugin.getInstances().forEach((instance) => {
// If a plugin has cancelled the event, no further plugins are considered.
if (cancelled) {
return;
}
if (typeof listenMethod === 'function') {
try {
const result = listenMethod.apply(instance, parameters);
if (result === false) {
cancelled = true;
}
} catch (error) {
this.error(
`Error thrown in "${eventName}" event by "${name}" plugin.`,
error,
);
}
} else if (typeof listenMethod === 'string') {
if (!instance[listenMethod]) {
throw new Error(`Missing "${listenMethod}" method in "${name}" plugin`);
}
try {
if (instance[listenMethod](...parameters) === false) {
cancelled = true;
this.debug(`Global event "${eventName}" cancelled by "${name}" plugin`);
}
} catch (error) {
this.error(
`Error thrown in "${eventName}" event by "${name}" plugin.`,
error,
);
}
} else {
this.error(`Listen method for "${eventName}" event in "${name}" plugin is not a function or string.`);
}
});
});
// Find ad-hoc listeners for this event.
if (!cancelled && this.listeners[eventName] && this.listeners[eventName].length > 0) {
this.debug(`Found ${this.listeners[eventName].length} ad-hoc listener(s) for global event "${eventName}"`);
this.listeners[eventName].forEach((listener) => {
// If a listener has cancelled the event, no further listeners are considered.
if (cancelled) {
return;
}
try {
if (listener(...parameters) === false) {
cancelled = true;
this.debug(`Global event "${eventName} cancelled by an ad-hoc listener.`);
}
} catch (error) {
this.error(
`Error thrown in "${eventName}" event by an ad-hoc listener.`,
error,
);
}
});
}
return !cancelled;
}
/**
* Calls a global event to all registered plugins, expecting a Promise to be returned by all.
*
* This collates all plugins responses into one large Promise that either expects all to be resolved, or one to reject.
* If no listeners are found, a resolved Promise is returned.
*
* @param {string} eventName
*/
globalPromiseEvent(eventName, ...parameters) {
this.debug(`Calling global promise event "${eventName}"`);
// Find plugins listening to this event.
const listeners = this.listensToEvent(eventName);
if (listeners.length === 0) {
this.debug(`No listeners found for global promise event "${eventName}"`);
}
this.debug(`Listeners found for global promise event "${eventName}": ${listeners.join(', ')}`);
const promises = [];
listeners.forEach((name) => {
const plugin = this.getPlugin(name);
if (plugin.isFunction()) {
return;
}
if (plugin.isSingleton() && plugin.getInstances().length === 0) {
plugin.initialiseSingleton();
}
const listenMethod = plugin.callMethod('listens')[eventName];
// Call event handler methods for all plugins, if they have a method specified for the event.
plugin.getInstances().forEach((instance) => {
if (typeof listenMethod === 'function') {
try {
const instancePromise = listenMethod.apply(instance, parameters);
if (instancePromise instanceof Promise === false) {
return;
}
promises.push(instancePromise);
} catch (error) {
this.error(
`Error thrown in "${eventName}" event by "${name}" plugin.`,
error,
);
}
} else if (typeof listenMethod === 'string') {
if (!instance[listenMethod]) {
throw new Error(`Missing "${listenMethod}" method in "${name}" plugin`);
}
try {
const instancePromise = instance[listenMethod](...parameters);
if (instancePromise instanceof Promise === false) {
return;
}
promises.push(instancePromise);
} catch (error) {
this.error(
`Error thrown in "${eventName}" promise event by "${name}" plugin.`,
error,
);
}
} else {
this.error(`Listen method for "${eventName}" event in "${name}" plugin is not a function or string.`);
}
});
});
// Find ad-hoc listeners listening to this event.
if (this.listeners[eventName] && this.listeners[eventName].length > 0) {
this.debug(`Found ${this.listeners[eventName].length} ad-hoc listener(s) for global promise event "${eventName}"`);
this.listeners[eventName].forEach((listener) => {
try {
const listenerPromise = listener(...parameters);
if (listenerPromise instanceof Promise === false) {
return;
}
promises.push(listenerPromise);
} catch (error) {
this.error(
`Error thrown in "${eventName}" promise event by an ad-hoc listener.`,
error,
);
}
});
}
if (promises.length === 0) {
return Promise.resolve();
}
return Promise.all(promises);
}
/**
* Log a styled message in the console.
*
* Includes parameters and a stack trace.
*
* @returns {void}
*/
logMessage(color, bold, message, ...parameters) {
/* eslint-disable */
console.groupCollapsed(
'%c[Snowboard]',
`color: ${color}; font-weight: ${(bold) ? 'bold' : 'normal'};`,
message
);
if (parameters.length) {
console.groupCollapsed(
`%cParameters %c(${parameters.length})`,
'color: rgb(45, 167, 199); font-weight: bold;',
'color: rgb(88, 88, 88); font-weight: normal;'
);
let index = 0;
parameters.forEach((param) => {
index += 1;
console.log(`%c${index}:`, 'color: rgb(88, 88, 88); font-weight: normal;', param);
});
console.groupEnd();
console.groupCollapsed('%cTrace', 'color: rgb(45, 167, 199); font-weight: bold;');
console.trace();
console.groupEnd();
} else {
console.trace();
}
console.groupEnd();
/* eslint-enable */
}
/**
* Log a message.
*
* @returns {void}
*/
log(message, ...parameters) {
this.logMessage('rgb(45, 167, 199)', false, message, ...parameters);
}
/**
* Log a debug message.
*
* These messages are only shown when debugging is enabled.
*
* @returns {void}
*/
debug(message, ...parameters) {
if (!this.debugEnabled) {
return;
}
this.logMessage('rgb(45, 167, 199)', false, message, ...parameters);
}
/**
* Logs an error message.
*
* @returns {void}
*/
error(message, ...parameters) {
this.logMessage('rgb(229, 35, 35)', true, message, ...parameters);
}
}

View File

@@ -0,0 +1,21 @@
import Flash from './extras/Flash';
import Transition from './extras/Transition';
import AttachLoading from './extras/AttachLoading';
import StripeLoader from './extras/StripeLoader';
import StylesheetLoader from './extras/StylesheetLoader';
import AssetLoader from './extras/AssetLoader';
import DataConfig from './extras/DataConfig';
if (window.Snowboard === undefined) {
throw new Error('Snowboard must be loaded in order to use the extra plugins.');
}
((Snowboard) => {
Snowboard.addPlugin('assetLoader', AssetLoader);
Snowboard.addPlugin('dataConfig', DataConfig);
Snowboard.addPlugin('extrasStyles', StylesheetLoader);
Snowboard.addPlugin('transition', Transition);
Snowboard.addPlugin('flash', Flash);
Snowboard.addPlugin('attachLoading', AttachLoading);
Snowboard.addPlugin('stripeLoader', StripeLoader);
})(window.Snowboard);

View File

@@ -0,0 +1,14 @@
import Snowboard from './main/Snowboard';
import ProxyHandler from './main/ProxyHandler';
((window) => {
const snowboard = new Proxy(
new Snowboard(true, true),
ProxyHandler,
);
// Cover all aliases
window.snowboard = snowboard;
window.Snowboard = snowboard;
window.SnowBoard = snowboard;
})(window);

View File

@@ -0,0 +1,14 @@
import Snowboard from './main/Snowboard';
import ProxyHandler from './main/ProxyHandler';
((window) => {
const snowboard = new Proxy(
new Snowboard(),
ProxyHandler,
);
// Cover all aliases
window.snowboard = snowboard;
window.Snowboard = snowboard;
window.SnowBoard = snowboard;
})(window);

View File

@@ -0,0 +1,9 @@
import AttributeRequest from './ajax/handlers/AttributeRequest';
if (window.Snowboard === undefined) {
throw new Error('Snowboard must be loaded in order to use the HTML data attribute AJAX request feature.');
}
((Snowboard) => {
Snowboard.addPlugin('attributeRequest', AttributeRequest);
})(window.Snowboard);

View File

@@ -0,0 +1,25 @@
import Flash from './extras/Flash';
import FlashListener from './extras/FlashListener';
import FormValidation from './extras/FormValidation';
import Transition from './extras/Transition';
import AttachLoading from './extras/AttachLoading';
import StripeLoader from './extras/StripeLoader';
import StylesheetLoader from './extras/StylesheetLoader';
import AssetLoader from './extras/AssetLoader';
import DataConfig from './extras/DataConfig';
if (window.Snowboard === undefined) {
throw new Error('Snowboard must be loaded in order to use the extra plugins.');
}
((Snowboard) => {
Snowboard.addPlugin('assetLoader', AssetLoader);
Snowboard.addPlugin('dataConfig', DataConfig);
Snowboard.addPlugin('extrasStyles', StylesheetLoader);
Snowboard.addPlugin('transition', Transition);
Snowboard.addPlugin('flash', Flash);
Snowboard.addPlugin('flashListener', FlashListener);
Snowboard.addPlugin('formValidation', FormValidation);
Snowboard.addPlugin('attachLoading', AttachLoading);
Snowboard.addPlugin('stripeLoader', StripeLoader);
})(window.Snowboard);

View File

@@ -0,0 +1,9 @@
import Request from './ajax/Request';
if (window.Snowboard === undefined) {
throw new Error('Snowboard must be loaded in order to use the Javascript AJAX request feature.');
}
((Snowboard) => {
Snowboard.addPlugin('request', Request);
})(window.Snowboard);

View File

@@ -0,0 +1,134 @@
import BaseCookie from 'js-cookie';
import Singleton from '../abstracts/Singleton';
/**
* Cookie utility.
*
* This utility is a thin wrapper around the "js-cookie" library.
*
* @see https://github.com/js-cookie/js-cookie
* @copyright 2021 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Cookie extends Singleton {
construct() {
this.defaults = {
expires: null,
path: '/',
domain: null,
secure: false,
sameSite: 'Lax',
};
}
/**
* Set the default cookie parameters for all subsequent "set" and "remove" calls.
*
* @param {Object} options
*/
setDefaults(options) {
if (typeof options !== 'object') {
throw new Error('Cookie defaults must be provided as an object');
}
Object.entries(options).forEach((entry) => {
const [key, value] = entry;
if (this.defaults[key] !== undefined) {
this.defaults[key] = value;
}
});
}
/**
* Get the current default cookie parameters.
*
* @returns {Object}
*/
getDefaults() {
const defaults = {};
Object.entries(this.defaults).forEach((entry) => {
const [key, value] = entry;
if (this.defaults[key] !== null) {
defaults[key] = value;
}
});
return defaults;
}
/**
* Get a cookie by name.
*
* If `name` is undefined, returns all cookies as an Object.
*
* @param {String} name
* @returns {Object|String}
*/
get(name) {
if (name === undefined) {
const cookies = BaseCookie.get();
Object.entries(cookies).forEach((entry) => {
const [cookieName, cookieValue] = entry;
this.snowboard.globalEvent('cookie.get', cookieName, cookieValue, (newValue) => {
cookies[cookieName] = newValue;
});
});
return cookies;
}
let value = BaseCookie.get(name);
// Allow plugins to override the gotten value
this.snowboard.globalEvent('cookie.get', name, value, (newValue) => {
value = newValue;
});
return value;
}
/**
* Set a cookie by name.
*
* You can specify additional cookie parameters through the "options" parameter.
*
* @param {String} name
* @param {String} value
* @param {Object} options
* @returns {String}
*/
set(name, value, options) {
let saveValue = value;
// Allow plugins to override the value to save
this.snowboard.globalEvent('cookie.set', name, value, (newValue) => {
saveValue = newValue;
});
return BaseCookie.set(name, saveValue, {
...this.getDefaults(),
...options,
});
}
/**
* Remove a cookie by name.
*
* You can specify the additional cookie parameters via the "options" parameter.
*
* @param {String} name
* @param {Object} options
* @returns {void}
*/
remove(name, options) {
BaseCookie.remove(name, {
...this.getDefaults(),
...options,
});
}
}

View File

@@ -0,0 +1,395 @@
import Singleton from '../abstracts/Singleton';
/**
* JSON Parser utility.
*
* This utility parses JSON-like data that does not strictly meet the JSON specifications in order to simplify development.
* It is a safe replacement for JSON.parse(JSON.stringify(eval("({" + value + "})"))) that does not require the use of eval()
*
* @author Ayumi Hamasaki
* @author Ben Thomson <git@alfreido.com>
* @see https://github.com/octobercms/october/pull/4527
*/
export default class JsonParser extends Singleton {
construct() {
// Add to global function for backwards compatibility
window.wnJSON = (json) => this.parse(json);
window.ocJSON = window.wnJSON;
}
parse(str) {
const jsonString = this.parseString(str);
return JSON.parse(jsonString);
}
parseString(value) {
let str = value.trim();
if (!str.length) {
throw new Error('Broken JSON object.');
}
let result = '';
let type = null;
let key = null;
let body = '';
/*
* the mistake ','
*/
while (str && str[0] === ',') {
str = str.substr(1);
}
/*
* string
*/
if (str[0] === '"' || str[0] === '\'') {
if (str[str.length - 1] !== str[0]) {
throw new Error('Invalid string JSON object.');
}
body = '"';
for (let i = 1; i < str.length; i += 1) {
if (str[i] === '\\') {
if (str[i + 1] === '\'') {
body += str[i + 1];
} else {
body += str[i];
body += str[i + 1];
}
i += 1;
} else if (str[i] === str[0]) {
body += '"';
return body;
} else if (str[i] === '"') {
body += '\\"';
} else {
body += str[i];
}
}
throw new Error('Invalid string JSON object.');
}
/*
* boolean
*/
if (str === 'true' || str === 'false') {
return str;
}
/*
* null
*/
if (str === 'null') {
return 'null';
}
/*
* number
*/
const num = Number(str);
if (!Number.isNaN(num)) {
return num.toString();
}
/*
* object
*/
if (str[0] === '{') {
type = 'needKey';
key = null;
result = '{';
for (let i = 1; i < str.length; i += 1) {
if (this.isBlankChar(str[i])) {
/* eslint-disable-next-line */
continue;
}
if (type === 'needKey' && (str[i] === '"' || str[i] === '\'')) {
key = this.parseKey(str, i + 1, str[i]);
result += `"${key}"`;
i += key.length;
i += 1;
type = 'afterKey';
} else if (type === 'needKey' && this.canBeKeyHead(str[i])) {
key = this.parseKey(str, i);
result += '"';
result += key;
result += '"';
i += key.length - 1;
type = 'afterKey';
} else if (type === 'afterKey' && str[i] === ':') {
result += ':';
type = ':';
} else if (type === ':') {
body = this.getBody(str, i);
i = i + body.originLength - 1;
result += this.parseString(body.body);
type = 'afterBody';
} else if (type === 'afterBody' || type === 'needKey') {
let last = i;
while (str[last] === ',' || this.isBlankChar(str[last])) {
last += 1;
}
if (str[last] === '}' && last === str.length - 1) {
while (result[result.length - 1] === ',') {
result = result.substr(0, result.length - 1);
}
result += '}';
return result;
}
if (last !== i && result !== '{') {
result += ',';
type = 'needKey';
i = last - 1;
}
}
}
throw new Error(`Broken JSON object near ${result}`);
}
/*
* array
*/
if (str[0] === '[') {
result = '[';
type = 'needBody';
for (let i = 1; i < str.length; i += 1) {
if (str[i] === ' ' || str[i] === '\n' || str[i] === '\t') {
/* eslint-disable-next-line */
continue;
} else if (type === 'needBody') {
if (str[i] === ',') {
result += 'null,';
/* eslint-disable-next-line */
continue;
}
if (str[i] === ']' && i === str.length - 1) {
if (result[result.length - 1] === ',') {
result = result.substr(0, result.length - 1);
}
result += ']';
return result;
}
body = this.getBody(str, i);
i = i + body.originLength - 1;
result += this.parseString(body.body);
type = 'afterBody';
} else if (type === 'afterBody') {
if (str[i] === ',') {
result += ',';
type = 'needBody';
// deal with mistake ","
while (str[i + 1] === ',' || this.isBlankChar(str[i + 1])) {
if (str[i + 1] === ',') {
result += 'null,';
}
i += 1;
}
} else if (str[i] === ']' && i === str.length - 1) {
result += ']';
return result;
}
}
}
throw new Error(`Broken JSON array near ${result}`);
}
return '';
}
getBody(str, pos) {
let body = '';
// parse string body
if (str[pos] === '"' || str[pos] === '\'') {
body = str[pos];
for (let i = pos + 1; i < str.length; i += 1) {
if (str[i] === '\\') {
body += str[i];
if (i + 1 < str.length) {
body += str[i + 1];
}
i += 1;
} else if (str[i] === str[pos]) {
body += str[pos];
return {
originLength: body.length,
body,
};
} else {
body += str[i];
}
}
throw new Error(`Broken JSON string body near ${body}`);
}
// parse true / false
if (str[pos] === 't') {
if (str.indexOf('true', pos) === pos) {
return {
originLength: 'true'.length,
body: 'true',
};
}
throw new Error(`Broken JSON boolean body near ${str.substr(0, pos + 10)}`);
}
if (str[pos] === 'f') {
if (str.indexOf('f', pos) === pos) {
return {
originLength: 'false'.length,
body: 'false',
};
}
throw new Error(`Broken JSON boolean body near ${str.substr(0, pos + 10)}`);
}
// parse null
if (str[pos] === 'n') {
if (str.indexOf('null', pos) === pos) {
return {
originLength: 'null'.length,
body: 'null',
};
}
throw new Error(`Broken JSON boolean body near ${str.substr(0, pos + 10)}`);
}
// parse number
if (str[pos] === '-' || str[pos] === '+' || str[pos] === '.' || (str[pos] >= '0' && str[pos] <= '9')) {
body = '';
for (let i = pos; i < str.length; i += 1) {
if (str[i] === '-' || str[i] === '+' || str[i] === '.' || (str[i] >= '0' && str[i] <= '9')) {
body += str[i];
} else {
return {
originLength: body.length,
body,
};
}
}
throw new Error(`Broken JSON number body near ${body}`);
}
// parse object
if (str[pos] === '{' || str[pos] === '[') {
const stack = [
str[pos],
];
body = str[pos];
for (let i = pos + 1; i < str.length; i += 1) {
body += str[i];
if (str[i] === '\\') {
if (i + 1 < str.length) {
body += str[i + 1];
}
i += 1;
} else if (str[i] === '"') {
if (stack[stack.length - 1] === '"') {
stack.pop();
} else if (stack[stack.length - 1] !== '\'') {
stack.push(str[i]);
}
} else if (str[i] === '\'') {
if (stack[stack.length - 1] === '\'') {
stack.pop();
} else if (stack[stack.length - 1] !== '"') {
stack.push(str[i]);
}
} else if (stack[stack.length - 1] !== '"' && stack[stack.length - 1] !== '\'') {
if (str[i] === '{') {
stack.push('{');
} else if (str[i] === '}') {
if (stack[stack.length - 1] === '{') {
stack.pop();
} else {
throw new Error(`Broken JSON ${(str[pos] === '{' ? 'object' : 'array')} body near ${body}`);
}
} else if (str[i] === '[') {
stack.push('[');
} else if (str[i] === ']') {
if (stack[stack.length - 1] === '[') {
stack.pop();
} else {
throw new Error(`Broken JSON ${(str[pos] === '{' ? 'object' : 'array')} body near ${body}`);
}
}
}
if (!stack.length) {
return {
originLength: i - pos,
body,
};
}
}
throw new Error(`Broken JSON ${(str[pos] === '{' ? 'object' : 'array')} body near ${body}`);
}
throw new Error(`Broken JSON body near ${str.substr((pos - 5 >= 0) ? pos - 5 : 0, 50)}`);
}
parseKey(str, pos, quote) {
let key = '';
for (let i = pos; i < str.length; i += 1) {
if (quote && quote === str[i]) {
return key;
}
if (!quote && (str[i] === ' ' || str[i] === ':')) {
return key;
}
key += str[i];
if (str[i] === '\\' && i + 1 < str.length) {
key += str[i + 1];
i += 1;
}
}
throw new Error(`Broken JSON syntax near ${key}`);
}
canBeKeyHead(ch) {
if (ch[0] === '\\') {
return false;
}
if ((ch[0] >= 'a' && ch[0] <= 'z') || (ch[0] >= 'A' && ch[0] <= 'Z') || ch[0] === '_') {
return true;
}
if (ch[0] >= '0' && ch[0] <= '9') {
return true;
}
if (ch[0] === '$') {
return true;
}
if (ch.charCodeAt(0) > 255) {
return true;
}
return false;
}
isBlankChar(ch) {
return ch === ' ' || ch === '\n' || ch === '\t';
}
}

View File

@@ -0,0 +1,64 @@
import Singleton from '../abstracts/Singleton';
/**
* Sanitizer utility.
*
* Client-side HTML sanitizer designed mostly to prevent self-XSS attacks.
* The sanitizer utility will strip all attributes that start with `on` (usually JS event handlers as attributes, i.e. `onload` or `onerror`) or contain the `javascript:` pseudo protocol in their values.
*
* @author Ben Thomson <git@alfreido.com>
*/
export default class Sanitizer extends Singleton {
construct() {
// Add to global function for backwards compatibility
window.wnSanitize = (html) => this.sanitize(html);
window.ocSanitize = window.wnSanitize;
}
sanitize(html, bodyOnly) {
const parser = new DOMParser();
const dom = parser.parseFromString(html, 'text/html');
const returnBodyOnly = (bodyOnly !== undefined && typeof bodyOnly === 'boolean')
? bodyOnly
: true;
this.sanitizeNode(dom.getRootNode());
return (returnBodyOnly) ? dom.body.innerHTML : dom.innerHTML;
}
sanitizeNode(node) {
if (node.tagName === 'SCRIPT') {
node.remove();
return;
}
this.trimAttributes(node);
const children = Array.from(node.children);
children.forEach((child) => {
this.sanitizeNode(child);
});
}
trimAttributes(node) {
if (!node.attributes) {
return;
}
for (let i = 0; i < node.attributes.length; i += 1) {
const attrName = node.attributes.item(i).name;
const attrValue = node.attributes.item(i).value;
/*
* remove attributes where the names start with "on" (for example: onload, onerror...)
* remove attributes where the value starts with the "javascript:" pseudo protocol (for example href="javascript:alert(1)")
*/
/* eslint-disable-next-line */
if (attrName.indexOf('on') === 0 || attrValue.indexOf('javascript:') === 0) {
node.removeAttribute(attrName);
}
}
}
}

View File

@@ -0,0 +1,165 @@
import Singleton from '../abstracts/Singleton';
/**
* URL utility.
*
* This utility provides URL functions.
*
* @copyright 2022 Winter.
* @author Ben Thomson <git@alfreido.com>
*/
export default class Url extends Singleton {
construct() {
this.foundBaseUrl = null;
this.foundAssetUrl = null;
this.baseUrl();
this.assetUrl();
}
/**
* Gets a URL based on a relative path.
*
* If an absolute URL is provided, it will be returned unchanged.
*
* @param {string} url
* @returns {string}
*/
to(url) {
const urlRegex = /^(?:[^:]+:\/\/)[-a-z0-9@:%._+~#=]{1,256}\b([-a-z0-9()@:%_+.~#?&//=]*)/i;
if (url.match(urlRegex)) {
return url;
}
const theUrl = url.replace(/^\/+/, '');
return `${this.baseUrl()}${theUrl}`;
}
/**
* Gets an Asset URL based on a relative path.
*
* If an absolute URL is provided, it will be returned unchanged.
*
* @param {string} url
* @returns {string}
*/
asset(url) {
const urlRegex = /^(?:[^:]+:\/\/)[-a-z0-9@:%._+~#=]{1,256}\b([-a-z0-9()@:%_+.~#?&//=]*)/i;
if (url.match(urlRegex)) {
return url;
}
const theUrl = url.replace(/^\/+/, '');
return `${this.assetUrl()}${theUrl}`;
}
/**
* Helper method to get the base URL of this install.
*
* This determines the base URL from three sources, in order:
* - If Snowboard is loaded via the `{% snowboard %}` tag, it will retrieve the base URL that
* is automatically included there.
* - If a `<base>` tag is available, it will use the URL specified in the base tag.
* - Finally, it will take a guess from the current location. This will likely not work for sites
* that reside in subdirectories.
*
* The base URL will always contain a trailing backslash.
*
* @returns {string}
*/
baseUrl() {
if (this.foundBaseUrl !== null) {
return this.foundBaseUrl;
}
if (document.querySelector('script[data-module="snowboard-base"]') !== null) {
this.foundBaseUrl = this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl);
return this.foundBaseUrl;
}
if (document.querySelector('base') !== null) {
this.foundBaseUrl = this.validateBaseUrl(document.querySelector('base').getAttribute('href'));
return this.foundBaseUrl;
}
const urlParts = [
window.location.protocol,
'//',
window.location.host,
'/',
];
this.foundBaseUrl = urlParts.join('');
return this.foundBaseUrl;
}
/**
* Helper method to get the asset URL of this install.
*
* This determines the base URL from three sources, in order:
* - If Snowboard is loaded via the `{% snowboard %}` tag, it will retrieve the asset URL that
* is automatically included there.
* - If a `<link rel="asset_url" href="https://example.com">` tag is available, it will use the URL specified in the link tag.
* - Finally, it will take a guess from the current location. This will likely not work for sites
* that reside in subdirectories.
*
* The asset URL will always contain a trailing backslash.
*
* @returns {string}
*/
assetUrl() {
if (this.foundAssetUrl !== null) {
return this.foundAssetUrl;
}
if (document.querySelector('script[data-module="snowboard-base"]') !== null) {
this.foundAssetUrl = this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.assetUrl);
return this.foundAssetUrl;
}
if (document.querySelector('link[rel="asset_url"]') !== null) {
this.foundAssetUrl = this.validateBaseUrl(document.querySelector('link[rel="asset_url"]').getAttribute('href'));
return this.foundAssetUrl;
}
const urlParts = [
window.location.protocol,
'//',
window.location.host,
'/',
];
this.foundAssetUrl = urlParts.join('');
return this.foundAssetUrl;
}
/**
* Validates the base URL, ensuring it is a HTTP/HTTPs URL.
*
* If the Snowboard script or <base> tag on the page use a different type of URL, this will fail with
* an error.
*
* @param {string} url
* @returns {string}
*/
validateBaseUrl(url) {
const urlRegex = /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i;
const urlParts = urlRegex.exec(url);
const protocol = urlParts[2];
const domain = urlParts[4];
if (protocol && ['http', 'https'].indexOf(protocol.toLowerCase()) === -1) {
throw new Error('Invalid base URL detected');
}
if (!domain) {
throw new Error('Invalid base URL detected');
}
return (url.substr(-1) === '/')
? url
: `${url}/`;
}
}

View File

@@ -0,0 +1,27 @@
/*
* Details page
*/
+function ($) { "use strict";
var UpdateDetails = function () {
this.init()
}
UpdateDetails.prototype.init = function() {
$(document).ready(function() {
$('.plugin-details-content pre').addClass('prettyprint')
prettyPrint()
})
}
if ($.wn === undefined)
$.wn = {}
if ($.oc === undefined)
$.oc = $.wn
$.wn.updateDetails = new UpdateDetails;
}(window.jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,159 @@
/*
* Updates class
*
* Dependences:
* - Waterfall plugin (waterfall.js)
*/
+function ($) { "use strict";
var UpdateProcess = function () {
// Init
this.init()
}
UpdateProcess.prototype.init = function() {
var self = this
this.activeStep = null
this.updateSteps = null
}
UpdateProcess.prototype.check = function() {
var $form = $('#updateForm'),
self = this
$form.request('onCheckForUpdates').done(function() {
self.evalConfirmedUpdates()
})
$form.on('change', '[data-important-update-select]', function() {
var $el = $(this),
selectedValue = $el.val(),
$updateItem = $el.closest('.update-item')
$updateItem.removeClass('item-danger item-muted item-success')
if (selectedValue == 'confirm') {
$updateItem.addClass('item-success')
}
else if (selectedValue == 'ignore' || selectedValue == 'skip') {
$updateItem.addClass('item-muted')
}
else {
$updateItem.addClass('item-danger')
}
self.evalConfirmedUpdates()
})
}
UpdateProcess.prototype.evalConfirmedUpdates = function() {
var $form = $('#updateForm'),
hasConfirmed = false
$('[data-important-update-select]', $form).each(function() {
if ($(this).val() == '') {
hasConfirmed = true
}
})
if (hasConfirmed) {
$('#updateListUpdateButton').prop('disabled', true)
$('#updateListImportantLabel').show()
}
else {
$('#updateListUpdateButton').prop('disabled', false)
$('#updateListImportantLabel').hide()
}
}
UpdateProcess.prototype.execute = function(steps) {
this.updateSteps = steps
this.runUpdate()
}
UpdateProcess.prototype.runUpdate = function(fromStep) {
$.waterfall.apply(this, this.buildEventChain(this.updateSteps, fromStep))
.fail(function(reason){
var
template = $('#executeFailed').html(),
html = Mustache.to_html(template, { reason: reason })
$('#executeActivity').hide()
$('#executeStatus').html(html)
})
}
UpdateProcess.prototype.retryUpdate = function() {
$('#executeActivity').show()
$('#executeStatus').html('')
this.runUpdate(this.activeStep)
}
UpdateProcess.prototype.buildEventChain = function(steps, fromStep) {
var self = this,
eventChain = [],
skipStep = fromStep ? true : false
$.each(steps, function(index, step){
if (step == fromStep) {
skipStep = false
}
if (skipStep) {
return true // Continue
}
eventChain.push(function(){
var deferred = $.Deferred()
self.activeStep = step
self.setLoadingBar(true, step.label)
$.request('onExecuteStep', {
data: step,
success: function(data){
setTimeout(function() { deferred.resolve() }, 600)
if (step.code == 'completeUpdate' || step.code == 'completeInstall')
this.success(data)
else
self.setLoadingBar(false)
},
error: function(data){
self.setLoadingBar(false)
deferred.reject(data.responseText)
}
})
return deferred
})
})
return eventChain
}
UpdateProcess.prototype.setLoadingBar = function(state, message) {
var loadingBar = $('#executeLoadingBar'),
messageDiv = $('#executeMessage')
if (state)
loadingBar.removeClass('bar-loaded')
else
loadingBar.addClass('bar-loaded')
if (message)
messageDiv.text(message)
}
if ($.wn === undefined)
$.wn = {}
if ($.oc === undefined)
$.oc = $.wn
$.wn.updateProcess = new UpdateProcess;
}(window.jQuery);