PATH:
usr
/
local
/
jetapps
/
frontend
/
jetbackup
/
app
/
services
'use strict'; define(['app'], function (app) { app.factory('lang', ["$i18next", "$location", function ($i18next, $location) { var date_formats = { short: "D MMM YYYY", shorttime: "D MMM YYYY hh:mm A", long: "ddd, MMM D, YYYY", longtime: "ddd, MMM D, YYYY, hh:mm A" }; return { _ns: '', setNS: function(ns, scope) { var self = this; self._ns = ns; if(scope !== undefined) { scope.$on('$destroy', function() { self.resetNS(); }); } }, resetNS: function() { this._ns = ''; }, initNS: function(defaultNS) { var ns = $location.path(); var parts = ns.split('/'); ns = parts[1]; if(!ns && defaultNS !== undefined) ns = defaultNS; if(!ns) return; $i18next.loadNamespaces(ns); $i18next.setDefaultNamespace(ns); }, t: function() { var args = []; for(var key in arguments) args.push(arguments[key]); var sprintf = args.slice(1); var text = (this._ns ? this._ns + "|:|" : '') + args[0]; if(!sprintf.length) return $i18next.t(text); return $i18next.t(text, { postProcess: 'sprintf', sprintf: sprintf }); }, d: function (time, format) { var date = moment(time); if(window.PAGE.info.utcOffset) date.utcOffset(window.PAGE.info.utcOffset); if(date_formats[format] !== undefined) return date.format(date_formats[format]); return date.format(date_formats.longtime); } }; }]); });
[-] utils.js
[edit]
[+]
..
[-] lang.js
[edit]
[-] jetapi.js
[edit]
[-] consts.js
[edit]
[-] storage.js
[edit]
[-] meta.js
[edit]
[-] backup.js
[edit]